Wednesday, July 3, 2013

Robot Rover 5 with Arduino Mega2560

I haven't posted an update in a while, that's because I  have been very busy with every spare moment building an Arduino controlled Robot. I haven't given up on the Raspberry Pi. The goal of this project is to actually have the Arduino control the sensors and motors, report the data back to the Raspberry Pi which will be controlling a camera and Internet wifi communication, it will take all the data and instruct the Arduino on what it should do and where it should go.
So far it has been a fun and frustrating process.  As many of my followers know,  I
have only been at it for a few months so I have had to teach myself Arduino C and Python for the RPI as I go.  And it has gone quite well. The Rover currently only has a rotating ultrasonic sensor to decide on direction, but I have also written some code in to detect the motor current draw which tells the arduino if it is stuck on something and also have a lever microswitch with a home made wire bumper on the front which is triggered by smaller items the sensor does not detect.. Items like a shoe.  Items smaller than that,  the tank tracks take care of.   Actually, the motors are so strong (only using 2 of the 4 currently)  that it will climb a wall until it is perfectly vertical!  Nice little robot chassis.

The hardware that makes up this robot is currently:

 Dagu tank tracked Rover 5 Chassis with 4 motor and 4 encoders
 Sainsmart Mega 2560 R3 Arduino Clone
 Sainsmart Mega Sensor Shield v2 (DO NOT USE! See below)
 SainSmart Ultrasonic Module Sensor HC-SR04
 Dagu 4 Channel 4 Motor Control Board(up to 5 amps per motor!)
 SainSmart 1.8" inch TFT LCD Display ST7735 (using adafruit's driver library!)
 7.2v 3800Mah Tenergy 6X Sub C NiMH Battery Pack (For motors!)
 6x 1.2v 2700MaH AA Batteries (for Arduino and Servo/Sensors)

What is next for this robot.  I have another lever microswitch, HC-SR04 Ultrasonic Sensor, Sharp IR Distance Sensor, Virtubotix Color Sensor as well as a Raspberry Pi with Pi Camera running Remote TightVNC over WIFI not to mention the rover itself still has 2 more motors, 4 encoders and 3 more current sensors that I still need to connect.  I am going to try and get it ALL to fit into this system and see what I can get it to do. It's already a lot of fun and pretty amazing.  with everything, it's going to get pretty interesting!

***NOTE-  Remember, if you plan to use the Sainsmart Mega Sensor Shield v2, check the end of this post to see the problem I and others have run into!

Note: Sainsmart Mega Sensor Shield v2.  Check the reviews before using this board, I found out the hard way with my Arduino getting super hot in minutes of plugging it in until the resettable fuse blew out.
  There is a jumper on the sensor shield that is labeled "Power Sel.".  This jumper has a couple long leads soldered on the bottom, that when the board are connected, shorts out against the USB port on the Mega2560 (sainsmart as well, don't know about others). I was lucky that only my fuse blew and I touched the hot spot.  My 2560 came right back up.  I checked the reviews and did what others had done.  I sanded the leads down to almost nothing and then inserted a piece of padded double sided tape on top of the USB port to prevent them from making contact.  If you want to use external power on the sensor board, you can remove the jumper and un-solder the pins completely.
  Just be sure to check the reviews and check what others have said about this piece before using it.. it may work for you, but you need to check carefully during the install.  Boards without the large USB (type B) connector, will not have this problem.  But the Sainsmart Mega2560 and the Sainsmart 2560 Sensor Shield v2, will have this problem!
See the double sided tape right above the USB port. The jumper right above that, it's leads make contact and short against the USB ports metal housing. 

No comments:

Post a Comment