Fireplace Mantel Christmas Project

I created an interactive fireplace decoration using an ATmega328, two 8×8 Matrix LED backpacks, a 128×64 OLED, a piezo buzzer and an IR remote sensor. Basic functions include the following

  • 8×8 LED depict snow falling, a flashing light tree and “Merry Christmas” scrolling marque
  • OLED wishes you a Merry Christmas, and has Naughty and Nice lists with names that can change
  • Piezo buzzer plays Jingle Bells
  • IR Remote controls both displays; plays Jingle Bells; and adds people to the Naughty and Nice lists.

I soldered one of the I2C address pads on one of the 8×8 Matrix LED to differentiate displays (0x70 and 0x71). I used an antique wooden glove box as the project box.


The video demonstrates the simple functions of this fireplace decoration.

IOT Digital Alarm Clock

I’ve started work on a new version of my alarm clock. I wanted to add a couple of improvements to the first version which was based on an ATMega328pu processor and NRF24 radio. This version would use an ESP-1 for both communication and standalone configuration.


IOT Digital Alarm Clock Breadboard

Hardware features:

  1. ESP8266 ESP-1 Wi-Fi web server
  2. ATMega328pu 8 Mhz Real-time processor
  3. DS1307 real time clock
  4. OLED display user interface (status and controls)
  5. 7-segment LED digital time display
  6. Piezo buzzer and flashing LED for alarm
  7. Photo-resistor to measure room light
  8. I2C bus for communication
  9. 3.3 volt for all components

Software features:

  1. Sync time from NTP at power up
  2. Web form to manually set time
  3. Web form to control alarm clock settings
  4. Star Wars Imperial March alarm sound
  5. ATMega328 handles analog and digital devices
ESP-1 uses I2C to control all components

ESP-1 uses I2C to control all components

The OLED can be hidden and only needed at startup to determine the status of the system and to show the IP address of the device.

ATMega328 handles all analog and digital devices.

ATMega328 handles all analog and digital devices.

A simple web form is used to (a) manually set date and time; (b) set the alarm time; (c) enable the alarm clock and (d) sound a system alarm.

Simple web for served by the ESP-1

Simple web for served by the ESP-1

The video below demonstrates the basic features using the breadboard design.

The next step is to complete the software development and move everything to a protoboard and antique box.

Raspberry Pi Surveillance Project

I wanted to add video surveillance to my home automation project, which was a good excuse to add another Raspberry Pi to the project. I’d tried using an ATMega328 with the Pi but found it too cumbersome to write Python code and Arduino ATMega code. It worked with an I2C interface but I wanted something simpler.

The diagram below illustrates the Adafruit photo-board with all of the necessary interfaces to 5 volt and 3.3 volt devices.

Raspberry Pi Interface Board

Raspberry Pi Interface Board

Project Enclosure

Project Enclosure

Features of a Raspberry Pi 2 Surveillance project:

  • Raspberry Pi 2 – REST server (HTTP communication and control)
  • Surveillance – Raspberry Pi camera for video capture
  • Panic Button – hardware debounced button (3.3 volts)
  • Motion sensor – PIR sensor at 5 volts
  • Night Light – large LED at 3.3 volts
  • Identification – IR Sensor to check for “me”
  • iBeacon sensor – BLE USB dongle checking for my iPhone iBeacon
  • Alarm – 555 Timer driving a loud speaker

I enclosed the project in a plain wooden box. As you can see the cable management was a hassle with the hinge and external interfaces on the door.

Raspberry Pi Surviellance

Raspberry Pi Surveillance

All of the code is in Python. There are four main packages

  1. REST server code
  2. Hardware interace – interrupts
  3. Camera controls with 2 rotating JPEG images
  4. BLE iBeacon scanner

I will publish the code to GitHub when I get a chance.

ESP Light Switch – Part II

Continuation of my ESP8266 DC power switch. Once I had the breadboard working I soldered the components onto an Adafruit Proto-Board and enclosed the electronics in an antique wooden box. I’ve been combining the “old” with the “new” by reusing old or antique wooden boxes as my Arduino, Raspberry Pi and ESP8266 projects.

Final Project Enclosure

Final Project Enclosure

The next version (there are always things to improve) will use a 220 Ohm resistor for the LED indicator. I will also add some type of relay for an AC version. I really like the cloths pin box which I found in an antique store in Kalispell, Montana.

ESP8266 Light Switch Design

ESP8266 Light Switch Design

The diagram depicts a modified version (new 220 Ohm resister, etc.) of the proto-board solution. I’ve also added pins to support debugging on the proto-board by providing RX, TX and GND pins from the ESP-1.

NebbieBox – Cat Entertainment Center

Another recent project is a cat entertainment center using a combination of servo controlled mice and feathers. For the prototype I used a wooden wine case (6 pack) and inserted 1-1/2 inch tubes and servos for two mice. A slot on the side uses another servo to pop out a feather. It has been very popular with Nebbie, our six month old kitty.

Features include the following:

  • Dual ATMega328 chips (I2C master and slave)
  • Adafruit 16-Channel 12-bit PWM/Servo Driver – I2C interface – PCA9685
  • Bluefruit LE – Bluetooth Low Energy (BLE 4.0) – nRF8001 Breakout
  • Two Piezo buzzers for mouselike sounds
  • Two small vibration motors to simulate scatching
  • Two IR LED emitters/receivers to detect cat proximity
  • iPhone to control each servo / sounds
  • Automated mode to pop mice out and in

One of the challenges was to make it robust enough to handle abuse from the kitty while at the same time “NOT HURTING” my kitty. Nebbie has pulled out the servos several times. She also runs over to the box as soon as she hears the servos power up.

Home Automation Motion Sensor

This is a prototype of my battery powered PIR motion sensor unit that I have on my front porch. It has run for several months on 3 AA batteries. Larry gave me the idea to use the PIR output to drive a MOSFET power switch.

ATMega328 battery powered motion sensor

ATMega328 battery powered motion sensor

The ATMega328 and NRF24 radio are powered up by motion detected by the PIR sensor. In the setup() routine it determines which of the four outdoor sensor locations it has been installed in (front porch, back yard, etc.) by the 2 position DIP switch, configures the NRF24 radio (DIP determines mesh network parent and pipe addresses), sends a message to a mesh NRF24 router unit and then enters a null loop until it looses power (PIR goes low). I’ve used an Adafruit proto-board to build a more permanent version:

ATMega328 Motion Sensor Project

ATMega328 Motion Sensor Project

I’ve run this device for more than 3 months and it works great. My next prototype will use the same idea but replace the ATMega328 and NRF24 with an ESP-1 Wi-Fi client.

ESP8266 Light Switch

Another recent project with the ESP8266 was my Wi-Fi controlled light switch. I had a couple of LED desk laps that I wanted to control remotely from my Home Automation iPhone app.

Goals for the project:

  • Use an ESP-1 to handle all of the processing (no ATMega328)
  • Implement a simple REST web server to handle HTTP PUT commands
  • Only use one 2.1mm power plug (Wi-Fi control has to use the lamp’s power cord)
  • Be as efficient as possible and rely on a LM1117 voltage regulator for 3.3 volts
  • Use a MOSFET to control power to the connected appliance (LED desk lamp)

This is a video of the first breadboard version of the light switch.

The next step is to create a more permanent protoboard (Adafruit product) and enclose it in an antique wooden project box.

ESP8266 Wearable Access Point

I wanted to create a couple of wearable devices using the ESP8266 for a SEAWare MeetUp. The first thing I needed was a wearable Wi-Fi access point. My first wearable project would use the access point to coordinate communication between my iPhone and other ESP8266 devices.

Wearable Wi-Fi Access Point

Wearable Wi-Fi Access Point

I decided to use a lanyard to hold both the battery and a very visible ESP8266 circuit board. I included an 8×8 matrix LED from Adafruit that use I2C communication (needed for he ESP-1). Features included:

  • ESP-1 access point
  • 3.3 volt lithium ion battery
  • 8×8 LED matrix
  • 2-position DIP as a power switch
  • iPhone to select different scrolling text messages

My next couple of posts will describe the wearable name tag with its OLED display, gyro-accelomter (posture sensor) and IR LED switches.

ESP8266 ESP-1 Internet of Things

I’ve recently started working with the ESP8266 model ESP-1 Wi-Fi web server, web client and access point. It is an incredibly powerful microprocessor with an equally powerful Wi-Fi radio. Its 32 bit, 80 MHz processor has lots of memory (compared to my ATMega328) and at around $2 US, its hard to beat.

ESP-1 IOT Platform

ESP-1 IOT Platform

You can use several different development environments but the ESP8266 community has ported it to the Arduino IDE. I’ll post a few of my most recent prototypes in the next couple of days.

DIY – Home Automation and Monitoring

I’ve spent the last couple of years learning digital design with the Arduino platform. The open source hardware and software communities have been immensely helpful and I could’nt have made much progress without their help.

I decided to use home automation and motion surviellance as the central theme for my self taught, hardware design education program. Today, my home has many sensors collecting data in each room and communicating status to my iPhone via Bluetooth devices. I’ve used an nRF24L01 2.4 GHz radio in a mesh network to coordinate each device.

I will document version 1.0 of my home automation system on “parttimemaker”.