Author Topic: PCB Isolation from long data cable (0 to 10V)  (Read 1615 times)

0 Members and 1 Guest are viewing this topic.

Offline hobbyelectronicsTopic starter

  • Regular Contributor
  • *
  • Posts: 85
PCB Isolation from long data cable (0 to 10V)
« on: January 28, 2021, 12:23:40 pm »
Hello everyone,

I am looking at a possible project which will require a number units (PCBs) which all require a 4 option selection from a remote box. Maybe up to 50 units on one control box
All the modules or PCB's will be located maybe 10 meters apart but all need to be connected to one control box. So the cable will loop or daisy chain from one module to the next. Power will be supplied separately to each unit.
The PCB will have a microcontroller on it for the functions. So, ideally the control box will have 4 switches on it. When any switch is pressed all the nodes or modules need to be able to see the switch selection and to select the correct function.

Now, I could so this with some sort of network, maybe RS485 and have all the nodes set to the same address maybe or some other method, but this needs to be as cheap as possible and more importantly robust as possible. So really the nodes need to be isolated from the cable maybe and also from a noise point of view each node needs good noise immunity. The 'network' can be a simple 0 to 10V signal for example (0-2.5, 2.5-5, 5-7.5, 7.5-10V) with each selection sitting in the middle of each voltage band.
but as the cables will also be close to 3-phase power cables, it does require some sort of consideration for noise and or isolation.

Others thoughts were 0 to 10V with some sort of galvanic isolation, 2 to 20mA loop, RS485, Onewire, or some other known network / protocol of which their are so many.

Any ideas for a simple, low cost but robust system would be a great help.

I hope that this makes some sort of sense.

Thanks

John

 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2130
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #1 on: January 28, 2021, 01:21:25 pm »
RS485 was made for this.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1237
  • Country: nz
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #2 on: January 28, 2021, 05:41:37 pm »
Do you need to isolate the "50 units in one control box" from each other? Do they share common power rails?

As fcb said, RS485 is a strong candidate. Given the proximity to 3 phase power cables, using a shielded cable is probably a good idea to cut down the risk of interference.

On the controls: 4 switches doesn't sound so bad, but keep an eye out for scope creep...
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #3 on: January 29, 2021, 01:11:10 am »
When I was a kid my dad worked for the railroad as an "operator", the guy sitting at a place where there were switches that had to be operated.  There were levers coming up from the floor about four feet long that had to be moved about two feet to operate the switch out on the track as much as a hundred yards away.  I'm guessing that's not the type of switch being discussed here. 

If you are sending the same 4 switch states to all the nodes, why not four separate wires?  For that I think I would just use a low impedance drive with controlled edge rates.  The nodes can be on the same 4 lines without worrying about signal integrity if you drive slow transitions.  You can use 6 conductor telephone wire and even modular jacks to keep it inexpensive.  I'm picturing a simple circuit with a couple of transistors and diodes to drive each output zero to 5V with 100 ohm drive impedance (rather noise immune).  Have some half a dozen jacks on the control box and let the remotes act as splitters so you can hang one or two other boxes off of each one. 

The input circuits would be something simple like a series resistance and a zener for protection and an RC to remove high freq noise.  Then either a comparator for level detection or a Schmitt trigger logic input can be used.  I sometimes use an LED for input protection, but the voltage is actually a bit low unless you use a blue or white one with a higher forward voltage.  But it gives you a visual indication which is nice.
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #4 on: January 29, 2021, 01:14:57 am »
You first need to decide if you need galvanic isolation or not though.  RS-485 does not provide that automatically.  I think you can get isolated 485 devices, but they will be a bit pricey.  20 mA current loop makes that easy with a simple opto-isolator. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline hobbyelectronicsTopic starter

  • Regular Contributor
  • *
  • Posts: 85
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #5 on: January 29, 2021, 10:53:06 am »
Hello,

Thank you for all your replies.

Galvanic isolation is not essential but would be a nice bonus if the cost was low enough but that seems out of the question from what I have seen. Each node runs of the mains with its own PSU and power etc. It would be nice to isolate each node from the other but not required (???).

I like the idea of a RS485 solution as I have worked on this in the past so 'should' be straight forward.
However, this has now changed slightly as I now longer need a switch box to control it but maybe a small powered box with two inputs, (Two pins each), which when shorted will will give me the 4 options I need. These can then be controlled by another automated system relay contacts to make the selection. This part has not yet been decided and may be from a PLC. OR, any other input method for selection could be considered.

As to the protocol, I could use ModBus but then that's an overkill as I only need to send four different commands only and can be simplex without any reply etc, but with some error checking or CEC / LRC.  The control box could always send the command once every 60 seconds so if the data was corrupted then it would auto update every 60 seconds.

