Modbus (serial) comms between RS485 CAN HAT (B) and Schneider 3355 iEM3355 power meter

Hi,
I have a Raspberry pi 4&5, with a RS485 CAN HAT (B) installed. I am trying to read the power usage from a Schneider 3355 iEM3355. I’ve enabled the spi interface and can verify that the serial ports are detected:

dmesg | grep spi

[ 7.091246] spi1.0: ttySC0 at I/O 0x0 (irq = 42, base_baud = 921600) is a SC16IS752
[ 7.171124] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[ 7.172343] spi1.0: ttySC1 at I/O 0x1 (irq = 42, base_baud = 921600) is a SC16IS752

I have set the baurd rate 19200, No parity,1 stopbit, and slave address on the meter.
The problem is that I cannot get any response from the meter either with my python script or the modbus poll program (I’m wireed to port 0, but i have tried ttySC1 too).

mbpoll -m rtu -a 15 -b 19200 -s1 -P none -o 3 -v -r 3204 -B /dev/ttySC0

debug enabled
Set start reference=3204
Set device=/dev/ttySC0
mbpoll 1.0-0 - FieldTalk™ Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, GitHub - epsilonrt/mbpoll: command line utility to communicate with ModBus slave (RTU or TCP)
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type ‘mbpoll -w’ for details.

Opening /dev/ttySC0 at 19200 bauds (N, 8, 1)
Set response timeout to 3 sec, 0 us
Protocol configuration: Modbus RTU
Slave configuration…: address = [15]
start reference = 3204, count = 1
Communication…: /dev/ttySC0, 19200-8N1
t/o 3.00 s, poll rate 1000 ms
Data type…: 16-bit register, output (holding) register table

– Polling slave 15… Ctrl-C to stop)
[0F][03][0C][83][00][01][77][9C]
Waiting for a confirmation…
ERROR Connection timed out: select
Read output (holding) register failed: Connection timed out
– Polling slave 15… Ctrl-C to stop)
[0F][03][0C][83][00][01][77][9C]
Waiting for a confirmation…
^C— /dev/ttySC0 poll statistics —
2 frames transmitted, 0 received, 1 errors, 100.0% frame loss

I’ve Wired the A B G pins of the HAT to the D1 D0 and 0V pins of the meter.

I would appreciate any direction.

Thanks.

1 Like

RS485 networks usually require termination resistors at both ends of the bus to prevent signal reflections. Make sure the iEM3355 and the HAT are properly terminated if required.

1 Like

Hi @Stavros258203, Welcome to the forums!!!

The only thing I can think of is if the A and B are connected backwards. Also potentially the G pin needs to be connected to the Ground of the iEM3355 not the 0V connector.

2 Likes

Thanks for your suggestions.

@lia262073 I have UTP of length about 300mm, so I didnt think I needed a resistor. I’ve tried with and without resistor. And tonight I lowered the baud rate (mbpoll and meter) to 9600, but still no joy.

@Aaron I can try flipping A & B, but I dont think they are wrong. My take on the “ground” is the 0v and the other symbol (O with = through it) is for the shield. You can see this https://www.productinfo.schneider-electric.com/iem3100_iem3200_iem3300/iem3100_iem3200_iem3300-series_user-manual/iEM3100_iEM3200_iEM3300%20series_User%20Manual/English/BM_iEM3100_iEM3200_iEM3300SeriesUserManual_0000351220.ditamap/$/C_ModbusWiring_0001032409

1 Like

Actually @Aaron you might be on something here. Relooking at the diagrams I have it backwards. i will report back soon.

2 Likes

Hi Stavros

Should be A to A and B to B, no cross overs.
Cheers Bob

3 Likes

Hi Stavros,

All suggestions are worthwhile investigations at the moment, A/B, G connections and termination.

Another cause for error frames are mismatched baud rates.
The SPI interface is likely using another Baud rate to the CAN interface, at a glance it looks like there are 2 locations in that python script the baud is set (both of them being different)

3 Likes

The terminal connector for the meter had A and B markings as well as D1/+ and D0/-. WHen I looked at the image for the HAT, I found that the A & B markings on the meter did not align with the + & -, so I swapped them and its working (with no resistor too, which is just for testing as its a short length).

Thank you!

3 Likes

Hi @Stavros258203,

Very glad to hear it is working properly!

2 Likes

Hi Stavros

The length has nothing to do with it. The terminating resistors should still be fitted. They may be already there, worth checking. Measure the resistance from A to B with nothing connected, that will tell you.
The drivers are designed to work into this load. the resistors should be 120Ω each.
Cheers Bob

1 Like