Where are you measuring 5V? Which cable? and why put (7.5V) in brackets? The Renogy cable should have 3 connections, A,B and 0V, did you forget the 0V?Hi, T6Jay,
I am struggling with response timeouts.
I think wiring is ok. worked long on it.
Can measure the 5V (7.5V) on the cable
Code:Modbus_Resulst:ModbusMaster response timed out 0xE2
changed the cable.
maybe you did have similar issues?
Where are you measuring 5V? Which cable? and why put (7.5V) in brackets? The Renogy cable should have 3 connections, A,B and 0V, did you forget the 0V?
I think you have to be more specific, and detailed in your questions if I stand a chance of helping. Can you post a complete detailed wiring diagram?
I have a USB/RS485 converter, and with this its possible to set up the laptop in place of the Renogy, and 'see' the modbus frame coming from the Arduino, and also to 'simulate' a reply, to check the arduino receives it. This setup answers the important questions;
1) is the Max485 sending out a message frame?
2) is the renogy sending any reply?
For me, the answer to question 1 was 'yes' but the PC let me see that the frame was missing a CRC byte, this led me to a bug in the modbus library. It's invaluable to be able to 'see' these messages when diagnosing a problem. I recommend you get a USB/RS484 converter, maybe someone here can advise which one. (Mine is a professional one and costs around £85)
Max485 | Mega-Gpio |
DI | 1 |
DE | d2 |
RE | d2 |
RO | 3 |
On the 0V connection (renogy pin 4), I found the comms would not work at all without this connected to arduino 0V
Hardware is on order, waiting...If you have a USB/RS485 converter, why don't you download Modbus Slave Simulator and link your PC up to the mega, have a look what messages appear in ModbusSlave. If you can get this working, but don't understand the message frames, post it here and I can help.
Hi Jason,If you have a USB/RS485 converter, why don't you download Modbus Slave Simulator and link your PC up to the mega, have a look what messages appear in ModbusSlave. If you can get this working, but don't understand the message frames, post it here and I can help.
result = node.readHoldingRegisters(0x000, 16);
000CH ~ 0013H | 16 | R | Product Model | | data format ASCII:RBC50D1S-G1 | - | |
0014H | 4 | R | software version | 00 01 03 00 | V1.3.0 | - | an example:might be different for updated version |
0015H | |||||||
0016H | 4 | R | hardware version | 00 01 03 00 | V1.3.0 | - | high 8 bit 00 reserve is an example:might be different for updated version |
0017H | |||||||
0018H | 4 | R | product's serial number | 13 04 00 01 | 190400001 | - | an example:might be different for updated version |
0019H |
18:55:07.469 -> Modbus_Result:>Modbus protocol illegal data address 0x2<
Tx:000027-01 83 01 80 F0
Tx:000029-01 83 01 80 F0
Rx:000030-01 03 01 00 00 23 05 EF
Rx:000032-01 03 01 00 00 23 05 EF
Rx:000034-01 03 01 00 00 23 05 EF
Rx:000036-01 03 01 00 00 23 05 EF
Tx:000039-01 83 02 C0 F1
Tx:000041-01 83 02 C0 F1
Rx:000042-01 03 01 00 00 23 05 EF
Tx:000045-01 83 02 C0 F1
Tx:000047-01 83 02 C0 F1
Tx:000049-01 83 02 C0 F1
Tx:000053-01 83 02 C0 F1
Tx:000059-01 83 02 C0 F1
Rx:000000-01 03 00 00 00 10 44 06
Tx:000001-01 03 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 92 7A
Rx:000002-01 03 00 00 00 10 44 06
Tx:000003-01 03 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 92 7A
Rx:000004-01 03 00 00 00 10 44 06
Well this is working right?Code:Rx:000002-01 03 00 00 00 10 44 06 Tx:000003-01 03 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 92 7A
.So if you have set up the 9600, 8N1 correctly in the Mega, it should work with the DCC50s now
Yes this worked for me, I found the 0V connection to be essential for use with arduino to DCC50S, but can't remember if this applies when linking PC to DCC50S, try it.Hi, just an idea I had. Tried with a master simulator to listen to the renogy as slave1 but did not get any RX from Renogy.
USB RS485 with only A and B connections.
Wondering if this would work in general?
Master simulator is showing timeout with 9600,8N2 and 9600,8N1
thx
I've found that arduino libraries are a great resource, but if you expect them to work 'out of the box', especially across platforms (uno, nano33ble, mega etc) you will be dissapointed. Also, the cores (firmware?) for the nano33ble have serious bugs in them, there's usually help to fix these on github etc, but you are sometimes in uncharted territory.really crazy with the serial settings 8n2 versus 8E1