News:

;) This forum is the property of Proton software developers

Main Menu

Robust coms connection

Started by TimB, Apr 05, 2021, 10:08 AM

Previous topic - Next topic

TimB

Hi,


I'm developing a product that 99% of the time will be connecting to my own boards. It will be fed 12v but internally run at 3.3v. It needs to talk via Serial back to the motherboard. The Motherboard will run at 3.3v also.

The issue is that it will be in an enclosure that stupid humans can prod their fat fingers and screwdrivers in.

So I need it to have robust coms that can stand being shorted or even zapped. I would rather not have rs232 levels, TTL direct would be better. I'm thinking perhaps a pullup based system where the usart goes through a buffer that just pulls lines low. It must also have static dissipation.

If I need to develop a standalone version that others can talk to then it would be simple to change it to an RS232 style coms.

Any thoughts?

Thanks

Tim

TimB


Hmmm, it turns out that it's a no big deal issue and there are loads of solutions

eg the SN74LVC2G07


Craig

Hi Tim

Just off the topic but would it be possible to eventually Pot your PCB to Protect it?
Regards Craig

top204

#3
That's what the old MAX323 chip did as well, except it did not have an in-built buffer. But it had a built in voltage booster, so the 5 Volt signal in, gave the 13 Volts out and vice-versa and they were Open Drain, so the signal in/out could travel quite a long way and was very robust, and connect together for nodes. I used them for many years in circuits, but that TI chip looks interesting and capable.

Also take a look at RS485 tranceivers because they have a good signal path as standard and they are not zero based.


gtvpic

Hello
RS485 or RS422 are very robust and can work in industrial environments.
Another option is inverted TTL but it is more delicate.

OG

#5
It made me a habit too.
I use rs485 even when two devices are side by side.
It is very reliable.

If you use rx interrupt, pay attention to a detail. Pull up MCU rx pin.
If the data line is idle, it may cause unwanted interruptions.
This situation causes unnecessary processing in mcu.


Also, it is best to use the rs485 data entry as below.
I use 10K resistors R1, R2, RT.

page 7, figure 9




okmn

UART/TTL-Serial network with multiple masters and multiple slaves

http://cool-emerald.blogspot.com/2009/10/multidrop-network-for-rs232.html

i am using via max485.

tumbleweed

Quote from: okaman on Apr 05, 2021, 07:40 PMUART/TTL-Serial network with multiple masters and multiple slaves

http://cool-emerald.blogspot.com/2009/10/multidrop-network-for-rs232.html

i am using via max485.
The "Multidrop network for RS232" portion of that page doesn't work... RS232 is +/- voltage, so you can't use a single diode to isolate the TX lines.

RS485 is designed to be a shared bus... I don't know why you'd add hardware like that to it.

TimB


I think the post went of on a tangent.  ;D

As I posted above "I would rather not have rs232 levels, TTL direct would be better"
"If I need to develop a standalone version that others can talk to then it would be simple to change it to an RS232 style coms."

The boards will be around 50mm apart. The new board will be in a standalone ali case as I need to keep eyes out so they do not figure out whats inside, at least not with out breaking a seal. As the board will be a module that is used in standard electrical cabinet I do not want it killed prematurely by fat fingers. Not only is it very expensive to cover warranty claims there is a very expensive component inside.

As I also posted I solved it using a SN74LVC2G07 open collector operation and ESD Protection Exceeds JESD 22 

Thanks

Tim


okmn

#9
Quote from: tumbleweed on Apr 05, 2021, 07:55 PMThe "Multidrop network for RS232" portion of that page doesn't work... RS232 is +/- voltage, so you can't use a single diode to isolate the TX lines.

RS485 is designed to be a shared bus... I don't know why you'd add hardware like that to it.

If you look more carefully you can see what I wrote in the title !! "UART / TTL-Serial network with multiple masters and multiple slaves"

i am using TTL to TTL level uart beetween to pic via to max485;
not rs232 for this reason i showed this way ..
may  be TimB can use if he want or  sees fit!

trastikata

Maybe an automobile certified CAN Transceiver (like MCP2544FD)? It may have the robustness you need.

QuoteProtection Against Damage Due to Short-Circuit Conditions (Positive or Negative Battery Voltage)
Protection Against High-Voltage Transients in Automotive Environments
Automatic Thermal Shutdown Protection
Suitable for 12V and 24V Systems
Extremely robust meeting automotive EMC hardware requirements
...


TimB

 ;D  ;D  ;D  ;D


As I posted above "I would rather not have rs232 levels, TTL direct would be better"
"If I need to develop a standalone version that others can talk to then it would be simple to change it to an RS232 style coms."

