Arduino humidifier with Grove Atomization module and Seeeduino Nano and + DHT11 + OLED
Check these awesome products !
https://www.seeedstudio.com/Seeeduino-Nano-p-4111.html
https://www.seeedstudio.com/Grove-Water-Atomization-v1-0.html
https://www.seeedstudio.com/Grove-Temperature-Humidity-Sensor-DHT11.html
Seeed is the IoT hardware enabler providing services over 10 years that empower makers to realize their projects and products. Seeed offers a wide array of hardware platforms and sensor modules ready to be integrated with existing IoT platforms and one-stop PCB manufacturing and Prototype PCB Assembly. Seeed Studio provides a wide selection of electronic parts including Arduino, Raspberry Pi and many different development board platforms. Especially the Grove Sytsem help engineers and makers to avoid jumper wires problems. Seeed Studio has developed more than 280 Grove modules covering a wide range of applications that can fulfill a variety of needs.
Hello there, hope you are well, this is a special article for a special video sponsored by Seeed Studio, there you can find all different products for your electronics projects, and like the last time, they were too kind to offer me a coupon and I had to chose what I need so I ordered few items (check the video).
But today as the title says we’re about the Seeeduino Nano and the Grove Water Atomization Module, and we’ll try to make a humidifier out of it using DHT11 and OLED screen to display the current Temperature/Humidity and the humidifier status, to maintain the room humidity at desired level.
As this is the first time using the Seeeduino Nano You can check in the video how to add the Seeeduino boards to the Arduino IDE or follow this link to see how on the product wiki page.
Hardware and parts
Using the Seeeduino Nano board for the first time instead of the Arduino UNO board, make sure to adapt the project to your own board.
And for the atomization process I’ll be using Grove Water Atomization Module, and basically it heats the water using ultrasound and separate the liquid into small droplets to dispense them in the air, and of course you can create your own scent dispenser out of this module.
Please pay attention when using the module !!!
If the module is powered do not touch it at all, about 63V is created between two pins on the bottom, and on the top the inductor L2 gets way too hot !!!!
And for our project we’ll need in addition of those mentioned above the following parts.
DHT11 and OLED screen
Wirings
Wiring 1
So first as we are just trying to setup the module and the board, here’s how to wire them, and as you can see in the video I used the grove cable, as it was very easy, and it wires the module directly to GND 5V and SCL (A5) because the grove connector on the Seeeduino is meant to use i²c devices, but you can use it in this case since it’s the only device I’m using until now !
N.B: The 3rd wire is not connected as you can see in the module (NC) and the 4th one needs only a digital signal to start the module or turn it off.
Also don’t forget to put the ultrasound probe (unit) on the surface of a recipient that contains water and help it with a paper towel so it won’t sink.
Wiring 2
Here is the wiring for the humidifier project, and here I add a DHT11 and OLED i²c display, any humidity sensor will work just use the right code, I’ve used a lot you can check them in the channel.
N.B: Please pay attention to you DHT11 module there are different ones some are soldered on a board with a resistor like the one I’m using, some of them have 4 pins, all pay attention to the pins some are (Signal, Vcc, GND) some are (Vcc, Signal, GND)
For the Atomizer I didn’t use the Grove connector as the OLED uses the i²c interface.
Libraries
The libraries I’ve used you can download them from the links:
- OLED libraries:
- Adafruit OLED SSD1306 library: Download here from Github or Donwload here.
- Adafruit GFX Library Download here from Github or Download here.
- DHT Adafruit library: Download here from Github or Download library here
Codes
Code 1
The first code is just a direct test with Arduino/Seeeduino board Download here or check below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
/* This code works with Grove Water Atomization module * It activate the atomizer for 3 seconds and turn it off with a message shown of the statut * Refer to http://Surtrtech.com for more details */ #define Atomizer A5 //Atomizer EN pin void setup() { Serial.begin(9600); pinMode(Atomizer, OUTPUT); } void loop() { Serial.println("Atomization !!!!"); digitalWrite(Atomizer,HIGH); delay(3000); Serial.println("Atomization OFF"); digitalWrite(Atomizer,LOW); delay(3000); } |
Code 2
The second code is the humidifier project Download here or check below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
/* This code works with Grove Atomizer, DHT11 and OLED i²c display * It shows the current temperature and humidity alongside the humidifier statut * It constantly read the ambient humidity and try to keep it at a defined humidity level (here is 70%) * and it activate the humidifer/atomizer everytime it's necessary to do so * Please refer to http://SurtrTech.com for more details */ #include "DHT.h" //Required libraries for DHT and OLED #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define Atomizer 3 //Atomizer EN pin #define DHTpin 2 //DHT signal pin #define DHTTYPE DHT11 //you can use DHT 22... #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 32 // OLED display height, in pixels #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); //Declaring the display name (display) DHT dht(DHTpin, DHTTYPE); void setup() { Serial.begin(9600); dht.begin(); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //Start the OLED display display.clearDisplay(); display.display(); pinMode(Atomizer, OUTPUT); } void loop() { float h = dht.readHumidity(); //Reading the humidity/Temperature values, you can calibrate them if you want float t = dht.readTemperature(); //You can add true between those brackets to make it Fahrenheit instead of Celsius if(h>=70){ //if the humidity % is equal or above the setpoint (70) the atomizer stops digitalWrite(Atomizer,LOW); } display.clearDisplay(); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(0,0); display.print("H "); display.print(h,1); display.print(" %"); if(h<70){ //Otherwise it will be on and it will show "On" on the display alongside the current temperature and humidity digitalWrite(Atomizer,HIGH); display.print("On"); } display.setCursor(0,19); display.print("T "); display.print(t,1); display.print(" C"); display.display(); delay(1000); } |
Tests
Test 1
The first test is straight forward, just don’t forget do not touch the sensor board while it’s powered and put a paper towel so the ultrasound unit won’t sink.
Test 2
The second code is for a humidifier project, the DHT11 is reading the humidity every second and as long as the wanted humidity value is not reached it will activate the atomizer, and the current humidity/temperature values are shown on the OLED alongside the Atomizer Status “On”.
The atomizer will stop once the value is reached.
Improvements/Ideas
You can improve the code by calibrating the DHT11 very well, also you can avoid the On/Off at the set point, by giving it an interval instead of a single value like “67<h<73” and the atomizer will work once the value is below 67 and turn off until it reaches 73 and start again if it goes below 67.
You can make a scent dispenser out of it, activated by a push button or automatically (every period/ every time someone passes by…).
That’s it I hope you like it and thanks again to Seeed Studio for the collaboration, very proud of it.
Categories
Yassine View All
Automation and Electrical Engineer, Electronics amateur trying to share my little projects.
One thought on “Arduino humidifier with Grove Atomization module and Seeeduino Nano and + DHT11 + OLED” Leave a comment ›