PDA

View Full Version : Help! Wireless control of electrical resistance


Cary Reeves
Nov 06, 2006, 03:12 PM
This is a cross over question from another of my hobbies; slot cars. I would like to make a wireless controller.

The standard controller in my setup has two wires that plug into a digital powerbase. The controller is simply a variable resistor. The powerbase measures the resistance of the controller and sends a digital signal to the cars on the track. There is no signifcant current through the controller in this setup. Low power resistors and pots are used.

What I would like to come up with is a pair of circuits to eleminate the wire from the controller to the powerbase. One connects to the controller and measures the resistance of the controller in realtime and transmitts the resistance value. The other circuit connects to the powerbase and creates a resistance in sync with the trasmitted value from the controller board.

Any ideas where I could start? Other places on the net I might look? It seems like there are three problems:
1. sensing the controller resistance
2. transmitting/recieving a value
3. creating a variable resistance in response to the value

IR, RF, etc. are all possiblities. If it's doable, I would eventually want to setup six so I would need to be able to keep the transmitted signals sorted out between the six different controllers.

Thanks for any suggestions!

JeffElecRC
Nov 06, 2006, 04:13 PM
Sounds like a fun little project, but may be difficult for someone with limited electrical or electronics experience. If you're asking how to sense and create a variable resistance, you'll need to brush up on some basic circuit fundamentals before proceeding (see V=IR, Ohm's law).

I'll answer your problems with how I would accomplish your idea (and basically this is the concept of a 1channel RC transmitter):

1) To sense the variable resistor in the controller you would generally connect it in series with another known resistance and a voltage source. You then measure the voltage drop across the variable resistor with the Analog to Digital (A2D) converter input of a microcontroller (Atmel or PIC ). The voltage measured will be directly proportional to the resistance.

2) Now with the voltage sampled in the microcontroller, convert that voltage value to a variable time digital pulse (so now variable resisitance = variable pulse width). Now repeat steps 1 and 2 at 10 to 20 times a second. Alternatively this could probably be accomlished with a standalone frequency or pulse-width modulator.

3) Next the pulse width modulated signal can be connected to an Infrared (simply a transistor and IR LED) or RF transmitter (such as those sold by Linx Technologies, etc...). The RF transmitter would modulate that pulse width variable signal to your rf frequency.

4) The receiver demodulates that signal (the RF module would do this for you) and outputs your original pulse-width signal.

5) Finally you need to convert the pulse width back to a voltage. This can be accomplished in a couple ways. Personally I might use a microcontroller again and a digital to analog converter. Maybe something like a dedicated frequency counter or PWM demodulator would work too. I'd have to think about that, but its probably what they did in the older radio TX/RX's before microprocessors/controllers.

Hope that gives you some idea whats involved.
Good luck!

Cary Reeves
Nov 06, 2006, 04:41 PM
Thanks for responding. I follow it all conceptually. If it could be done using off the shelf non-programmed components I think I could give it a shot. If it requires programming a pic its probably more than I could take on right now.

The one part that is still a mystery is how do you convert the voltage in step 5 back into a corresponding resistance that can be sensed by the power base? I was hoping for modules that could be plugged into the controller and powerbase without having to modify them, and they both work off of resistances.

slipstick
Nov 06, 2006, 06:57 PM
If the output really needs to be a variable resistance look for "digital potentiometers". E.g. devices like the TDA1074.

But it's a lot of complication. There are almost certainly better ways to control the slot cars using standard RC speed controller techniques, using the existing controller resistance just to replace the pot on the standard radio input.

Steve

bravokilo
Nov 06, 2006, 07:28 PM
Hi Cary, I agree with the others it is bit complex but it can be done. See the volume control o the TV remote?If you would consider a simpler approach, USE SERVOS.

Use bellcrank style linkage and put a horn on the original pot. Vary the diameter(arc) to suit the servo travel to the resistor travel.

Use six TX on six channels. Just make sure you are not near a flying site! Do not extend the antenna unless the final transistor heat up too much or better shut of the final stage of the TX and jump the antenna to the driver stage.


BravoKIlo

Cary Reeves
Nov 06, 2006, 07:40 PM
The slot cars run in digital system. The track is always at full voltage. Their are six ports on the power base, one for each car ID. The cars are programmed with a digital ID from one to six. The powerbase senses the resistance at each port and associates that resistance with throttle, brake, and lane change inputs. The throttle is a 5k potentiometer connected to springloaded trigger. The brake and lane change buttons switch in fixed value resistors. The powerbase can then determine the throttle position, brake, and lane change button states as represented by a single resistance measured at the port. With that information, the powerbase sends a digital signal along the track to each car. A decoder in each car decodes the specific signal for that car. The speed of the car is controlled similar to RC motor controls by pulsing the power to the motor. Braking is done by the motor as well. Car ID's for timing, lap counting, lane changes etc., are from a car mounted LED to a track mounted detector. Lane changes are produced by a flipper that quickly switches the car. Because the system is digital and car speed, braking, etc. occur in the car based on the digital signal, all six cars can run in one lane with independent control. So, unlike traditional tracks where resistors in the controller vary the voltage to the rails, a resistance in the controller is simply used to indicate a desired state to the digital logic built into the powerbase.