I was looking at THVD1429DT, which is a low cost transceiver but also has surge and transient protection built in and as you stated, using a screened twisted pair cable will offer added protection. With regard to the 120 Ohm terminator resistors I was looking at two 60 Ohms in series with the centre tap to ground via a small cap which will make a low pass filter adding more noise protection.

With regard to the number of nodes, I could have potentially up to 256 (Or 247) nodes on one control box (Changed from before), but at this is not know yet. And as the commands would need to be sent to all nodes, I could have the same address for each node so its like a 'broadcast address' and as each node does not need to send back data this would be a bonus maybe, as I would not need a method of knowing or setting each address and adding it to the control box. Nice and easy! Just add each node without worrying about addresses.

What would be nice to find is a small low cost off the shelf box with a few inputs that would simply send out a RS485 command (Maybe broadcast modbus command). Then I would not have to worry about making the control boxes. But I can't seem to find anything. Maybe up to £50 for a ready built module (Din Rail mount??). Seems maybe some sort of PLC I/O or something perhaps.

With regard to 0-10V selection or a 2 - 20mA loop etc It looks like I would have to sort out my own solution rather than a chip ready solution as with RS485 for the actual interface.

As with Large 4 foot levers for switches etc, that would be fantastic if I could get away with it, bw like going back to the old days......

One question I have is that in theory RS485 should work up to 256 nodes up to 1200m at very low speed, but how reliable would this be. I cannot test it until all nodes etc are built. Then it might be too late. I can test a few maybe knocked together but not 50 or 100+ for testing over long cables???

Thanks again, and please let me know if you have any more ideas.

Sorry to waffle on about all this....

John



 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2130
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #6 on: January 29, 2021, 02:33:16 pm »
Normally RS485 is quoted as 32 or so nodes.  Modern (as in last 25yrs) RS485 transceivers have a lower loading on the bus (often you'll these quote "quarter-load" or "eight-load"), which allows many more units. Speed on the bus is function of bus capacitance and at the upper end of the speed range you'll be limited by reflections, terminations etc..

Go as low as you need to.  I've built many RS485 comms systems over the years, some several KM long, others really fast (10Mbps) - it's a very versatile ELECTRICAL standard.

For 256 nodes, i'd probably break the system down into perhaps 8 zones - regardless of network design - makes debugging simpler.  Problem with optocouplers is really the loading they'll pose, if you get some nice ones that need a whiff of current (say 1-2mA) for reliable operation, then your still faced with generating 1/4 amp or more if all driven in parallel. Again break the system down into a few seperate systems and it becomes much easier to drive without resorting to custom drivers. LDA111 optocoupler has a very low input current, glacially slow - but with care& feeding would make a good isolated system.  You could even use RS485 drivers to drive optocouplers.

Reliability: RS485 is very robust, certainly more so than radio. Your main issue would be ground loops that might push the bus outside the common mode limits. Isolated RS485 is pretty bullet-proof.

https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #7 on: January 29, 2021, 09:13:14 pm »
I don't understand your preference for a serial protocol over a differential pair that will require an MCU to receive the commands and activate whatever it has to activate.  Maybe the remote boxes already have MCUs in them? 

I still think a 5V single wire driving 100 ohms for each control is the easiest solution.  Perhaps I'm not clear on the possible states.  When you originally talked about 4 switches, is that 16 combinations or is it 1 of 4 and possibly none giving 4 or 5 combinations? 

I really don't follow about the inputs to the control box being two pairs of two wires.  Are they in addition to a ground or is that a contact closure on each pair giving only 4 possible states, none, either one or both contacts closed?  If it's only 4 states, why not ship the contact closure to all the boxes?  It's only four wires.  A relay contact is about as immune to noise as you can get.  Add a solid pullup for when it is open and it will be very noise immune.  That's what controls railroad signals and they run the current through the rails of the tracks! 

I also worked for the railroad and relays controlled a lot of equipment.  They *never* worried about EMI impacting them. 

As an aside, they had some seriously reliable equipment.  The relays in the cabinet controlling the signals had glass bottoms with hand written labels inside.  The relays were often over 50 years old and the contacts would periodically be rebuilt as they wore out.  The notes indicated the contacts had not been replaced for over 25 years! 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #8 on: January 29, 2021, 11:53:10 pm »
BTW, galvanic or any other requirement is either required or not required.  Saying it is "a nice bonus" is not a good way to deal with requirements. 

That said, it is not difficult or expensive other than that it requires an appropriate drive, somewhere around 10-20 mA I believe.  You would need to check the data sheets, it might do with less. 

That is not a hard or expensive requirement to meet.  It simply requires a driving circuit that is just a couple of transistors.  Since you can't put 50 of them on one string it would require some four or five drivers, so 10 transistors driven from some higher voltage (48V is a common supply) or more parallel circuits from a lower supply like 5 devices from 12V, so 10 strings. 

Actually I took the time to draw up a LTspice simulation and the optos they have in their library are more like 1.1V per so a 12V supply can drive 9 in simulation but 8 in a real circuit gives some margin.  Added wave shaping to slow the transitions so they don't generate RFI, about 30 uS rise and 60 uS fall times.  Delay time is fairly symmetrical at 40 uS so not much pulse width distortion.  Plenty good at 1.2 kbaud.  The actual current drive for these parts seem to be significantly lower than 20 mA, but I guess that's just margin.  Still, the output starts changing at 200 uA through the LED.

Here is a schematic.  Don't assume any of the parts shown are recommended.  I just picked parts to run the simulation. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: us
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #9 on: January 30, 2021, 07:43:02 am »
You can do an isolated RS485 interface for about $3 at qty 250 using readily available digital isolator ICs, a prepackaged isolated DC-DC converter, and a transceiver or receiver of your choice.  Maybe an extra $0.50-1.00 if you want some basic bus protection.  Having 256 nodes on one bus is right at the limit for 1/8 unit load transceivers, but you can buffer the bus at some convenient midpoint (easy with simplex) or just have more than one output from the controller.  If you only have four states, that's just two bits, so a single byte transfer has plenty of excess bits for validation.  No need for any addressing or anything.  Or you could go even simpler and use a pulse length code, which would allow you to loosen the timing beyond what a typical UART would require and maybe skip having crystals or trimmed oscillators on the receivers. 
 

Offline hobbyelectronicsTopic starter

  • Regular Contributor
  • *
  • Posts: 85
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #10 on: January 30, 2021, 01:09:00 pm »
Hello everyone and thanks for all the replies.

OK, my exiting board (Node) already has an MCU onboard to measure and control other things. This all works ok fine. One new feature required is to be able to select some of these features remotely, but only four options. So the need is basically to be able to select four options, from a remote box somewhere controlling each network with however many nodes on it.  This remote box could have switches on it for the selection but this has now changed and the control box may need to be controlled (the 4 selections) automatically from another system which may be a PLC or something offering dry contacts or something else (Unknown as yet). So the overall requirement is to be able to select one of four options to each of the many nodes, but in a robust, low cost way that is quick to develop (A matter of months). The selection will always be sent to all nodes, so they will all be the same, so do not need to be individually addressable.

All though I do not know if isolation or galvanic isolation is an actual requirement yet but this is something I need to look into further and may have benefits of making a more robust system, all though actual isolation may not be required

Regarding the control box having 2 inputs but 2 connections each, this was simply to allow the control from the main system to make the selection on the control box via a relay contact. So, for example if the main system turns out to be a PLC then using dry contacts to make the selection on the control box. The two connections on the control box for each input could be something like just shorting these would be to pull one down to ground (One pin ground, the other pulled high). Or even using an optocoupler for the inputs. The MCU in the control box would then simply see the one of four possible choices and send the correct selection command down the RS485 network to all the nodes, which in turn would set the appropriate choice.

As only a few bytes will need to be sent when the selection is made or changed, speed is not a problem. As slow as possible really. As this would be a simplex system (So each node does not need a unique address), if the data get corrupted or not received, the control box would send out the command every few minutes. So, if their was a data problem or a node did not receive the correct command, then the command would be resent in due course and so on. The command block would have the start byte, broadcast address, command, and CRC or LRC and maybe followed by a end byte.

The main thing with all of this is that as the 485 cabling will be next to a 3 phase power system, its needs to be reliable with good noise immunity, which is why I like the idea of isolated 485 drivers, plus the nodes run on a 3 phase supply, making them as safe and immune as possible seems to me as a benefit resulting in a reliable solution.

As FCB said, ""Reliability: RS485 is very robust, certainly more so than radio. Your main issue would be ground loops that might push the bus outside the common mode limits. Isolated RS485 is pretty bullet-proof.""

I really like the sound of "Isolated RS485 is pretty bullet-proof".

Doe that make some sense?

An alternative could simply use just 4 wires and have a 2 relays in each node. Putting 0v / 24V on each pair of wires would close the relays making the 1 of 4 selection in the nodes. All though simple, this would mean the control just needs to supply 24 volts, but if each relay coil draws say 20mA (Maybe less) that could mean 2 Amps for 50 nodes if the selection was option 4 with both relays on. But would be very simple because it would be relay contacts in the control box supplying 24 V to the relay coils in each node (Relays driving relays really). But, all though simple would this cause other problems or issues. Not sure what to think of the idea really. Having a RS485 network, also gives the options for adding extra features or commands later if needed down the road.

Thanks

John

 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #11 on: January 30, 2021, 09:01:08 pm »
How about you remove the remote box altogether and simply wire the same two dry contacts to every node in the system?  Each system can contain the current source (a resistor from 5V) requiring some nominal current be sunk, say 2 mA.  Now your current requirement is only 100 mA and it's just a rating on the contacts, not an external supply. 

If you need isolation the nodes can use a simple differential circuit essentially the RS-485 receiver with a bias on the input.  Open contacts the receiver sees a +.  Close the contacts and the receiver sees a -. 

I don't see a need for a box to turn dry contacts into an RS-485 signal. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline hobbyelectronicsTopic starter

  • Regular Contributor
  • *
  • Posts: 85
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #12 on: February 07, 2021, 07:32:09 pm »
Hi gnuarm,

Been thinking about this (I have another post discussing the Modbus), but also like the look if either using a MAX22191 or ISO1211 device (PLC style input) The MAX chip will give me a simple PLC style binary digital input and take power from the 24v bus, with a -60 to + 60 input. Two 0/24V lines will give me the 4 options I need and give me some isolation. Have a look at the two data sheets, these are interesting devices and may be suitable, especially the MAX22191 with a dual opto-coupler being fed by two MAX2211 devices, which can take its power from the input and the slaves do not need to to have isolated power to these devices. Just don't know the effect of having many all on the same 24V line???

Looks interesting......
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #13 on: February 07, 2021, 10:49:22 pm »
Hi gnuarm,

Been thinking about this (I have another post discussing the Modbus), but also like the look if either using a MAX22191 or ISO1211 device (PLC style input) The MAX chip will give me a simple PLC style binary digital input and take power from the 24v bus, with a -60 to + 60 input. Two 0/24V lines will give me the 4 options I need and give me some isolation. Have a look at the two data sheets, these are interesting devices and may be suitable, especially the MAX22191 with a dual opto-coupler being fed by two MAX2211 devices, which can take its power from the input and the slaves do not need to to have isolated power to these devices. Just don't know the effect of having many all on the same 24V line???

Looks interesting......
These parts are essentially the same as the current loop, but with the current loop driver on each receiver circuit. 

The MAX chip requires a factory quote for lead time.  Not sure what that means.  At least the ISO part is stocked.  What do these parts do for you a simple opto-isolator won't?  They are current driven so you still need to size a power source to the total current required.  The current is a bit over 2 mA in some of the cited configurations.  The two programming resistors set the current and voltage. 

I provided a current source circuit previously.  I would use that before using a special purpose IC.  Remember that nearly any device can be subject to shortages and we are presently seeing such shortages on many parts.  Any device can have long lead times without notice.  Using a transistor based circuit makes it much easier to find second sources. 

Here is a version of the circuit posted previously, modified for driving a single opto from a 24V source (between 5V and 400V with the right parts).  You can use a garden variety NPN device and the circuit will operate up to a Vin set by the Vce breakdown.  Inexpensive devices will allow the circuit to survive a 240V line cross.  Adding the LED provides reverse voltage protection or a standard diode can be used.  The LED gives a visual indication of reversed polarity.  Or instead a diode bridge can be added to the input to make the circuit work in either polarity.  To survive a 240V power cross R1 should be sized to handle 1.6W and Q1 must handle 0.85W.  Those numbers are based on the peak voltage and so can be adjusted for the RMS values, with margin added for safety of course. 

Here is an updated copy for the single channel opto with input protection.  Funny, the idea of adding protection to the driver of an opto-isolator when that is what the opto-isolator could be doing.
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: ru
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #14 on: February 10, 2021, 12:00:39 pm »
Today optical lines are not expensive at all. Maybe this option will seem good to you - you have full protection from all connection problems - no interference, no fear of potential differences.
The radio channel also provides a good isolation, but it is less protected from interference.
And sorry for my English.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: ru
Re: PCB Isolation from long data cable (0 to 10V)
« Reply #15 on: February 10, 2021, 12:07:48 pm »
As for the RS-485 limit of 32 nodes.

I use the switch to select the connection of the pull-up resistors and do not turn them on on every device, usually in the middle and at the end.
I have had the experience of connecting 57 nodes with a total distance of just under 1000m. I have experienced no losses at the speed of 9600 and extremely rare losses at 19200. For connection, I used an outlet and RJ-45 plug cat.5.
And sorry for my English.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf