URGENT: School project - arduino uno humidifier pls help 😭

Hi,, this is a school project and it's due soon, and I'm really stuck and confused. I'd really appreciate any help.. It's a Arduino uno humidifier with air quality monitoring

here are the components:

  • Arduino Uno
  • DHT11 - Temp and humidity
  • MQ135 - air quality
  • Ultrasonic Mist Module - how do you connect this?? it has like a c type connection
  • 1-Channel Relay - controls mist module??
  • 16x2 LCD (12C) - displays temp, humidity, air quality
  • 5V Buzzer - alerts when air quality is poor

WHat it should do:

  • Turn ON mist module when humidity is LOW
  • Turn OFF when humidity is OK
  • turn ON buzzer when air quality is BAD
  • Dispplay all values on LCD

I BADLY NEED HELP WITH THE CIRCUIT BUILDING CAUSE IM VERY CONFUSED ON THAT PART.. IDK HOW TO BUILD IT.. Pls help, deadline is VERY VERY NEAR.. thank you so much.. :sob::sob:

What class? How did you select this project? Have you asked your teacher? Certainly, you have had classroom instruction. Have you tried searching the internet? What code/wiring have you managed to produce?

Hi thanks for replying
I'm in grade 9, and this is a group arduino prototype project aligned with SDGs (we choose sdg 3 and 13 thats why its a humidifier). Every group decides what prototype to make so everyones robot is different,, I cant really rely on my groupmates.. We've had basic basic arduino lessons, and I've searched online, but I couldn't find examples that use the same set of components we have, which is why I'm confused about how to build and wire it.

Reiterating what @xfpd said: What have you done so far?… Do you know how to get one sensor to print to the serial monitor? (forget about the LCD for now.) If you can, can you get the second sensor to do the same thing (separately)? Can you get anything to print to the LCD screen (never mind the sensors). Can you turn the mister on & off by itself? If you can do these things separately you are a good ways to your goal already.

Tell us which of these steps you've already done or where you're actually getting stuck. Post your current code (even if it's broken) and describe what happens when you run it. That will help us figure out exactly where you need help.

have you searched on line ?


you don't need to use the USB C connector, you can solder wires to some pads and power the module when needed (5V / 300mA needed, so that's likely what the relay is for).

Baby steps!

Find examples for each one of the components and get each one working individually. Then start combining components, adding one at a time, testing as you go. That way you will actually learn something.

hi thank you for reply

This is what I've built so far (see the attached photo). I've connected the DHT11, MQ135, and the LCD. At this point, Im stuck on how to correctly wire the ultrasonic mist module with the relay. Because the circuit isnt complete yet, I havent tested a code.


See post #6 above.

Yes,, I’m at home right now and don’t have the Arduino IDE installed on this laptop, and it’s already late here.. so the only time I can test the coding part is at school, but the thing is we only have about 1 hour and 30 minutes in class to test everything using the school laptop where the Arduino IDE is installed, so I’m trying to make sure the wiring is correct first to avoid wasting that limited time or damaging components..

The Arduino IDE is free and easy to install on just about any laptop. You can't test the wiring without code, and if parts have conflicting wiring, the code won't work.

With that attitude, you have boxed yourself into a corner. There is next to no chance that you will get this project working in 1 hour and 30 minutes, as it currently stands.

I dont have a solder tool..

@biim
Do you want to test the whole project in ONE GO?

Or

Do you want to connect one component/subsystem at a time, test it and then connect the next subsystem?

??? I just need help with the connection with mist module and channel relay.. Once that’s clear, I can move forward with testing. Thanks.

The components don’t care about a specific computer. Install the IDE on the laptop you are posting to this forum on.

You will get better help if you can post the exact model of the components you are using, or even better links to where they were purchased. For testing purposes you can substitute an LED (with current limiting resistor) for the relay, that way you can see if it is turning ON/OFF correctly.

The mist module will most likely be connected only to the relay contacts, that should in no way affect the Arduino code or connections for the relay module to the Arduino.

You will make it a lot easier on yourself if you connect the LCD to the hardware I2C port, the pins marked SDA and SCL on the UNO. Note that these pins are connected to A4 and A5, so do not use those analog pins for anything else.

Whichever library you use for the LCD, make sure to look at the example sketches to see the specific syntax to use, there are multiple I2C LCD libraries that use an identically named header file for the #include statement, trying to find the correct library for some random code you found on the internet can be a time-consuming task.

I have no problem helping with that, but you need to verify how your mist module behaves.
It likely does not start mist by applying power and you need to press button. But if soldering is not an option here, you need to try this: Test your module first normally with water (no arduino, just usb). Then try if you hold the button continuously pressed and then power the module, does it start misting after 1s or so ?
If yes, you can glue the button down or use food bag clamp for example. Then you can switch the power with relay.

You must. In what way are they not reliable? This is how real projects go... your teacher should know about this.

