En300 Environmental Meter RS232 output to Arduino Serial

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());
  }
}

Is the RS232 output from the meter connected directly to the Uno as your 'photo would seem to indicate ?

yes,

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

Something like this perhaps

i tried to connect with Rs232, and using the same ardiono code as above, but no serial data updates in serial monitor. Tx led in Ardiono doesnt bling

  1. Connected En300 GND to DB9 PIN 5
  2. Connected EN300 Signal pin to DB9 PIN 2
  3. Connected TTL VCC, GND to Arduino 5v and GND
  4. Connected TTL Rx to Arduino PIN 6 as in code
  5. Connected TTL Tx to Arduino PIN 7 as in code

What exactly is the board between the meter and the Uno in your 'photo ?

its a Db9 male and rs232 converter connected, RS232 with MAx3232 chip

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
image

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

for more detailed discussion see read-rs232-data-on-arduino

The voltage btw Tx and GND from En300 is less than 1v

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)

the signal is correct i connected USB serial interface HW-597 and got the serial output in PC. its just that i am unable to get it in Arduino

how did you connect it? using a USB to RS232 cable?

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

Your Arduino code in post #1 is using 2400 baud.

the HW-597 appears to be a USB to TTL converter not USB to RS232
on the UNO you are attempting to read RS232 signals

yes, it is. does it mean i have TTL output from EN300 not a RS232 output

I tried with 9600 too but it doesnt seen to work either way the voltage between Rx and GND is less than a volt

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

i

1 Like

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