When some families get together, they do activities like jigsaw puzzles or craft projects. Not ours. While my daughters were home for the Christmas break, they wanted to try their hands at building a robot. We talked about simple “My First Robot” projects and came up with a robot design they felt comfortable with. Then I gave them all the parts they needed and stood by to help where needed and then they got to work.
Of course, Lindsey and Kelsey can’t do things the plain & simple way so it took about three minutes for them to decide that this wasn’t going to be a simple, unadorned robot. Due to their mutual love for teacup pigs, this robot was going to be Pigbot, complete with snout, ears and a tail.
It is a pretty simple robot – two servos for drive motors and three contact switches on the front to detect when it runs into something. Here’s a video of it in action – http://www.youtube.com/watch?v=qh_miyljQmY&feature=youtu.be
And to answer your unasked question – they are 24 and 21. Still my babies.
A fairly standard project for electronic beginners is to build a desktop power supply from an old computer power supply. I know some of you are thinking “Huh? Why on Earth would you do that?” When you are playing with a new circuit, you always need a DC power source and it isn’t convenient to keep digging out batteries and a battery case to get the voltage you want. Instead, you would like an easy way to get different voltages that you can use to power different circuits. The answer is a desktop power supply like this one:
A “Real” power supply that costs “Real” money
This one would be great but it costs $331. When you’ve already spent far too much on your new hobby, the quest for continued marital harmony suggests that you forgo spending hundreds of dollars on a new piece of equipment and build one yourself. That’s how I ended up with this:
It isn’t as pretty and doesn’t have as many features but it was far cheaper than a store-bought unit. (To be honest, there are cheaper store-bought power supplies but comparing mine to one that costs $79 would make you wonder why in the heck I made my own.)
To build this, I used an old computer power supply from a computer that I bought back in 2000, a stereo speaker that we got at the Arc for $4.00 and various bits and pieces that *should* have cost me about $20. Of course, I ordered some wrong parts mistakenly and then wasted a board with some ham-fisted soldering but, in theory, I built this for less than the cost of buying one new. I’m happy with the functionality but the craftsmanship isn’t where I want it. One of the LEDs is misaligned with the others and the hole I cut for the digital display is too big on one side. Even though it isn’t pretty, it has features that one wouldn’t find in a cheaper unit:
- 12, 5 and 3.3 volt rails
- Adjustable rail that goes from 1.2 to 10.5 volts
- Digital display of the output voltage
- USB port for devices that use USB power
- Genuine BradLab© construction
Here are pictures from construction:
Tonight’s accomplishment is a working prototype of a desktop power supply that I’m building. It has four channels – 12V, 5V, 3.3V and a variable voltage channel. Now I need to transfer these breadboard circuits to a protoboard and find a suitable box to stuff it all in. When done, the front panel will have an On/Off switch, a adjustment dial, a display LED and banana jacks for the four power rails. I may also add a USB port for powering USB devices.
This is a pretty standard project for electronics beginners but it was fun to put it all together and not smoke, melt or toast anything. It actually worked on my first test, which is not exactly typical for me. 🙂
In this week’s installment, we learn how an I-beam, a squat cage and a freestanding heavy-bag frame down in the basement can cause problems for a robot driving around on the first floor.
After this weekend’s successful test drive of the Escalade rover, I wanted to fine-tune the control system by calibrating the compass and associated steering algorithm. I *thought* that I would be able to do that inside since I only need 15 feet or so to drive in a straight line. Unfortunately, I was getting very inconsistent results. Eventually I realized what was causing the problem.
My basement has some very large steel objects in it. Every time the robot drives over one of them, the internal compass would start getting weird results. Then the steering system would go nuts and the rover would crash into something. At first I was doubtful but then I realized that the straight line distance from the first floor to the ceiling of the basement is less than a foot. Apparently, the “magnetometer on a chip” is sensitive enough that those things throw it off.
It was good to realize what was happening but that slows down my progress if I can’t test inside. The temperature outside right now is -1 F. Sure, I’m a manly man and not scared of a little frostbite but the cold is bad for the batteries. So I think I will turn on an episode of Mythbusters and call it a night.
This 96 second video shows the first outdoor test of a cheap RC car that I converted to an autonomous rover. I took out the remote control circuit board and added:
– An Arduino Uno microcontroller for control of the motors, steering & sensors
– A Raspberry Pi “computer on a board” for higher-level functions like Guidance and communications
– An Inertial Measurement Unit with a compass, accelerometer and gyroscope
– Additional batteries
Once the Raspberry Pi receives the Go signal from the laptop via wireless, the vehicle is completely autonomous. I am able to monitor telemetry remotely and, if necessary, issue a emergency shutdown command but other than that, the on-board electronics do everything.
The goals of this test drive are very simple. Use the compass to determine the current heading, drive 30 seconds in that direction, turn around and drive 30 seconds on the opposite heading.
You will see the vehicle swerve back and forth a lot during the drive. There are several parameters to the control system that control how quickly it reacts to a course deviation and how large and long the steering response should be. Fine tuning these parameters will make it drive in a straighter line with less of the over-correction that you see in this test.
Once I have the steering smoothed out, I’ll add logic to use the other capabilities of the IMU. This will allow me to build more sophisticated capabilities than what you see here. There’s still plenty of work to do but this vehicle has come a long way in the past month. Stay tuned for more developments.