General

Humidity sensor SEN0438

userHead user002 2024-03-11 13:49:08 129 Views3 Replies

Hi,

The Humidity sensor SEN0438 is not transmitting any data to microcontroller Rx pin. The sensor connection is like this 

red          -    +12V     White - B of RS485 to TTL module

Black      -    Gnd       Yellow - A of RS485 to TTL module

 

RS485 to TTL module connection

RO - RX and DI toTX RE and DE ns joined and set to a GPIO pin 

 

The Code is here

     RE and DE pin high;
   USART_Transmit(0x01);
   USART_Transmit(0x03);
   USART_Transmit(0x00);
   USART_Transmit(0x00);
   USART_Transmit(0x00);
   USART_Transmit(0x02);
   USART_Transmit(0xC4);
   USART_Transmit(0x0B);
     _delay_ms(1);

   RE and DE pin high;

in =USART_Receive();    
   in =USART_Receive();
   in =USART_Receive();
   in =USART_Receive();
   in =USART_Receive();
   in =USART_Receive();
   in =USART_Receive();
   in =USART_Receive();

 No data is received .

2024-03-26 15:49:42

Hi,

 

I am having issues too with the communication.

Can someone please confirm whether the following communication specs are correct?

- 9600 baud rate- address: depends on the pulled up pins- 8N1 for data size, parity and stop bits

 

Thank you,

regards

 

userHeadPic Francesco.Stefanni
2024-03-13 13:09:30

The slave address is 1 like in figure 1 . I am using atmega32 microcontroller for reading humidity from the sensor 

userHeadPic user002
2024-03-11 17:11:50

Hello,

What type of controller are you using? Also can you confirm that the dial address is the same as in the code?

userHeadPic Yeez_B