From e836c4b9e78cc3892cdebf8126cb650f1b91ed37 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Thu, 8 Jan 2026 22:28:37 +0800 Subject: Tighten prose. --- _log/bumblebee.md | 29 ++++++++------------- _log/e-reader.md | 33 +++++++++++++----------- _log/etlas.md | 33 +++++++++++++----------- _log/fpm-door-lock-lp.md | 17 ++++++------ _log/fpm-door-lock-rf.md | 42 ++++++++++++++++-------------- _log/neo4j-a-star-search.md | 6 ++--- _log/site-search.md | 63 ++++++++++++++++++++++++--------------------- 7 files changed, 113 insertions(+), 110 deletions(-) (limited to '_log') diff --git a/_log/bumblebee.md b/_log/bumblebee.md index 25f08e4..6ef46b3 100644 --- a/_log/bumblebee.md +++ b/_log/bumblebee.md @@ -6,34 +6,27 @@ project: true thumbnail: thumb_sm.png --- -Work project. Browser session-to-code conversion. +Browser session-to-code conversion. For work. Pre-LLM. -Architecture: C# WinForms host, embedded browser, code editor. Browser -extension rejected due to security policy and shallow event control. +Quality of scripts are pitiful. -Tool evaluation: +Created tool to generate them real-time (as the user browses the web). - - CefSharp: Discarded. API lacked elegance. - - WebView2: Selected. Better WinForms integration. Hard dependency on - Microsoft Edge--acceptable for corporate Windows environments. +Architecture: C# WinForms host, embedded WebView2 browser, Scintilla.NET +editor. Implementation: - 1. Interception: Injected JS hooks; internal browser event monitoring - (pop-ups/downloads). - 2. Transformation: Event → Token → Instruction Table → String. - 3. Optimization: Parallel event/text lists processing; rendered - in Scintilla.NET + - Interception: Injected JS hooks + internal browser events. + - Transformation: Event → Token → Instruction table → String. + - Optimization: Parallel event/text lists. + - Two-way binding of code to Scintilla editor. -Bug: Manual mid-session overrides desync code/event lists, bypassing optimizer. -Linear lists inadequate for state synchronization. Need to rethink data -structures; look to compiler Abstract Syntax Trees (AST) for intermediate -representation. +NOTE: Abstract syntax trees. -Verdict: Serves its purpose. +Script generation: minutes/hours → seconds. diff --git a/_log/e-reader.md b/_log/e-reader.md index 69b1e96..45363f7 100644 --- a/_log/e-reader.md +++ b/_log/e-reader.md @@ -1,12 +1,12 @@ --- -title: 512 KB e-reader +title: 512KB e-reader date: 2023-10-24 layout: post project: true thumbnail: thumb_sm.png --- -First project with e-paper displays and ESP32. +First project with e-paper. -Redesigned the PCB completely. Tossed the RF modules and the second MCU. -Connected R503 sensor directly to the ATmega328P. Sensor now mounts on door -exterior, servo attaches to interior knob, MCU stays on the back to prevent -tampering. +Redesigned the PCB completely. Tossed RF modules and the second MCU. Connected +R503 directly to the ATmega328P. Sensor now mounts on door exterior, servo +attaches to interior knob, MCU stays on the back to prevent tampering. @@ -42,14 +41,14 @@ Solved idle power draw with MOSFETs. 2N7000 and NDP6020P cut power to sensor and servo before deep sleep. Through-hole MOSFETs that switch at 3.3V are getting harder to find. NDP6020P already obsolete. -Replaced linear regulators with MP1584EN DC-DC buck converters. No RF, noise -isn't a big concern. Buck's pin breakout not great--wouldn't fit most -commercial dev boards. +Replaced linear regulators with MP1584EN DC-DC buck converters. No RFM--noise +isn't a big concern. Buck's pin breakout not great--wouldn't fit commercial dev +boards. -Squeezed more power savings from the MCU by running it at 3.3V/8MHz. Combined +Squeezed more power savings by underclocking MCU to 8MHz/3.3V. Combined with buck converters: 56% total power savings. -Wake sequence: MCU activates sensor MOSFET, unlocks sensor over UART, scans and +Wake sequence: MCU activates FPM MOSFET, unlocks FPM over UART, scans and matches fingerprint. Match triggers blue LED, servo MOSFET, PWM signal to unlock. No match triggers red LED. MOSFETs off, back to sleep. diff --git a/_log/fpm-door-lock-rf.md b/_log/fpm-door-lock-rf.md index 76f64d7..87dc6b4 100644 --- a/_log/fpm-door-lock-rf.md +++ b/_log/fpm-door-lock-rf.md @@ -12,21 +12,25 @@ Wanted to unlock door with fingerprint, wirelessly to avoid drilling. lines of the transceivers to UART RXD/TXD of an ATmega328P. Unreliable--constant packet loss. -2025-01: Switched to RFM69 modules. A complete ball-ache. Followed the -datasheet to the letter, audited code more than 10 times, cross-checked with -RadioHead and RFM69 OSS drivers. No luck. ATmega328P runs at 5V, RFM69 3.3V. I -suspect the problem is with the logic-level converter (LLC). Not enough swing. +2025-01: Switched to RFM69 modules. Complete ball-ache. Followed datasheet to +the letter, audited code many times, cross-checked with RadioHead and RFM69 +open-source drivers. No luck. -2025-04: Ditched RFM69s. Switched to NRF24L01+ modules--5V tolerant, no LLC -required. Spent six weekends writing driver from scratch--clean-room, using -datasheet. Works perfectly. +Datasheet riddled with ambiguity. -2025-05: Wrote FPM sensor drivers for R503 and FPM10A. UART RX sequence was -tricky--took multiple attempts to get handshake working. R503 has built-in LEDs -and better form factor--will use it for the lock. +ATmega328P runs at 5V; RFM69 3.3V. Suspect logic-level converter (LLC) +issues. High resistance. Not enough swing. -2025-06: First PCB design. Two boards: fingerprint sensor (front), servo -controller (back). Encrypted RF link between them. +2025-04: Ditched RFM69s. Switched to NRF24L01+ modules-- data pins 5V tolerant, +no LLC required. Spent six weekends writing driver from scratch--clean-room. +Works like a charm. + +2025-05: Wrote FPM drivers for R503 and FPM10A. UART RX sequence was +tricky--adopted Adafruit C++ FOSS implementation to C. R503 has built-in LEDs +and better form factor. Chose it for the lock. + +2025-06: Two PCB boards for FPM (front) and servo (back) controllers. Encrypted +RF link between them.
@@ -52,19 +56,17 @@ controller (back). Encrypted RF link between them.
PCB specs: 2-layer, 1oz copper, 0.3mm traces (0.5mm for power). Ground plane. -Both subsystems worked—could control servo from sensor over RF. -2025-06: NRF24L01+ on the back controller stopped working after mounting on -PCB. RFM is too close to PWM line. Fixed by soldering a large 47uF (16V) -electrolytic capacitor between VCC and ground. +2025-06: NRF24L01+ on the back stopped working after mounting on PCB. Too close +to servo's PWM line. Soldering a large 47uF (16V) electrolytic capacitor +between VCC and ground fixed it. Power problems became clear. Linear regulators dissipated too much heat. Sensor -and servo drew 13.8mA and 4.6mA quiescent—unacceptable for battery. Servo -inrush current can exceed 1A. Trace width (0.3mm), especially for servo and -power, cutting it close. +and servo drew 13.8mA and 4.6mA quiescent currents--unacceptable for battery. +Servo inrush current exceeds 1A. 0.3mm tracks cuts it too close. Verdict: Functional but not practical. Battery dead in under 24 hours. Led to -[complete redesign](../fpm-door-lock-lp/) with proper power management. +[redesign](../fpm-door-lock-lp/) with proper power management. Commit: [f4b0b73](https://git.asciimx.com/smart-home/commit/?id=f4b0b734a595919cf451ab9448b06274c8e609a4) diff --git a/_log/neo4j-a-star-search.md b/_log/neo4j-a-star-search.md index de0ef25..db74444 100644 --- a/_log/neo4j-a-star-search.md +++ b/_log/neo4j-a-star-search.md @@ -4,8 +4,8 @@ date: 2018-03-06 layout: post --- -Work project. Marine vessel tracking with Neo4J hit a limit. Need to store -13,000 route points; Dijkstra's shortest path search slows after 4,000. +Work. Vessel tracking with Neo4J hit a limit. Need to analyze 13,000 route +points; Dijkstra's shortest path search slows after 4,000. Replaced Dijkstra's algorithm with A* search using haversine function as heuristic: @@ -48,7 +48,7 @@ private void updateCosts( } ``` -Outcome: 300x speedup. Scaled to 13,000 route points. +300x speedup. Scaled to 13,000 route points. Upstreamed changes: