Using an Arduino to read a simple MODBUS/RTU RS-485

Hello everyone…

i’m newbie to arduino

i’m having an tense em-07k meter , i have been trying for several days to read the register values…

My Hardware: Arduino uno, MAX485

My Firmware: Arduino ide 1.8.3,

Can you please guide me how to read the register value from the Meter using arduino uno

below here attached my connection dig, EM-07K Multimeter datasheet
Kindly your help
Arduino Code And library

EM-07 SET MODBUS REGISTER TABLE ENG .pdf (60.5 KB)

EM-07K USER MANUAL.pdf (1.9 MB)

Which modbus library are you using?

Libraries and code are attached
Please check the files and advice

ModbusMaster.cpp (24.6 KB)

ModbusMaster.h (10.4 KB)

Modbus_PM2200.ino (1.94 KB)

REG_PM2200.h (227 Bytes)

You forgot to define the pre-/postTransmission functions to de-/activate the RS-485 driver.

Post a wiring diagram of your setup!

Please correct errors in connections or program code

abutahersamara:
Please correct errors in connections or program code

No problem. I will need your meter for testing, send it over.

I'm sorry, this is a help forum, not a do it for you forum. I have enough of my own projects to complete without having to work on yours.

Post questions on what you have tried and we will post answers.

Dears
my program working well with arduino uno but not working with arduino mega

kindly advice

Multimeter_EM_07E_Modbus.ino (2.92 KB)

Tense-EM-07E.h (399 Bytes)

abutahersamara:
Dears
my program working well with arduino uno but not working with arduino mega

kindly advice

Three possible problems:

  1. You didn't recompile with the correct board selected. You compiled for an UNO and uploaded to a MEGA.
  2. Wiring problem. You didn't transfer all the wires correct and have an error in the wiring.
  3. The MEGA is damaged or NFG. I suggest loading a different sketch that will test all pins that are used by your final sketch.

Hi,
I'm with the same challenge, did you get some resolute abutahersamara?

jaysonmiranda:
Hi,
I'm with the same challenge, did you get some resolute abutahersamara?

Have you read and tried everything in this thread? abutahersamara has gone radio silent since Oct 9th. If you would like assistance. Please post your problem and setup and we can try to help.

Hi, I know this is an old thread, but since I experience the exact same problem I thought I'd share the solution I found to it.

It seems that modules using the max485 chip work on arduino UNO, but don't (or erratically) on arduino MEGA. However I noticed that modules using the Max481 chip, such as that from the linnk bellow, work on both Arduino UNO and MEGA.

http://www.tinyosshop.com/arduino-rs232-rs485-shield

I haven't seen any substantial difference between both circuits on the data sheet, though I am not an expert...

Hope this helps,

It seems that modules using the max485 chip work on arduino UNO, but don't (or erratically) on arduino MEGA. However I noticed that modules using the Max481 chip, such as that from the linnk bellow, work on both Arduino UNO and MEGA.

Bullshit, i have a MAX485 working on a Mega2560 without any problem. It might be that some Chinese clones that pretend to be a MAX485 don't work correctly but even there I don't see a reason why there might be a difference between the UNO and the Mega2560.