Posts

Low Voltage Protection Module Review

Image
In one of my projects, I needed a protection module to prevent a lead-acid battery from over-discharging. I picked up the first module I could find. The module is built around the LM358 operational amplifier. The intended purpose of this module is simple: when the battery voltage reaches a critically low level, it should disconnect the load to prevent further discharge until the battery is recharged. The cutoff threshold is adjustable; for old 7Ah batteries, I usually set it to 11.0V - 10.95V, though for today’s tests, I set it to 10.5V. During testing, I discovered a significant “nuance.” The idle current consumption of the module with a “charged battery” is 7mA, which is perfectly fine. However, what happens next is quite interesting. Once the voltage drops below the critical level, the relay clicks—and the current consumption jumps to 33mA. The Problem: Instead of energizing the relay when the battery is healthy, the circuit does the opposite. When the battery is already ...

Building U-Boot and Running Custom C++ Code on Orange Pi Zero 2W

Image
For one of my recent experiments, I needed to investigate how much the Linux operating system actually impacts hardware performance. To do this, I had to test the same algorithm in two different environments: under Linux control and in bare-metal mode (without an OS). Beyond the data, I was driven by pure curiosity—it was fascinating to compare programming for microcontrollers versus “grown-up” 64-bit multi-core processors. For these tests, I chose the Allwinner H618 SoC: Ubiquity and Accessibility : It’s incredibly easy to find. My home embedded lab has about a dozen devices powered by this chip, ranging from TV boxes to various SBCs (Orange Pi, Walnut Pi, etc.). Back in the summer of 2025, H618-based boards could be snatched up for $15-$20, though prices have noticeably climbed since then. The Power-Periphery Balance : With four Cortex-A53 cores, you can hardly call this processor “sluggish.” It’s snappy enough for serious tasks. Working with UART, SPI, I2C, or timers here is st...

WebSerial: How to communicate with a microcontroller from the browser

Image
I want to talk a bit about the WebSerial API . You have likely seen websites that allow you to flash microcontrollers directly from a web page. I first encountered this with the Micro:bit educational kit. A child can build a Scratch algorithm and, with a single click, upload the firmware to the board straight from the browser. This is incredibly convenient (as long as you have an internet connection): No need to install specialized software (IDEs, drivers, or command-line utilities). No complex environment setups or configurations. Minimal permission issues (though Linux users might still need occasional adjustments). Essentially, you only need a single HTML + JavaScript page to handle all the logic. It works almost everywhere on Chromium-based browsers (Google Chrome, Microsoft Edge, Opera, Vivaldi, Brave). Interestingly, on Chrome for Android, this method provides access to Bluetooth/BLE serial, though I couldn’t get it to work with USB CDC devices. It is also worth noting...

Modifying the INA226: From 0.8A to High-Power Current Sensing

Image
For my DIY battery build (4S LiFePO4 40Ah), I decided to add a “smart” monitoring system. Sure, I could have just bought an off-the-shelf Smart BMS with Bluetooth or Wi-Fi, but that’s not my style. I want to understand the entire process and build something of my own. First and foremost, I need to track the charge and discharge current. Based on this data, I’ll later be able to develop an algorithm for accurate State of Charge calculation. First and foremost, I need to track the charge and discharge current. Based on this data, I will eventually be able to develop an algorithm to calculate the State of Charge (SoC) . I’m not going to claim that this will be a high-precision instrument - it’s not. It is more of a ‘rough gauge’ to help me stay oriented: to see if everything is fine or if the power consumption has become abnormally high and something has gone wrong. To measure the current, we’ll use the INA226 module. Typically, these boards come with a 0.1 Ohm (100 mOhm) shunt resist...

Orange Pi Zero 3: Power Usage Benchmarks and Efficiency Tuning

Image
In recent months, I’ve noticed that my file server has been shutting down frequently. The primary reason is that the UPS (LX2UPS) charge is no longer sufficient. It is likely that the 18650 cells have degraded, and frequent power outages have only worsened the situation. Therefore, I decided to investigate how this can be fixed. My server is built on an Orange Pi Zero 3 and a 2.5” SATA HDD in an external USB enclosure. To start, I decided to measure the actual power consumption. Test #1: Power Consumption Without Drives In this test, I will check the power consumption of the Orange Pi Zero board alone, without any peripherals. I am conducting the measurements using a USB power meter, which allows me to monitor instantaneous current and total power consumption in milliwatts (mW). First stage: 30 minutes of operation with Wi-Fi and Ethernet enabled, with no background processes. Measurements showed a consumption of 820 mWh . Second stage: The same conditions, but the Wi-Fi and Bl...

Controlling the MT3608

Image
If you look at the MT3608 datasheet, you’ll notice that pin 4 is the Enable pin, designed to toggle the chip’s operation. A high level signal enables the chip, while a low level signal disables the voltage boosting. In the latter case, the output voltage will simply match the input voltage of the module. As we can see, EN is connected to the adjacent pin (5) of the IC, which is our input positive VIN . Therefore, to control the EN input, this trace must be cut. Initially, I wanted to use a rotary tool for this, but even the smallest burr turned out to be too large.   So, there was nothing left to do but cut the trace with a scalpel.   I’m doing all of this under a microscope, and in 15 seconds, the trace is gone.   Now it’s time to put everything together. I want to use the RCWL-0516 module as the control signal source. This module is a microwave motion sensor. As for the load, let’s use a 12V fan. We’ll supply 5V to the input from a regulated power supply. ...

Power bank module H961-U v6.1

Image
Dimensions: 6.5 x 2.5 cm Weight: 10.8 g Continuous Current: 2.4A Dual Output Current: 5V 2.4A Input Voltage (B+ to B-): 3.0 - 4.2V Overcharge Protection Detection Voltage: 4.20 ± 0.05V Release Voltage: 4.100 ± 0.05V Detection Delay: <200 ms Over-discharge Protection Detection Voltage: 3.0 ± 0.10V Release Voltage: 3.10 ± 0.10V Detection Delay: <100 ms The module is marked H961-U v6.1 Quiescent Current The quiescent current from USB (when battery are fully charged) is 18.5 mA. The quiescent current drawn from the battery depends on the module’s state: 26 mA — for a few seconds after activating the module via the button, 15 mA — when the charge status display is on, 3623 µA — display off, but 5V is present at the output, 92 µA — the module has entered sleep mode. Charging Logic This module supports only standard 5V. There is no support for Quick Charge or Power Delivery. Testing with Deeply Discharged Battery The module f...