AEM1000 Multi Sensor ESP8266 with TFT (Co2, VOC, PM2.5, Temp, Humidity)

I have made a cheap multi Air sensors project using ESP8266 , 1.8" TFT.
I have used Node-red to upload the sensor data to mysql db from Mqtt.

The ASAIR AEM1000 is a cheap alternative. The data it provides is calibrated from factory. We can fetch the data by modbus protocol either from Uart or modbus module.

AEM1000 Photos:


You have to transfer 2 resistors and remove 2 big resistors to use UART

Datasheet: http://www.aosong.com/m/en/products-78.html

I was new to this protocol, and not found a library for this sensor. I have chosen this library for this sensor :

Using the code :


//Note: Defaultly there is only MODBUS protocol supported on AEM1000
// You have to transfer 2 resistors as shown in image in the main page

// Create SoftwareSerial instance
SoftwareSerial modbusSerial(D1, D2);  // RX, TX pins
ModbusMaster node;  // Create Modbus master instance

**Setup:**
 modbusSerial.begin(9600);
  node.begin(1, modbusSerial);

Reading Sensor Values


//The AEM1000 sensors registers are from 0-4 and size max is 4
const char *names[] = { "temp", "hum", "voc", "co2", "pm2.5" };

    for (int i = 0; i <= 4; i++) {

      result1 = node.readHoldingRegisters(i, 4);

      if (result1 == node.ku8MBSuccess) {
        data1 = node.getResponseBuffer(0);

//store sensor values in values[] array
values[i] = (int)data1;

//Print senor name and value
Serial.print(names[i]);
Serial.print(" : "):
Serial.println(values[i]);
      } else {
   //error fetching sensor data or corrupt data
      }
     
    }

To Calibrate Co2 (keep sensor in open air outside for 20 minutes and run this) :


//set co2 calibration to manual
 node.writeSingleRegister(32, 0);

//set value 405 as co2 value of open area (natural air)
    node.writeSingleRegister(33, 405);

To Check Sensor Status (If Sensor Working or faulty or unplugged)


const char *names[] = { "temp", "hum", "voc", "co2", "pm2.5" };

//The registers are from 11-14 (for same sensors register from 0-4)

 for (int i = 11; i <= 14; i++) {
    
      result1 = node.readHoldingRegisters(i, 4);

      if (result1 == node.ku8MBSuccess) {

       status1 = node.getResponseBuffer(0);

       // Status : 0:OK, 1:Faulty, 3:Unplugged

      const char *statuses[] = {"OK","Faulty","Unplugged"};
    

        // Print Status
         Serial.print (names[i - 11]);
         Serial.print(" : ");
        Serial.println(statuses[status1]);     
        
      } else {

        Serial.println("Error reading register");
      }

    }

Are you a representative of the company that makes those sensors @ajaybnl ?

How much do they cost?

Where can I buy one?

Just from looking at the picture, it looks like the temperature/pressure/humidity sensor it uses is a DHT22 or similar, I thought they were rather less accurate than the BME series of sensors, also very cheap.

I am not related to any company. I just build a couple of sensors (with tft) for me. Yes it looks like DHT22 but its resolution is 0.1 degree.

I found it cheap (30$ or 2500 Rupees Indian) Found it cheapest multi sensor board online.

I found simple solution (code) after 2 days of finding no libraries for this sensor.

I have created a Arduino Code on Github : GitHub - ajaybnl/AEM1000: AEM1000 Sensor Reading Methord for Arduino , ESP32 , ESP8266 Like MCU

2 Likes