• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NPIX-RS485 with auto direction control now available
#1
We changed the RS-485 transceiver used on module NIOT-E-NPIX-RS485 in REV#2.

The new part - MAX13488E - features auto direction control and is switching between TX (transmit) and RX (receive) mode automatically and instantly once you enabled it by a GPIO. The advantage now is to be no longer compelled to handle switching in software by a non-realtime driver that is causing jitter of the switching times switching from TX mode back to RX mode after a request has been sent. If then a responder is sending back data too fast it could easily happen that the first incoming chars are getting lost if the switching was too long.

The MAX13488E is pin compatible to the previous used transceiver SN65ALS176 in #REV1. Instead of using the TX_EN pin to switch between TX/RX as done before on #REV1 you have now just to set the TX_EN pin to "high" state a single time and automatic direction control gets enabled.

With Node-RED for example you could just inject a "true" to a rpi gpio node directed to GPIO17 (TX_EN) and you are done:

Code:
[{"id":"287692d1.c61e06","type":"inject","z":"d31910c1.fd0618","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":295.5,"y":599,"wires":[["6bbb3ed9.4bb6d8"]]},{"id":"6bbb3ed9.4bb6d8","type":"rpi-gpio out","z":"d31910c1.fd0618","name":"","pin":"11","set":"","level":"0","freq":"","out":"out","x":483.5,"y":599,"wires":[]}]


After pulling the TX_EN pin to high state the NPIX-RS485 module will get compatible with any serial communicating program or Node-RED node.

Download the latest NPIX modules documentation highlighting the #REV1/#REV2 modules' difference in the download section here. Please keep also in mind that the used serial port named "Mini UART" used has also restrictions and check if it fulfils your protocol requirements.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#2
Photo 
Hi Armin,
I have just received the new NPIX-RS485, unfortunately I cant get it to work. I am running the latest firmware on the NIOT-E-NPI3-51-EN-RE. Last night I installed the newest Docker container and set the port to /dev/ttyS0. I am running the hilschernetpi/netpi-nodered container with the new node-red 1.0.6. I have tried activating the GPIO 17 like you suggested in node-red. I get the following error “nrgpio python command not running” If I do the same setup on a raspberry PI with USB-modbus, it runs no problem. Any ideas?
Thanks


Attached Files Thumbnail(s)
   
  Reply
#3
Hi there,

can you tell me which gpio node you have been using during your test?

The one that I am always using is Raspberry Pi GPIO named "node-red-node-pi-gpio" https://flows.nodered.org/node/node-red-node-pi-gpio. It needs to be post installed.

Then it goes with charm if you setup the container as described in the README like this

a.) privileged mode on
b.) /dev/ttyS0 devicemapped
b.) MOST IMPORTANT /dev/gpiomem mapped

Here is  my screen shot of setting the GPIO right

   

But I am wondering that this GPIO node is not part of the standard Node-RED library and installation. I hardly can remember but I thought it is installed along with Node-RED always by default

But nevertheless in Node-RED 1.0.6 it is no longer there. It would be good to have this node in hilschernetpi/netpi-nodered container installed by default too. I will generate a new version for the community including this node then today. Then everybody is on the same level and this forum topic "RS-485 ..." do not create misunderstandings any more.


Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#4
Hi Armin,

You are really on the ball, thanks for your swift reply. I will wait for your new version of Node-Red and get back to you with the results.
  Reply
#5
The container "hilschernetpi/netpi-nodered:latest" has now been updated and is available for download
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#6
Thanks Armin,

I will download it and give it a try.
  Reply
#7
I made also an official version of the container "hilschernetpi/netpi-nodered:1.5.2". It is now ready to deploy after it has been created on Docker Hub automatically.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#8
Hi Armin, I am getting this error, any idea's?


Attached Files Thumbnail(s)
   
  Reply
#9
Let me checkthis myself. Indeed as this point I have changed something in the building process.

I will be back to you.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#10
I see the same. This is a bug. I need to correct it. My fault.

There is a temporary work around for this. Before you start the container ou have to specifiy the entrypoint where the container starts manually: /etc/init.d/entrypoint.sh

See my screen shot

   


In the background I have correct the container. It is already buiiling on Docker Hub. Building will take 3 hours.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  NPIX signals MikeP 1 2,351 November-8th-2021, 03:13 PM
Last Post: Armin@netPI
  NPIX board outline Armin@netPI 6 5,505 June-16th-2021, 06:47 AM
Last Post: Armin@netPI
  Problems with the communication of the RS485 interface PeterL. 9 6,236 April-28th-2020, 02:53 PM
Last Post: Armin@netPI
  NPIX expansion module NIOT-E-NPIX-4DI4DO 3D drawing Armin@netPI 0 2,018 April-20th-2020, 05:49 AM
Last Post: Armin@netPI
  NIOT-E-NPIX-EVA EPROM milesie 1 2,466 February-24th-2020, 06:32 PM
Last Post: Armin@netPI
  connecting Mitsubishi via RS485 COswald 11 7,844 January-14th-2020, 10:58 AM
Last Post: Armin@netPI
  NPIX-4DI4DO keep inputs galvanically isolated? EUROKEY 1 2,917 January-9th-2020, 09:09 AM
Last Post: Armin@netPI
  Dual RS485 Ports primmer 2 2,930 September-25th-2019, 09:43 AM
Last Post: primmer
  Designing own NPIX extension modules Armin@netPI 0 1,853 September-12th-2019, 11:54 AM
Last Post: Armin@netPI
  NIOT-E-NPIX-RCAN availability andreash 4 4,366 April-26th-2019, 01:25 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)