My Project Notes
As well as helping my wife build her Cat Bus, I'm also doing some electronics for my son's IronFest contribution. He’s come up with this crazy idea to cosplay Rincewind and The Luggage. Rincewind is a wizard from the Discword series. He has a magical chest called “The Luggage” which holds all his things and magically follows him wherever he goes on dozens of tiny legs.
From an engineering viewpoint, We’rebuildingan autonomous robot. Also did I mention we have less than a month to build this thing? My son will do all the woodworking and mechanical construction. I’m in charge of the electronics. I figure the quickest way to make it is with ultrasonic range-finders feeding into a simple computerised control system. I'm not real experienced with ultrasonics, I might fail at this, let's see how it goes.
To start off, I figure that placing two ultrasound receivers at a known distance from each other will allow me (with a bit of math) to triangulate the position of an ultrasonic transmitter. This can feed into the motor control circuit. Here’s my prototype, utrasonic sensors separated by a known distance and a PIC18 computer board I found in my junk box. As usual, I do not want to buy any new parts if I don’t have to.
Now to make the transponder. This will attach to Rincewind’s clothing and echo back whenever it hears a “ping” from the ultrasonic transmitter.
I found this old data-logger I built for a project years ago. It's got most of the circuitry I need so let's re-use!
It came together pretty fast, I just chopped off most of the board, desoldered the parts I don’t need an whacked on an ultrasonic transceiver.
The software is pretty simple for this one, simply listen for a ping and then respond. Now I need to write the software for the detector.
Now this is where it gets a little tricky, you see these hobby transponders are intended to be used for distance measurements by listening for their own echo. But I do not want an echo, I want it to listen for the transponder ping and nothing else. My idea to solve this problem is the transmitter will send one ping and the transponder will respond with three pings. That way, the transmitter will know it’s not an echo of it’s own ping.
Signals are looking nice on the scope, I hope they still look this good when it's outdoors in a noisy environment.
The software was a bit tricky. The ultrasonic receiver has to be able to tell the difference between signals from the transponder and echoes of it's own transmissions. Also the ultrasonic modules I have are meant for range-finding, not for triangulation so I had to modify them a little. I patched on a wire to bypass the final stage of the detector so I can get faster response, more accurate timing and separate out those three pings.
The mechanical parts were built by my 16yo son. We started with a kid’s ride-on toy car. It was a damaged one we got cheap. It has wheels, suspension, 2x 12V motors and power steering! It’s not too hard to patch into the motor and steering control circuits and now my microprocessor can drive it anywhere!
Here he is dismantling it. We only need the chassis, wheels and motors. The rest can go.
Look at this linear voltage regulator I salvaged. This will do nicely to interface to the 12V power for the motors. I have not bought any electronic parts for this project, it's all scavenged and repurposed from other gear or from my hoard.
Finally got it all wired up to the
motor controller. I turn it on and poof! I managed to blow up one
of the H-bridges. I must have calculated the drive voltage
incorrectly. It's an unusual part, I can't buy any locally, only
from China. How annoying.
So I'm going to try and build a new motor controller using some relays. It's old-school but it should work.
Here is my relay-based motor controller for the steering bodged together at the last minute
And here is the finished product
Then we dressed up Rincewind in his wizard robes and hid the transponder inside a spell book. He did a great job of the costume and won best youth costume at IronFest 2019.
You can see a short video of The Luggage in action here: https://youtu.be/KvSBe_jpH5Y