Bill's Computer Circus
Don't get caught with your system down.
NOTICE: This web site may not render correctly in older browers like Internet Explorer 5.2 for the Mac. May the gods help you if you are using Internet Explorer on any machine! Otherwise, if this site does not look right on your browser, please let me know what browser you are using (and what version and on what computer). Thanks!
"Visual Basic makes the easy things easier. Delphi makes the hard things easy."
-- unknown
Thursday, August 05, 2004
 
Wow. I have been busy lately. Let's see if I can even remember what has happened since the last time I wrote.

Well, let's start back at Monday night. I went to the CSM Robotics class where a friend of mine is attending. He has built a robot that he calls the T-34 B, and he has this transmitter that he uses to control it that is for radio controlled cars.

I don't like transmitters made for radio controlled cars, because they are not intuitive to me. You have to pull this trigger with one hand to make the vehicle go forward, and push the trigger to make it back up. If that isn't confusing enough, you have to use your other hand to steer - and the steering is backward when you are driving backward (if you turn the wheel to the left while going forward, the vehicle will turn to the left, but if you then back up, it turns to the right). So the wheel doesn't steer a vehicle like the steering wheel of a car does.

It's just not intuitive to me, and it cross-wires my brain having to perform one driving function (forward/backward) with one side of my brain and another driving function (steering) with the other side of my brain. As I have learned from video games in my youth, it is MUCH easier to separate controls into similar groups. For example, use the right hand for navigation control, and the left hand for weapons control. Things just seem a whole lot more intuitive that way. My combat robot and my Trike is set up for one-stick control - forward, backward, left and right all on one stick.

Anyway, to make matters worse for my friend's setup, his transmitter has only three channels, and the third channel is controlled by a knob on the top of the transmitter. This channel controls his weapon, which is a pneumatic flipper. You have to turn this knob until it fires, then turn it back to retract it. The flipper triggers when it hits position "50" or below, and retracts when it hits "60" or above (the control swings from 0 to 100).

To make things even worse, this knob turns a digital pot. Turn the knob one way, and it sends pulses down one input path. Turn the knob the other way, and it sends pulses down another input path. Therefore, simply replacing the knob with a simple switch (you know, to make it useful) was simply out of the question.

Ed (my friend) wanted a solution. He wanted a setup where one person could drive while another person operated the weapon. Two brains better than one? I don't know, but I spent the last three days (since Monday night) putting a solution together. And this is what I came up with:



There is a telephone cord coming out of the back of the transmitter, carrying the necessary power and signal lines to connect to my little device (what once was a FailSafe module from my RC4 project) inside the little blue box, that has wires coming out the other end to a little switch box I made, having one pushbutton switch and two LEDs mounted in it.

Here is how it looks in operation:


The only thing left to do is to make a nice little wrist strap (velcro or elastic - perhaps even a cloth casing) for the little blue box, and it will make a slick little setup. Now, one person can drive, and one person can shoot.

The circuit in the little blue box has a PIC16F628 microcontroller in it that just responds to the switch by sending the proper pulses to the transmitter. It is self-calibrating, since when it is first powered up, it sends pulses to set channel 3 to one extreme (in the non-firing direction), then sends pulses to set channel 3 to position "56". When the button is pushed, it pulses channel 3 down to position "46" to make sure the weapon fires, then pulses back to "56" after a 1/4-second delay. When the button is released, it pulses channel 3 up to "66" to make sure the weapon retracts, then pulses back to "56" after a 1/4-second delay.

Channel 3 on the transmitter only advances by two for each pulse (not by one), so that's why it sits at 56 and not 55. I just like to leave it rest at 56 so it only has to go three pulses down to fire, and two pulses up to release. The pulse train takes about 134ms to advance the channel 3 position to either of its programmed extremes (46 or 66). It may not seem like much, but when you want your weapon to fire NOW, you want it to fire NOW and not make you wonder what the hesitation is all about. So, two or three clicks to fire or release means you don't have to wait the full 134ms -- only 54-80ms. Still a tiny delay, but not enough to notice.

Anyway, the two LEDs provide a visual indication that the unit is operating, in case the pneumatics run out of air and you start to wonder why it isn't firing. The LEDs will let you know if it is the unit or not:



Well, I don't have any more time to write at the moment, so I'll write more later.

posted by Bill  # 5:54 PM