This circuit allows many uses :
- Switch sensor
- Temperature sensor
- Humidity sensor
It runs from battery. There is a CR2032 holder on bottom, but it can also be powered with 2xAA batteries, on a separate header.
You can also directly provide the 3.3V on another header.
There is 2 inputs : both have pull-ups pads to solder a resistor, but are optionnal (if you prefer to use atmega internal resistor).
The power stage uses a MAX1724EZK33+, which converts input voltage from 0.8V to 3.3V to fixed output of 3.3V.
The radio module used is a RFM69(HW).
I also made a very similar version for the RFM69HCW, because HopeRF did a mistake and sold me 50pcs of the wrong radio module ;). It uses almost the same components, except I removed the boost converter.
Circuit size is 50x30mm, which is about the same size of 2xAA batteries. You can the place it almost everywhere !
**Component selection **
There is different ways to power this device :
- With a coin cell (CR2032, holder behind the sensor) : Don't solder the AMS1117 nor the MAX1724, nor the inductor. Just make a strap between pins 2 & 3 of the AMS1117 footprint : atmega and radio are then fed directly with VIN (battery)
- With a 0.8V to 3V power supply : a MAX1724 is then used to boost the voltage up to 3V. Don't solder the AMS1117, but do solder the MAX1724 and the inductor. You can then provide power with either the coin cell, or via the VIN connector (bottom left). You can even use a single AA or AAA battery !
- With a higher than 4.7V power supply (i.e. 3xAA batteries), via the VIN pins. Solder the AMS1117 but not the MAX1724. You can also use a low drop-out voltage regulator (LDO), Microchip is making good ones for example.
Programming
Warning ! The board isn't drilled big enough to use standard ICSP headers ! Instead, I made a simple adapter with pogo pins (pictures coming soon). Just hold the adapter with a hand firmly on the board, and hit "upload" with your second hand.
You'll also need an USBASP or equivalent programmer (no USB adapter on the board !)
** Usage **
You can use the device multiple ways :
- Switch sensor : you can connect two switches or push buttons on S0 or S1 (between middle pin and GND). Internal pull-ups are then used (you can also solder external pull-ups if you want)
- Temperature sensor using a DS18B20 : needs a 4K7 external pull-up (internal won't do the trick). You can choose between 9,10,11,12 bits conversion, but the bigger the longer the conversion is ! Up to almost 1s is needed for a 12 bits, and each bit removed divides the needed times by 2 ! You can power it permanently (VCC-Signal-GND), or you can use the second connector to power the DS18B20 just before the conversion, read the value, then power it off ! Maximum watts squeeze from your batteries GUARANTEEED !
- Temperature sensor using some other sensor (I use LMT85/LMT86). The accuracy seems a bit under the DS18B20, but power consumption is very low, and conversion is really fast !
- Humidity sensor using a DHT11/DHT22 : I recommand powering it only when needed, because the quiescent current is pretty high...