Voltage ramp instead of potentiometer

Discussion in 'Analog & Mixed-Signal Design' started by 2DrTahoe, Aug 14, 2019 at 7:11 PM.

  1. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    Hello All,

    I am in need of replacing a potentiometer with voltage ramp circuit, at least that's what I think I need. I have purchased a PWM controller off ebay to control a 12v fan. The issue is that I want to eliminate the POT and replace it with a circuit that ramps up the voltage as soon as the power is applied and be ready for a second ramp should the power be shut off and then on again. The ramp should be about 3-5 seconds.

    After searching the forums, I found this circuit: https://forum.allaboutcircuits.com/attachments/rampdriver-gif.87260/

    I believe it will do what I need but it looks like the ramp takes 10 seconds. I think to shorten the ramp, R4 would have to reduced by half? And to set up a "restart" there would need to be a pull-down resistor but I think that is what R1 can accomplish?

    Sorry for the newbie descriptions. I'm really good at building and putting things together but electronics is a very weak area for me.

    I would appreciate any help, Thanks.
     
  2. danadak

    Distinguished Member

    Mar 10, 2018
    3,198
    709
    The ramp has to produce what level of peak voltage ?

    Regards, Dana.
     
  3. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    Hi,
    The input voltage will be 12v, so the output should also be 12v.
     
  4. crutschow

    Expert

    Mar 14, 2008
    22,477
    6,579
    I think, for your purposes, an exponential ramp would be acceptable, so just use a RC circuit at the input.
    Try a series resistor of 10kΩ followed by a capacitor to ground of about 270μF.

    Below is the LTspice simulation of the circuit from application of power.

    The diode is to rapidly discharge the capacitor after power is removed, if you want the circuit to recover faster than about 10 seconds after power loss.

    upload_2019-8-14_19-38-12.png
     
  5. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    Awesome, thanks for that! I downloaded LTspice and was able to build and simulate the circuit I had referenced. I changed the R4 resistor to 33 and was able to simulate a 3 second ramp!

    I guess my question now is what would be a better, more reliable circuit? Or, it doesn't matter, simple is better?

    I tried to code and on/off switch in the Sim.....it didn't work out so I don't know how the other circuit behaves when power is removed.
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    9,927
    2,397
    Change your input voltage source from a DC one to a Pulse one with a suitable 'on' time.
     
  7. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    Ok I'll try that, thanks.
     
  8. crutschow

    Expert

    Mar 14, 2008
    22,477
    6,579
    I take my motto paraphrased from Einstein, "Make it as simple as possible, but no simpler".
     
    cmartinez likes this.
  9. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    I tried using a simple Delay Off circuit and removed the coil and could not get pulse to show any delay. It seems a simple switch is overly complicated to make in this program. All it did was pulse on and off no matter how I changed values in both the pulse and circuit.

    [​IMG]
     
  10. crutschow

    Expert

    Mar 14, 2008
    22,477
    6,579
    You have nothing to slow down the charging of the capacitor.
    You need a resistor in series with the diode in front of the capacitor.

    The first circuit should work better for a delay than the second.

    The first circuit does not need a diode in parallel with the relay coil since the inductive transient will just keep the transistor on for the short time of the transient.

    What's the purpose of the diode in series with the transistor?
     
  11. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    I think that in the first one you would want the cap to charge as fast as possible so that there is a fast turn on. When power is off, it bleeds out in only one direction bc of the diode resulting in a "delay off". If I remove the coil, I would need to replace it with a low value resistor to slow down the bleed. I could be wrong since I really have limited knowledge of this stuff. I'll have to try it again tonight.
     
  12. ci139

    Member

    Jul 11, 2016
    417
    56
    Last edited: Aug 16, 2019 at 9:47 AM
  13. crutschow

    Expert

    Mar 14, 2008
    22,477
    6,579
    Yes.
    Scratch what I said.
    I was thinking delay for on, not delay for off. :oops:

    How long a delay do you need?
     
  14. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    Ultimately I need to combine a delay off and a voltage ramp. Delay off can be 7-10 seconds. Ramp can be 3-5 seconds. I was trying to simulate them separately then combine to see if the results work out.
     
  15. crutschow

    Expert

    Mar 14, 2008
    22,477
    6,579
    So what is the exact sequence for the ramp and delay?
     
  16. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    It would be: power on, ramp up, run for how ever long, power off, delay off.
     
  17. crutschow

    Expert

    Mar 14, 2008
    22,477
    6,579
    Do you need the relay you showed in post #9, or just the voltage ramp, with delay off?
    Could the delay off just be a ramp down?
     
  18. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    I was aiming for either the circuit in post 1 or the one you suggested in post 4 and then combine one of those with the delay off circuit. A ramp down to off would also work, it would make a nice touch! I was only using the post 9 circuit to try and get it to work in the sim. The relay isn't needed.
     
    Last edited: Aug 16, 2019 at 1:24 PM
  19. crutschow

    Expert

    Mar 14, 2008
    22,477
    6,579
    Here's a modification to the simple RC circuit.
    You can play with the values of R1 and R2 to adjust the off and on ramp speeds respectively.

    upload_2019-8-16_12-55-32.png
     
  20. 2DrTahoe

    Thread Starter New Member

    Dec 14, 2016
    10
    1
    Dude, That is awesome! Thank you! I'm going to build it in the sim and tweek it a bit. I'll post results.
     
    cmartinez likes this.
Loading...