RayEllam

#12
Choose RS485.

Line length: 0.1mm to 1km.

Very robust to noise.

Addressable, multiple slaves on the same line.

One chip, cheap solution with an easy interface to a PIC (A lot of pics have a UART that is addressable I believe?)


trastikata

Quote from: TimB on Apr 06, 2021, 09:23 AMAs I posted above "I would rather not have rs232 levels, TTL direct would be better"
"If I need to develop a standalone version that others can talk to then it would be simple to change it to an RS232 style coms."

TimB MCP2544FD and other CAN devices are TTL, take a look at the datasheet.



TimB

#14
Sorry If I sound rude but I did explain in my first post "TTL" I have reiterated it several times.

CAN RS485 are not is not a TTL level coms system.
"Standard CAN bus transceivers operate over a limited common mode voltage range that extends from −2V to +7V."

RS458 "The allowable common-mode voltage is in the range −7 V to +12 V"

I'm going from one PCB to another. I have no need to introduce a CAN or any system like it to talk to a PCB 50mm away.

A HardDrive or PCI board is not running on a Can Bus.


okmn

#15
dear TimB,
you can use this way in your project via (max485 + any Pic MCU) for each boards
pic and rs485png.png

you also can use uart ttl to 485 converter if you want data transfer auto
https://www.elecrow.com/uart-ttl-to-rs485-twoway-converter-p-1545.html
https://electronics.stackexchange.com/questions/244425/how-is-this-rs485-module-working





UART/TTL-Serial network with multiple masters and multiple slaves



with a data format that you created frame haeader ;
for example start the data via B8 D8     ... xxxxxx..  (How many bytes you want is up to you)
even you can work 5v or 3.3v level easy.
and i used this kind filter option for 5v and rx tx (the cable rx/tx is 2meter)
uart ızolation1.png

TimB


okaman

I really appreciate the effort your putting in. Really I do.
But it not what I was asking for.

All I need to do is protect the TTL lines between 2 boards. A 4 line ribbon cable 50mm long is all there will be.
As I said in my second post, its a very common requirement and there are loads of solutions. I went for a SN74LVC2G07

The only other thing I may add its extra TVS diodes on the lines and a TVS on the power lines as well as reverse voltage protection on the power. EG a p channel mosfet.

Thanks again for the effort I'm sure people will find it very helpful.

m.kaviani

Quote from: TimB on Apr 07, 2021, 10:37 AMAll I need to do is protect the TTL lines between 2 boards. A 4 line ribbon cable 50mm long is all there will be.
Hi Tim,
What is your purpose when you said want to protect? protect against who?
if your boards are inside a cabinet take a piece of plastic glass and cover them.
if there is vibration choose a lockable pin header.
it is better to isolate the power by an MC34063AC simple switching chip which can work as isolated dc/dc SMPS.
use a ground line between two lines (4 lines goes 7 lines) to reduce EMI.
TVS diodes as Okaman said are good for EMS protection. 
Quote from: TimB on Apr 07, 2021, 10:37 AMAs I said in my second post, its a very common requirement and there are loads of solutions. I went for a SN74LVC2G07.
use 74HC125D as quod BUS buffer.

jmarkwolf

I have used 5V level serial, between PIC boards, on 10ft cables, on aircraft, for years, without issue. Just used some transient protection and shielded Beldfoil type cable. Wasn't a multi-drop scenario. Each "channel" had it's own TX/RX pair.

Comm radios, nor ignition noise ever gave me a problem.

YMMV (your mileage may vary).

TimB


"What is your purpose when you said want to protect? protect against who?"

My module will be used in a couple of places
1 inside an enclosure of my design, sealed with screws. I see no issue here.
2 Inside an electrical cabinet where the client will connect up the power (to a dedicated din rail power supply) and to their BMS system. Its this situation I'm worried about.

I think I will add my own controller to interface with a BMS Module i.e bacnet, as well as run a display / front end for a simple UI to cover diagnostics etc. In this instance my module will connect to my PCB and that is the one I'm talking about. There is no reason for it to be serial over such a short distance. It's the fat fingers poking around here I'm worried about.
Your absolutely right in saying place a cover over the whole lot. With a big sticker saying to not touch.

Normally I'm tight and build everything on a budget. But in this case with one of the components costing ~$100 I do not want any chance of the kit being made inoperative because someone touched it. So a few extra $ on protection is no issue.

Where the client wants direct connection to there own brand of PLC and omit my intermediate board then I can add RS232/RS485 etc etc.

Thanks on the MC34063AC I will check that out.