Society of Robots - Robot Forum
Mechanics and Construction => Mechanics and Construction => Topic started by: leebleleeble on June 16, 2008, 11:18:25 PM
-
i just started working with microcontollers and bought a BASIC Stamp to begin learning how. I have some extra motors lying around but when i try and add them to my breadboard they don't work. Also, some of the LEDs don't work either. Anyone know what i'm doing wrong?
-
My guess is that no one has any idea what you're doing wrong because you haven't told us any details about what you've done. For example, can you describe how you have your LEDs connected? And what are you using to drive your motors? I can envision around 500 things that you could be doing wrong so it would help me greatly if you could narrow the scope some rather than my having to list them all first.
- Ben
-
you can't add motors directly to a microcontroller (like BASIC stamp). ucs supply little current. it's like connecting stage lightning to a 1.5V battery. If the LEDs don't work when tested separately, throw them away.
If you connect them to the BASIC stamp, you will have to program it before they will do something.
-
I'm just trying to connect the motor into the breadboard and have it run. I'm using a BASIC stamp so i just ran a resistor from P14 over to the Vdd side at P14 and put an LED from there into Vdd's terminal thing. However, when i try to do this using a motor it won't budge. Do i need to use a transistor or something? I'm a beginner so sorry for not giving precise details.
-
basically i wanna know how to put a motor into my circuit. I have a breadboard, resistors, 2 motors, capacitors and transistors.
-
wiki
-
You will need a motor driver to connect a motor to a microcontroller. Just search for it in this forum and google for more info.
-
dude, let me get this clear for you :P
you can't add motors directly to a microcontroller
read this ten times, and then try to repeat. have a break, do something you enjoy, and then try to repeat again.
if you remember, the next question comes in place.
why, you ask? take a watch or calculator battery, and connect a 100W bulb to it. it doesn't work. that's why motors don't spin from a microcontroller, either. in both cases, they don't have enough power.
now, you say you have transistors. those are switches. you can drive a motor with a transistor, and control the transistor with the microcontroller. but first, plug the motor into your power supply, and check if it works.
then, put a motor pin in +, and the other pin in the drain/collector of the transistor.
put a switch to + on the gate/base. put a resistor between the switch and the base/gate (500-1k)
last, connect a small resistor (1-5ohms) to ground and to source/emitter.
when you push the switch the motor should turn.
now, instead of using the switch, use a microcontroller's pin. That's basically it :P