5 x SoftwareSerial for ESPEasy mega = ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

5 x SoftwareSerial for ESPEasy mega = ?

#1 Post by leachimtrebron » 28 Jul 2022, 17:31

Hello all,

I need your help,
I need 8 x RS232 interfaces with 9600 baud to read smartmeters.
The ESPeasy supports 3 hardware RS232 versions and can pass them on the Ethernet. Exactly what I need for 8 x RS232 interfaces.
With my search I stumbled over this project:
https://github.com/StefanRu1/SoftwareSe ... _SSSRV.ino
Can someone help me, how I can integrate this into my ESPeasy and is it then possible to address up to 8 x RS232 interfaces also over the Ethernet.
The _P132 is according to https://espeasy.readthedocs.io/en/lates ... lugin.html
already assigned.
Has anyone compiled such a version?

Is there a possibility to integrate the software RS232 into the standard?
I am unfortunately not so fit with programming.

THANKS

Excuse my bad English

TD-er
Core team member
Posts: 8642
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: 5 x SoftwareSerial for ESPEasy mega = ?

#2 Post by TD-er » 28 Jul 2022, 18:18

When added support for ESPEasy for ESP32, there was no (stable) implementation for SW serial for ESP32.
Also the 3 HW serial ports on ESP32 is enough for most users.

There is support for the NXP I2C to UART bridge (SC16IS752) which can be used in the current code of ESPEasy.
Each SC16IS752 chip adds 2 UART ports and by selecting different I2C addresses, one can add several of these.
I have tested it with 3 of these, but I don't see why it won't work with more.

Running SW serial is (at least on ESP8266) far from optimal, especially for "chatty" devices like GPS.
I don't know how well it is working on ESP32.
But I can imagine that having several receiving a near continuous stream of data at low bitrates will grind the ESP down to a halt and probably loose quite a few bits.
So using those I2C to UART bridges seems the preferred option here as those are HW serial ports.

The only drawback is that those chips only have 64 byte buffer per port.
This means the plugin needs to check those chips frequently and not wait until a complete message is in the buffer.

leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Re: 5 x SoftwareSerial for ESPEasy mega = ?

#3 Post by leachimtrebron » 28 Jul 2022, 19:08

Thanks for the quick reply. the SC16IS752 is a good hint. will order and try this times

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: 5 x SoftwareSerial for ESPEasy mega = ?

#4 Post by ThomasB » 28 Jul 2022, 21:14

Simple idea: Use multiple ESP32 based ESPEasy nodes to handle all your serial port requirements. Each node will provide 3 ports.

They could be independent or one "master" node could receive data sent by the other "slaves". Using this P2P master/slave node arrangement would emulate a single ESP32 doing all the work.

https://espeasy.readthedocs.io/en/lates ... /C013.html

- Thomas

leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Re: 5 x SoftwareSerial for ESPEasy mega = ?

#5 Post by leachimtrebron » 29 Jul 2022, 01:40

Hello Thomas,
that is a good idea. Will have to look into the P2P network. I have never done that before.
I still have an ESP32 that I could use for this as a test.

Do you have a sample application or info link on how I need to configure master and slave.

How does that look then with the power consumption?
Can the P2P network be established via Bluetooth, so that no additional IP address must be used in the network? or does this only work in the Wlan?

Thanks for your support


Leachim

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests