RS485 hardware communication

653 views
Skip to first unread message

zdenek...@pells.cz

unread,
Feb 12, 2015, 5:13:40 PM2/12/15
to sou...@googlegroups.com
Is supported RS485 two wire communication (only RX/TX) , without third control PIN in SOULISS framework? I need one more free pin on arduino.

see attached pict.
Zdenek

Di Maio, Dario

unread,
Feb 12, 2015, 5:38:25 PM2/12/15
to sou...@googlegroups.com

Is supposed to work, in the usart drivers of vNet (located in conf/usart) you can disable the TxENABLE.

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/457c9cd1-c82f-4701-9cd0-5ce4c711e0af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Juan Pinto

unread,
Feb 13, 2015, 9:46:39 AM2/13/15
to sou...@googlegroups.com
If you test share your results! It's interesting. As Dario say this must work.
 
Regards.

Fulvio Spelta

unread,
Feb 14, 2015, 2:40:00 AM2/14/15
to sou...@googlegroups.com
I'm using 2 pin communication on ProDINO2 without problems

zdenek...@pells.cz

unread,
Feb 14, 2015, 6:59:39 AM2/14/15
to sou...@googlegroups.com
what is your harware schema?
Zdenek

Dne sobota 14. února 2015 8:40:00 UTC+1 Fulvio Spelta napsal(a):

Fulvio Spelta

