0
\$\begingroup\$

DRV8834 Circuit connectionI am using DRV8834 IC driver to run the 5v stepper motor. I've managed to run the 5v stepper motor using DRV8834 IC by using a breadboard. But I've found we need 3 pins (Step, Direction and enable) to enable and step the device. I came to know that by making the enable pin to high makes the driver disable where there is no power consumption in the whole system.

But the requirement is only to use 2 pins (step and direction). If I don't control the enable pin via microcontroller then the driver and motor (whole system) consume 50mA. I have to find a solution where the driver and motor shouldn't consume any power until enable line receives the step output pulse from the microcontroller.Also, the step output will always stop in the low state. Is there any idea you can help me with to use any MOSFET/any other idea/pulse stretcher to control the power consumption without using the enable pin? Please let me know if you guys got an idea. Your help is much appreciated.


Update to clarify @Transistor's answer.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 1
    \$\begingroup\$ Welcome to EE.SE. (1) Please add a schematic diagram. If you are using a screenshot then please turn of the grid for legibility. There is a schematic button on the editor toolbar. (2) "... motor consume tiny power." Please edit your question to make it clear whether tiny power is OK or not. ("Tiny power" should be replaced by a measurement - amps or watts.) (3) Can you guarantee that the step output will always stop in the same state (either high or low)? Put all the information in your question. \$\endgroup\$ – Transistor Oct 19 '17 at 10:41
  • \$\begingroup\$ Your edit has addressed point (2). What about (1) and (3)? I numbered them so you couldn't forget! \$\endgroup\$ – Transistor Oct 19 '17 at 11:14
  • \$\begingroup\$ did you get enough information for you to answer my question? \$\endgroup\$ – Dhinesh Oct 19 '17 at 13:10
2
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. SLEEP control.

How it works:

  • When STEP goes low D1 discharges C1. Q2 turns off and R2 pulls /SLEEP high enabling the output.
  • When STEP stops high C1 charges through R1, Q2 turns on and the stepper goes into sleep mode.
  • C1 can only be discharged to about 0.5 V with D1 and that would tend to turn on Q2. Adding D2 prevents this happening (hopefully).

Choose C1 so that R1 x C1 is the time delay you require.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ I believe he may need to use /ENABLE instead of /SLEEP. Page 19 of the DRV8834 datasheet indicates that sleep resets the internal logic and "returns the indexer to the home state". Of course that will need a logic inversion. \$\endgroup\$ – Tut Oct 19 '17 at 12:50
  • \$\begingroup\$ Thanks for your help! Yes, I have to use /Enable line instead of /Sleep line. Sorry I have mentioned wrong as the step output always stays low. Will this circuit still works?. Sorry for the confusion. \$\endgroup\$ – Dhinesh Oct 19 '17 at 14:04
  • 1
    \$\begingroup\$ Sorry, Dhinesh. I answered your original question. You provided incorrect information. You should be able to modify my solution to give the required signal for your new specification. I have shown how to draw the timing waveforms. \$\endgroup\$ – Transistor Oct 19 '17 at 14:21
  • \$\begingroup\$ @Dhinesh ... Note that this circuit was designed to your original specification that the step output always stops in the high state. You will need to take that into account and you need to be more careful providing information that is material to the design. \$\endgroup\$ – Tut Oct 19 '17 at 14:48
  • 1
    \$\begingroup\$ @Trevor: That's an excellent suggestion. To be more precise - use EITHER rather than both. If either STEP or DIR is toggling then ENABLE. If not then disable after a time. \$\endgroup\$ – Transistor Oct 19 '17 at 19:41
0
\$\begingroup\$

Expanding on Transistor's answer, this circuit monitors both the DIR and the STEP lines for rising edges and will turn off the sleep signal for a period set by the values or C2 and R3.

R1,C1, R2 act as a high pass filter to turn on Q1 on rising edges of the XOR gate for a short period. This charges C2 down to the ground rail. R3 discharges C2 back up to Vcc. M1 will turn on when the voltage decays back up to Vgs.

Being edge triggered the micro has to actually toggle something to keep it alive. When holding, toggle the DIR line both directions before the RC timer times out. When running the step signal "should" keep it awake naturally.

schematic

simulate this circuit – Schematic created using CircuitLab

The XOR could be replaced with discrete parts, but take care not to distort the DIR and STEP signals.

|improve this answer|||||
\$\endgroup\$
0
\$\begingroup\$

Here is a different solution based on the assumption that you can make the micro outputs high impedance.

schematic

simulate this circuit – Schematic created using CircuitLab

Note each signal line is biased to half rail when the output from the micro is high impedance. These biased signals are then fed to two window comparators in a quad LM339. The biased signals are then compared with 1/3 and 2/3 rail voltages and the outputs orred together with diodes and the pull down. If any of them are outside the gray logic range the sleep signal is deactivated.

Since DIR and STEP change states at different times, there should be no time that both are transitioning through the grey logic area at the same time, so this configuration should work.

This means you can put the driver to sleep just by changing the configuration of the outputs to high impedance.

You could do a similar thing with four opto-couplers if you have the drive for the LEDs.

schematic

simulate this circuit

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.