• How to resolve issues integrating Home Assistant,  ESPHome, IR Blaster, Sony and NEC Protocols

    How to resolve issues integrating Home Assistant, ESPHome, IR Blaster, Sony and NEC Protocols

    I have an old Yamaha RX-V630 receiver and an older RCA 4K TV which are missing remotes. I wanted to replace them with an ESP8266-based infrared blaster connected to Home Assistant. Here are some of the problems I encountered and overcame. Problems You can see my full ESPHome config YAML at the end of the…

  • Connect INMP441 microphone to ESP32 NODEMCU-32 V1.3 2821

    Had trouble figuring exactly which pins to connect I2S microphone to the particular ESP32 board. INMP441 microphone NODEMCU-32 V1.3 2821 Below is the pin map for translating microphone pins to ESP32 board pins. Microphone NODEMCU GND GND VDD 3V3 SD P23 SCK P18 WS P19 L/R GND

  • ATtiny85, arduino-cli, interrupts; PIR-triggered wakeup example

    ATtiny85, arduino-cli, interrupts; PIR-triggered wakeup example

    I had a hard time getting started with ATtiny85. I ordered a few of those chips to use in a motion detector for my backyard because of its low power consumption and ability to be put into a deep sleep and woken up via an interrupt. The interrupt in this case would be a rising…

  • Measuring Inductance with Arduino Nano

    Measuring Inductance with Arduino Nano

    The schematic and code are at the bottom of the post. The problem While researching how to create a DIY MPPT solar charge controller I noticed that I would need an inductor with a certain value. I have a bunch of salvaged ones but had no idea what their inductance values were. I needed to…

  • I broke up with Lua and got with arduino-cli for ESP8266 development

    I broke up with Lua and got with arduino-cli for ESP8266 development

    TL; DR With the advent of arduino-cli there are no more reasons to use Lua over C/C++ for ESP8266 programming. Please challenge me on that in the comments if you can 😉 I enjoyed a couple of years of writing asynchronous code in Lua. It was fun and intuitive for someone like me, with a…

  • Interval Training Assistant using ESP8266

    Interval Training Assistant using ESP8266

    My wife does interval training exercises in the backyard or the basement. I joined her a couple of times and noticed that she struggled to time her “on” and “off” intervals using the phone. So I saw a fun project opportunity where I get to use an ESP8266 and some salvaged parts like a buzzer…

  • A simple buzzer/piezo Lua library for NodeMCU/ESP8266

    A simple buzzer/piezo Lua library for NodeMCU/ESP8266

    I was working on a project that involved adding a buzzer and playing different notes. I ended up writing something pretty easy to use so decided to put it on GitHub to save people some time. Link to the repo: https://github.com/alexchumak/buzzkill-lua Usage Please note that in real life you would have a delay between the…

  • Use GPIO interrupts instead of sensor sampling to simplify code

    Naively, I’ve been using sensor sampling as the only way to detect changes in sensor readings. Shaking my head over here. Just sad. Sampling means periodically reading sensor value to detect changes. My period was typically around 10Hz, or 10 times every second. Not only it is wasteful in many cases, it also has a…

  • HowTo: Reduce sensor’s WiFi communication to use 300 times less power

    HowTo: Reduce sensor’s WiFi communication to use 300 times less power

    The Problem Many devices with sensors spend the majority of time in deep sleep, wake up, take a measurement, communicate it over WiFi and go back to sleep. WiFi communication is typically the step that takes the longest and consumes the most battery power. How do we optimize our code to spend less time being…

  • WeMos D1 Mini/ESP8266 Pin States On/Off/Deep sleep/Low side switch

    The Problem In my post about low power deep sleep for ESP8266 dev boards I ran into an issue with a low side switch where I was unable to wake up NodeMCU after the first sleep. The uptime is controlled by TPL5110 timer which has DRIVE and DONE pins. To power down ESP you signal…

Got any book recommendations?