Cheap, Long Wire Low Power Serial Communications

Thread Starter

joeyd999

Joined Jun 6, 2011
5,283
I am working on a remote sensor that will communicate digital information via a serial interface. I am looking for some ideas in creating such an interface that has some significant design constraints. The sensor and the host both use PICs, and communication will occur between their respective USARTs. I am hoping that some "free-association" between like-minded (and even different-minded!) engineers will help to lead me to an acceptable solution.

The data rate will be less than 2 kBaud (RS-232 data format) over a 6 to 8 foot wire (bidirectional), which is, in most cases, very easy! But here are the constraints that make it challenging:

1. It must be cheap, cheap, cheap! I don't want to incorporate any (integrated) line drivers into the solution.

2. Communications should be relatively reliable (I can do error detection and correction) in high noise environments, but not necessarily perfect.

3. I don't mind using twisted pair, but I don't want to use shielded cable. Therefore, signal swings should be kept to a minimum. I like LVDS, but the transceivers are prohibitively expensive, use lots of power, and are overkill for my proposed data rates. I've also considered current modulation, as opposed to voltage modulation, too keep the radiated noise down.

4. Immunity to 4KV human body model static discharge is a must on both host and sensor. Additionally, it must meet CE for radiated RF emissions.

5. Ultra-low power! I'd like the entire comm solution (both ends) to consume less than a few hundred microamps at full speed. Please don't propose RS-232 line drivers...too much power (and too expensive).

6. The cable will also provide power (9V from an alkaline battery) from the host to the sensor.

I know that I can simply wire the ports together over the line, but this will provide no ESD protection and signal reflection due to mismatched impedance may cause data errors. Also the large signal swings and sharp edges can cause RF emission problems, especially in an unshielded cable.

FYI, both microchips will be operating at either 3 or 3.3V.

Any ideas?
 

t06afre

Joined May 11, 2009
5,934
You have quite low data speed. And the distance is not that long. I would at least try to se how direct pic to pic communication does it. It should be quite simple to ESD protect the data lines
 

thatoneguy

Joined Feb 19, 2009
6,359
Which PICs are you using? Some have ESD protection passing the Human Body Model on their I/O.

A 50 to 100 ohm resistor in series with the data line, and a 10nF/0.01uF cap from data line to ground will also help with ESD faster than diodes can.
 

Thread Starter

joeyd999

Joined Jun 6, 2011
5,283
You have quite low data speed. And the distance is not that long. I would at least try to se how direct pic to pic communication does it. It should be quite simple to ESD protect the data lines
Which PICs are you using? Some have ESD protection passing the Human Body Model on their I/O.

A 50 to 100 ohm resistor in series with the data line, and a 10nF/0.01uF cap from data line to ground will also help with ESD faster than diodes can.
To be frankly honest, I have, in the past, made it a rule never to expose CPU pins directly to the world. The idea with a series resistor & cap make sense, though. I think I would need to apply the network at both ends of each line for it to satisfactorily protect both the transmitter and receiver. Perhaps even some schottky diodes at each tx/rx pin as well.

A nice thing about this solution is it will also slow down the signal edges on the wire, helping to suppress radiated energy. And it would limit power dissipation in the case of a short circuit.

Also, I am (surprisingly) not aware that some PICs incorporate ESD protection at the human body model levels! Keep in mind that, as far as CE is concerned, you are considered to have failed the test if the DUT malfunctions under ESD. It is not enough that it is not destroyed! So, if, say, the CPU resets or hangs-up, that would be considered a failure, even if proper operation can be successfully restored after the event.

FYI, the host will use a PIC18F84J90. I have not decided what the sensor will use yet.

Yes, I will try it. In the mean time, any other ideas?
 

thatoneguy

Joined Feb 19, 2009
6,359
For the distance involved, you shouldn't run into any issues. You could even use SPI for faster communication over that distance. The voltages you are working at won't really allow for much EMI, and the resistor/diode with cap at pin can be used on both ends.

You may need to experiment with value if you have glitches with communication (smaller resistor, then smaller cap). For 2400 baud or less, you shouldn't have problems. A PICKit 2 or a scope will help you track down issues if you do run into them, anyway.
 

John P

Joined Oct 14, 2008
2,026
For low data rates, it's perfectly possible to make PIC processors do their own LVDT interfacing as in RS-485. When a processor is receiving, run the line into a comparator (a lot of the PIC chips have this) and when you transmit, just set the pins to be outputs.
 
Top