1
\$\begingroup\$

I'm using a combination of a D type flip flop and an astable 555 to get a 50℅ duty cycle. It's connected to a motor driver (receives an inverted and normal input to determine direction) to turn back and forth.

It's working as described, except that it isn't repeatable. For example, on the first run my motor will turn clockwise then anticlockwise for a few runs, then I'll turn it off. And when I turn it back on, it moves in the opposite direction (I.e. anticlockwise then clockwise).

I'm not that familiar with the D type flip flop and flip flops in general, so I'm wondering if there is a way I can set it to not toggle this way?

\$\endgroup\$
2
  • \$\begingroup\$ What DFF IC are you using? It sounds like its state at reset is indeterminate...thankfully, this is easy to fix. Also, what power supply voltage are you using for the 555 + D flip-flop? \$\endgroup\$ Commented Nov 29, 2016 at 3:13
  • \$\begingroup\$ I'm using a 74LS74, and +5V for the whole setup. \$\endgroup\$ Commented Nov 29, 2016 at 3:19

1 Answer 1

1
\$\begingroup\$

And this is why all sequential circuits need a reset!

Without any external aid, the state of a flip-flop on start up is a...coin flip, basically. This is one reason most flip-flop ICs, and just about all larger sequential (flip-flop-containing) circuits, have a RESET or CLEAR pin.

Fortunately, power-on reset circuits are cheap (the MCP100 is a representative part in TO-92 that costs $0.34 in unit quantities at the time of this writing) and easy to use, as you simply need to hook up power and ground to the chip, and it provides an active-low reset pulse on power-on or a brown-out that can be fed to the RESET or CLEAR pin on your flip-flop chip. (Some other parts use an open drain output that needs a pull-up to the power supply.)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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