I was hoping not to have to hack into the powerbase, but instead provide a plug-in wireless link between the controller plug and the powerbase jack that replicates the resistance of the controller for the powerbase to detect.

Based on the input I've received so far, it sounds like it would require some pic programming and digital potentiometers. They would also have to work very quickly so that you wouldn't introduce a lag into the car/controller response. I had cautiously hoped there might be something from the TV remote world (or robotics, etc.) that would be a 1 or 2 chip solution that already used variable resistances. Something like a MAX232 chip that I have used to build data cables to covert TTL to RS232. One chip, a few caps, a few resistors and voila your done. I knew it was too much to hope but thought it was worth asking.

This is beyond my capabilities right now. I would need to purchase a programmer, pics, learn the particular language required for pic programming and have someone help me design the circuit in each box.

bravokilo
Nov 08, 2006, 12:54 AM
Cary, You said that it is digital. The practical link to break and reconnect wireless is the line from the powerbase to the track. The digital signal or codes can be sent and received . I see is that you only one powerbase. If you had on PB for each car, then it can be done where you power the powerbase with batteries and hooked to a TX circuit. Problem I see is that the multiplexing in that wire from the PB to the track.

BravoKilo

Cary Reeves
Nov 08, 2006, 08:13 AM
Thanks for the suggestions. The powerbase supplies 12V DC at 7 amps to the track rails to run the cars. It overlays a digital signal on the rails to tell the in-car microprocessor what to do. While there are two physical lanes, they are really only one since they constantly recieve the same power and control signal. The cars can run on either lane and switch back and forth. Multiple cars can be controlled independently in the same lane. While having separate power supplies for each lane is the best way to setup an analogue track, its not how it works for digital since there is really only one lane regardless of how many slots you divide it into.

The powerbase "reads" the resistance of the hand controllers and then generates the appropriate digital signals to command the in-car microprocessors. My goal was to replace the two conductor wire from the hand controller to the powerbase to elliminate the mess of wires from the 6 hand controllers. My goal was also to come up with a pair of plug-n-play black boxes that would not require tapping into the powerbase circuit board. I thought that with an A/D converter chip, an IR comm chip, and a digital resistor (or logic gates connected to a bank of physical resistors) it might be possible. As pointed out above, it is essentially like a remote volume control for a TV or stereo system.

Ralph Weaver
Nov 08, 2006, 08:25 AM
I'm assuming that the system reads a voltage from the pot. If the pot is across 12V, then the wiper varies from 0-12V etc. It would seem likely that the wiper voltage is the signal of interest.

Can't you send a voltage to the system? A micro with a D/A or a filtered PWM would do the trick.

Cary Reeves
Nov 08, 2006, 09:21 AM
I don't know. The controller just presents a conductor with a variable resistance like in this sketch. The resistance values to control the system are well defined. I have built a controller from scratch using a slide pot.

The powerbase is detecting the resistance of the controller. However it is doing, I would think a plug-n-play solution would require that whatever replaces the hand controller would have to replicate the variable resistance.

Ralph Weaver
Nov 08, 2006, 09:49 AM
Can you measure the voltages on the controller wires while connected to the base and moving the trigger? That would tell us a lot. I'd guess one wire is either ground or +V and the other ends up being the voltage read by the processor.

Cary Reeves
Nov 08, 2006, 10:02 AM
I'll give it a try tonight.

bravokilo
Nov 10, 2006, 08:45 AM
It could well be that the system used is similar to the speed controller for RC car. The trigger is defining a pulse width. It is controlling a timer inside. The timer delays a pulse from the previous pulse which defines how long a data pulse is on. Multiplexing is time based, a frame contains all the pulses for all the cars and all the controls it has in each car. You see, there is a parallel here in what we do in RC. In the beginning, we used a servo to control a heavy current variable resistor to control the speed of the car. Now, we use ESC. But it is still the pulse width which defines the resistance. I think I mentioned this previously. Theoretically, it is a low current esc that you want to be connected in place of the orig pot. If only we have the circuit to make an esc whose resistance range is the same as that in the pot, then we got it. The pot is probably 5k or 100k but mind you , only a region is used. Try google and search of the remote control TX/RX LM1871 and LM1872. The prefix might be different but if you locate the datasheet, it will explain many things. These ics are very old and were used in many toy RC cars. Cary in what country are you? Can you post the pot resistance? and exact brand model of the system so I can look it up. Might be able to design what you need.

Ooops, TX is Texas of course.

BK

Cary Reeves
Nov 10, 2006, 09:21 AM
The throttle is a 5k potentiometer connected to a springloaded trigger. The brake and lane change buttons switch in fixed value resistors. The powerbase can then determine the throttle position, brake, and lane change button states as represented by a single resistance measured at the port. With that information, the powerbase sends a digital signal along the track to each car. A decoder in each car decodes the specific signal for that car. The speed of the car is controlled similar to RC motor controls by pulsing the power to the motor.

Bravo: The parameters of the hand controller are well known. I have built a functional controller from scratch in which I used a sliding pot for throttle and switched in the brake and lane change resistors using toggles rather than momentary switches. This allows me to set the speed for a pace car by sliding the pot and start and stop it with a toggle switch.

I've also modified an original hand control by placing a trim pot in parallel with the throttle pot to allow me to scale the resistance down to make a car run slower for my younger children. Here's pictures of the original hand control, the modified one, and the scratch built one.