Here is my "prototype" for driving a small electric motor using one of the Mbed's digital out pins (actually a PWM pin, but that's not important).
The Mbed can only source about 40mA from a single pin, so in order to drive an electric motor, one needs to use a transistor... The only transistor I had lying around were some BC337's, which are pretty normal NPN transistors, but the maximum current they can drive is 800mA... so I used this tool to find out what value resistor I needed on the Base... as the 5v electric motor I use had a resistance of 2.2ohms, I decided to use 400ohm resistor... which, if I've understood everything, will mean the maximum current through the transistor will be 654.5mA... Hooray! That gives me a 145.5mA tolerance for variance in the components :)
See below for a screenshot :)
/media/uploads/bloodline/mycircuit.jpg
-Edit- I've modeled the electric motor as a 2.2ohm resistor with a flyback diode, which I included in my design to protect the transistor from any reverse current off the motor (which I know happens with solenoids... not sure about motors).
Hi all,
I'm not very experienced with electronics, I'm a programmer by trade... which is why I always resort to using a microcontroller whenever I have an electronics project :)
I've noticed that others on this forum also seem to be very new to electronics, so I thought I would share a tool that I used to "prototype" all my electronics designs before I build them for real:
http://www.falstad.com/circuit/
Sadly it does require Java capable browser to run... Anyone here able to port it to Javascript and HTML5 (Then I could run it on my iPad)? I have no Java experience at all...
Anyway, this allows me to check my resistor values are correct without burning out real components... so it's worth using.