I have a sketch that runs fine when it’s powered by USB from the computer. But it will not work properly on external power.
My project has a seeeduino board with the their brick shield on top. I’m using it to read a diffuse reflection IR sensor, and then manipulate a servo. It works fine when it is connected to the computer and receiving power through the USB port. However, I need it to work on battery power. I have the board installed on a 9V harness (seeedstudio’s).
The seeeduino has a mini-switch to choose external or USB power. I select EXT and plug in the battery. It just twitches the servo. Everything I read says that a 9V should be able to power a micro-servo. Another strange thing is it tries to drive it in the wrong direction.
So I used the wall wart and little adapter (available from seeedstudio). It doesn’t work either. I tried switching back to USB and plugging it in to another computer (without the sketch running, or the drivers installed). I also tried using a straight USB battery charger (like for a cell phone). All of those methods cause the servo to pulse rapidly (but not really move). It kind of has a decaying amplitude where the pulses get less intense over about a 10 second period.
The IR sensor has an LED on the back of it that lights when it detects a signal. That light also flashes in sync with the servo twitches. Note there is nothing in front of the sensor to trigger it. So obviously, something weird is being output on all the digital pins to cause this.
Regardless, it doesn’t work anything like it should when powered by USB on the computer running the sketch. Unfortunately, this project is a Valentine’s Day box that my son and I made for his school party this Friday. It senses the presence of someone, and then opens a door for them to put their Valentine inside. I don’t think I’m going to be able to drag my computer along with it!
Am I missing something obvious? Is there something I was supposed to do with the bootloader? This is my first Arduino experiment so I’m hoping it’s something very simple.
I really, really would appreciate some advice. I can upload pictures etc. if you want more information.