Pages: [1]   Go Down
Author Topic: Arduino behaving differently connected vs disconnected  (Read 644 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

first off, i would like to apologize if this doesn't fit in the section. i was not sure where to put it and it seemed like it kind-of fit in here.

i am currently in the process of making an autonomous, gps-guided, robot that can also avoid obstacles. i am using an arduino uno.

the problem i am facing is the robot behaves how i want to to when it is connected to the computer which provides it power. but when i disconnect it and run it on a battery it acts differently. it acts as if the new updated code was never put on it even though i have uploaded it.

i was wondering if anyone has had similar trouble or know what i am be doing wrong. i know this is broad and you may need to know more to help. i am new to this and do not know exactly what to put so if you need anything feel free to ask and i will try to answer as soon as possible.

thanks in advance, chad
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it acts as if the new updated code was never put on it

As if the Uno had it's program memory erased?
Logged

Central Indiana, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 202
So many projects, so little time...and money!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Make sure your supply voltage from the batteries is high enough.  I have a duemilanove and it works fine from USB power, but if I connect to batteries, it behaves strangely if the voltage is less than 7 VDC.  I was using a 4 AA battery pack and it doesn't provide a high enough voltage for the board to operate properly.  With some peripherals it is okay and with others it isn't.  A 9 V battery works well for a short time -- not much capacity.  Try using a larger battery pack.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes, it is almost like the memory was erased. but the code that was uploaded before is still there.

and im using a 9v to power everything (a small servo, gps, sensor and the board so i guess i can give everything its own power? i just didn't think that lack of power would cause it to behave completely different.
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16499
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
and im using a 9v to power everything


A nine volt what? A battery? a AC power adaper (wall wart)? What is the current capacitor of your 9v whatever?

To properly power your project you should research the max current requirements of all the components it is using, and only then do you have the proper information (total current demand) to go about figuring out how to power everything. I have do doubt that power (lack of current capacity) is the root cause of your problem(s).

Lefty
Logged

0
Offline Offline
Tesla Member
***
Karma: 114
Posts: 8908
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When you have your 9v source connected, check the voltage on the 5v pin.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Pages: [1]   Go Up
Jump to: