Saturday, April 25, 2015

Arduino UPS / Battery Shield

We just picked up a LIPO shield from Adafruit, which allows us to battery power our projects.

The shield contains a optional 2Ah LIPO battery, and recharges from a mini usb cable (same as a Kindle).

You can power your project from the shield on battery power, or plug in the cable, and it charges the battery and acts like a online UPS, powering your project. LED's show power on, charging, charged, and low battery status, and you can monitor battery voltage on one of your analog pins.

All we had to install was the extended headers, and the optional power switch (finally, you can power off the arduino). Stack the shield, plug in the battery and a usb cable for charging when necessary, and you are set to go.

Take it solar with

We used a Ada Fruit RGB I2C LCD Shield
Make sure you download the Adafruit Libraries for the LCD.

// set up the voltage monitor
// select the input pin for the battery voltage. 
//Make sure you solder the correct pad on the bottom 
//of the power boost shield.
int sensorPin = A2;    
// variable to store the value coming from the battery
int sensorValue = 0;  

//measure your AREF pin and replace our 
//measured value of 4.77v
float stepVolt = 4.77/1024.0; 

// include the library code:
#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>

// The shield uses the I2C SCL and SDA pins. On classic Arduinos
// this is Analog 4 and 5 so you can't use those for analogRead() anymore
// However, you can connect other I2C sensors to the I2C bus and share
// the I2C bus.
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

// These #defines make it easy to set the backlight color
#define RED 0x1
#define YELLOW 0x3
#define GREEN 0x2
#define TEAL 0x6
#define BLUE 0x4
#define VIOLET 0x5
#define WHITE 0x7

void setup() {
  // Debugging output
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  lcd.print("Battery Voltage");

void loop() {
 sensorValue = analogRead(sensorPin); 

Wednesday, April 22, 2015

Earth Day - Have your lights turn off when you leave the room!

We wanted to save energy, and create convenience, by adding motion sensors to our lighting circuits. Maybe you want some notification of an intruder. Both can be done with a PIR Motion sensor.  When I walk into a room, the lights come on automatically, and when I leave, shut off after a short period of time. You can choose how long that time delay is in the code. No more fumbling for a light switch in the dark with my arms full of groceries!

Monday, April 20, 2015

Solar & Wind Data Logger Video

This data logger monitors a solar or wind off -grid power system. A current shunt and voltage divider monitors the voltage and current of the system. This data is displayed on the LCD and written to the SD card along with time / date stamping from the real time clock module. A Screw prototyping shield enables easy access to pins for connecting additional sensors like temperature, humidity, barometric pressure, wind speed and direction and rain gauges. Additional information including the web based charting and graphing module is available at

Related Posts Plugin for WordPress, Blogger...