unread,
Feb 19, 2015, 3:17:46 AM2/19/15
to sou...@googlegroups.com
Sorry I missed your post. The schema is simple. I'm using "row" of 4 ProDINO connected using the RS485 pins that are already available onboard.
Connect all "A" together and all "B" together. If the boards have different power supply connect togher also the GND (in my case isn't needed because the boards are powered from the same power supply)


zdenek...@pells.cz

unread,
Feb 19, 2015, 3:34:29 AM2/19/15
to sou...@googlegroups.com
Here is misunderstanding , ProDino have harware chip on board RS485 is two wire (A,B) but from CPU are three pins  RX / TX / TXENpin - and I would like to save TXENpin for other purpose -  I do not have hardware chip on board - see my schematics



Dne čtvrtek 19. února 2015 9:17:46 UTC+1 Fulvio Spelta napsal(a):

Fulvio Spelta

unread,
Feb 19, 2015, 3:45:43 AM2/19/15
to sou...@googlegroups.com
Dario sent the hint:
Is supposed to work, in the usart drivers of vNet (located in conf/usart) you can disable the TxENABLE.

Have you a try ?

zdenek...@pells.cz

unread,
Feb 19, 2015, 3:47:36 AM2/19/15
to sou...@googlegroups.com
I will test it  on sunday

Dne čtvrtek 19. února 2015 9:45:43 UTC+1 Fulvio Spelta napsal(a):

starfsh133

unread,
Jun 6, 2015, 3:13:39 PM6/6/15
to sou...@googlegroups.com
Hello Zdenek,

Did u test the communications with this circuit?? and did it work?

I wan to use usart communications on RS485 with an Arduino Mega and a couple Pro mini clones.... Any one know how to change serial port on the Mega with friariello??

Best Regards,
Jan


Op donderdag 12 februari 2015 23:13:40 UTC+1 schreef zdenek...@pells.cz:

Di Maio, Dario

unread,
Jun 6, 2015, 3:15:22 PM6/6/15
to sou...@googlegroups.com

Here the answer
https://github.com/souliss/souliss/wiki/Transceiver%20Connection

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

guyc

unread,
Jun 19, 2015, 5:42:48 PM6/19/15
to sou...@googlegroups.com


I was testing the communication between 2 nodes over RS485. I also will not use the TXENABLE pin.

I usartUsrCfg.h I found that the TXENABLE is by default desabled (#define TXENABLE 0)

I also put in my code :
#define USARTDRIVER_INSKETCH
#define USART_TXENABLE     0
#define USARTDRIVER Serial1

but there is no communication

When I connect the TX-pin from one node to the RX from the other and vise versa, the communication is ok




Di Maio, Dario

unread,
Jun 19, 2015, 8:04:37 PM6/19/15
to sou...@googlegroups.com

If you are using rs485 txenable must be at 1 and you should wire that pin.

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

guyc

unread,
Jun 20, 2015, 12:52:22 PM6/20/15
to sou...@googlegroups.com
Dario,

When I read your answer of Febr. 12th on the question of Zdenek, it can work without the third pin for TXENABLE .


"Is supposed to work, in the usart drivers of vNet (located in conf/usart) you can disable the TxENABLE."


Was this answer wrong or is something changed meanwhile ?

guy

Op zaterdag 20 juni 2015 02:04:37 UTC+2 schreef Dario Di Maio:

Di Maio, Dario

unread,
Jun 20, 2015, 12:54:02 PM6/20/15
to sou...@googlegroups.com

Generally, if you have an rs485 drive with txenable, you must use it.

If you cross connect two usart directly, you don't need it.

Dario.

From Mobile.

Fulvio Spelta

unread,
Jun 24, 2015, 3:29:00 AM6/24/15
to sou...@googlegroups.com
I'm using RS485 on proDINo 2 without TXENABLE and A-A, B-B straight connection.
Check the communication over RS485 using a RS485-USB transceiver and e terminal emulator program on a pc that will capture all the traffic over the RS485 line.

Di Maio, Dario

unread,
Jun 24, 2015, 4:17:18 AM6/24/15
to sou...@googlegroups.com

On DINo TXENABLE is set by default once selected the configuration file for that board.

With rs485 the use of the TXEN is a must.

Dario.

From Mobile.

On 24 Jun 2015 09:29, "Fulvio Spelta" <fulvio...@gmail.com> wrote:
I'm using RS485 on proDINo 2 without TXENABLE and A-A, B-B straight connection.
Check the communication over RS485 using a RS485-USB transceiver and e terminal emulator program on a pc that will capture all the traffic over the RS485 line.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

zdenek...@pells.cz

unread,
Jun 24, 2015, 4:26:02 AM6/24/15
to sou...@googlegroups.com
Hi 
I am back, I have tested this communication wihout TxEnable and my advice is  - the best way is - use this pin ! 
because this hardware proper function depend on transfer speed  - in some case I must add capacitor to gate Q1 for proper function
and for high speed I must change Q1 with lower gate capacity.

Dne středa 24. června 2015 9:29:00 UTC+2 Fulvio Spelta napsal(a):

Di Maio, Dario

unread,
Jun 24, 2015, 4:35:21 AM6/24/15
to sou...@googlegroups.com

Goot tip. Q1 which pin is in your schematic?

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

zdenek...@pells.cz

unread,
Jun 24, 2015, 8:29:51 AM6/24/15
to sou...@googlegroups.com
The capacity depends on R4 and parasitic capacitance Q1 gate  - thats mean you must experiment on each circuit for each serial speed
this is cause for using TxEnable pin 
Zdenek

Dne středa 24. června 2015 10:35:21 UTC+2 Dario Di Maio napsal(a):
xx1.jpg

guyc

unread,
Jan 29, 2016, 6:08:08 PM1/29/16
to souliss


I was testing my communication with the souliss app.

1.  When I loaded the the database, the saw the 5 nodes, but no typicals. After pushing 'rebuild' it was OK;

2. node1 has 33 slots, but I can see only 21  slots ( 11 devices) in the app.
  I increased the payload to 66, but nu result.
 In the github  I found that max 25 slots  can be transferred. Is it possible to increase this to a higher value ?

3. The health of Node0 (gateway, is very good, but the health of the other nodes is very poor.

Di Maio, Dario

unread,
Jan 30, 2016, 2:26:32 AM1/30/16
to sou...@googlegroups.com

How many nodes have you on the rs485 bus? How long is it?

Keep those limits as are unless you have few nodes over a short line.

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

guy caluwaerts

unread,
Jan 30, 2016, 3:40:04 AM1/30/16
to sou...@googlegroups.com
I have 5 nodes. The distance between the nodes is very short. 3 nodes are in one cabinet and the others are also together in a cabinet 3 meter from the first



Op za, jan. 30, 2016 om 8:26 schreef Di Maio, Dario
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/QVIYfV9-9po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Jan 30, 2016, 4:46:27 AM1/30/16
to sou...@googlegroups.com

How your healthy values are after at least 1h from a reset of all nodes?

Does your network behave properly?

Dario.

From Mobile.

zdenek...@pells.cz

unread,
Jan 30, 2016, 4:59:13 AM1/30/16
to souliss

Ho many Rz you have installed? There must be only two on the bus active.
Zdenek


On Saturday, January 30, 2016 at 9:40:04 AM UTC+1, guyc wrote:
I have 5 nodes. The distance between the nodes is very short. 3 nodes are in one cabinet and the others are also together in a cabinet 3 meter from the first
Op za, jan. 30, 2016 om 8:26 schreef Di Maio, Dario

How many nodes have you on the rs485 bus? How long is it?

Keep those limits as are unless you have few nodes over a short line.

Dario.

From Mobile.

On 30 Jan 2016 00:08, "'guyc' via souliss" <sou...@googlegroups.com> wrote:


I was testing my communication with the souliss app.

1.  When I loaded the the database, the saw the 5 nodes, but no typicals. After pushing 'rebuild' it was OK;

2. node1 has 33 slots, but I can see only 21  slots ( 11 devices) in the app.
  I increased the payload to 66, but nu result.
 In the github  I found that max 25 slots  can be transferred. Is it possible to increase this to a higher value ?

3. The health of Node0 (gateway, is very good, but the health of the other nodes is very poor.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/4fceab13-fb1c-4dcf-b2eb-3043578c644c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/QVIYfV9-9po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

guy caluwaerts

unread,
Jan 30, 2016, 6:20:04 AM1/30/16
to sou...@googlegroups.com
Dario,
Gone do the test again today and wait for minimum one houre to see the result
Op za, jan. 30, 2016 om 10:46 schreef Di Maio, Dario

guy caluwaerts

unread,
Jan 30, 2016, 6:20:05 AM1/30/16
to sou...@googlegroups.com
I did test without resistors and with the resistors. Result is the same. Rs485 is only 20 cm between the 2 nodes I' m testing with
Op za, jan. 30, 2016 om 10:59 schreef zdenek...@pells.cz

For more options, visit https://groups.google.com/d/ optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/QVIYfV9-9po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

zdenek...@pells.cz

unread,
Jan 30, 2016, 12:27:47 PM1/30/16
to souliss
The 20cm is too short, could you test longer wire 5m or more (UTP cable for LAN network)  - test two nodes with Rz=120ohm 
Zdenek
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

Di Maio, Dario

unread,
Jan 30, 2016, 7:48:58 PM1/30/16
to sou...@googlegroups.com

Zedneck are you using rs485 with Souliss?

Dario.

From Mobile.

zdenek...@pells.cz

unread,
Feb 1, 2016, 2:25:55 AM2/1/16
to souliss
I am in testing phase with my own design of hardware based on arduino micro (8 wall switch input and 8 relay output). 
Now testing gateway 2560 and two nodes and I have plan to run 6 nodes together
It take long time because I must finish my new house first.

guyc

unread,
Feb 1, 2016, 4:16:49 AM2/1/16
to souliss

Dario,  indeed after an longer period the health became green.

After I removed the node with the 33 slots, the system was working.

Back to my second question of Jan 30th :

In the github I found that only 25 slots can be transmit via RS485.
Is there a possibility to increase this to more slots ?

 guy

Andreas Karl

unread,
Feb 1, 2016, 5:59:24 AM2/1/16
to souliss
guyc which board are you using for your setup? I made a prototype which consists a Pro mini, onboard mini buck converter, 2 RJ45 jacks and a MAX485. So 2 wires of the RJ45 cable are 24V/ground and another 2 are RX/TX that's it.

Di Maio, Dario

unread,
Feb 1, 2016, 6:24:49 AM2/1/16
to sou...@googlegroups.com

Technically you can, but I suggest you to don't.

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

guy caluwaerts

unread,
Feb 1, 2016, 7:06:00 AM2/1/16
to sou...@googlegroups.com
Andreas,

I'm using 5 arduino Mega boards,

one ethernet board ENC28j60, but I gone replace that by a W5100 board, because sometimes I'm loosing communication specially whit scenes. The only possibility at that moment is to reset the gateway node.

guy




From: Andreas Karl <andreas...@gmail.com>
To: souliss <sou...@googlegroups.com>
Sent: Monday, February 1, 2016 11:59 AM
Subject: Re: [souliss] Re: RS485 hardware communication

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/QVIYfV9-9po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

guy caluwaerts

unread,
Feb 1, 2016, 7:08:06 AM2/1/16
to sou...@googlegroups.com
Don't think so. When I connect the node with the 33 nodes ( and sometimes I have communication with that node), the app shows only 21 nodes.

guy




From: "Di Maio, Dario" <dario....@souliss.net>
To: sou...@googlegroups.com
Sent: Monday, February 1, 2016 12:24 PM

Subject: Re: [souliss] Re: RS485 hardware communication
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/QVIYfV9-9po/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Feb 1, 2016, 2:02:29 PM2/1/16
to sou...@googlegroups.com
To get it, you need to change several parameters. Having longer frame will increase the chance that the collision avoidance will delay too much the transmission, that's why I say that's better if you don't.

Dario.

Andreas Karl

unread,
Feb 2, 2016, 4:07:38 AM2/2/16
to souliss
Has anybody considered powering nodes by CAT5 cable and also handle RS485 TX/RX communication over the same cable?

Electroguard

unread,
Feb 2, 2016, 6:15:36 AM2/2/16
to souliss
It should work, it does for CCTV, where you can 'inject' power and RS485 PTZ control down the same Cat5 cable.

Two problems to watch out for are voltage drop on longer runs and possible crosstalk, so perhaps use bigger reservoir caps and slower baud rate.

You will also need to connect your RS485 grounds via the Cat5 cable, because you won't be able to 'cheat' as is often done by referencing each RS485 to ground via their psu's rather than running a ground wire between them (RS485 is supposed to have a ground wire between nodes).

guyc

unread,
Feb 2, 2016, 10:34:29 AM2/2/16
to souliss
I will give it a try to get all my slots visible on the app. I did the test now with a W5100 ethernet shield, but the result is the same as with the ENC28j60 shield. The app shows only 12 of 16 typicals in node 1. (27 slots)

my parameters :
      max payload : 66
     
max number of nodes  : 10
     
max number of slots 41

Which parameters do I have to change so that the node will transfer all the slots ?


Di Maio, Dario

unread,
Feb 2, 2016, 3:50:00 PM2/2/16
to sou...@googlegroups.com
You have to increase the vNet and MaCaco payloads of the same quantity and check that the same increase applies also for the USART max payload.

Dario.

Di Maio, Dario

unread,
Feb 2, 2016, 3:53:48 PM2/2/16
to sou...@googlegroups.com
Yes, there were some design by Marco Signorini based on this assumption. Many anti-theft system use a single cable for both power and signal.

More than a CAT5 that has tiny wires, there are cables for anti-theft with bigger wires for power.

Dario.

Andreas Karl

unread,
Feb 3, 2016, 1:10:48 AM2/3/16
to souliss
I read the topics regarding the RS485 board by Marco Signorini but I didn't find anything about a cable. Can you give me some details?

Di Maio, Dario

unread,
Feb 3, 2016, 1:16:09 AM2/3/16
to sou...@googlegroups.com

Is generally like this

http://m.ebay.it/itm/CAVO-PER-ALLARMI-ALLARME-ANTIFURTO-6-FILI-TERRA-4x0-22-2x0-50-T-25-METRI-/301043896550?nav=SEARCH

Dario.
From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

guy caluwaerts

unread,
Feb 3, 2016, 2:51:46 PM2/3/16
to sou...@googlegroups.com
Dario,

I modified in
vNetCfg.h max payload to 66
vNetDriver_usart.h : max payload to 46

Everythings runs fine now. Can see all the slots in the app.

many thanks




From: "Di Maio, Dario" <dario....@souliss.net>
To: "sou...@googlegroups.com" <sou...@googlegroups.com>
Sent: Tuesday, February 2, 2016 9:49 PM
Reply all
Reply to author
Forward
0 new messages