Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Connecting two microcontrollers through long wire

Status
Not open for further replies.

Yasserbn

New Member
I would like to transfer commands from one PIC microcontroller to
another one through a long command wire. The wire is around
200m.

I designed the attached schematic.
untitled.png

and here is my calculations

For Q1
Ib(Q1) = 4.3/1k = 4.3mA
Ic(Q1) = Ib(Q2) = 4.7/(220+220) = 10.6mA

The frequency of my commands will be 1khz.
Is there any problem with this design. Can the signal cross 200m
safely.

Do I need to make VQ1 = 12v and VQ2 = 12v instead of 5v to
raise the power up.

Another thing, the remote PIC will drive a 12v motor. Is there
any problem if I use my local 12v to power the remote motors.
Again, the distance between two controllers is 200m.
 
200m is a long distance to send power. You might want to send 12V down the wire and put a regulator at the far end.
Why not use a RS232 transmitter and receiver.
 
If you double up your circuit so you have 2 lines and make one allways the inverse the other and use twin twisted pair like stp lan cable you'll have a reasonable balanced transmission line.
Rs232 as mentioned is better, the max232c is a good chip to convert 5v to =-12v, it even contains the inverter to generate those voltages, you might need a 1k resitor in series with the line at that distance to slow down the ristime.
The quality of the cable also plays a part, screened stp cable is better than utp unscreened.
 
I doubt you will be able to drive a 12v motor from the derived voltage at the end of 200m

I use a special 4 core cable to run up to 150 metres... The resistance drop on the cable is about 6 ohms total... But as my system doesn't pull ANYWHERE near as much as yours will... I get away with it...

Some times it's necessary two double the wires... I use a modulation technique to provide power AND communicate down the same two wires... How much current does you motor need?
 
As Ian said, getting enough power down a 200M run is troublesome at best, not to mention raising the risk of ingress along the transmission path. Reliable communication at that distance will also prove to be tricky. I guess if the Motor current is small, you could get away with using a much higher line voltage, possibly 48V, regulating it locally, and superimposing your communication down a half decent coaxial cable. I think you will need to state what the Motor current/ total power requirements are before anyone can suggest anything more :)
 
If you are running a cable, why not use 4 core like CCTV systems do. As said, it does depend on the current your motor draws. You could also drop the frequency of the commands. 1KHz maybe borderline on an unbalanced system over 200m. Depends on the quality of the cable.
 
It will work, sort of, until the first lightning strike anywhere within 1km.
 
A big problem with your circuit in post #1, is that the voltage threshold between a 1 and a 0 is the 0.6V VBE turn on level of Q2. Which means that if you have more than 0.6 volts of difference between the two ends, you wont be able to get any data through.

One big reason why the RS232 standard used +/- 12 volts, was to be able to send data reliably even when there were a few volts of ground difference between two pieces of equipment.

For your application, I would sugest an opto coupler at the receiving end. The transistor at the sending end turns current through the LED side of the opto on and off. Because it is a current instead of a voltage, a couple volts of difference between end points does not interfere with the data. If you tie the LED in the opto to +12V (through an aproprtiate current limiting resistor) you should be able to get reliable data with up to ~8 volts of end point ground difference. Or, if you use a pair of wires and loop the + side of the opto back to the sending end, you now have total galvanic isolation between end points, allowing the difference to be thousands of volts.
 
i can't believe how many suggestions go for RS232...o_O

how about some numbers?
how many 12V motors?
what is the max current draw at any moment?
how reliable this should be?
how frequently will this be used (5min in a month, continuously, ...)?
is there a reason you don't want to use power supply at remote site?
what is the location? (indoor? outdoor? plant floor? sea bottom? glacier? volcano?foundry?)
how is cable routed? (together with powerlines, phone cables, inside metalic conduit...?)
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top