SmartSerial Master for Arduino - exist? Possible?

More
18 Aug 2024 06:56 #308048 by zz912
Hello,

I bought new toy:
spotpear.com/shop/ESP32-S3R8-4.3inch-LCD...ay-LVGL-800x480.html
 
It is a Develop board for Arduino ESP32 with Display + Half Duplex RS485.

I have a project:
- which is not demanding on speed
- very simple logic
- needs several inputs
- needs a lot of outputs (up to 100)
- I don't want to use a relay for outputs
- 24V

I plan to use some industrial I/O controlled by Modbus RTO for this device.

But quality I/O is very expensive. I would like to use a Mesa 7i84.
Is this even possible?

It would be ideal to use some firmware for the Mesa 7i84 to make it a Modbus slave.
Is this even possible?
The price/quality of the 7i84 is fantastic and the use of this card would expand drastically. However, there is a PIC processor on this card and I don't understand that at all. I can program only Arduino.

The second option is to use an Arduino processor as a SmartSerial Master.
Is this even possible?
There are projects where SmartSerial Slave is used. But I would need a Master.
Would it be possible to use more than one 7i84(with original firmware) on one Half duplex RS485 Master?
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Aug 2024 08:50 - 18 Aug 2024 09:01 #308055 by cornholio
SmartSerial is going to need 2.5mbps serial interface to begin with.
The smart serial protocol is layed out in most of the mesa manuals.

Looking into the slave (probably the easier way to see how things work)
One of the best places to start is to download one of the 7i90 zip files, this includes the bitstreams for the card and the hostmot sources, within that you'll also find ssremote7i90.zip which is the src for the ssremote portion if you want to use the 7i90 as a ssremote card.
The source is in assembly for one of the softcores on the fpga, it's pretty easy to work out, that's not that many instructions. Convert that to your mcu of choice and you should be good to go. Tho you may want to look into learning at least C.
It took me about 2 weeks to really get a good idea of what was going on, then modify that portion to get that running on a colorlight RV901T board that supports 4 MPGs. A couple of days of that was a silly mistake on my part. It was never my intention to get the code running on a MCU, so I never bothered looking into it.

Ok thats just for the slave portion.
If you want to have a non Mesa Master, you'll have to do all of the above but looking at the slave point of view. Then you would have to come up with a serial device that works at 2.5mbps, and then write a SmartSerial that talks to your setup. Or though you can use 115.2k but that's about 20 times slower.

On top of all that you'll have to design the hardware, PCB boards and buy parts. At the end of the day it will more likely end up not being cost effective.

There's also a couple of other zip files that may be worth looking at.
Last edit: 18 Aug 2024 09:01 by cornholio.
The following user(s) said Thank You: zz912

Please Log in or Create an account to join the conversation.

More
18 Aug 2024 09:14 #308056 by zz912

SmartSerial is going to need 2.5mbps serial interface to begin with.

I found in manual 7i84:
 

Tho you may want to look into learning at least C.


I like C. I dont like python.

also find ssremote7i90.zip


Thank you, I will study it.

In normal mode, SmartSerial is used so that one serial output serves one SmartSerial device.
Is it possible to use SmartSerial with a modified Master as a bus? I want to use several 7i84.

SmartSerial uses a Full Duplex bus, but I have a Half Duplex bus. Is this a problem?
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Aug 2024 11:17 #308058 by cornholio
You might be better off looking at modbus. From my point of view you're looking at making some wholesale changes.
As far as I'm aware SmartSerial seems to be designed as a single device per channel at full duplex.

Please Log in or Create an account to join the conversation.

More
18 Aug 2024 11:45 #308061 by zz912
Thank you for the consultation. I came to the same opinion. If I could program a PIC, I would think about converting the 7i84 to a modbus slave.
I will probably buy:
www.turck.us/en/product/6827381
It is not cheap.

Please Log in or Create an account to join the conversation.

More
18 Aug 2024 11:57 - 18 Aug 2024 11:58 #308066 by cornholio
That's the thing about Arduino, it's made people lazy and think everything can be solved via an arduino sketch.

It's like the guy that only owns a hammer, he thinks it can fix everything.

It's not just the programming you may want a good idea of how the hardware is connected. You'd need to know which pins go where.
Last edit: 18 Aug 2024 11:58 by cornholio.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.166 seconds
Powered by Kunena Forum