Constant On Time LED Dimmer

Introduction The world of digitally controlled switchmode power supplies has always held a certain allure for me: the idea that you could sample things like output voltage and current, apply some DSP techniques, and then based on that output a gate drive signal in real time, giving you whatever response you want out of your buck/boost converter just seems so… insanely cool. That being said, a lot of times these require a good understanding of the control loop architecture and parameters of switchmode power supplies to be able to properly stabilize, which has proven to be quite the barrier to entry....

January 25, 2024 · 12 min · Infinus

Inductor Saturation Current Measurement Jig and Constant Current Dummy Load

Background As I have only recently come to realize, inductor selection for boost converters is not a trivial matter at all. Every inductor I tried saturated way too early, causing progress for the SMPS Chronicles Boost Converter project to grind to a halt. After many frustrating afternoons, and several blown parts and melted breadboard holes, I had enough. Inspired by this video on the RF Man YouTube channel (really nice channel by the way), I decided to build a dedicated jig that would allow me to easily measure the saturation current of the any inductor that I was about to use....

August 23, 2021 · 13 min · Infinus

How to Use I2C EEPROM with Arduino

First off, there are already a whole bunch of tutorials on how to use this particular I2C EEPROM with an Arduino. If you want to understand how such an EEPROM works, this post is not for you. I just wanted to share this bit of code with anyone who doesn’t feel like writing their own. It basically allows you to select an EEPROM address and specify a payload to be written to that particular address....

November 5, 2020 · 2 min · Infinus

Using Hardware Serial with the HC-05 Bluetooth Module

I recently ran into an interesting issue developing my dawn simulator lamp (full project details coming soon): the HC-05 module I was going to use really didn’t play nice with the hardware UART peripheral on the Arduino Nano. Why not use software serial like the countless other tutorials on the HC-05 on the Internet suggest, you may ask. Well, its because this project uses WS2812B LEDs, which are a real pain when you have to do multiple things that require precise timing (both RS232 and the WS2812B’s communication protocol are asynchronous) on something like an Arduino Nano, which isn’t particularly fast, has limited peripherals, doesn’t have a DMA… you get the idea....

September 30, 2020 · 3 min · Infinus

How to Serial.read() Multiple Bytes on Arduino

Have you ever tried to Serial.read() multiple bytes successively with an Arduino, only to have it spit out a bunch of 0xFF or similar nonsense? I sure have. Check out this section of code from my mood light project: uint8_t cmd = Serial.read(); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 //other stuff here else if (cmd == 0xcc) { //set color currR = Serial....

September 30, 2020 · 2 min · Infinus