Hi all,
I'm currently working on a robot project, using this set-up:
- Platform: DFrobot 4wd + encoder (http://www.robotshop.com/dfrobot-4wd-arduino-platform-encoders-2.html)
- Power: 5x re-chargable NiMH GP 2500 series AA battery
- Board: Arduino Mega ADK, together with the DFrobot motorshield (http://www.robotshop.com/dfrobot-arduino-compatible-motor-shield-2a.html)
- Sensor: at the bottom of the frame I mounted a simple IR sensor for proximity detection (http://iprototype.nl/products/components/sensors/infrared-distance-switch).
I wrote a simple sketch that tells the DC motors to drive continuously forward until the IR sensor detects an object. Then it drives one side of the motor backward and holds the other still for half a second, to make the platform do a backwards turn. Then it re-checks the IR sensor status. If all is clear it continues forward.
This is all working great when powered by a 9V power adapter, but when I power it from the batteries I have two types of problems: 1) the robot drives forward, detects something, backs off, then stalls (code execution seems to have stopped completely, as an indicator LED I added to signal object detection from the IR sensor stays off, yet the board still seems te be powered as signaled by the green power LED). 2) the robot keeps detecting objects in the IR sensor, even though there are no objects in sight. This leads to the robot backing up continuously. When I attach external power the problems do not occur (even connecting the USB cable with the batteries connected as well solves these problems).
I have a strong feeling these problems come from the batteries not being able to supply enough power, leading to code crashing (problem 1) and noise on the board (problem 2). As this is the first robot I build (and the first time I drive motors) I am not sure about this. I would like to hear your opinion on this, and if you have any suggestion (should I increase the battery pack? or drive the motors from another power source? anything else?).
Also I would like to hear what I can expect as to operation duration with this set-up. Should I be happy with 15 minutes, or should the batteries last for hours?
All help is very much appreciated.
Kind regards, Vincent