What will you be sensing/testing with the MQ135? It seems unnecessary unless you are instructed to detect gases. Humidity will be detected/sensed by the DHT.

It looks like you have the LCD plugged into DIO#4 and DIO#5 (+pwr, -gnd).
The LCD should be plugged into A4 and A5.

UNO R3      Peripheral module
==========  =================
DIO PIN  2  - MQ135 digital output ** (your picture is missing this connection)
DIO PIN  3  - DHT output
DIO PIN  9  - Buzzer output
AIN PIN A0  - MQ135 analog output
AIN PIN A4  - LCD DATA
AIN PIN A5  - LCD CLOCK
POWER RAIL  - Arduino 5v, MQ135, DHT, LCD
GROUND RAIL - Arduino GND, MQ135, DHT, LCD, BUZZER

Your power supply must be 5vdc in this case. You should wire everything together and use the following stand-alone module test sketches. When they all work, you should combine the sketches.

BUZZER

// test buzzer on dio pin 9

int buzzerPin = 9;

void setup() {
  pinMode(buzzerPin, OUTPUT);
  delay(2000);
  for (int i = 0; i < 5; i++) {
    digitalWrite(buzzerPin, HIGH);
    delay(250);
    digitalWrite(buzzerPin, LOW);
    delay(250);
  }
}

void loop() {
  // nothing here
}

LCD

// LCD I2C test

#include <LiquidCrystal_I2C.h> // library https://github.com/lucasmaziero/LiquidCrystal_I2C
#define I2C_ADDR 0x27 // address of LCD
#define LCD_COLS   16 // columns of LCD
#define LCD_ROWS    2 // rows of LCD
LiquidCrystal_I2C myLCD(I2C_ADDR, LCD_COLS, LCD_ROWS); // create LCD_I2C instance/object

void setup() {
  myLCD.init(); // initilize LCD object
  myLCD.backlight(); // turn backlight ON

  myLCD.setCursor(0, 0); // COL 0, ROW 0
  myLCD.print("Hello, World!");
  myLCD.setCursor(10, 1); // COL 10, ROW 1
  myLCD.print("@biim");
}

void loop() {
  // do nothing
}

LCD

// LCD I2C test

#include <LiquidCrystal_I2C.h> // library https://github.com/lucasmaziero/LiquidCrystal_I2C
#define I2C_ADDR 0x27 // address of LCD
#define LCD_COLS   16 // columns of LCD
#define LCD_ROWS    2 // rows of LCD
LiquidCrystal_I2C myLCD(I2C_ADDR, LCD_COLS, LCD_ROWS); // create LCD_I2C instance/object

void setup() {
  myLCD.init(); // initilize LCD object
  myLCD.backlight(); // turn backlight ON

  myLCD.setCursor(0, 0); // COL 0, ROW 0
  myLCD.print("Hello, World!");
  myLCD.setCursor(11, 1); // COL 10, ROW 1
  myLCD.print("@biim");
}

void loop() {
  // do nothing
}

DHT

// DHT test on pin 3

#include <DHT.h> // https://github.com/adafruit/DHT-sensor-library

#define DHTPIN 3 // DHT data pin
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE); // configure DHT object/instance

void setup() {
  Serial.begin(115200);
  dht.begin(); // initialize DHT11
}

void loop() {
  delay(2000); // wait before reading
  float h = dht.readHumidity(); // read humidity
  float t = dht.readTemperature(); // read temperature in centigrade

  if (isnan(h) || isnan(t)) { // check for invalid readings
    Serial.println(F("DHT reading failed."));
    return; // quit
  }

  Serial.print(F("Humidity: "));
  Serial.print(h);
  Serial.print(F("%  Temperature: "));
  Serial.print(t);
  Serial.print(F("°C "));
  Serial.println();
}

MQ

// MQ135 test using pins AIN A0 and DIO 2 as input pins

int MQanalogPin = A0, MQdigitalPin = 2; // assign Arduino pins
int MQanalogValue, MQdigitalValue; // variables to store MQ output values

void setup() {
  Serial.begin(115200); // serial port baud rate
  pinMode(MQdigitalPin, INPUT); // configure DIO pin 2
  pinMode(MQanalogPin, INPUT); // configure AIN A0 for clarity
  Serial.println("Warm-up for 30 seconds.");
}

void loop() {
  MQanalogValue = analogRead(MQanalogPin); // read MQ analog output on AIN A0
  MQdigitalValue = digitalRead(MQdigitalPin); // read MQ digital output on DIO 2
  Serial.print("Analog: ");
  Serial.print(MQanalogValue); // print MQ Analog Output
  Serial.print(" Digital: ");
  Serial.print(MQdigitalValue);
  Serial.println();
  delay(1000); // wait one second
}

Nice circuit for the piezo, but would it make mist?
Those mist makers are typically 1-2W, so about 300mA.