Check out my Amazon Alexa contest project posting.
My new project is a Internet of Things kitchen counter LED light strip. The goal was to implement a 21st century light switch using bright and energy efficient LED lights. This required the replacement the mechanical switch with a hand-motion proximity sensor for on and off. Other features include:
- ESP-01 microprocessor and web server to control the light – an important maker CPU
- Motion sensor to turn off the light, when the kitchen is unoccupied for a user defined time interval
- 12 volt power with MOSFET (Adafruit IRLB8721) switch for the LEDs and a 3.3 volt switching regulator for the system components
- The user interface was to be a simple Web site for status, clock and system configuration, and remote light control, that could also update the ESP-01’s EEPROM
- OLED 128×64 display for system status, debug stuff and Wi-Fi network information
The ESP-01 presents a couple of problems, because it only has two GPIO ports. I needed to use the I2C bus to communicate with the OLED, which used both GPIO. So I decided to use an MCP23008 IC to handle interrupts (INPUT) and to control the MOSFET (OUTPUT). This enabled me to use I2C bus and added 8 more GPIO ports.
I used two two proximity devices on this project. The first is the PIR motion sensor. I really like the Parallax, Inc. PIR Sensor – Rev B, because it can operate on 3.3 volts and has a red LED to indicate detection of motion. The second proximity sensor is the Adafruit, VCNL4010 Proximity/Light sensor. It measures both near proximity and ambient light. The VCNL4010 uses the I2C bus to communicate data and it has a configurable interrupt signal. I used the MCP23008 to handle both interrupts – PIR and VNCL4010.
I added a cool on/off switch from Adafruit as the final touch. The Rugged Metal On/Off Switch with Blue LED Ring – 16mm Blue On/Off looks great.
The software features included: (a) NTP time set, (b) AP mode when the ESP-01 could not connect to its predefined SSID/password, (c) defaults in EEPROM, (d) my version of the VNCL4010 library, (e) my MCP23008 library with interrupt handling, and (f) RESTful interface for the website configuration stuff.
The next step was to fit everything in a small wooden box that I would mount on the wall.
I had a lot of trouble with the VNCL4010 when it was installed in the box. I need to spend time determining how much of the PCB board needs to be exposed from a hole or mount in the box. My first attempt blinked on and off after a couple of minutes.
Below is a short video of the light working. I’m planning to move everything to an Adafruit proto-board and finding a smaller box.
Next steps in a couple of weeks.
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.
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.
- ESP8266 ESP-1 Wi-Fi web server
- ATMega328pu 8 Mhz Real-time processor
- DS1307 real time clock
- OLED display user interface (status and controls)
- 7-segment LED digital time display
- Piezo buzzer and flashing LED for alarm
- Photo-resistor to measure room light
- I2C bus for communication
- 3.3 volt for all components
- Sync time from NTP at power up
- Web form to manually set time
- Web form to control alarm clock settings
- Star Wars Imperial March alarm sound
- ATMega328 handles analog and digital devices
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.
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.
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.
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”.