my first robot

Hi all. I’m building my very first robot. I recently bought the DFRobot 4WD Arduino chassis from Robot Shop (great customer service!) and started piling stuff on. I’ve never built a mobile robot, I’ve done a bit of machine control, so seeing what I can do in a little package with wheels is a blast!

I’m not using an Arduino. I’ve hacked a two-axis controller that I’ve used previously to run the robot. The board drove two steppers; I’ve depopulated one driver chip and use one phase each on the remaining chip to drive the two motor on each side of the robot. (Then I cobbled connectors at various places on the board to match the needs of the robot.)

The board was designed with a ATMEGA168; this one has a 328 in it for extra code. One nice thing about the board (I think!) is that it has a step-up power supply to regulate the motor voltage. This gives pretty good repeatability to its motion.

Turning, however, is a different matter. I tried timing the turns at fixed power settings but the slightest variations in the surface made repeatability impossible. I added a cheap digital compass (hangs off the top level on the back) and now the bot can drive squares and get back to the same spot. That’s about as far as I’ve gotten towards where I want to go…

I’ll like the bot to roam the house and memorize (SLAM) the surrounds, Then, if it detects anything different on the floor it will signal an alert that something (like something dropped or one of this home’s two handicapped residents) needs picking up. Here’s a close up of the two sensors on the pan and tilt head.

The bigger sensor is the Sharp 18 foot IR distance sensor; the smaller one on the left is the Sharp 6-foot sensor. It points a few degrees down so that it doesn’t interfere for the the larger sensor and can be used for floor scanning and detecting drop-offs (stairs). The silver object on the left is a laser pointer module. Whimsically, I call the collection the “long range sensors,” the “short range sensors” and “the primary weapon.”

My first thought was that vertices, wall-wall-ceiling corners, would make great reference points but there appears to be too many reflections (corner cube effect) to get good readings there. I’m going to try edge (wall-wall and wall ceiling) next. There are similar issues where the detector beam is normal to the edge but there’s plenty of other spots to read and I’m hoping I can find the edges and compute the vertices.

The bot is a little heavy. It comes in at 2.5 pounds; spec on it is a kilogram so it’s just a few ounces over… I put in four 18650 lithium batteries; that’s about 5 amp-hours of power because the system is power hungry, about 70ma with servos idling and without the motors. The problem with it’s energy usage is that I haven’t been able to turn off the Sharp IR sensors. I tried a MOSFET on the low side, but that (somehow) interacted with the sensor’s output and restricted it to a very small voltage range. I AM NOT AN ELECTRICAL ENGINEER! I haven’t got around to trying a P-channel FET on the high side; I’m hoping that will do the trick.

… I’m working on a visualization app on the PC and will add a wireless link. The board has a connector for a Zigbee radio but am thinking of wedging in WiFi instead. I think that once I can see what it sees; I’ll see a way to get the localization working… So, that’s where I’m at with a long way to go!

  • Ed.

Thanks to everyone for the interest and kind words. I appreciate how friendly everyone is. - Ed.

I’ve seen clips like that and hope I can do similar, though, certainly it will be much slower using a IR & servo than the laser scanner that they use. Do you think this one is for real? The shoe-print-shaped spots “walking” across the room got me laughing. The bot surely can’t be imaging the bottom of folks’ shoes but if that’s psuedo-imagery showing the motion of (deduced) people in the room… wow! - Ed.

If you haven’t seen them, I suggest that you look for youtube videos by liam.rs … I think those motion systems will knock your socks off. (BTW, that Xplain board looks like a heck of a lot of hardware for $30 USD; thanks for pointing that out.)

I’m not sure why the whiskers (and my wife doesn’t like the looks of them either.) If the idiot never runs into the wall, then I’ll take them off. Your post makes be think of the advantages of a more compact outline. I’ll look at putting the compass on top of the shelf. I haven’t tested below because I expected that the coil in the switching regulator would drive it crazy… maybe not, that was just my guess. As it is, there are enough fields in the house that at first I thought the digital compass was random. It was only after walking around with a regular compass and seeing the needle veer east and west +/- 20 degrees that I figured out what was going on. That’s still useful for making a predefined turn (in place) but not for maintaining a heading. However, since the DFRobot drives very straight, I re-read the compass at the end of a move and use the delta as an accumulating offset. I don’t have much mileage on the robot at all but at first glance that’s working pretty well. Thanks again, - Ed.

This is a project of grate interest to me. I am currently waiting on a Lynxmotion chassis from Robotshop, and I am adding sharp IR-range sensor, digital compass (using I2C) and “tilt and pan” module. Motherboard is a Atmel xplain board, with the great xmega128A1 chip. My project is going down somewhat the same road as yours, and I would like to se the development of your rover in the future.

I on the other hand am an electronic engineer, more specifically I am finishing my master in control system engineering (speciality Navigation and Vessel control), and my main focus on this project will be navigation. I want to explore how I can integrate a PID regulator, and some MPC controller for navigation. Using several sensors as state feedback. The goal is a smooth ride. Where the rover make changes in direction as a smooth and natural part of moving about, as a response to a changing or unknown environment.

My software is mainly going to be c based. I would really like to hear more about your rover project, as our projects has somewhat the same direction.

Welcome to the RobotShop Forum, nice first post and equally impressive first robot!

Images are always appreciated. Not sure I understand the use of the bump switches since you have a sensor turret. For saving space, consider mounting the rear breadboard on the underside of the top plate facing inwards (keep the robot a nice tight cube). It seems obvious your previous background has contributed to how fast you are integrating sensors etc. Keep us posted!

I would love to see that robot doing some SLAM. It will truly show the advanced capabilities of hobbyist robotics!

I think that you will like this video of the Neato XV-11 SLAM. It seems to be doing exactly what you want to accomplish:
[video=youtube;zodC8EFvh7g]http://www.youtube.com/watch?v=zodC8EFvh7g