Skip to main content

Posts

Automatic Rechargeable LED Beacon Light

A flashing beacon is a simple thing that is useful in many places: beside a broken-down vehicle, at the edge of a farm plot to keep animals away, or at a hazard that needs marking overnight. This one charges from a 5V supply, runs from a single 18650 cell, stays off in daylight and starts flashing by itself when it gets dark. It has no microcontroller and no firmware. One CMOS logic IC senses the light and generates the flash, two small transistors and a MOSFET drive the LED at a limited current, and three further ICs look after the battery. The complete design is open source and available at https://github.com/dilshan/auto-led-beacon . Finished prototype build. The beacon operates automatically from dusk to dawn, with a trimmer to set how dark it must be before flashing starts. The LED driver limits the current to about 0.6A to 0.7A, which protects both the LEDs and the battery from excessive current. Power management is built in. An on-board charger tops up the cell at 1A, wi...

Open LRU Fingerprint Library

LRU sensors are small USB fingerprint modules developed by Shenzhen Lirox Information Technology Co., Ltd. , designed for access-control and embedded security devices. Each module has its own onboard processor that captures the fingerprint image and extracts its features, communicating with the host computer solely over USB. Recently, I had the chance to work with the LRU1011 , a thin, inexpensive capacitive fingerprint sensor. LRU1011 Fingerprint sensor. The vendor provides a closed-source Linux library for this sensor, which cannot be ported to architectures other than amd64. To use the sensor on other architectures, I decided to build a lightweight C library for it. Because the vendor does not publish the protocol, I had to reverse-engineer it myself using two complementary methods: - Hardware USB sniffing: I captured the USB traffic between the vendor's software and the sensor using an external hardware USB sniffer. - Binary analysis: I studied the vendor's close...

TDA1516BQ 12W x 2 Stereo Amplifier

These days, it is easy to find high-power Class D and Class T audio amplifiers. Compared with classic Class A, B, and AB designs, they are tiny and deliver very high output power. I have built and used many Class D and T amplifiers, but I still prefer the warm, organic, and smooth sound of older Class A, B, and AB topologies. Prototype build of TDA1516BQ amplifier. The problem is that older amplifier chips are getting harder to find. While shopping for electronic components some time ago, I came across the Philips TDA1516BQ . It delivers 12W per channel on a 12V - 14V supply, and the circuit is extremely simple. It turned out to be one of the easiest stereo amplifiers I have built so far. I designed a small PCB for this amplifier (62 mm × 41 mm) and had it fabricated by PCBWay . The design is also shared on PCBWay, so if you are interested, you can order the board directly from there . The Gerber files are available in the release section of repository as well. Top view o...

Flash C - Compiler

Flash C is a small C compiler with a full-screen, text-mode IDE. Both are written from scratch and both run on Linux. The compiler, fcc , reads C source code and writes a native x86-64 Linux executable directly. No assembler, linker or C library is used at any point. The IDE, fc , wraps the same compiler in pull-down menus, overlapping edit windows, an error window , option dialogs , a source-level debugger and hyper-linked online help. Its layout follows the classic Turbo Vision style IDEs. This post shows what is in the project and how it works inside. The Flash C IDE. The whole toolchain lives in one repository: the lexer and preprocessor, the parser and type checker, an optimizer, the x86-64 code generator, an ELF writer, a run-time library written in C, the IDE, a debugger and the help system. Flash C compiles C89 with a few C99 conveniences, such as // comments. C++ is deliberately not supported. Two programs come out of the build. fcc is the command-line compiler. Runn...

Diagnosing and repairing an Audio-Technica AT-LP120-USB motor driver

As an audio enthusiast, Audio-Technica has long been one of my go-to brands for reliable gear. Back in 2016, I bought a brand-new Audio-Technica AT-LP120-USB direct-drive turntable. For nearly eight years, it performed flawlessly. Then came last June. While listening to a record, I noticed a subtle drop in pitch. I adjusted the pitch slider and tried tinkering with the speed controls, but the platter responded erratically. Within a few minutes, the rotation slowed down to a crawl and came to a complete stop. Power cycling the unit did nothing to jumpstart the motor, though all the status LEDs and indicators remained brightly lit. The main logic was alive, but the motor was completely unresponsive. I decided to open it up and see if I could save my turntable. Upon opening the chassis, I was surprised by the internal layout. Rather than a simple single-board design, the LP120 utilizes a complex modular dual-PCB setup: Control board: Handles user inputs, pitch control, speed switc...

Building a Dual V100 AI Workstation for Local LLMs

In today's software development landscape, local Large Language Models (LLMs) offer unprecedented privacy, zero latency, and freedom from subscription fees. While I generally avoid purely " vibe coding " for my projects, having robust inline code completion and chat directly integrated into IDEs speeds up development significantly. However, consumer GPUs with high VRAM often cost enough that paying for cloud inference ends up being the more economical option for most developers. To overcome this, I recently completed constructing a custom, dual-rack compute node specifically designed to host LLMs and compile complex codebases without breaking the bank. Here is the full engineering breakdown of how I designed, assembled, and configured this dual Tesla V100 machine from scratch. Fully assembled rig. The core philosophy behind this build was maximizing compute performance and Tensor VRAM density while strictly controlling costs. Consumer-grade GPUs with large VRAM, su...

Tiny Basic for Arduino

The primary objective of the Tiny Basic for Arduino project is to replicate that nostalgic C64 style programming environment utilizing modern, low-power MCU platforms. Present-day microcontrollers offer significantly higher processing power and memory capacity than the vintage systems of yesteryear, whilst being available at a fraction of the cost. I envisioned an environment where students and hobbyists alike could experience retro-style computing without the need to source rare, expensive vintage hardware, and completely avoiding any assembly or soldering hassles. By simply connecting a standard, off-the-shelf development board to a PC and launching a serial terminal, one can immediately commence coding in BASIC . Arduino Due: The primary development and testing board. To maintain an authentic and lightweight footprint, the interpreter is built upon the original Tiny Basic language grammar. It accurately parses and executes standard Tiny Basic syntax, making it highly famili...