Content-type: text/html Set-Cookie: cookiehash=D8TIX1F9GET8DML97LCWDC1UDL31CF7Q; expires=Thu, 22 Oct 2020 00:00:00 GMT; path=/; domain=.drivemeinsane.com
Previous Entry.. Next Entry.. |
#7 The RC Car
July 19, 2012 17:16
Back in the early days, when I was still toying with the mere idea of a webcam, there was a site called Khep on the web. This site featured a small tethered robot with a webcam that lived in a maze, and you could drive it around the maze. I felt inspired to arrange something similar, but thought it would be neat if the playground could be a little larger than a tabletop maze, like, my whole house. I figured the easiest way to accomplish this would to be to purchase an RC car, find a small camera, a video transmitter, and interface the remote control with the computer.
At first, I figured that the levers on the remote control would be potentiometers. I spent some time researching how I would construct a resistor ladder and control its output using a single parallel port. I finally hunted around and found a $20 RC Car at Radio Shack, and brought it home. Taking apart the remote I discovered that the levers were in fact not potentiometers, but just rocker switches. This signficiantly reduced the scope of the project. The switches could be pretty easily replaced by transistors or relays. I ended up going with relays because my first effort to use transistors didn't work out well. So I purchased some excessively large relays and wired them in paralell with the contacts on the rocker switches, then controlled those relays from the parallel port.
It took a little while to get the interface up and running. At first, it would only go forward and backwards, and the only interface was through a telnet session. Eventually I added the webpage controls, and the general interface hasn't changed much from that over the years. It even got me on Slashdot.
However, from the beginning, there were a number of problems. First off, the car was small and couldn't carry much weight. At first I tried using a separate battery pack to power the camera and transmitter, but the car could barely move with the extra weight, so I instead wired all of the electronics to use the car's own battery supply, which thankfully was also 12V. A set of rechargable batteries would last 3 hours, and took almost 9 hours to recharge. A second issue was that due to voltage drops, anytime the car was moving, the camera would fuzz out. The end result was rather irritating. Eventually I sought to solve this problem by purchasing a larger RC Car and using a larger battery. During my efforts to migrate the electronics over, I managed to kill the transmitter, thus putting the project out of commission for a year or so, since I could barely afford it as it was. The larger vehicle faired better charge wise, and would last 21 hours between recharges. However, both cars also suffered from a speed limiting issue. The only way I could prevent the car from going too fast was to force the car to stop 1 second after each command, and then wait another second to ensure that the vehicle had stopped moving, to prevent a cumulative acceleration. The new car also had issues from overloading the transistors, probably from the excess weight, and I had to periodically replace them. The car finally broke beyond repair about the time I moved, and it was a couple of years before I sought a replacement.
Next, I bought an RC Tank, which I thought would be useful in the new house. I had hoped that the tracks would make it easy to climb over the thresholds. I also decided to fix the start/stop problem by installing an embedded computer in the critter and interfacing with that via wifi. However, tracks, while making it easy to climb over obstacles, makes it next to impossible to spin, especially on a surface with a lot of friction, like a carpet. So after the tracks broke, I decided to build a critter, using a 4 wheel differential drive, and hopign that the spacing of the wheels would prevent friction issues. It did not. I later tried removing two of the wheels and adding a caster. That resulted in a critter that could spin fine on any surface, but couldn't drive straight, and didn't have enough power to climb the thresholds. I finally build another version of the critter with much larger wheels and a more powerful motor. Thats' where I'm at now. It works pretty well, although the thresholds are still giving it trouble. Mainly, becuase the wheels slip on the surface. Never the less, it's still a work in progress.