Sound Level Meter Modbus TCP/IP

Good morning all.

I have a school project which aims to make a sound level meter in modbus TCP/IP.
I have at my disposal: UNO card, SHIELD ETHERNET2, SOUND LEVEL METER.

Here is the code I have without modbus communication:

#define SoundSensorPin A1  //this pin read the analog voltage from the sound level meter
#define VREF  5.0  //voltage on AREF pin,default:operating voltage

void setup()
{
    Serial.begin(115200);
}
void loop()
{
    float voltageValue,dbValue;
    voltageValue = analogRead(SoundSensorPin) / 1024.0 * VREF;
    dbValue = voltageValue * 50.0;  //convert voltage to decibel value
    Serial.print(dbValue,1);
    Serial.println(" dBA");
    delay(125);
}

It is necessary that with code, I add the com Modbus so that I can read on a Register the data of the sensor... Can you help me please?

Thank you in advance.

Please supply a link or post documentation for the sound level meter. Do you have a physical Modbus interface for the Arduino? Have you looked at any Modbus library?

Here is the documentation: Gravity__Analog_Sound_Level_Meter_SKU_SEN0232-DFRobot.
I use Modbus Doctor for make tests with the communication.
Yes, i try with <SPI.h> , <Ethernet2.h> ...
Thank you for your help.

What's the problem? There's no description of problems and no question.

That was not a useful reply. Have you found a Modbus library? Also, how do you know that you can make a Modbus connection to the sound meter? The documents you linked to, say nothing about that. Why would it even use Modbus, instead of some simple protocol like I2C or serial?

It's not up to us to sleuth all this information. You must supply it.

Hi, @alexandregd10
Welcome to the forum.
Please read the post at the start of any forum , entitled "How to use this Forum".

This will help with advice on how to present your code and problems.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.