RS485 - TTL , Serial read using hex values of MECO Multifunction meter

Hello All,

we are trying to fetch data from MECO Multifunction meter using hex values by connecting RS485 - TTL converter to D+, D- pins of multifunction meter and ground connected to arduino board.
Rx and Tx pins of RS485 - TTL converter are connected to 10 and 11 pins of arduino.

we are not able to read any data into arduino from multifunction meter.
Below are the links for multifunction meter(MFM-96S) and RS485-TTL converter

http://www.silicontechnolabs.in/rs485-to-ttl-converter

If anyone could suggest something, it would be of great helpful.
Feel free to ask for more information, if required.

Below is the code -
we just tried to execute the software serial example -

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}

void loop() { // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}
[code/]

No link to the used products (both the meter and the converter!), no code tags around your code.

Please read the top message in the topic about how to post the necessary information.

The requested information is updated in the initial post.
Kindly check.

Thank you

Using an oscilloscope what activity do you see:

  1. On the RS485 bus?
  2. The RO from the MAX485 chip.
  mySerial.println("Hello, world?");

Do you think the power meter will react on a "hello world?" message? It will disturb ModBus communication.

mySerial.begin(4800);

According to the user manual the power meter is only able to support 9600 baud.

What do you want to achieve. Using the Arduino as a forwarder with a unreliable SoftwareSerial emulated interface is not really a good idea.

We want to read real time parameters from power meter.

We want to read real time parameters from power meter.

That's clear, but why do you want to use an Arduino if you want to read the values with the PC? What do you want to do with the read data? Has the Arduino to react if certain values are read?

Using the posted code that Arduino does nothing than being a failure risk.

We want to read data from power monitor, display on serial and send received data as sms using gsm modem.

Did you made changes I suggested? If yes, please re-post the changed complete sketch.

We want to read data from power monitor, display on serial and send received data as sms using gsm modem.

That means that a ModBus master software has to run on the Arduino. You should also post the ModBus ID you configured on the power meter.
How do you plan to connect the GSM modem? You're running out of serial interfaces and having two of them emulated by SoftwareSerial definitely makes the system unreliable.

Excuse me for butting in late to the party. You initially stated you need to use hex values with the meter, but you are sending ASCII text to the meter in your program. What am I missing?

Paul

For now we want to read date and display on serial monitor. How to fetch data ? Either by using register addresses for each parameter provided in the manual by meco or we can read using serial.available().

The program does not execute Serial.available() function.

Register addresses are like this -

R phase voltage - DEC: 3029, HEX: 0BD5, Data type: 32-bit Float
Y phase voltage - DEC: 3031, HEX: 0BD7, Data type: 32-bit Float
B phase voltage - DEC: 3033, HEX: 0BD9, Data type: 32-bit Float

Please help me. I am struggling. Send me a sketch if possible.

How to fetch data ?

As I already stated the power meter talks the protocol named ModBus RTU. This is not just sending some register addresses and getting their value, it has a defined timing, uses a CRC to check the data integrity and defines a set of functions to read and write registers. As the power meter is a ModBus slave your Arduino must be the master to get the values from the meter. There are several libraries out there that implement the ModBus RTU master protocol.

Thank you all for your support.

We are able to retrieve data from multifunction meter from arduino using modbus rtu protocol.

Thanks
Parma

Hi Parma, I am also trying to fetch data from my electric meter (it has RS485 modbus RTU option) but not successful yet. Could you give me some hint on how did you retrieve data from your meter?

Thanks!
William

Parma:
Thank you all for your support.

We are able to retrieve data from multifunction meter from arduino using modbus rtu protocol.

Thanks
Parma

Hi Parma,

I am trying to read data from elmeasure energy meter wuth MODBUS RTU protocol but not successfule. Could you pls help by sharing your code