BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Sun Oct 21, 2018 3:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: RobotNode BALancing
PostPosted: Wed Jul 31, 2013 4:30 pm 
Offline
Citizen

Joined: Thu May 16, 2013 5:56 am
Posts: 9
Well, I might as well post about the project with which I'm using a RoboClaw. I've always been a balancing robot guy so after recently moving to the area and learning about the Sparkfun autonomous vehicle competition, naturally, I decided to enter a balancing robot. Timing and other issues precluded me from using the design that I'd planned and I ended up going with my test platform - a Lego Mindstorms NXT based balancing robot. Still, work has proceeded on the "true" robot.

So, the base of the balancing robot are three cuts of MDF held together at four corners by threaded rod. I'm using pololu 37D gearmotors with encoders and 6" wheels from servocity. The motor controller is obviously the RoboClaw. With the ubiquity and cheapness of android phones, not to mention ease of programming and the amount of sensors and peripherals built-in, I decided to make this the "brains" of the robot. You can get a reasonable condition galaxy nexus phone for about $150. Compare that to putting together an incredibly powerful microcontroller, GPS, wifi, bluetooth, accelerometer, gyroscope, digital compass, camera, and lcd touchscreen - you could easily double that cost buying these things individually from typical robot/hobbyist stores/websites. The big downside is that I still need access to low cost analog or i2c sensors and so while bluetooth to TTL serial adapters are cheap ($10), for non serial sensors, one still needs something else. I'm currently using an arduino uno, though there are plenty of alternatives that provide the same or similar functionality for cheaper - I just already had the arduino.

So, aside from being a perfect development platform - I can log everything in realtime on the phone, program/debug over wifi, easily add bluetooth or wifi based control, I can create a rich user interface saving me having to figure out how best to multiplex some sort of button system on a micro so I don't run out of needed peripheral pins. Due to wifi adb, I can in-circuit-program (since the phone is being used for it's gyro and accelerometer to do balancing, it needs to be mounted on the robot).

So, essentially, the phone's accelerometer and gyro sensors are used to compute the tilt angle and tilt rate of the robot. Motor control commands are sent over serial through bluetooth to the arduino which handles reading and writing motor speeds to the RoboClaw over a software serial connection. I've got a couple i2c ultrasonic sensors which are read by the arduino and used for obstacle avoidance. Future features as I work through things are GPS guidance, camera based obstacle avoidance/tracking, using the compass to augment gps and odometry, bluetooth remote control (likely through another cheap android phone that I have), self charging (build a charging station that the robot can find and dock - the awesome thing is that I'm using a lead acid battery so I can monitor state of charge through the RoboClaw).

I also recently acquired a high torque servo. The idea is to mount it as an arm on the robot so it can pick itself up should it ever fall over. Not only would this be nice for competitions like the sparkfun avc where other robots could potentially run you over, it would be nice when I'm teleoperating the robot over LTE and it falls over out in the field. (I'll need to add appropriate bumpers to the robot to minimize shock forces when taking a fall).

Aside from the physical robot, I've started working with Player/Stage (though considering switching to ROS). In Player/Stage, I've already put together a layout of the (2013) Sparkfun course and a virtual robot and controller. The idea is that after developing your control agorithms in simulation, you can take the exact same controller and place it on your real robot, just adjust where sensor and output data comes/goes. That would be awesome and the next step once I feel the balancing and control is stable enough to turn it into a standalone appliance/service so that it's truly available on a client/server basis.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO