Simple Push Button Issue
NWUpgrades
Posts: 292
OK, So I am obviously having a brain fart on this one. In looking at the Push Button example on page 73 of WAM, I am trying to figure out how to do the same thing with a 3 V DC motor. When I connect power the motor spins and stops spinning when button is pressed. I know it is something simple but that illudes me right now. I have 1k resistor to power then to top of button. Then bottom of button to ground. Any help is greatly appreciated.
Comments
How do you have the motor hooked up?
I do not think it is a power issue. The motor is small enough that even a coin battery will turn it.
If you want to operate the motor when the button is pushed, you connect one end of the motor to ground, the other end of the motor to one terminal of the pushbutton, then you connect the other end of the pushbutton to +3V. That's it. The motor itself will limit the amount of current drawn by producing a "back EMF" that opposes the supply voltage. LEDs don't do that so you have to have a separate current limiting resistor. If you use the diagram in WAM for a pushbutton that provides a signal for a Stamp I/O pin, the 1K resistor limits the current through the pushbutton to some reasonable amount (= 5mA = 5V / 1K) otherwise the pushbutton would act like a short circuit across the power supply.
love the way you describe the back EMF a motor creates that in turn keeps the motors current limit in check. Frankly I never heard it describe so elegantly before and now I can see what it is that use to be foggy.
That said, could a circuit be developed to control the current through a motor by employing a variable inductor in series with the motor? Just asking to clarify, or support. my new found understanding of back EMF.