I am getting assistance on the two PIC modules, it is just the putting of the signal across the 12volt dc. Basically the two modules could be hard wired together but in this case the decoder moves around and I want to use the track to send the signal to the decoder where ever it maybe.
It is for use on a standard model railroad (form of robotics!) layout using variable dc up to 12 volts.
The signal is required only 1 way - from kepad PIC connected to the track or power supply, across the track to the decoder PIC mounted in a passenger car and connected via wipers to the track.
Message is to just turn leds on or off.
Distance - probably should work on 10 metres max. but varies as the passenger is moved around the layout etc.
Locomotive control is not wanted, just using standard dc voltage conroller.
Because a standard model train picks up the power from physical contact with the tracks, and because the wheels and train is moving, you can expect there to be a lot of noise in the signal. That's going to make encoding a signal even harder.
Add to that the fact that the track makes up a lot of unpredictable contacts in the circuit from track segment to track segment, and the fact that the DC voltage is going up and down as the speed of the train is changing, and it all adds up to a tricky problem finding a way to encode the signal and not have it confused by the normal operation of the train.
I'm not sure, but don't the standard cheap train power controllers use rectified but unfiltered DC to begin with? If that's the case, you might have a 120 Hz pulsating DC on the track to make things even harder.
You will need some system which includes a lot of redundancy in the signal in order to factor out the potential noise already in the power circuit. There are a million ways to do that, but I don't know much about what is available off the shelf to help you. It's not a typical problem which I would expect there to be an off the shelf solution available. But maybe someone here with more experience with PIC I/O devices could suggest something?
One path is to use an RF modulator to put the signal into a fixed frequency band. AKA, broadcast it like a radio signal using AM or FM modulation over the wire. That might be had off the shelf, but still be usable over the track.
I am sure we are talking about an extreme amount of electrical noise. You might use an off-the-shelf radio frequency remote on-off switch. Or hack one out of a radio-control toy. But, the electrical noise may make those systems inoperable.
Perhaps better way is to use an Infra-Red signal, like in your TV remote control. I am sure there are kits for this. In fact, I am sure there are versions, done just for PIC's, that would allow you to do more than just a single on-off.
I spent some time on the same problem before giving up on it. The bad news is that I never got 100 percent reliability on it. The good news is that the best I got was pretty good and only cost $3.50.
I bought a Radio Shack consumer IR receiver like those that receive IR remote control signals. I disassembled it and removed the IR photo diode (or photo transistor) and connected the leads that went to the photo diode to two capacitors that were connected to the track. At the transmitter I had an AVR sending out regular IR signals (like that found on a Sony remote control) through two capacitors connected to the track.
So, capacitively coupled 40 KHz transmitter, the track, and a capacitively coupled receiver that has an AGC and 40 KHz detector.
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.