555 Astable circuit to Stepper driver. Need to slow the frequency on startup

Thread Starter

Nealieboyee

Joined May 24, 2017
56
Hi All,
I've built a 555 variable frequency astable circuit that provides the pulses for a DRV8825 Stepper motor driver. It works fine except when trying to start it on a higher speed. Obviously there is no acceleration so the stepper just sits there whining. I can give it a hand by spinning the shaft and it works after that, but I'm wondering if there is a change I can make to the 555 circuit to slow down the frequency just for a second so that the motor can start on its own. Maybe an RC circuit or something similar? Any help is appreciated. Thank you.

Here is the circuit I've used.
 

Attachments

Papabravo

Joined Feb 24, 2006
19,300
IMHO the 555 is the wrong way to do what you want to do. As I see it you have at least two choices:
  1. Use a micro controller to generate the required velocity profiles
  2. Design a discrete alternative to the 555 that will allow for acceleration and deceleration by adjusting the frequency rather than the duty cycle of the waveform. This might also be described as a Voltage to Frequency Converter.
There may be other solutions, but those are my top two choices.
 
Last edited:

Alec_t

Joined Sep 17, 2013
13,153
If the 555 output pulse width isn't important you could get a ~2.5:1 frequency variation over that 1 sec period by simply using an RC combo on the CV input of the 555. Would that range be enough?
 

Irving

Joined Jan 30, 2016
3,132
As @Papabravo said, and you have witnessed, a 555 isn't sufficient for full control of a stepper at higher speeds because you are unable to generate sufficient starting torque to overcome the inertia in the system. Stepper motors don't like step changes (pun intended), even when you think they are working ok they are probably skipping steps. Generating a velocity profile is far simpler with a uController, but you could experiment with the CV (control voltage) input on the 555 to modulate the frequency. Doing it while starting (and ideally stopping) is the complex bit...
 

Thread Starter

Nealieboyee

Joined May 24, 2017
56
IMHO the 555 is the wrong way to do what you want to do. As I see it you have at least two choices:
  1. Use a micro controller to generate the required velocity profiles
  2. Design a discrete alternative to the 555 that will allow for acceleration and deceleration by adjusting the frequency rather than the duty cycle of the waveform. This might also be described as a Voltage to Frequency Converter.
There may be other solutions, but those are my top two choices.
I agree, a microcontroller is the way to go, BUT i'm trying to keep it simple with parts I already have. Thanks though.
Ah this quoting system has me stumped sometimes.
 

Thread Starter

Nealieboyee

Joined May 24, 2017
56
As @Papabravo said, and you have witnessed, a 555 isn't sufficient for full control of a stepper at higher speeds because you are unable to generate sufficient starting torque to overcome the inertia in the system. Stepper motors don't like step changes (pun intended), even when you think they are working ok they are probably skipping steps. Generating a velocity profile is far simpler with a uController, but you could experiment with the CV (control voltage) input on the 555 to modulate the frequency. Doing it while starting (and ideally stopping) is the complex bit...
I agree, a microcontroller is the way to go, BUT i'm trying to keep it simple with parts I already have. Thanks though.
If the 555 output pulse width isn't important you could get a ~2.5:1 frequency variation over that 1 sec period by simply using an RC combo on the CV input of the 555. Would that range be enough?
Yeah that should do just fine! May I ask where to put the RC combo exactly? What values?
 

Irving

Joined Jan 30, 2016
3,132
Yeah that should do just fine! May I ask where to put the RC combo exactly? What values?
Its not just an RC combo, you need to apply the control voltage at the right time - your RC will probably be part of an op-amp arrangement that is triggered at startup to provide a triangular voltage pulse to the CV input.

If you look at the 555 internal circuit you will see 3 resistors from VCC to ground, giving voltages of 2/3Vcc (threshold) and 1/3Vcc (trigger). In the astable configuration the main timing capacitor charges to threshold voltage then discharges to the trigger voltage. The CV input connects to the 2/3Vcc point, so applying a voltage here affects both charge and discharge times.

For example, CV is normally 8v. Say the existing Ra, Rb, C combo gives 1kHz, then 6v gives about 1.3kHz and 10v about 674Hz. That should get you started...
 

Alec_t

Joined Sep 17, 2013
13,153
This is the sort of thing I had in mind :-


RampedPulseRate.jpg
You probably need a reverse-biased Schottky diode across R2 to prevent the CV pin going too negative when power is removed from the circuit.
 
Last edited:

crutschow

Joined Mar 14, 2008
30,803
If interested, here's the simulation of Alec_t's circuit showing more plot detail, including the CV voltage (yellow trace), the full 1 second trace, the magnified start of the oscillation, and the magnified oscillation at one second:
Note that it takes about 22mS for the oscillations to start (which should not be a problem in this application).

1661560804644.png
 

Thread Starter

Nealieboyee

Joined May 24, 2017
56
This is the sort of thing I had in mind :-


View attachment 274790
You probably need a reverse-biased Schottky diode across R2 to prevent the CV pin going too negative when power is removed from the circuit.
Ah thanks Alec. I'll have to give that circuit a try. Much appreciated.

If interested, here's the simulation of Alec_t's circuit showing more plot detail, including the CV voltage (yellow trace), the full 1 second trace, the magnified start of the oscillation, and the magnified oscillation at one second:
Note that it takes about 22mS for the oscillations to start (which should not be a problem in this application).

View attachment 274799
Thanks for that Crutschow. I'll play around with it on the breadboard today :)
 

BobTPH

Joined Jun 5, 2013
5,773
Why is this not a problem?

When the capacitor on cv is fully charged, the threshold voltage is the same as supply voltage. Now, the timing capacitor can never be higher than the threshold, so the oscillator stops. Yet the simulation dies not do that.

What am I missing?

Edi: Never mind, the cv starts at supply voltage and goes down from there.
 

Alec_t

Joined Sep 17, 2013
13,153
I've just come across this in Wikipedia, re the 555 :
"For bipolar timers, if this pin [pin 3 of the 555] drives an edge-sensitive input of a digital logic chip, a 100 to 1000 pF decoupling capacitor (between this pin and GND) may need to be added to prevent double triggering.[2]".
I note that the driver chip you are using is rising-edge-triggered, so that added cap may be necessary.
 

Thread Starter

Nealieboyee

Joined May 24, 2017
56
I've just come across this in Wikipedia, re the 555 :
"For bipolar timers, if this pin [pin 3 of the 555] drives an edge-sensitive input of a digital logic chip, a 100 to 1000 pF decoupling capacitor (between this pin and GND) may need to be added to prevent double triggering.[2]".
I note that the driver chip you are using is rising-edge-triggered, so that added cap may be necessary.
Thanks Alec. Just been looking at the schematic you posted again, and I'm trying to figure out how to keep the oscillator frequency variable as I had it before (I could adjust the speed of the stepper motor by changing the 555 frequency). There is no resistor or potentiometer between pin 6 and 7 and no resistor from pin 7 to VCC. The whole astable circuit is drawn differently. Is this because you're now using it as a voltage controlled oscillator?
 

Alec_t

Joined Sep 17, 2013
13,153
The whole astable circuit is drawn differently. Is this because you're now using it as a voltage controlled oscillator?
Apart from the added cap on the CV pin it's a standard circuit (if not the more frequently used 'textbook' circuit). You can replace R1 with a variable resistance (rheostat) to vary the frequency manually, in addition to the variation provided by the CV pin control. As usual with a rheostat, include a series fixed resistor to ensure the total resistance can't be set to zero Ohms.
 
Top