Let's Make Robots!

Penny - An Arduino SHR

AttachmentSize
starthere1.0.pde3.38 KB
starthere1.2.pde3.88 KB

Introducing Penny. She's beginning her existence as a Start Here style robot. However, she's based on an Arduino Mega.

  • Video 1: Early testing of the servo and Sharp IR sensor used to test my code.
  • Video 2: Penny prototyped on a breadboard and running fine

Chassis

I re-used the motors, wheels and chassis from my original SHR, which has been gathering dust for a while.

Penny is configured back-to-front from the old SHR, with her drive wheels in the lead. I set the Sharp IR sensor back as far as practical, since it doesn't work well closer than 10 cm anyway.

The messy breadboard will get cleaned up. I plan to use Ro-Bot-X's Arduino shield for building robots, which will take care of .some of that wiring for me.

Update 2010-10-05: I have received the Ro-Bot-X designed Arduino shield and gave Penny an upgrade. Look at her now. Quite a difference!

Code

Penny 1.0 is based on a straight translation of fritls' Start Here code for the Picaxe. This is my first Arduino robot, so I wanted to start simple. I'm very pleased with the result.

I have attached the original code as well as an updated version that is fit for the Arduino shield and adds a backup function.

Electronics

I'm using an SN754410NE dual h-bridge motor driver. No other electronics yet.

Execution

As you can see in the 2nd video, Penny is working fine. I adjusted some parameters, like how far away she reacts to an obstacle. There's plenty of room for enhancement of the basic SHR code, and I'll use Penny as a platform for learning more about  the Arduino.

Future

The future is bright for Penny. I have a lot of possible enhancements with an Arduino Mega as the brain power. We may see features like:

  • Wheel encoders
  • PWM
  • Line following
  • Edge/cliff detection
  • More actuators
  • Perhaps... penmanship

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I see you have used 4xAA alkaline batteries... this is 1.5x4=6V

According to Arduino documentation you should be using 7-12 V as external power source ;-)

Did you notice any problem? Should I use a 6 x AA holder? (specially if I use rechargables)

Maybe another type of battery?

My SHR will be pretty similar... with a more powerful servo (too much but it is what I have) and a Maxbotix EZ1 ultrasonic instead of the Sharp IR sensor

Thanks!

I've had good success with 4xAA alkaline batteries. I doubt it would work with 1.2V rechargables, as this would only provide 4.8V, and the voltage regulator wants to put out 5V.

The Arduino documentation actually recommends 7-12V, but says it may work as low as 6V or as high as 20V. Re-read the section under 'Power'.

http://arduino.cc/en/Main/ArduinoBoardUno

I'm planning to invest in a charger and some NiMh racing packs, but so far I've always used alkalines.

A 6xAA battery holder as you suggest is a fine way to go. I wanted to keep it small, so I went with only 4xAA.

A small 9V battery (with clip) might do also... but i read somewhere it would have very little autonomy (low mAh?)

What would be the expected autonomy for a robot like this? I want to pay with it but not have it running for ever.. so a few hours might be enough...?

The motors and servo will draw more current than a 9V can provide.

The solarbotics motors draw around 50 mAh if I remember correctly, but a 9V battery only holds (at best) 300mAh, so it'll only last a few hours. Rechargeable 9V batteries (make sure its the 8.4V ones not the 7.2V with filler ones) would only last an hour or two.

hey i think u can slightly alter the program so that the wheels can turn when the robot is a bit further than the obstacle  :D

I do have other plans for Penny's coding, but I'm waiting on a good encoder solution so I can have accurate control of my motors. I'll get around to it sooner or later.

can we connect more than one servo and dc motors directly to adruino without using any kind of shield ?..

 

it may reset the arduino while running, if the load on the motor suddenly increases like when hitting an obstacle. I just had this problem with two servos powered from the 5 volt regulated output

Hi ignoblegnome, would you consider the challenge of turning upside down the motor so the wheels are free enough to stand this robot up and create a "Start here self balancing robot"?.