After building projects for your home, you’ll eventually want to take your progress to the next level and install them outside your house. Maybe to monitor an outdoor garden or a DIY barn temperature sensor to know when the horses need their blankets on. Accomplishing this requires a battery, and though there are many out there, one that I recommend is a LiPo, or Lithium Polymer battery. So in this tutorial I’ll not only teach you how to power your arduino via LiPo battery, I’ll also show you how to detect the battery’s voltage level and how to charge it.
The DS18B20 is a waterproof temperature sensor capable of being used for an automated aquarium, terrarium, or any environment in which the DHT22 cannot be deployed due to rust or other damage susceptibility. While DHT22’s are very accurate and give a variety of data such as humidity, heat index, etcetera, the problem is that it’s incapable of being protected from corrosion. This tutorial explains how to hookup, code, and deploy the DS18B20 waterproof temperature sensor.
The passive infrared sensor (PIR) is a sensory unit that detects infrared (heat) energy and can be configured to trigger events based upon it being active or inactive. We will be using the Elegoo micro-controller to manipulate its output, as well as learning some hardware information.
The PIR sensor is a cheap and easy to use unit that requires minimal effort on behalf of the user; with a few wires and taps of the keyboard you’ll be well on your way to implementing more complicated heat/ intrusion detection systems down the road.
Let’s first look at the PIR’s hardware and detail each of their functions:
The DS3231 is a real time clock utilized by the arduino micro-controller to remember and to trigger time based events. It features a CR2032 coin-cell backup battery pack, which will keep it powered for long periods of time when micro-controller power has failed by only powering the chip tasked with time keeping. During this power failure, the red LED which would normally be illuminated will be off during this time. Due to the various settings the module can be deployed it has a temperature-compensating chip that varies the oscillation cycle to adjust for high heat and cold. This unit retails on Amazon at 2 for $6.99 and is very easy to manipulate in the Arduino IDE.