# RC circuit for linear ramp

by eegeek
Tags: circuit, linear, ramp
 P: 7 Hello! I'm trying to activate a solenoid with a linear ramp in voltage of 0 - 24VDC in 2 seconds. An RC series circuit helps achieve soft start but in an exponential way (with 63% of supply voltage in 1 time constant). Can I use a single circuit for charging and discharging? (linear ramp down also preferred). Ideal ramp down time should be less than 1 second. Trying to figure out if this circuit is possible with resistor/ capacitor elements and without the use of an expensive proportional amplifier. Any help is much appreciated!
P: 834
 Quote by eegeek Hello! I'm trying to activate a solenoid with a linear ramp in voltage of 0 - 24VDC in 2 seconds. An RC series circuit helps achieve soft start but in an exponential way (with 63% of supply voltage in 1 time constant). Can I use a single circuit for charging and discharging? (linear ramp down also preferred). Ideal ramp down time should be less than 1 second. Trying to figure out if this circuit is possible with resistor/ capacitor elements and without the use of an expensive proportional amplifier. Any help is much appreciated!
Hello. A constant current source will charge/discharge an RC circuit to have a linear voltage.
P: 834
Here is a derivation I did for it a while ago.
Attached Files
 linearcharge.pdf (240.6 KB, 52 views)

 P: 7 RC circuit for linear ramp Thanks DragonPetter for the quick response! This equation looks more like the one for RC discharging circuit. And to achieve constant current source, I connect a resistor between voltage source and capacitor?
 P: 1,814 How much is your maximum current?
 P: 7 The coil can take upto about 1.6A..
P: 834
 Quote by eegeek Thanks DragonPetter for the quick response! This equation looks more like the one for RC discharging circuit. And to achieve constant current source, I connect a resistor between voltage source and resistor?
It is for the voltage on a capacitor as it is charged or discharged by a constant current. Forget the R component, I eliminated that when I made the current constant.

One possible way to do what you want is to charge a capacitor up to the desired start voltage, and then to put a current source in series between the capacitor and the solenoid, where the current source's supply is from the capacitor. I don't know what problems you may have doing this in a practical circuit tho. I see a problem in that the voltage at the inductor would be 0 if it is given a constant current, which defeats your goal to have a ramp voltage across the solenoid. You could still use the linear V discharging cap as a reference voltage.
 P: 7 @DragonPetter: You're right. I actually have to use a 8Ω resistor anyway to have a current of 1.6A at the solenoid coil (7Ω) from a 24V DC source. So my circuit currently has a 24V source in series with an 8 ohm resistor, a .056 F capacitor and the coil. Of course linear ramp is difficult here. Don't have much experience with op-amps, will they help?
 HW Helper Thanks P: 5,341 What are you using the solenoid for, eegeek, and why do you want a soft-start?
 P: 7 @NascentOxygen: The solenoid is used for steering a large equipment and a sudden step input might result in jerk resulting from force needed to overcome the moment of inertia (infact an exponential voltage coming from series RC circuit might do the same). Hence the soft start..Do you have a solution?
P: 4,663
 Quote by DragonPetter Hello. A constant current source will charge/discharge an RC circuit to have a linear voltage.
 Quote by DragonPetter Here is a derivation I did for it a while ago.
A true linear voltage ramp requires a linear op amp current integrator. See http://www.wisc-online.com/Objects/V...spx?ID=SSE5303
 PF Gold P: 753 I concur. Cool little display animation with the integrator amp there Bob S. To add to what Bob s is saying: The TRANSFER FUNCTION you are looking for is -1/JωRC. The gain of the amp shown is -RF/RA (1/JωC)/R = -1/JωRC. Test your limits at max frequencies. When ω=0..........gain will be infinite or saturated in steady state.........The time it takes to get there is the RC constant....... When ω=infinity.............gain will equal zero. Reminder: db is 20 log |Gain|........that's how that peske minus sign goes away as far as gain goes.....as far as output voltage, it absolutely plays a part. Look at this (-1/JωRC) in regards to sin and cosine. We know that sin is the intregal of cosine. Take your cosine and flip it across the horizontal acces according to the minus sign in the formula. Now phase shift it -90 according to the J in the denominator. You now have the Sin. To someone smarter than me......Does what I just wrote make sense? I kinda made it up as I went along.....lol.
 P: 7 Thanks all for the helpful replies...
 P: 3,898 A constant current source needed to be use with a capacitor to create a linear ramp. A constant current source can easily be implemented by just a transistor. I still don't quite know what you are trying to do. Do you mean you want to achieve a soft start by using a linear Ramp to ramp the voltage from 0 to 24V across the solenoid to create a soft start. Then when you want to turn off the solenoid, you want to ramp down the voltage to achieve soft turning off? This is a circuit I whipped out quickly and see whether it works for you: I have two constant current source by the PNP and NPN. The PNP is always on. The current is about 3V/R3. The NPN is a switchable current source where it is controlled by the switch on the left. When the switch is closed, the NPN is off so the ramp is generated by the current source of the PNP charging C1. When the switch is open, the NPN current source turns on. R3 is 3 times the value of R4, so current by NPN is 3 times the current of PNP. With that, you achieve charging up at a current called I1, but the discharge current is I2-I1=-2I1. You adjust the ramp by adjust the I1 and C1 to get 2 second ramp up and 1 second ramp down. The N channel enhancement mode MOSFET is the buffer. I use 30V supply to get 24V at the output. I'll let you work out the detail values. Remember the input capacitance of the MOSFET is quite high, so you need to take that into consideration. This is not a precision circuit in any stretch, but it should do what I understand from you post. This is a cheesy circuit, but you are only driving a solenoid!!! The only formula need is C1V=It as it is constant current and ramp is linear( well roughly). R1 and R2 is just to bias the zeners on with very low current. Let me know is that what you want.
P: 834
 Quote by Bob S A true linear voltage ramp requires a linear op amp current integrator. See http://www.wisc-online.com/Objects/V...spx?ID=SSE5303
I see. This is specifically when you want to convert a DC voltage to a ramp voltage, as the integration of a constant is a sloped line? I never thought about using the integrator opamp, but that seems like a really good way to do it.

I believe a constant current charge or discharge from a capacitor also gives a truely linear voltage ramp as well, but in this case you don't use a control voltage, but rather a control current.

http://www.maxim-ic.com/app-notes/index.mvp/id/3655