Intro

Simple request from a friend: change a remote-controled light bulb into a sound activated light bulb.


What you need for this project:

Whatimgprice in 2020
Esp32 ESP32 7€
NanoMotion sensor 4€
IR SenderIR Sender 5€
Sound sensorSound sensor5€


Links are not an endorsement of the product and just provided for convenience sake. I get not cut.
I bought a lot of ESP32 for other projects, but it is a bit of overkill, in the sense that you don't need any of the wifi or bluetooth capabilities, so a Nano would do just as well. It was also an opportunity for me to code for the Nano. That's why I listed both prices. You don't need both, any of the two will do. For sound sensor, you can use a KY-0037 or KY-0038, or anything else :-)

Putting it together


The design is rather simple: An IR sender is connected to a board, and the board connected to sound sensor.
The sound triggers the lightbulb on and off.
The problem was of course to know which code the remote was sending to switch the lightbulb on and off.
One solution was to use my previous project but after a bit of research, the bulb was identified as a Livarno Lux.
I further found that it was using the NEC-AIWA1 set, and the codes found here.

The wiring looks like this:

board



From a programming point of view, all the information needed is here: IR library, ESP8266 example.     Adaptation for an ESP32 or Nano is straightforward.


Proto1 Proto1 Proto2 Proto3










(C) Thunus F. 2020.