A New Year - a New Makeover for Charlie!

Greetings from Charlie and I. We both hope you had a wonderful new year’s holiday!

This is the “new” Charlie, all ready for the new year and new adventures.

For New Year’s, (That’s how they do it in Russia, their “winter celebration” is on New Year’s Day.), Charlie received several nice presents:

  • A redesigned camera mount with a flexable camera cable, instead of a raspberry pi camera ribbon cable.

This cable comes from a vendor in the UK who makes them specially to-order in whatever length you wish, though at about 25£ or so each, plus shipping, they’re not cheap. The advantage is that they’re better able to take the swiveling motion required by the camera being placed on Charlies head.

  • He also received a line-sensor.

Here’s the line sensor mounted underneath his front, just behind the bumper. You can also see it, (sort-of), in his first picture down near the bottom. Though I’ve successfully calibrated it and verified functionality, I have not had an opportunity to actually try it in the real world as I would need a large roll of white paper about 2 meters wide and about six or seven meters long to lay the track on. Of course, I could lay black electrical tape all over our wooden floor, allowing Charlie to wander around following the line, but my wife would absolutely KILL me!

  • He also got an upgrade with an Adafruit RTC, (Real Time Clock), module. (In fact, Adafruit has a number of interesting things that Charlie just drools over. He drools, I get to clean up the mess! :wink:

Here you can see it near the back left.

Here is a closer view. It plugs right in and, (barely!), fits under the top plastic canopy.

They have a really good tutorial on how to get this little beastie set up and running in Raspbian. My next project is to figure out how to get it running in Dexter OS and Cinch. @cleoqc says “no can do!”, but - as I’ve said before - the best and fastest way to get me to latch onto something like a bulldog is to tell me it can’t be done!

  • Last but most assuredly not least, He received an IMU upgrade!

Here you can see where I’ve mounted it right behind Charlie’s battery pack.

I have also tried calibrating it and verifying functionality, but have not put it to real use yet.

One thing I have noticed, (at least in Dexter OS/Blockly), is that commands to turn a specific angular amount do not inherit the precision of the IMU. (i.e. a 90° turn isn’t a 90° via the IMU turn, but an “approximate” 90 degrees.) IMHO, the entire idea of installing an IMU is to improve positional accuracy, so it makes sense for angular measurements to inherit these measurements from the IMU. (Enhancement hint! hint!)

Just had a thought. . . I wonder if the turn angle “x” block will take a computed value? (i.e. turn(current_heading) ± some angular amount) I’ll have to try that. Though, having the bloxter blocks inherit the precision of the IMU isn’t a bad idea. Maybe this can be triggered by a special “enabling” block near the beginning of the beginning of the code?

Unfortunately there was one hiccup: In the process of installing everything - and mounting the camera on Charlie’s head - I accidentally snagged the bumper and ripped the plunger out of one of the switches.

Though it doesn’t affect the basic tests of Charlie’s new upgrades, it does mean I’m going to have to remove the bumper, unsolder all the wires, remove the offending switch, epoxy on a new one, and reassemble everything. Which, I might add, is a Royal Pain.

I’m going to have to find some kind of quick-disconnect for Charlie’s bumper. Push connectors that would fit over the solder-tabs on the switches would be great too.

Next Steps:

  • Verify each of the new additions in the real world. This will include enabling and activating the RTC within Raspbian.

  • Figure out how to program real-world applications for Charlie’s new sensors:

    • Can I use the IMU to provide real-world precision to Charlie? (i.e. Turn a precise 90°, travel “x” distance North-East, etc.)
    • Can I use the line-follower as a “cliff detector”?
    • Can I use the updated camera - as a background process, independent of everything else Charlie is doing - to broadcast real-time video to me so I can see where he is? An additional “nice-to-have” would be the ability to “override” whatever he’s doing and either stop him or re-direct him by remote control. (No! Don’t go play in the fireplace!!. . . . Yes, you need a dusting, but NOT in the walk-in shower!)
  • Installing a display.

    • I have a 3.5" touch-screen display that plugs into the GPIO pins where the clock is. I can move the clock to the underside of the board, or hard-wire it with a short piece of 4-conductor ribbon cable. Since they use different i2c addresses, there should be no problem.
    • I also have a 7" touch-screen display that plugs directly into the Pi’s display port.
    • The idea behind this is to give Charlie some kind of real-time display that could allow him to communicate status and/or receive input/control from me.
  • Install the Dexter GPS module

    • Theoretically, this will allow Charlie to, (ahem!), “know where he is”. Though I have the GPS unit, and will probably install it sometime in the future, using this in some really useful way is a real “stretch-goal” for me. I’ll be tickled pink if I can get the other sensors working.

What say ye?

Jim “JR” (and Charlie!)

Take a look at/run the RemoteCameraRobot https://github.com/DexterInd/GoPiGo3/blob/master/Projects/RemoteCameraRobot/README.md

Running it:

cd ~/Dexter/GoPiGo3/Projects/RemoteCameraRobot
python3 remote_robot.py

then point your browser to <charlies_IP>:5000

and you get realtime view

Yes - “The proof is left as an exercise to the user” heard daily from every engineering prof.

BTW, your flat bumper just happens to be a better idea than you may have intended…

I had a robot Cye, which used driving into the walls/baseboards of a corner right beside its home base. The flat front of Cye would align to the first wall, and the bot would reset its 0 heading and 0 “y” axis. Next, the bot would back up an appropriate distance, turn what it thought is 90 degrees and drive into the other corner wall, resetting its 0 “x” axis and double checking the 90 degrees encoder accuracy. Lastly, it would drive very accurately to its nearby

home base to recharge.

Your flat bumper will give you a great reference for setting the 0 offsets for the IMU. I have not gotten around to that yet, in part because Carl doesn’t have a flat surface to drive hard against to gain a reference. My plan has been to use the lines in the flooring with the PiCam but this will be much more complicated than banging Carl’s toes against a wall hard enough to “knock him straight”

1 Like