Humidity / Temperature Sensor
-
I've build a sensor to measure humidity and temperature in my living room. It is now working for about 7 weeks.
The sensor consists of the following components:
- DHT22 Hum/Temp Sensor
- MCP 1702 LDO Regulator (3.3V)
- Atmega328P-PU PDIP-28
- holder for batteries (4 x AAA)
- NRF24L01+
Here are the schematics:
And here is a screenshot from my OpenHab-View:
(I'm logging the last update to ensure the sensor is still alive)
The DHT22 needs at least 3 V to operate stable, so I thought about using a booster or a regulator and took the regulator.
Currently I'm using rechargeable AAA, which will be switched soon, as the sensor is working fine. The Voltage has dropped 0,1 V (from 5.3V to 5.2V) in 7 weeks and the AAAs were only precharged. My multimeter is able to measure the current, but in case of this sensor it is to low, I need a better multimeter.
The Atmega328p is running with 8 MHz internal clock and brown out detection is disabled.
Finally the sketch:
-
A little mistake in your schematic: R2 must be 4,7k!
-
@doesel33: You're right, thanks!
-
Cool!
Perhaps a noob question, but how do you program the Atmega?
-
Currently I'm using rechargeable AAA, which will be switched soon, as the sensor is working fine.
Why would you switch the batteries?
5.2V / 4 = 1,3V so still quite full.
These batteries are low-leakage batteries so provided the initial charge is fine and current consumption the lifespan should be good and at least 50% of that of good alkaline batteries
-
@gadu I'm using a MySmartUSB MK3.
@daulagari I'm using rechargeable ones as long as I'm not sure how good my device is working.
-
I power DHT22 from arduino pin. It help make economy battery. When controller sleep, power pin set to low.
If using 3.3 power - no needed R2
If you use CR123A accomulator. You will not need Regulator and the device will be smaller
-
Does the DHT22 work with 3v? I thought it needs at least 3.3v. I will test that!
-
Can't remember the specs. "Normally" 3.3v is something like 3.0-3.6v..
Just did the google thingy.. 3v-5v:)
-
-
I think the comment in the routine
void measureBattery() {
// R1 = 1MOhm, R2 = 220 kOhmShould be
void measureBattery() {
// R3 = 1MOhm, R2 = 220 kOhm(R3)
Is it possible to add (comment out) some lines how to calculate the battery percentage and send this via gw.sendBatteryLevel (batteryPcnt)
Great sketch!
Suggested Topics
-
💬 MyMultisensors
OpenHardware.io • 15 Apr 2016, 23:39 • openhardware.io 17 Feb 2023, 18:35 -
💬 NModule
OpenHardware.io • 23 May 2017, 14:38 • openhardware.io 10 May 2020, 05:43 -
Starry Sky
OpenHardware.io • 24 Mar 2016, 09:55 • openhardware.io 5 Nov 2016, 07:26 -
Wall Mount Sensor
OpenHardware.io • 14 Jan 2016, 03:48 • openhardware.io 14 Jan 2016, 06:40 -
Openhab 2 Mysensors smart chicken coop
My Project • 1 Mar 2017, 02:08 • Ticupolu 8 Mar 2017, 15:48 -
💬 Sensebender Micro mk2
OpenHardware.io • 16 Nov 2016, 22:30 • openhardware.io 10 Jul 2018, 19:37 -
💬 BlackCircle Sensor - High "WAF" Temp/Hum. sensor
OpenHardware.io • 31 May 2017, 16:47 • openhardware.io 3 Feb 2018, 18:04 -
Humidity controlled bathroom dryer during and after showering or sauna
My Project • 27 Dec 2014, 13:30 • samppa 29 Dec 2014, 14:34