I am using En300 Environmental Meter to measure Decibel Level and to display in serial monitor, Arduino Code IDE is as follows. The serial monitor result is not the same as the display in En300. I Understand the serial has 4 channels, one for Temp, Lux, RH and DB. how to get the right reading in arduino serial, please help. the current serial output is repeating 2,67,66,66,255 and repeating the same where the decibel reading is around 45~50 but corresponding changes are not reflecting in serial output. i also tried connecting a RS232 converter but not output in serial.
#include <SoftwareSerial.h>
SoftwareSerial EMSerial(6, 7);
void setup() {
// set the baudrate for the Serial port
Serial.begin(2400);
EMSerial.begin(2400);
}
// Loop collecting data and printing to Monitor
void loop() {
if (EMSerial.available()) {
Serial.println(EMSerial.read());
}
}
The RS232 signal levels are not compatible with the TTL input of the Uno. You need an RS232 to TTL converter between the two and a common GND connection
if you have a multimeter it is worth checking the RS232 voltage to ensure you have Tx and Rx connected correctly, e.g. the female 9-pin D-type connector on the TTL/RS232 module should be
the TX signal from your En300 meter should be between -6 and -12 volts
connect it to pin 3 of the TTL/RS232 module
Edit: are you sure the baudrate is 2400 - if you have an oscilloscope it can help to determine the baudrate by looking at the width of one bit
are you sure you have the correct signal line? try other connections?
signal markings can be confusing, e.g. is a Tx label transmit out or transmit in???
I have seen both which is why it is a good idea to check voltages
otherwise either the En300 is damaged or ir is not RS232 Serial (should be -6 to -12 volts when idle) or TTL serial (should +3V to +5V when idle)
As you can see in the photo in the device En300 it says RS232 output and i connected the 3.5mm Jack other than GND signal came only in the ring, so only 2 wires came out and the voltage is less than 1v. I connected the respective Tx and GND to HW-597 USB to TTL converter and connected the usb to pc and i received the data @baudrate 9600. Now i have ditched the Arduino and connected the HW597 to the rpi4 i had and using it. It will be very helpful if this can be accessed via Arduino Uno
how did you connect the HW597 to the RPi4 - using a USB-TTL cable?
with nothing connected to the HW597 the important voltage is between GND and and the Tx line
if it is 5V the output is TTL serial
if it is -6 to -12V it is RS232 serial