Main Site Documentation

Current through the Digital IO pins


#1

I am trying to power a DC toy motor directly using the digital output pin on the FEZ Panda, but it’s not working. However, when I plug it in directly into the 5V pin, it works. Do the 5V pin and the digital output pins provide different voltage/currents? Thanks


#2

When it comes to electricity there are two factors. The voltage (Volts) and the current (Amper) that you neglected.
In your case, the DC motors withdraw let’s say 250mA which is considerably too much power than a digital pin can give (10mA maximum). So the motor will not work. and the IO might get damaged.

To handle such case with electronics, they use a driving circuit, this circuit can give the motor what power it needs and at the same time it can be controlled by very little processor power.

The motor driver shield is an example:
http://www.ghielectronics.com/catalog/product/177


#3

I was considering just using a transistor as a switch from the 5V to the motor. Is it worth the money just to control a motor? Would it be hard to fabricate a circuit that does essentially the same thing? I can see problems arising if there’s PWM involved if the components are not fast enough…


#4

You can buy a transistor for pennies on ebay or use this http://www.ghielectronics.com/catalog/product/242
Take out the LED and put your motor instead. There is a tutorial about this but it is not complete http://wiki.tinyclr.com/index.php?title=LED_Strips_%26_Relays


#5

Thank you, yeah I was looking for a cheap solution. But with the motor shield it’s probably a lot easier to control the motor, right?


#6

With the DC motor shield you have the luxury to change the rotation speed the the rotation direction.