I get no response from the sensor

Hello,
I'm new to the Arduino world!

I'm trying to create a monitoring system! Among which I want to capture the value of radon in the air! But I have a problem with this sensor. I have already opened another topic: Send the asci command to get the sensor value - #25 by qatalin.

I still have this problem. I have to send the character 'r' from the keyboard to the sensor through UART communication and the sensor responds with the radon value. This process happens once an hour, but when the character r is sent (at any time) the sensor responds with the last recorded radon value.

I connected the sensor to a Raspberry pi4 using tx, rx pin and through serial PUTTY I was able to communicate with the sensor (it works perfectly).

I want to communicate through an ESP8266, but no matter what, the sensor doesn't answer ABSOLUTELY anything.

Thanks to those who guided me in the other discussion!

I attach the code and datasheet of the sensor below!

Thanks a lot!

#include<SoftwareSerial.h>
SoftwareSerial SUART(2, 3); //SRX = DPIN-2, STX = 3
void setup()
{
  Serial.begin(9600);
  SUART.begin(9600);
  Serial.println("Process start");
  
}

void loop()
{

  SUART.write('r'); //asking for data ?
  delay(4000);
  

  while(SUART.available()== 0)
  {
     String value_sensor = SUART.readString();
     Serial.println( "Value of sensor is:");
     Serial.print(value_sensor);
     delay(3000);
     
     }
  
  } 

RADON SS 2022.pdf (713.4 KB)
RADON SENSOR QA.pdf (194.2 KB)
RADON SS SENSOR APPLICATION NOTES_INTERFACING.pdf (618.9 KB)

There are different pin numbering systems. These are GPIO pin numbers. Sometimes pin numbers like D1, D2 etc. appear on the board and these are not the same. Can you provide a link to your ESP8266.

Hello. This is the ESPhttps://www.optimusdigital.ro/en/wifi-boards/266-placa-de-dezvoltare-wifi-nodemcu.html board from a local online shop. is from a local online store. (I have already made some programs on the board, so it is functional, but not using uart)

OK. And to which pins (board labels) did you connect the sensor :

anyway, maybe you find something here: ESP8266 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials

1 Like

D2 to TX pin of sensor, and D3 TO RX pin of sensor

Try this instead:

SoftwareSerial SUART(5, 4); // GPIO5=D1=SoftRX, GPIO4=D2=SoftTX

D1 to TX pin of sensor, and D2 TO RX pin of sensor

As I said, GPIO is not the same as a "D" number. Look in the link I posted.

1 Like

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