Hardware Hacking

Enter Your Electronics & Design Project for a chance to win a $200 shopping cart!

Submit an EntrySubmit an Entry  Back to homepage
Project14 Home
Monthly Themes
Monthly Theme Poll


Hello everyone, in this post I will show, how I hacked my old star wars lamp, including wifi support, using an esp8266 and voice control using Python + Google Speech API.

The code used in this project can be found in https://github.com/danilo94/IotLamp





1 - Understanding the Hardware


Firstly to hack the lamp, I need to understand how the hardware of the project works, so disassembling I found this PCB:


The PCB is composed by a simple line of RGB leds, and a microcontroller ( probably an Attiny85 ) responsible for control the brightness of each color, using a PWM signal. So, testing the pins, i found the color channels, next when old microcontroller stay in pcb as shown in figure.


2 - Hacking RGB signals, using an Arduino


So, to test the signals, I soldered the wires in each color channel and connected it to an old Arduino nano, to test the color transition.


Darth Vader Lamp


3 - Adding ESP8266 to the project

So, after the test of RGB channels using the Arduino, I connected the wires to an esp8266 to use them as main controller.



4 - Using Python + Google Speech API to add voice commands


To add voice control to this project, I created a python script to listen to@@ my voice and using the Google Speech API, the script detect the following words:


  1. Luke Skywalker: Change color of the light to blue.
  2. Mestre Yoda ( Master's Yoda ): Change color of the light to green.
  3. Darth Vader: Change color of the light to red.
  4. Desligar ( Turn off ): Turn off the lamp.



5 - Youtube Video ( i will add subititles as soon as possible )