Hi, I want to power an Arduino Uno board and a DC motor connected to the Arduino with the same custom-built power supply. In this picture the power supply, 6 x AA batteries are connected to the bard (7.2V). Then the Arduino connects to the board and draws power. Can I get a clarification on connecting power to pins without damaging the board?
As I understand it, you can connect up to 12 volts to the external DC power connection (The black cylinder with the square at the end). However, If don't have that connection jack, is it possible to get enough power by just connecting through pins? My power supply is 7.2 volts, is it safe to connect it through the Vin pin? If so, I don't seem to get enough power to run the motor, and the board gets dims down. I tried connecting the 7.2V supply through the 5V pin, and the motor had enough power, but apparently I can damage the board doing that? And then AREF and IOREF, as I understand it, would be a great option for custom voltage power supply's, except they only take up to 5V, just like the 5V pin?
What kind of transistor are you using? Your picture does not show the transistor pin labels (E, B, C), can you draw and post a wiring schematic? If not, thats the very next thing you should learn, it's the language of electronics. Your motor should be connected like this (for an NPN transistor).
Never connect a voltage greater than 5 to the 5V pin, the IOREF pin passes the 5V up to a connected shield, the AREF pin is for connecting an external voltage reference for the AD converter.
Connect your 7.2V batt + to VIN, - to GND, nothing to 5V pin for now.
@outsider It's a IRF520, if that means anything? The one that comes with the starter kit. I'll include a pic at the bottom. Why is it not a good idea to connect the motor directly through the push-button? Is the transistor really necessary?
Thanks you for that pin info, that is very handy. The only reason I tried, is because connecting through the VIN made the board get dim when activating the motor, and the motor didn't have enough power to start itself up, not without a little tug. Connecting + through 5V made everything "work" as I needed it to, but I had a feeling I shouldn't be doing that. Any way to get enough juice while still connecting (7.2V) through the VIN?
@nielyay I think I did connect the negative through the GND on the Arduino. Thankfully, it looks like nothing got damaged, as of yet. Won't be trying it again, though.
IRF520 is not a logic level MOSFET, 5 volts on the gate is not high enough to turn it full ON, you need a IRL520 or other LOGIC LEVEL type. If running the motor "made everything dim", your power supply may not supply enough current for your motor. What are your motor specs?
Connect like this:
The Arduino output pins can pass about 20 mA continuously, enough for an LED or such but not enough for a motor, thats the reason for a transistor "booster".
@outsider The motor I am using is is a (FF-180PA 2955V). Sadly the only other transistor I have is the (BC547). I tried my best to connect everything according to the diagram you provided, integrating it with a push-button. Following the schematic you provided, I feel as though the motor is even weaker than before. I'm very new to this, maybe I made a mistake somewhere? Was your diagram supposed to circumvent my transistor not having enough power, or was it just a better way to connect things if I did happen to have the right transistor?
I believe you would be better off with the IRF520 than the BC547. While the IRF520 is not meant to be controlled by a 5V source I think for your intended use it is definitely the better of the two.
I would suggest you:
Move the two battery connections from the end of the board to the middle of the board.
put the Motor, and Mosfet on one side of the battery connection (but close to the battery connection)
put the Arduino on the other side of the battery connection.
Right now you have your connections spread out over the board. Not the best idea because the board is not an ideal connection.
Sorry I don't have time to draw a diagram right now.
@JohnRob Thank you for your input; i'll give it a try. Is the idea that the motor will have "maximum amount of torque" when it's closest to the battery, and the Arduino will still have enough current to stay powered?
@ianderrick I'm trying to get a motor to open up a door with a light sensor. This was just a way to test if It would work using the same power supply, and then replace the button with a light sensor. Back to the drawing board, I guess!