Monday, July 28, 2014

New Demo Video


In this new demo video, I show my Raspberry Pi Arduino Robot approaching a cardboard box and scanning it with the ultrasonic range sensor, twice.  Unfortunately, I didn't properly save the first scan image file, so it doesn't show that the distance measured was ~10 inches from the range sensor.

Also demonstrated in the video is the onboard video, shown as an inset, picture-in-picture video.  The field-of-view isn't great.  I suppose I could angle it better, but when I drive the robot at home, it's on the floor, where its angle points sort of upward and looks okay.  Also, here, I could have adjusted the FOV electronically.  However, for privacy's sake, I was also trying to block out the view of the rest of the room.

After backing out, the robot had a power glitch (described below).  Power came back after I jostled the robot a bit, and then I drove it around a while.

Some notes:

-- I've been experiencing sporadic power loss to the motors whenever I run across bumpy surfaces.  If I pick it up or otherwise move it after it loses mobility, it often regains motor mobility.  I think I may have a loose wire somewhere inside the robot platform.  The battery pack is not secured inside, so if it slides around, a connection could loosen.  I think I'll tape some velcro to the battery pack and the bottom of the robot platform, so I can secure the battery pack.

-- The angular resolution of the ultrasonic range sensor is just awful, and I don't think I can buy another one that's any better.  Just looking over sensors in roughly the same price range on Amazon and Radio Shack, I think they're all almost exactly the same cheap/inexpensive design.  It's almost not worth using such fine step sizes on the stepper motor, and I thought I was using a relatively coarse step size to begin with.  I could try making some sort of collimation device for the sensors, but then I think I'd lose distance resolution.

-- 7/28/14 Update:  It turns out there are ultrasonic range sensors that are much cheaper than the Radio Shack range sensor, but most of these seem to use four pins instead of three.  At this point, I'd rather not have to figure out how to make use of the additional pin.

-- The robot itself is still not autonomous.  I still control it from my MacBook Pro via WiFi.  Now that the ultrasonic range sensor works, at least in a rudimentary way, I think it's time to build in some basic AI.  Collision-avoidance is the obvious first step, and since the angular resolution is so poor, I can make the sensor sweep faster by taking fewer steps.

-- You can also see from the video that the wheels slip a lot on some surfaces.  If I could buy tires with better traction or just a lot less slip, I could trust velocity estimates a bit more, and maybe I could program a little drive-to-destination AI, too.  That would be one advantage in using a Raspberry Pi as the brains of this robot over just using the Arduino alone.

-- If the Arduino plus Tamiya Tank platform robot was my version 1 robot, and if this is my version 2 robot, then maybe it's about time to consider a version 3 robot.  In addition to adding AI capability, I think it's time to consider additional physical capability.  I think I'm down to maybe only one or two remaining digital I/O pins on my Arduino stack.  I might be able to add another sensor, but I wouldn't be able to add another stepper motor, servo motor, or a robot arm (which, BTW, I have already assembled from a kit!).  So, to add more stuff, I would want to expand with more digital I/O pins.  One way to do that would be to add another Arduino stack.  But how?  A possibility might arise from the fact that I chose to go with USB as my means of communication between the Raspberry Pi and the Arduino, rather than using the GPIO ports as others have done.  If I can use a USB hub off the Raspberry Pi, then theoretically, I can communicate via USB with multiple Arduino boards, provided the Arduino serial libraries and the Raspberry Pi serial libraries allow for addressing through multiple USB devices.

-- Plus, if I go with expanded physical capabilities and multiple Arduinos and a USB hub, I'll definitely have to go with yet another, larger robot platform, one that can hold larger battery packs with much higher watt-hour ratings, which means the Arduino motor shields will have to drive relays rather than provide those voltages directly.  Then I can drive more powerful motors needed to drive the larger platform, but then the larger platform can hold my robot arm...