Hello guys,
Most of the work with Rpi is over, the next part is to prepare the control unit.
This week we gonna break open a USB humidifier and try to control it using the arduino.
Does humidity affects emotions?
Even I had the question till this was started, and after little search found a lot of interesting facts over this, so the conclusion they do play a vital role over the mood, higher humidity makes you lazy, that's something you might want when you are angry.
I opened it, there is small control board and a pair of wire connected to the piezo. I removed the board to inspect and found the IC marking to be erased.
Since its was ON OFF controller decided to do it in another way, permanently shorted the humidifier switch to ground and attached a NPN to the power supply
and as final touch sprayed a layer of conformal coating ()
The Bluetooth is yet to be unleashes so I'm gonna send data over the arduino serial monitor
Its already humid weather here, so the only test case possible was 'anger' (did a mistake over the case in the snippet), but still it works. I don't want the humidifier to be turned ON based on the Relative humidity so hooked up a DHT11 to the arduino.
The code
#include <TroykaDHT.h> DHT dht(10, DHT11); void setup() { pinMode(9, OUTPUT); Serial.begin(9600); dht.begin(); } void loop() { digitalWrite(9,LOW); dht.read(); delay(1000); int hum = dht.getHumidity(); char c = Serial.read(); switch(c) { case 'a': //anger if (hum<80) Serial.println(hum); digitalWrite(9,HIGH); delay(10000); break; case 's': //sad if (hum<60) Serial.println(hum); digitalWrite(9,HIGH); delay(10000); break; } }
I started to visualize the final outcome, hoping for a great end.
Cheers,
Top Comments