Does diodes fail and let current flow either ways?
KE7GKP:
Yes. There are several failure modes including open and shorted.
Usually if a diode fails it is because too much current was passed through it, or too much voltage was applied across it in the reverse direction.
Most modern diodes have a direct bonded connection and fail shorted. Unless so much current flows that it overheats and physically breaks or explodes.
Are you concerned about diode current, or voltage?
I'm just using a standard Arduino 5V voltage and 40mA current. Would that affect the diode?
I'll try to use the diode to prevent current from flowing into the Arduino output pin. It is used to control a motor forwards and backwards. Please refer to the schematic.
What diode do you recommend?
-The power is the output source of the Arduino Uno (5V, 40mA)
-I've drawn that myself.
-It is used to make a motor run either clockwise or counter-clockwise.
-Motor is similar to normal RC car type
-NPN
So any suggestions on the circuit? Does it really works?
Vbe on the transistor is 0.7V. In other words, the transistor pulls the pin outputs down to 0.7V leaving no voltage left to drive the positive side of the motor (and drawing too much current, potentially damaging both transistor and Arduino). You need to add a resistor on the transistor bases.
BUT...
This is not a good way to drive a motor. Most likely you need more current than the pin outputs can deliver, and you also need to protect the Arduino from the high voltages generated inside the motor coils.
The circuit you need is called an H-bridge, and looks like this:
It's a simple circuit, but there are also chips which include all the driver and protection circuitry in a convenient and compact package (eg. SN754410).
And you can get fully assembled motor-driver boards designed for the Arduino, for such as these and others.
http://www.ladyada.net/make/mshield/
Thanks for it!
So can I use the circuit on Bipolar Transistor HBridge Motor Driver - Robot Room instead of H-bridge IC's ?
I'd just add a 1uF capacitor between +V and Gnd, somewhere near the transistors. And where it says 2.2-9.6V, you must use the same voltage as your Arduino. If you're using power from the Arduino-board itself, make sure you don't draw too much current (about 700mA for the Uno, or 400mA if powered via USB).
Hi, here's the schematic diagram for a typical Motor Driver board, often less than $10: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=127
Here's more general Motor Driver Info; http://arduino-info.wikispaces.com/MotorDrivers
Here's the same H-Bridge chip on an Arduino plug-on shield: http://arduino-info.wikispaces.com/ArduinoShieldL298N
DISCLAIMER: Mentioned stuff from my own shop...