0

I have been trying to create a DC motor controller that can do numerous actions with just the use of one button.

Basically when I click it has to go on way, when I click again it has to stop, and again it has to go the other way and vise versa only using one button. I've been attempting this with a D-FLIP-FLOP, but I have encountered multiple problems along the way that have me thinking new ways to solve it. Any ideas to this silly, but funny problem?

Kevin Reid
  • 7,444
  • 1
  • 25
  • 44
Kritix
  • 1

1 Answers1

1

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. A CD4017 decade counter with reset on Q4.

How it works:

  • On each press of SW1 the outputs switch sequentially on Q0, Q1, etc.
  • Q1 is wired to your forward control and Q3 is wired to your reverse control. When Q0 or Q2 is on the motor is off.
  • When Q4 is reached it pulls the reset pin high and resets the count.

Problem: on power-up the counter could be at any state including > 4. A solution to this is shown in my answer to Power circuit with a push button. Alternatively you can feed the reset pin via diodes connected to Q4, 5, 6, 7, 8 and 9 to force a reset should the device power up in one of those states.

Electron
  • 2,066
  • 9
  • 21
Transistor
  • 168,990
  • 12
  • 186
  • 385