I hope this is the correct forum to ask this in... I have a couple of simple questions that I don't know the answer to. First: is the "vin" pin on the Arduino UNO the same as the 5v pin? I am not sure when or if to use it in a project. Second: Is an "H bridge" only necessary to be used with a dc motor to allow it to go forward and backward? I am trying to build a remote controlled car using ir and don't want to modify my servos for continuous rotation. I figured I would use dc motors but I thought I needed to use them in conjunction with an h bridge for motor control and a transistor and external power supply. Third: When using an external power supply, how do you determine how much you need. I have 2 motors that are rated for 4.6 - 6.0 volts dc (I think). If I connect up 4 AA batteries in a battery pack which provides me with 6v (1.5x4) is that enough? Also when isn't that enough (if I add another motor?) Thanks for your time in reading and responding to this. Shawn.

"First: is the "vin" pin on the Arduino UNO the same as the 5v pin? " No, Vin is the input to the 5V regulator, after the reverse polarity protection diode. "Second: Is an "H bridge" only necessary to be used with a dc motor to allow it to go forward and backward?" Yes. Can be done with relays if direction is only changed "occasionally", or electronic (transistors) if PWM is to be used for speed control. Or a combination - relay for direction, and transistor connecting to power supply - (or Gnd) for speed control. Power supply for motors: need enough current at rated voltage to overcome motor's stall current to get it moving. So just voltage isn't enough - current is bigger part of the picture.

Thank you. So when would I need to use the "vin" pin? Also are you saying that if I have say 3 dc motors rated at 4.8 - 6v dc, that I need to pay attention to the amps of each motor and make sure I have enough external power to cover the amps? So if I had 6AA batteries which would be 9 vdc (more than the 4.8-6v required by the motors) but the amps were right then this is what I should use? Would you have a schematic/resource which details what you are suggesting? I do much better visually :) Thank you very much!

"So when would I need to use the “vin” pin? "
When you don’t have a barrel plug to bring power into the barrel jack.
When your input voltage is a little too low to overcome the diode and provide enough drop across the regulator.
When you want to tap the incoming voltage to power something higher than 5V- but be aware the diode is only rated for 1A.
“3 dc motors” - yes, need to supply enough current. If motors are rated 4.8-6V, why would you supply 9V? Just use larger 1.5V batteries (lantern battery, C cells, D Cells, etc). If you supply too high a voltage they could burn out, or spin too fast(?).
What are you trying to accomplish? That will lead to a better schematic.

A cheap digital multimeter is an indispensable tool for Arduino developers. With it you could quickly measure the voltage on Vin and see that it is above 5v.

And if you try to use a battery or other power supply that provides the correct voltage when open-circuit but cannot provide enough current you can measure the significant voltage drop when the load is applied.


I'm using this to experiment with motors, it will accept PWM input on either of the two pins for each motor, with the other pin set to LOW it works well with just a bit of simple coding that is easy to work out.

The motor power does not come from the Arduino, if you look at the datasheet and usage instructions for the DRV8833 you can easily see how it works. even if you don't buy it it's worth reading the blurbs.

Worth getting one and experimenting at that price, though you have to solder the header pins on yourself (or get a mate to do it!)

NB it connects differently to the L293Dmentioned in the Arduino Cookbook but the principle is the same.

Thanks folks! Ok another silly question. What is the easiest way to post a pic in this forum. When I have tried to do it in the past it ends up huge. I would like to post a pic of my current project so it's easier to convey my intentions. Thanks.

You have to resize your photo in your own computer before you post it. Any decent image processing package will do that.

Hi, Windows Paint has a resize function that will make them smaller.

Tom.... :)

Try posting with img & /img tags, like from another website

Or use Attachment below the Reply box, browse to your locally stored file and Attach one.

Thanks folks! Ok I am still trying to wrap my head around this concept... I would like someone to explain to me in the simplest of terms when I would need to use a transistor and when I would need to use a relay. Also is there a situation where I would need to use both? My understanding is that if I am using a servo of any size, I can connect the control wire to the arduino but the positive and negative leads go to an external power source. I also have to make sure to connect the ground of the power supply and the ground of the arduino together. When I am using a dc motor/stepper motor, etc. (without a control wire) I need to either use an h-bridge (does that come integrated with a motor controller (for control) that I can connect my external power to?) or a transistor to just make it run without any control. I'm not sure which transistor to use. I'm also not sure when to use a relay instead of a transistor... I'm so frustrated! Please try to remember when you first got into this world and didn't really know anything :) I'm trying. Thanks!