Hello, I'am new here and I have just got a Arduino UNO for christmas.
With my Arduino I have got a power supply (something like this).
Now I want to install a program on my Arduino UNO that start if you
if you attach the 9V battery to it.
I dont know if this is possible, but it is for a project with no computer or wall socket near it.
ChrisTenone:
That should work just fine. You will need a computer to write and install the program on the Uno though.
Then I think i do something wrong... It doesn't work.. When I run a program with my computer connected with my arduino and disconnect the computer it looks like it is reset or something because it dont do anything..
UKHeliBob:
What is the program supposed to do and how do you know that it is not working ?
What I was trying was to rotate a servo-motor, but my whole project is something that look like a game and if you reach the end you can open the box (a safe with a lock that is a game)
UKHeliBob:
Where on the Arduino did you connect the 9V battery to ?
I connected it to THIS IMAGE (the jackplug) with a connector that looks like THIS
UKHeliBob:
Can you measure the current taken by the Arduino when running on the 9V battery and the battery voltage when it is powering the Arduino ?
How can I do that? I'am a newbee to the world of Arduino
UKHeliBob:
What type of 9V battery is it ? Not a PP3 by any chance ?
Is THIS a PP3 Battery? If so, yes is that very bad?
It's time to show us your code and a circuit diagram. A photograph of a pencil drawing will do for the latter.
By the way, because of the current drawn it is not a good idea to power a servo from the Arduino GND and 5V pins directly but you could use an external power supply of a suitable voltage as long as you connect the GNDs
UKHeliBob:
It's time to show us your code and a circuit diagram. A photograph of a pencil drawing will do for the latter.
By the way, because of the current drawn it is not a good idea to power a servo from the Arduino GND and 5V pins directly but you could use an external power supply of a suitable voltage as long as you connect the GNDs
O.K. that Sweep script works for thousands of people so the problem is very likely to do with either connections or powering things. Neither of your pictures show any form of power connected to anything...so let's go back to basics.
Does the Sweep program move the servo correctly when the Arduino is powered from the USB?
Does it do anything at all when you unplug the USB and connect your 6 x AA cells instead?
What type of servo are you using? Because if it is a large powerful one it will NOT work connected to the Arduino 5V pin (and as UKHeliBob has already said it's a bad idea to power any servos that way).
How exactly are you connecting the servo? If it is via a breadboard then that may be a problem because some breadboards cannot take any relatively high currents like servos use.
Apart from the problem with powering the servo directly from the Arduino, the battery featured in the PM to me (a 9V PP3) is totally unsuited to powering the sevo anyway as it is unable to provide enough current at a suitable voltage for more than a few minutes to power the servo. You need to consider using something beefier such as 6 AA cells in series.
UKHeliBob:
You need to consider using something beefier such as 6 AA cells in series.
Based on post #6 I thought that's what he was using (assuming that at some point that thing actually had the batteries in). Is it just me or is this getting a bit silly?
slipstick:
Based on post #6 I thought that's what he was using
You are quite right, but that was not the power connector referred to in a PM to me. Mind you, having just reviewed it I see that it was from Paul__B although it involved the OP and was about this thread.
slipstick:
O.K. that Sweep script works for thousands of people so the problem is very likely to do with either connections or powering things. Neither of your pictures show any form of power connected to anything...so let's go back to basics.
Does the Sweep program move the servo correctly when the Arduino is powered from the USB?
Does it do anything at all when you unplug the USB and connect your 6 x AA cells instead?
What type of servo are you using? Because if it is a large powerful one it will NOT work connected to the Arduino 5V pin (and as UKHeliBob has already said it's a bad idea to power any servos that way).
How exactly are you connecting the servo? If it is via a breadboard then that may be a problem because some breadboards cannot take any relatively high currents like servos use.
Steve
Yes the Sweep does work if it is connected with my PC.
It doesnt work if i disconnect my pc if it is powerd with my batteries.
If I connect the batterypack, the ON-light goes on