diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-01-09 16:45:56 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-01-09 16:45:56 +0800 |
| commit | a851a2d646f439f7126c232ba1524c55a8990872 (patch) | |
| tree | 0d8870fae739b72e37fc3ce1a672388ce7592a9c /_site/log | |
| parent | 3b0f6bd6879d8a32d89dcccc739a73e0e9e823a7 (diff) | |
| download | www-a851a2d646f439f7126c232ba1524c55a8990872.tar.gz | |
Remove _site from git.
Diffstat (limited to '_site/log')
55 files changed, 0 insertions, 1696 deletions
diff --git a/_site/log/arduino-due/connections.jpeg b/_site/log/arduino-due/connections.jpeg Binary files differdeleted file mode 100644 index 081e6d4..0000000 --- a/_site/log/arduino-due/connections.jpeg +++ /dev/null diff --git a/_site/log/arduino-due/index.html b/_site/log/arduino-due/index.html deleted file mode 100644 index ed49e78..0000000 --- a/_site/log/arduino-due/index.html +++ /dev/null @@ -1,114 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>ATSAM3X8E bare-metal notes</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">ATSAM3X8E BARE-METAL NOTES</h2> - <h5 class="center">16 SEPTEMBER 2024</h5> - <br> - <div class="twocol justify"><p>Bypassing ATSAM3X8E (Due) bootloader via Serial Wire Debug (SWD).</p> - -<p>Toolchain: ST-LINK/V2 programmer, OpenOCD, ARM GNU Compiler Toolchain.</p> - -<p>ARM chips boot into 0x00000. GPNVM bits map one of ROM, flash0, flash1 to -0x00000:</p> - -<ul> - <li>GPNVM1=0 → ROM (default).</li> - <li>GPNVM1=1 and GPNVM2=0 → flash0.</li> - <li>GPNVM1=1 and GPNVM2=1 → flash1.</li> -</ul> - -<p>By default, control jumps to Atmel’s SAM-BA bootloader in ROM. To bypass, set -GPNVM1=1 and place vector table at 0x80000 (flash0).</p> - -<p>Connect ST-LINK/v2 to Arduino Due’s DEBUG port:</p> - -<table style="border: none; width: 100%;"> - <tr style="border: none;"> - <td style="border: none; width: 50%; vertical-align: top; background-color: transparent;"> - <img src="schematic.png" alt="Pinout" style="width: 100%" /> - <p style="text-align: center;">Wiring</p> - </td> - <td style="border: none; width: 50%; vertical-align: top; background-color: transparent;"> - <img src="connections.jpeg" alt="Circuit" style="width: 100%" /> - <p style="text-align: center;">Arduino Due</p> - </td> - </tr> -</table> - -<p>Remap memory:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ openocd -f openocd-due.cfg -$ telnet localhost 4444 - > halt - > at91sam3 gpnvm show - > at91sam3 gpnvm set 1 - > at91sam3 gpnvm show -</code></pre></div></div> - -<p>Full command list is in OpenOCD manual AT91SAM3 (flash driver section).</p> - -<p>Compile and upload program:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -T script.ld \ - -nostartfiles \ - -nostdlib \ - -o a.elf main.c -$ openocd -f openocd-due.cfg -c "program a.elf verify reset exit" -</code></pre></div></div> - -<p>Commit: -<a href="https://git.asciimx.com/bare-metal-arduino-due/commit/?id=318496925ca76668dd9d63c3d060376f489276f8">3184969</a></p> - -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/arduino-due/schematic.png b/_site/log/arduino-due/schematic.png Binary files differdeleted file mode 100644 index 62ddadd..0000000 --- a/_site/log/arduino-due/schematic.png +++ /dev/null diff --git a/_site/log/arduino-due/source.tar.gz b/_site/log/arduino-due/source.tar.gz Binary files differdeleted file mode 100644 index 496567b..0000000 --- a/_site/log/arduino-due/source.tar.gz +++ /dev/null diff --git a/_site/log/arduino-uno/3v3.Makefile b/_site/log/arduino-uno/3v3.Makefile deleted file mode 100644 index 4ca89d4..0000000 --- a/_site/log/arduino-uno/3v3.Makefile +++ /dev/null @@ -1,46 +0,0 @@ -CC = avr-gcc -MCU = atmega328p -PORT = /dev/cuaU0 -TARGET = app - -SRC = main.c -OBJ = $(SRC:.c=.o) - -CFLAGS = -std=gnu99 -CFLAGS += -Os -CFLAGS += -Wall -CFLAGS += -mmcu=$(MCU) -CFLAGS += -DBAUD=57600 -CFLAGS += -DF_CPU=8000000UL -CFLAGS += -ffunction-sections -fdata-sections - -LDFLAGS = -mmcu=$(MCU) -LDFLAGS += -Wl,--gc-sections - -HEX_FLAGS = -O ihex -HEX_FLAGS += -j .text -j .data - -AVRDUDE_FLAGS = -p $(MCU) -AVRDUDE_FLAGS += -c arduino -AVRDUDE_FLAGS += -b 57600 -AVRDUDE_FLAGS += -P $(PORT) -AVRDUDE_FLAGS += -D -U - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -elf: $(OBJ) - $(CC) $(LDFLAGS) $(OBJ) -o $(TARGET).elf - -hex: elf - avr-objcopy $(HEX_FLAGS) $(TARGET).elf $(TARGET).hex - -upload: hex - avrdude $(AVRDUDE_FLAGS) flash:w:$(TARGET).hex:i - -.PHONY: clean - -clean: - rm -f *.o *.elf *.hex - - diff --git a/_site/log/arduino-uno/Makefile b/_site/log/arduino-uno/Makefile deleted file mode 100644 index 9db7b09..0000000 --- a/_site/log/arduino-uno/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -CC = avr-gcc -MCU = atmega328p -PORT = /dev/cuaU0 -TARGET = app - -SRC = main.c -OBJ = $(SRC:.c=.o) - -CFLAGS = -std=gnu99 -CFLAGS += -Os -CFLAGS += -Wall -CFLAGS += -mmcu=$(MCU) -CFLAGS += -DBAUD=115200 -CFLAGS += -DF_CPU=16000000UL -CFLAGS += -ffunction-sections -fdata-sections - -LDFLAGS = -mmcu=$(MCU) -LDFLAGS += -Wl,--gc-sections - -HEX_FLAGS = -O ihex -HEX_FLAGS += -j .text -j .data - -AVRDUDE_FLAGS = -p $(MCU) -AVRDUDE_FLAGS += -c arduino -AVRDUDE_FLAGS += -P $(PORT) -AVRDUDE_FLAGS += -D -U - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -elf: $(OBJ) - $(CC) $(LDFLAGS) $(OBJ) -o $(TARGET).elf - -hex: elf - avr-objcopy $(HEX_FLAGS) $(TARGET).elf $(TARGET).hex - -upload: hex - avrdude $(AVRDUDE_FLAGS) flash:w:$(TARGET).hex:i - -.PHONY: clean - -clean: - rm *.o *.elf *.hex diff --git a/_site/log/arduino-uno/breadboard.jpeg b/_site/log/arduino-uno/breadboard.jpeg Binary files differdeleted file mode 100644 index bd74907..0000000 --- a/_site/log/arduino-uno/breadboard.jpeg +++ /dev/null diff --git a/_site/log/arduino-uno/index.html b/_site/log/arduino-uno/index.html deleted file mode 100644 index 3eee3a3..0000000 --- a/_site/log/arduino-uno/index.html +++ /dev/null @@ -1,108 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>ATmega328P at 3.3V and 5V</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">ATMEGA328P AT 3.3V AND 5V</h2> - <h5 class="center">10 JUNE 2025</h5> - <br> - <div class="twocol justify"><p>Quick reference for wiring ATmega328P ICs at 5V and 3.3V. 5V uses 16MHz -crystal, 3.3V uses 8MHz.</p> - -<table style="border: none; width: 100%;"> - <tr style="border: none;"> - <td style="border: none; width: 50%; vertical-align: top;"> - <img src="pinout.png" alt="Pinout" style="width: 100%" /> - <p style="text-align: center;">Pinout</p> - </td> - <td style="border: none; width: 50%; vertical-align: top;"> - <img src="breadboard.jpeg" alt="Circuit" style="width: 100%" /> - <p style="text-align: center;">Breadboard</p> - </td> - </tr> -</table> - -<h2 id="5v-16mhz">5V-16MHz</h2> - -<p>Standard setup. How Arduino Uno boards are wired.</p> - -<p>Connections: Pin 1 → 5V via 10kΩ resistor. Pins 9/10 → 16MHz crystal via 22pF -capacitors to ground. Pins 7/20/21 → 5V supply. Pins 8/22 → ground. Add 0.1μF -decoupling caps between pins 7/20/21 and ground.</p> - -<p>Sample Makefile: <a href="Makefile">Makefile</a></p> - -<h2 id="33v-8mhz">3.3V-8MHz</h2> - -<p>Electrical connections identical to 5V circuit. Replace 5V with 3.3V supply, -16MHz crystal with 8MHz.</p> - -<p>Problem: ATmega328P ships configured for 5V. Must modify fuses (BOD level, -etc.) and replace bootloader. Standard Arduino bootloader expects 16MHz—needs -8MHz version.</p> - -<p>Solution: Use Arduino Uno as ISP. Upload ‘ArduinoISP’ sketch from Arduino IDE. -Connect SPI pins (ATmega328P ↔ Uno), Uno’s SS pin → ATmega328P RESET pin. Power -ATmega328P from Uno’s 5V pin during programming.</p> - -<p>Arduino IDE: Select ‘ATmega328P (3.3V, 8MHz)’ processor, ‘Arduino as ISP’ -programmer. Burn bootloader via tools menu.</p> - -<p>Sample Makefile (8MHz): <a href="3v3.Makefile">Makefile.3v3</a></p> - -<h2 id="remarks">Remarks</h2> - -<p>Don’t connect AREF (pin 21) to V<sub>cc</sub> if using ADC with internal 1.1V -or AV<sub>cc</sub> reference. See datasheet section 23.5.2.</p> - -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/arduino-uno/pinout.png b/_site/log/arduino-uno/pinout.png Binary files differdeleted file mode 100644 index 59acfbc..0000000 --- a/_site/log/arduino-uno/pinout.png +++ /dev/null diff --git a/_site/log/bumblebee/bee.mp4 b/_site/log/bumblebee/bee.mp4 Binary files differdeleted file mode 100644 index 835600d..0000000 --- a/_site/log/bumblebee/bee.mp4 +++ /dev/null diff --git a/_site/log/bumblebee/index.html b/_site/log/bumblebee/index.html deleted file mode 100644 index 984187b..0000000 --- a/_site/log/bumblebee/index.html +++ /dev/null @@ -1,85 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Bumblebee: web script synthesizer</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">BUMBLEBEE: WEB SCRIPT SYNTHESIZER</h2> - <h5 class="center">02 APRIL 2025</h5> - <br> - <div class="twocol justify"><p>Browser session-to-code conversion. For work. Pre-LLM.</p> - -<video style="max-width:100%; margin-bottom: 10px" controls="" poster="poster.png"> - <source src="bee.mp4" type="video/mp4" /> -</video> - -<p>Quality of scripts are pitiful.</p> - -<p>Created tool to generate them real-time (as the user browses the web).</p> - -<p>Architecture: C# WinForms host, embedded WebView2 browser, Scintilla.NET -editor.</p> - -<p>Implementation:</p> - -<ul> - <li>Interception: Injected JS hooks + internal browser events.</li> - <li>Transformation: Event → Token → Instruction table → String.</li> - <li>Optimization: Parallel event/text lists.</li> - <li>Two-way binding of code to Scintilla editor.</li> -</ul> - -<p>NOTE: Abstract syntax trees.</p> - -<p>Script generation: minutes/hours → seconds.</p> - -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/bumblebee/poster.png b/_site/log/bumblebee/poster.png Binary files differdeleted file mode 100644 index 6dc955e..0000000 --- a/_site/log/bumblebee/poster.png +++ /dev/null diff --git a/_site/log/bumblebee/thumb_sm.png b/_site/log/bumblebee/thumb_sm.png Binary files differdeleted file mode 100644 index f7cfbf3..0000000 --- a/_site/log/bumblebee/thumb_sm.png +++ /dev/null diff --git a/_site/log/e-reader/circuit.svg b/_site/log/e-reader/circuit.svg deleted file mode 100644 index fd7508b..0000000 --- a/_site/log/e-reader/circuit.svg +++ /dev/null @@ -1,145 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Circuit Diagram, cdlibrary.dll 4.0.0.0 --> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg version="1.1" width="680" height="360" xmlns="http://www.w3.org/2000/svg"> - <line x1="360" y1="130" x2="360" y2="330" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="70" y1="330" x2="360" y2="330" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="70" y1="250" x2="70" y2="260" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="70" y1="260" x2="70" y2="275" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="70" y1="315" x2="70" y2="330" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 70,275 L 70,277 L 63,280 L 77,286 L 63,292 L 77,298 L 63,304 L 77,310 L 70,313 L 70,315" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="56" y="295" style="font-family:Arial;font-size:11px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 56, 295)">10 kΩ</text> - <line x1="70" y1="250" x2="100" y2="250" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="130" y1="250" x2="190" y2="250" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="100" y1="250" x2="101" y2="250" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="129" y1="250" x2="130" y2="250" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <ellipse cx="104" cy="250" rx="3" ry="3" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <ellipse cx="126" cy="250" rx="3" ry="3" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <line x1="103" y1="242" x2="127" y2="242" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="109" y1="236" x2="121" y2="236" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="115" y1="236" x2="115" y2="242" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="70" y1="140" x2="190" y2="140" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="70" y1="60" x2="70" y2="140" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="70" y1="100" x2="100" y2="100" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="130" y1="100" x2="190" y2="100" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="70" y1="60" x2="100" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="130" y1="60" x2="190" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="100" y1="100" x2="101" y2="100" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="129" y1="100" x2="130" y2="100" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <ellipse cx="104" cy="100" rx="3" ry="3" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <ellipse cx="126" cy="100" rx="3" ry="3" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <line x1="103" y1="92" x2="127" y2="92" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="109" y1="86" x2="121" y2="86" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="115" y1="86" x2="115" y2="92" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="100" y1="60" x2="101" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="129" y1="60" x2="130" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <ellipse cx="104" cy="60" rx="3" ry="3" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <ellipse cx="126" cy="60" rx="3" ry="3" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <line x1="103" y1="52" x2="127" y2="52" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="109" y1="46" x2="121" y2="46" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="115" y1="46" x2="115" y2="52" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="310" y1="130" x2="410" y2="130" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="310" y1="120" x2="410" y2="120" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="310" y1="110" x2="410" y2="110" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="310" y1="100" x2="410" y2="100" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="310" y1="90" x2="410" y2="90" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="310" y1="80" x2="410" y2="80" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="310" y1="70" x2="410" y2="70" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="310" y1="60" x2="420" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="450" y1="160" x2="500" y2="160" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" /> - <path d="M 430,120 L 430,110 L 420,100 L 410,100" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 430,120 L 420,110 L 410,110" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 430,130 L 420,120 L 410,120" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 430,140 L 420,130 L 410,130" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 510,180 L 520,190 L 530,190" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 510,190 L 520,200 L 530,200" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 510,200 L 520,210 L 530,210" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 510,200 L 510,210 L 520,220 L 530,220" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="524" y="185" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 524, 185)">1</text> - <text x="524" y="195" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 524, 195)">2</text> - <text x="524" y="205" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 524, 205)">3</text> - <text x="524" y="215" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 524, 215)">4</text> - <line x1="445" y1="155" x2="450" y2="165" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:1" /> - <line x1="495" y1="155" x2="490" y2="165" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:1" /> - <path d="M 455,160 L 440,160 L 430,150 L 430,80" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" /> - <path d="M 485,160 L 500,160 L 510,170 L 510,240" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" /> - <path d="M 430,80 L 430,70 L 420,60 L 410,60" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 430,80 L 420,70 L 410,70" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 430,90 L 420,80 L 410,80" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 430,100 L 420,90 L 410,90" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="413" y="55" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 413, 55)">1</text> - <text x="413" y="65" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 413, 65)">2</text> - <text x="413" y="75" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 413, 75)">3</text> - <text x="413" y="85" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 413, 85)">4</text> - <text x="413" y="95" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 413, 95)">5</text> - <text x="413" y="105" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 413, 105)">6</text> - <text x="413" y="115" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 413, 115)">7</text> - <text x="413" y="125" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 413, 125)">8</text> - <path d="M 510,220 L 520,230 L 530,230" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 510,230 L 520,240 L 530,240" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 510,240 L 520,250 L 530,250" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 510,240 L 510,250 L 520,260 L 530,260" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="524" y="225" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 524, 225)">5</text> - <text x="524" y="235" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 524, 235)">6</text> - <text x="524" y="245" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 524, 245)">7</text> - <text x="524" y="255" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 524, 255)">8</text> - <text x="470" y="155" style="font-family:Arial;font-size:11px;text-anchor:middle" dominant-baseline="baseline" transform="rotate(0, 470, 155)">BUS</text> - <text x="590" y="170" style="font-family:Arial;font-size:11px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 590, 170)">E-Paper Display HAT</text> - <rect x="540" y="180" width="100" height="90" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <line x1="530" y1="190" x2="540" y2="190" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="190" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 544, 190)">CS</text> - <line x1="530" y1="200" x2="540" y2="200" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="200" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 544, 200)">DC</text> - <line x1="530" y1="210" x2="540" y2="210" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="210" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 544, 210)">DIN</text> - <line x1="530" y1="220" x2="540" y2="220" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="220" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 544, 220)">CLK</text> - <line x1="530" y1="230" x2="540" y2="230" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="230" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 544, 230)">BUSY</text> - <line x1="530" y1="240" x2="540" y2="240" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="240" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 544, 240)">RST</text> - <line x1="530" y1="250" x2="540" y2="250" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="250" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 544, 250)">GND</text> - <line x1="530" y1="260" x2="540" y2="260" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="260" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 544, 260)">VCC</text> - <rect x="200" y="50" width="100" height="210" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <text x="250" y="40" style="font-family:Arial;font-size:11px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 250, 40)">ESP-WROOM-32</text> - <line x1="190" y1="60" x2="200" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="204" y="60" style="font-family:Arial;font-size:10px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 204, 60)">IO21</text> - <text x="196" y="58" style="font-family:Arial;font-size:8px;text-anchor:end" dominant-baseline="baseline" transform="rotate(0, 196, 58)"></text> - <line x1="300" y1="60" x2="310" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="296" y="60" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 296, 60)">IO5</text> - <text x="304" y="58" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 304, 58)"></text> - <line x1="300" y1="70" x2="310" y2="70" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="296" y="70" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 296, 70)">IO16</text> - <text x="304" y="68" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 304, 68)"></text> - <line x1="300" y1="80" x2="310" y2="80" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="296" y="80" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 296, 80)">IO23</text> - <text x="304" y="78" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 304, 78)"></text> - <line x1="300" y1="90" x2="310" y2="90" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="296" y="90" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 296, 90)">IO18</text> - <text x="304" y="88" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 304, 88)"></text> - <line x1="190" y1="100" x2="200" y2="100" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="204" y="100" style="font-family:Arial;font-size:10px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 204, 100)">IO22</text> - <text x="196" y="98" style="font-family:Arial;font-size:8px;text-anchor:end" dominant-baseline="baseline" transform="rotate(0, 196, 98)"></text> - <line x1="300" y1="100" x2="310" y2="100" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="296" y="100" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 296, 100)">IO4</text> - <text x="304" y="98" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 304, 98)"></text> - <line x1="300" y1="110" x2="310" y2="110" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="296" y="110" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 296, 110)">IO2</text> - <text x="304" y="108" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 304, 108)"></text> - <line x1="300" y1="120" x2="310" y2="120" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="296" y="120" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 296, 120)">GND</text> - <text x="304" y="118" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 304, 118)"></text> - <line x1="300" y1="130" x2="310" y2="130" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="296" y="130" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 296, 130)">3V3</text> - <text x="304" y="128" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 304, 128)"></text> - <line x1="190" y1="140" x2="200" y2="140" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="204" y="140" style="font-family:Arial;font-size:10px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 204, 140)">GND</text> - <text x="196" y="138" style="font-family:Arial;font-size:8px;text-anchor:end" dominant-baseline="baseline" transform="rotate(0, 196, 138)"></text> - <line x1="190" y1="250" x2="200" y2="250" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="204" y="250" style="font-family:Arial;font-size:10px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 204, 250)">IO15</text> - <text x="196" y="248" style="font-family:Arial;font-size:8px;text-anchor:end" dominant-baseline="baseline" transform="rotate(0, 196, 248)"></text> - <ellipse cx="360" cy="130" rx="2" ry="2" style="fill-opacity:1;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <ellipse cx="70" cy="100" rx="2" ry="2" style="fill-opacity:1;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> -</svg>
\ No newline at end of file diff --git a/_site/log/e-reader/ereader.mp4 b/_site/log/e-reader/ereader.mp4 Binary files differdeleted file mode 100644 index 89e05eb..0000000 --- a/_site/log/e-reader/ereader.mp4 +++ /dev/null diff --git a/_site/log/e-reader/index.html b/_site/log/e-reader/index.html deleted file mode 100644 index 13b4efa..0000000 --- a/_site/log/e-reader/index.html +++ /dev/null @@ -1,117 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>512KB e-reader</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">512KB E-READER</h2> - <h5 class="center">24 OCTOBER 2023</h5> - <br> - <div class="twocol justify"><p>First project with e-paper.</p> - -<video style="max-width:100%;" controls="" poster="poster.png"> - <source src="ereader.mp4" type="video/mp4" /> -</video> - -<p>ESP-WROOM-32, 7.5” Waveshare e-paper display, three-button interface -(prev/next/sleep).</p> - -<p>Memory: 512KB SRAM + 4MB flash. Internal flash unsuitable for storing books due -to P/E cycle limit. Used HTTP Range requests to stream them on-demand. -Progress saved to RTC memory to survive deep sleep without flash wear.</p> - -<p>PDFs are rasterized and stored as sequences of bitmaps on a server. 1 byte = 8 -pixels, 1 page = 48KB (display resolution), headerless. Optimized for Range -requests without server-side logic:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>int r0 = ((page_n - 1) * PAGE_SIZE); -int rn = page_n * PAGE_SIZE - 1; - -int n = snprintf(NULL, 0, "bytes=%d-%d", r0, rn) + 1; -char *buf = malloc(sizeof(char) * n); -snprintf(buf, n, "bytes=%d-%d", r0, rn); - -esp_http_client_set_header(http_client, "Range", buf); -esp_http_client_perform(http_client); -</code></pre></div></div> - -<p>Three pages (prev/current/next) held in a buffer—maximum possible. Upon -request, embedded software cycles the buffer, updates the screen, prefetches -the next page.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>c_page_num++; -pg.page_num = c_page_num + 2; -pg.page_buf = pages[(c_page_num + 1) % PAGE_LEN]; - -xSemaphoreGive(mutex); -xQueueSend(http_evt_queue, &pg, portMAX_DELAY); - -epd_draw_async(pages[c_page_num % PAGE_LEN], PAGE_SIZE); -epd_draw_await(); -</code></pre></div></div> - -<p>System isn’t as responsive as I’d hoped. Scheduling GPIO, SPI, and HTTP tasks -on a single thread causes input lag. Pinned GPIO/SPI tasks to one core and the -HTTP task to the other.</p> - -<p>Better, but screen updates block user input.</p> - -<p>Moved the SPI buffers to DMA and made the transfers async. Few more cycles -saved.</p> - -<p>Can’t think of anything else.</p> - -<p>Verdict: Functional but limited. Led to <a href="../etlas/">Etlas</a>.</p> - -<p>Commit: -<a href="https://git.asciimx.com/esp32-e-reader/commit/?id=7f691c46093933b67aab466c0ca582ace8ab73d4">7f691c4</a></p> -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/e-reader/poster.png b/_site/log/e-reader/poster.png Binary files differdeleted file mode 100644 index 1e222d2..0000000 --- a/_site/log/e-reader/poster.png +++ /dev/null diff --git a/_site/log/e-reader/source.tar.gz b/_site/log/e-reader/source.tar.gz Binary files differdeleted file mode 100644 index 3e343a7..0000000 --- a/_site/log/e-reader/source.tar.gz +++ /dev/null diff --git a/_site/log/e-reader/thumb_sm.png b/_site/log/e-reader/thumb_sm.png Binary files differdeleted file mode 100644 index 7c971e8..0000000 --- a/_site/log/e-reader/thumb_sm.png +++ /dev/null diff --git a/_site/log/etlas/circuit.svg b/_site/log/etlas/circuit.svg deleted file mode 100644 index 6255045..0000000 --- a/_site/log/etlas/circuit.svg +++ /dev/null @@ -1,105 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Circuit Diagram, cdlibrary.dll 4.0.0.0 --> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg version="1.1" width="700" height="300" xmlns="http://www.w3.org/2000/svg"> - <line x1="380" y1="220" x2="380" y2="280" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="340" y1="220" x2="550" y2="220" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="340" y1="210" x2="550" y2="210" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="340" y1="200" x2="550" y2="200" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="340" y1="190" x2="550" y2="190" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="340" y1="180" x2="550" y2="180" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="130" y1="50" x2="210" y2="50" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="130" y1="70" x2="160" y2="70" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="160" y1="280" x2="380" y2="280" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="160" y1="70" x2="160" y2="280" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="130" y1="60" x2="210" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="70" y="30" style="font-family:Arial;font-size:11px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 70, 30)">AM2302</text> - <rect x="20" y="40" width="100" height="40" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <line x1="120" y1="50" x2="130" y2="50" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="116" y="50" style="font-family:Arial;font-size:11px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 116, 50)">DATA</text> - <line x1="120" y1="60" x2="130" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="116" y="60" style="font-family:Arial;font-size:11px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 116, 60)">GND</text> - <line x1="120" y1="70" x2="130" y2="70" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="116" y="70" style="font-family:Arial;font-size:11px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 116, 70)">VCC</text> - <text x="610" y="120" style="font-family:Arial;font-size:11px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 610, 120)">E-Paper display HAT</text> - <rect x="560" y="130" width="100" height="100" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <line x1="550" y1="140" x2="560" y2="140" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="140" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 140)">CS</text> - <line x1="550" y1="150" x2="560" y2="150" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="150" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 150)">DC</text> - <line x1="550" y1="160" x2="560" y2="160" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="160" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 160)">DIN</text> - <line x1="550" y1="170" x2="560" y2="170" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="170" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 170)">CLK</text> - <line x1="550" y1="180" x2="560" y2="180" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="180" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 180)">BUSY</text> - <line x1="550" y1="190" x2="560" y2="190" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="190" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 190)">RST</text> - <line x1="550" y1="200" x2="560" y2="200" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="200" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 200)">PWR</text> - <line x1="550" y1="210" x2="560" y2="210" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="210" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 210)">GND</text> - <line x1="550" y1="220" x2="560" y2="220" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="564" y="220" style="font-family:Arial;font-size:11px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 564, 220)">VCC</text> - <line x1="340" y1="80" x2="430" y2="80" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="340" y1="70" x2="430" y2="70" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="340" y1="60" x2="430" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="340" y1="50" x2="430" y2="50" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <line x1="470" y1="110" x2="520" y2="110" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" /> - <path d="M 450,70 L 450,60 L 440,50 L 430,50" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 450,70 L 440,60 L 430,60" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 450,80 L 440,70 L 430,70" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 450,90 L 440,80 L 430,80" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 530,130 L 540,140 L 550,140" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 530,140 L 540,150 L 550,150" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 530,150 L 540,160 L 550,160" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <path d="M 530,150 L 530,160 L 540,170 L 550,170" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="544" y="135" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 544, 135)">1</text> - <text x="544" y="145" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 544, 145)">2</text> - <text x="544" y="155" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 544, 155)">3</text> - <text x="544" y="165" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 544, 165)">4</text> - <line x1="465" y1="105" x2="470" y2="115" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:1" /> - <line x1="515" y1="105" x2="510" y2="115" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:1" /> - <path d="M 475,110 L 460,110 L 450,100 L 450,70" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" /> - <path d="M 505,110 L 520,110 L 530,120 L 530,150" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" /> - <text x="433" y="45" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 433, 45)">1</text> - <text x="433" y="55" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 433, 55)">2</text> - <text x="433" y="65" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 433, 65)">3</text> - <text x="433" y="75" style="font-family:Arial;font-size:8px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 433, 75)">4</text> - <rect x="220" y="40" width="100" height="210" style="fill-opacity:0;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> - <text x="270" y="30" style="font-family:Arial;font-size:11px;text-anchor:middle" dominant-baseline="middle" transform="rotate(0, 270, 30)">ESP32 Mini NodeMCU D1</text> - <line x1="200" y1="50" x2="220" y2="50" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="224" y="50" style="font-family:Arial;font-size:10px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 224, 50)">IO19</text> - <text x="216" y="48" style="font-family:Arial;font-size:8px;text-anchor:end" dominant-baseline="baseline" transform="rotate(0, 216, 48)"></text> - <line x1="320" y1="50" x2="340" y2="50" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="50" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 50)">IO15</text> - <text x="324" y="48" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 48)"></text> - <line x1="200" y1="60" x2="220" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="224" y="60" style="font-family:Arial;font-size:10px;text-anchor:start" dominant-baseline="middle" transform="rotate(0, 224, 60)">GND</text> - <text x="216" y="58" style="font-family:Arial;font-size:8px;text-anchor:end" dominant-baseline="baseline" transform="rotate(0, 216, 58)"></text> - <line x1="320" y1="60" x2="340" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="60" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 60)">IO27</text> - <text x="324" y="58" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 58)"></text> - <line x1="320" y1="70" x2="340" y2="70" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="70" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 70)">IO14</text> - <text x="324" y="68" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 68)"></text> - <line x1="320" y1="80" x2="340" y2="80" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="80" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 80)">IO13</text> - <text x="324" y="78" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 78)"></text> - <line x1="320" y1="180" x2="340" y2="180" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="180" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 180)">IO25</text> - <text x="324" y="178" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 178)"></text> - <line x1="320" y1="190" x2="340" y2="190" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="190" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 190)">IO26</text> - <text x="324" y="188" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 188)"></text> - <line x1="320" y1="200" x2="340" y2="200" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="200" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 200)">IO16</text> - <text x="324" y="198" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 198)"></text> - <line x1="320" y1="210" x2="340" y2="210" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="210" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 210)">GND</text> - <text x="324" y="208" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 208)"></text> - <line x1="320" y1="220" x2="340" y2="220" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" /> - <text x="316" y="220" style="font-family:Arial;font-size:10px;text-anchor:end" dominant-baseline="middle" transform="rotate(0, 316, 220)">3V3</text> - <text x="324" y="218" style="font-family:Arial;font-size:8px;text-anchor:start" dominant-baseline="baseline" transform="rotate(0, 324, 218)"></text> - <ellipse cx="380" cy="220" rx="2" ry="2" style="fill-opacity:1;fill:rgb(0, 0, 0);stroke:rgb(0, 0, 0);stroke-width:2" /> -</svg>
\ No newline at end of file diff --git a/_site/log/etlas/dash.jpg b/_site/log/etlas/dash.jpg Binary files differdeleted file mode 100644 index cf4efc6..0000000 --- a/_site/log/etlas/dash.jpg +++ /dev/null diff --git a/_site/log/etlas/etlas_arch.png b/_site/log/etlas/etlas_arch.png Binary files differdeleted file mode 100644 index 241e9f1..0000000 --- a/_site/log/etlas/etlas_arch.png +++ /dev/null diff --git a/_site/log/etlas/index.html b/_site/log/etlas/index.html deleted file mode 100644 index 68c19ae..0000000 --- a/_site/log/etlas/index.html +++ /dev/null @@ -1,153 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Etlas: e-paper dashboard</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">ETLAS: E-PAPER DASHBOARD</h2> - <h5 class="center">05 SEPTEMBER 2024</h5> - <br> - <div class="twocol justify"><p>Repurposed the <a href="../e-reader/">e-reader</a> into something for regular use. News, -stocks, weather dashboard. ESP32 NodeMCU D1 + 7.5” Waveshare e-paper + DHT22 -sensor.</p> - -<table style="border: none;"> - <tr style="border: none;"> - <td style="border: none;"><img src="dash.jpg" alt="front" style="width: 100%" /></td> - <td style="border: none;"><img src="pcb.jpg" alt="back" style="width: 100%" /></td> - </tr> - <tr style="border: none;"> - <td colspan="2" style="border: none;"><img src="etlas_arch.png" alt="front" style="width: 100%" /></td> - </tr> -</table> - -<p>Stocks: Two weeks EOD data from Polygon.io (max possible). Flask app on VPS -manages watchlist, relays the feed. Backend: httpd + htpasswd + slowcgi + -Flask.</p> - -<p>gui_plot_stocks() plots a stepped graph; was easier to implement, but the code -is hideous; triggers watchdog. vTaskDelay() prevents that.</p> - -<p>NOTE: Refactor. Bresenham’s?</p> - -<p>News: Channel NewsAsia RSS. MCU does the parsing. Didn’t plan to have a backend -at the time. Now that I have one for stocks, should relay the feed for -flexibility.</p> - -<p>Weather: DHT22 single-wire protocol. 26µs/50µs/70µs pulses are too fast for -standard ESP32 APIs. Bit-banged relative pulse widths (ported from <a href="https://github.com/Fonger/ESP8266-RTOS-DHT" class="external" target="_blank" rel="noopener noreferrer">ESP8266</a>):</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>static inline int dht_await_pin_state(int state, int timeout) -{ - int t; - static const uint16_t delta = 1; - - for (t = 0; t < timeout; t += delta) { - ets_delay_us(delta); - if (gpio_get_level(DHT_PIN) == state) - return t; - } - return 0; -} - -static inline int dht_get_raw_data(unsigned char buf[BUFLEN]) -{ - int rc; - unsigned char i, pwl, pwh; - - gpio_set_level(DHT_PIN, 0); - ets_delay_us(1100); - gpio_set_level(DHT_PIN, 1); - - if (!dht_await_pin_state(0, 40)) { - rc = 1; - xQueueSend(dht_evt_queue, &rc, (TickType_t) 0); - return 0; - } - if (!dht_await_pin_state(1, 80)) { - rc = 2; - xQueueSend(dht_evt_queue, &rc, (TickType_t) 0); - return 0; - } - if (!dht_await_pin_state(0, 80)) { - rc = 3; - xQueueSend(dht_evt_queue, &rc, (TickType_t) 0); - return 0; - } - - for (i = 0; i < BUFLEN; i++) { - if (!(pwl = dht_await_pin_state(1, 50))) { - rc = 4; - xQueueSend(dht_evt_queue, &rc, (TickType_t) 0); - return 0; - } - if (!(pwh = dht_await_pin_state(0, 70))) { - rc = 5; - xQueueSend(dht_evt_queue, &rc, (TickType_t) 0); - return 0; - } - buf[i] = pwh > pwl; - } - return 1; -} -</code></pre></div></div> - -<p>epd_init() stalls intermittently on first refresh() after flash. Toggling delay -values in refresh() resolves it. If the first refresh succeeds, it remains -stable. Root cause unknown–suspect noisy power supply due to powering display -via MCU.</p> - -<p>Uptime: August 2024 - January 2026</p> - -<p>Commit: -<a href="https://git.asciimx.com/etlas/commit/?id=a92c86ac1592c2137d3d1fec1668eacc2d0ca581">a92c86a</a></p> -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/etlas/pcb.jpg b/_site/log/etlas/pcb.jpg Binary files differdeleted file mode 100644 index fcb40fa..0000000 --- a/_site/log/etlas/pcb.jpg +++ /dev/null diff --git a/_site/log/etlas/schematic.svg b/_site/log/etlas/schematic.svg deleted file mode 100644 index 3070dd1..0000000 --- a/_site/log/etlas/schematic.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Do not edit this file with editors other than diagrams.net --> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="741px" height="371px" viewBox="-0.5 -0.5 741 371" content="<mxfile host="app.diagrams.net" modified="2024-01-04T10:11:48.655Z" agent="Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0" etag="QhztmAZcJcNMJFkbNl2E" version="21.2.9" type="device"><diagram name="Page-1" id="Hvsc3-8LFRnBvTan2Q2q">7VzbcuI4EP0aHkPZEr49gpNJqjbJpoYku5mXlMdWwLsGMbZIYL9+JVvyVYAJBpOBqtQgt2RJ7nPU6m7Z04H2ZHEdOrPxHfZQ0AGKt+jAyw4AqmIZ9IdJlolEs5REMAp9jzfKBEP/PyTu5NK576Go0JBgHBB/VhS6eDpFLinInDDEH8VmbzgojjpzRqgiGLpOUJX+5XtknEhNTcnkN8gfjcXIqsJrJo5ozAXR2PHwR04ErzrQDjEmSWmysFHAlCf0ktz3bUVtOrEQTUmdG66NwIeLl/HLD+sFfn8e2PbTjwutl3Tz7gRz/sR8tmQpVBDi+dRDrBelAwcfY5+g4cxxWe0HBZ3KxmQS0CuVFiMS4n+RjQMcUskUT2mzAR8DhQQtVs5eTXVCyYTwBJFwSZvwG3qgqyX3cCLpPSH4yHAxelzZ4xwm0OBCh3NhlPaeqYsWuMa20J4gaU5ZyKP04Zc4JGM8wlMnuMqkg6I6sza3GM+4Ev9BhCz5WnDmBBdVjBY++ZvfzsovufLlIn/BVKWJqwcU+vSxUShaTL0+WyAZTFTyzWca4PVURfE4XcvqCUE8WFftpYJsxPhqmb8qD5loi6loPQuoRvE8dNE61XNb4IQjRNa0s+SsClHgEP+9OA8ZP/itD9inM0zZCATPOBnVMsWSefG7MpZRhTvLXLMZaxCtGQdY0nEy0iY9ZhROn3EHVldNwNGx2ljNas5atchYoG0k7Prl8AW5u5ttg8fPAmtbFkBjMw0kduvMjdIke8fPDeqJbUmOs4XYkgXaF2AB3MyCrqLoRSboNXaLs5nYTBD9CxBkjX8sNxM1tpAzDfKD98w2aaDWo8EaV+Lo0DT2EtNoZjGmAfp+YhrNVAvjQPUQMU2nnOa4Gj5AJrrzpz79ucceurOfaIkyBlTj+jR7wzD3nGicctMJ/NGUll2KN2NNNRsiEkexZOzMWJeTxYglzLooQC4JfdcJugEe+e7ryCEo6v56m7367op0S+D8RMG9M+F5MRs+U1/drv5d318mBdWS1m/8Yzu8DQz2j84u2TDM97OBJmkPBzN/esvm9riMn9GdR6SZ7A9USvG2QCiX+wGA+yP53E+afWvcqmntxEdZUkYrbEsb9qQGrZRR00oBs81Nx6gs+Mubx12Tmw0wWdP1IpPNKpNVkZXNM9kw96Qpq2oaL2bUSIVUeNN/bF1jqlLcL1RNojFdkvdVyxtYYyoD1e2kagwyv8ENnCiKrXlOM0U11l2fVS3ltKBJlCBkOzoHKpBv2mkXidmoOAebO6qZOW3KEQBtm21TLQSb6gbD3XagKZh93CGGmOW6BRn7pSi8ekfMPU00zwwT871ir+UBRz7xMfPlfmJC8CRx1z7h9olu+7wNYTRZ5/pFtJ0TvCZoRN1ZiAmto2p7RU7IlncThhSoxcMEKDGkUh9qb2a0evgIu/C5ghx9ZCLzq0unjG90AZREFZDKyEx8z4uXuGwfk5nonRCwVti+HACyjQzuzYdVK7o+iDE8nPXSd7RK8k1Mh0Unjsa0tTaxbUNloxT2iHH2GioD/WxLN65k3TSLSxm2bUvNE7OlujigXIPAQY2p6Ph0goLUgShDsG1QUOnIPGxQAKvx3O+9eCAoKdywWl487Zwop2HZ6pCMnwwcVVAG6wZlK1hwmKBMzPLsSKx7r9EoORJG9a3GgzoSUJOgpgfM7r3h2Ghn8Om/5lhUXETxKuvTBtZsEStHVNPSiP3aQ9ETnVnSWVLx+xpaIF6VSZOX9QytSFM1D2/VT2wK3kv7DG/NfXR/8Faz+U3B+334eIL4giK+Vsv49mRBRkPW+faPk8eXAiz5quCwCMvOlppB+O7P4cvpQawUHSwgdsDWAJa5xc0APHg6SYCLxxqgbRerB/cG8LN9ej5W6dAEmPUM9N5SFT3ZJ3PNwBu/sHVi8AJFLX3Z1z7C+wuBT3EBlzP1QCT7WsNXdsJ1XsGfPwvTy/hKnGjxJeNhEK6+/tdYlqP/2D85iDVdK0NcARhKspSfAJheZt/EJwc82f8sAK/+Bw==</diagram></mxfile>"><defs/><g><rect x="0.5" y="0.5" width="740" height="370" fill="rgb(255, 255, 255)" stroke="none" pointer-events="all"/><path d="M 258 106 L 187 106 L 187 109 L 218.04 109.04" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 258 126 L 219 126" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 258 146 L 219 146" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 258 166 L 219 166" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 258 186 L 219.96 186" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 258 206 L 219 206" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 483 246 L 539 246 L 539 194" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 273 66 L 468 66 L 473 71 L 473 261 L 468 266 L 273 266 L 268 261 L 268 71 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="277.5" y="109.3">15</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="277.5" y="129.3">27</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="277.5" y="149.3">26</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="277.5" y="169.3">13</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="277.5" y="189.3">14</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="277.5" y="209.3">25</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="462.5" y="229.3">19</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="307.5" y="259.3">3V3</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"><text x="447.5" y="259.3">GND</text></g><g fill="rgb(0, 0, 0)" font-family="Arial,Helvetica" text-anchor="middle" font-size="9.600000000000001px"/><path d="M 258 86 L 268 86 M 473 86 L 483 86 M 258 106 L 268 106 M 473 106 L 483 106 M 258 126 L 268 126 M 473 126 L 483 126 M 258 146 L 268 146 M 473 146 L 483 146 M 258 166 L 268 166 M 473 166 L 483 166 M 258 186 L 268 186 M 473 186 L 483 186 M 258 206 L 268 206 M 473 206 L 483 206 M 258 226 L 268 226 M 473 226 L 483 226 M 258 246 L 268 246 M 473 246 L 483 246 M 288 56 L 288 66 M 288 266 L 288 276 M 308 56 L 308 66 M 308 266 L 308 276 M 328 56 L 328 66 M 328 266 L 328 276 M 348 56 L 348 66 M 348 266 L 348 276 M 368 56 L 368 66 M 368 266 L 368 276 M 388 56 L 388 66 M 388 266 L 388 276 M 408 56 L 408 66 M 408 266 L 408 276 M 428 56 L 428 66 M 428 266 L 428 276 M 448 56 L 448 66 M 448 266 L 448 276" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="278" cy="256" rx="5" ry="5" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 223px; height: 1px; padding-top: 166px; margin-left: 259px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">ESP32 Mini NodeMCU D1 </div></div></div></foreignObject><text x="371" y="170" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">ESP32 Mini NodeMCU D1 </text></switch></g><path d="M 601 194 L 601 259.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 601 264.88 L 597.5 257.88 L 601 259.63 L 604.5 257.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="524" y="116" width="154" height="78" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 152px; height: 1px; padding-top: 155px; margin-left: 525px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">DHT22</div></div></div></foreignObject><text x="601" y="159" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">DHT22</text></switch></g><rect x="59" y="86" width="160" height="160" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 166px; margin-left: 60px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">E-paper HAT</div></div></div></foreignObject><text x="139" y="170" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">E-paper HAT</text></switch></g><path d="M 79 246 L 79 299.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 79 304.88 L 75.5 297.88 L 79 299.63 L 82.5 297.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 189.5 286 L 189.5 266 L 189.56 246" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><rect x="177" y="286" width="25" height="20" fill="none" stroke="none" pointer-events="all"/><path d="M 177 291 L 202 291 M 179 293.5 L 200 293.5 M 181 296 L 198 296 M 185.25 301 L 193.75 301 M 187.25 303.5 L 191.75 303.5 M 189.5 286 L 189.5 291 M 183.25 298.5 L 195.75 298.5 M 189.25 306 L 189.75 306" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="49" y="306" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 321px; margin-left: 50px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">3.3V</div></div></div></foreignObject><text x="79" y="325" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">3.3V</text></switch></g><path d="M 658.5 266 L 658.5 194 L 594 194" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><rect x="646" y="266" width="25" height="20" fill="none" stroke="none" pointer-events="all"/><path d="M 646 271 L 671 271 M 648 273.5 L 669 273.5 M 650 276 L 667 276 M 654.25 281 L 662.75 281 M 656.25 283.5 L 660.75 283.5 M 658.5 266 L 658.5 271 M 652.25 278.5 L 664.75 278.5 M 658.25 286 L 658.75 286" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="571" y="266" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 281px; margin-left: 572px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">3.3V</div></div></div></foreignObject><text x="601" y="285" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">3.3V</text></switch></g><path d="M 308 266 L 308 309.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 308 314.88 L 304.5 307.88 L 308 309.63 L 311.5 307.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="278" y="315" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 330px; margin-left: 279px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">3.3V</div></div></div></foreignObject><text x="308" y="334" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">3.3V</text></switch></g><path d="M 448.5 311 L 448.5 291 L 448 276" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><rect x="436" y="311" width="25" height="20" fill="none" stroke="none" pointer-events="all"/><path d="M 436 316 L 461 316 M 438 318.5 L 459 318.5 M 440 321 L 457 321 M 444.25 326 L 452.75 326 M 446.25 328.5 L 450.75 328.5 M 448.5 311 L 448.5 316 M 442.25 323.5 L 454.75 323.5 M 448.25 331 L 448.75 331" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="172" y="95" width="60" height="23" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 107px; margin-left: 173px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">CS</font></div></div></div></foreignObject><text x="202" y="110" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">CS</text></switch></g><rect x="172" y="115" width="60" height="23" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 127px; margin-left: 173px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">DC</font></div></div></div></foreignObject><text x="202" y="130" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">DC</text></switch></g><rect x="170" y="135" width="60" height="23" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 147px; margin-left: 171px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">RST</font></div></div></div></foreignObject><text x="200" y="150" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">RST</text></switch></g><rect x="170" y="155.5" width="60" height="23" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 167px; margin-left: 171px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">CLK</font></div></div></div></foreignObject><text x="200" y="171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">CLK</text></switch></g><rect x="166" y="174" width="60" height="23" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 186px; margin-left: 167px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">MOSY</font></div></div></div></foreignObject><text x="196" y="189" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">MOSY</text></switch></g><rect x="167" y="195" width="60" height="23" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 207px; margin-left: 168px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">BUSY</font></div></div></div></foreignObject><text x="197" y="210" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">BUSY</text></switch></g><rect x="49" y="221" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 236px; margin-left: 50px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">VCC</font></div></div></div></foreignObject><text x="79" y="240" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">VCC</text></switch></g><rect x="159.5" y="221" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 236px; margin-left: 161px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">GND</font></div></div></div></foreignObject><text x="190" y="240" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">GND</text></switch></g><rect x="571" y="170" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 185px; margin-left: 572px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">VCC</font></div></div></div></foreignObject><text x="601" y="189" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">VCC</text></switch></g><rect x="644" y="170.5" width="29" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 27px; height: 1px; padding-top: 186px; margin-left: 645px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">GND</font></div></div></div></foreignObject><text x="659" y="189" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">GND</text></switch></g><rect x="523" y="170" width="35" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 33px; height: 1px; padding-top: 185px; margin-left: 524px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 9px;">DATA</font></div></div></div></foreignObject><text x="541" y="189" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">DATA</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
\ No newline at end of file diff --git a/_site/log/etlas/source.tar.gz b/_site/log/etlas/source.tar.gz Binary files differdeleted file mode 100644 index 8b12cf6..0000000 --- a/_site/log/etlas/source.tar.gz +++ /dev/null diff --git a/_site/log/etlas/thumb_sm.jpg b/_site/log/etlas/thumb_sm.jpg Binary files differdeleted file mode 100644 index a374879..0000000 --- a/_site/log/etlas/thumb_sm.jpg +++ /dev/null diff --git a/_site/log/fpm-door-lock-lp/breadboard.jpg b/_site/log/fpm-door-lock-lp/breadboard.jpg Binary files differdeleted file mode 100644 index 2bf47a9..0000000 --- a/_site/log/fpm-door-lock-lp/breadboard.jpg +++ /dev/null diff --git a/_site/log/fpm-door-lock-lp/footprint.png b/_site/log/fpm-door-lock-lp/footprint.png Binary files differdeleted file mode 100644 index 5511bf1..0000000 --- a/_site/log/fpm-door-lock-lp/footprint.png +++ /dev/null diff --git a/_site/log/fpm-door-lock-lp/gerber.zip b/_site/log/fpm-door-lock-lp/gerber.zip Binary files differdeleted file mode 100644 index 19a9d19..0000000 --- a/_site/log/fpm-door-lock-lp/gerber.zip +++ /dev/null diff --git a/_site/log/fpm-door-lock-lp/index.html b/_site/log/fpm-door-lock-lp/index.html deleted file mode 100644 index a39a34e..0000000 --- a/_site/log/fpm-door-lock-lp/index.html +++ /dev/null @@ -1,110 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Fingerprint door lock (LP)</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">FINGERPRINT DOOR LOCK (LP)</h2> - <h5 class="center">18 AUGUST 2025</h5> - <br> - <div class="twocol justify"><p>Second iteration of the <a href="../fpm-door-lock-rf">RF door lock</a>. Old version worked -but drew too much quiescent current. Sensor and servo pulled 13.8mA and 4.6mA -idle. Linear regulators were a disaster. Battery didn’t last 24 hours.</p> - -<video style="max-width:100%;" controls="" poster="pcb.jpg"> - <source src="video.mp4" type="video/mp4" /> -</video> - -<p>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.</p> - -<table style="border: none; width: 100%"> - <tr style="border: none;"> - <td style="border: none; width: 49.9%; background-color: transparent; text-align: center;"> - <img src="breadboard.jpg" alt="PCB" style="width: 100%" /> - </td> - <td style="border: none; background-color: transparent; text-align: center;"> - <img src="pcb1.jpg" alt="Design" style="width: 100%" /> - </td> - </tr> - <tr style="border: none;"> - <td colspan="2" style="border: none; background-color: transparent; text-align: center;"> - <img src="footprint.png" alt="PCB footprint" style="width: 100%" /> - </td> - </tr> -</table> - -<p>PCB specs: 2-layer, 1oz copper, 0.3mm traces (1mm for power and servo). Ground -plane on bottom layer.</p> - -<p>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.</p> - -<p>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.</p> - -<p>Squeezed more power savings by underclocking MCU to 8MHz/3.3V. Combined -with buck converters: 56% total power savings.</p> - -<p>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.</p> - -<p>Total power savings: 99.9% (30.6mA → 2.9μA). Verdict: Fixed.</p> - -<p>Commit: -<a href="https://git.asciimx.com/fpm-door-lock/commit/?id=75290945b2fd84b3bc108fd46419ee478eaac3ca">7529094</a> -| Gerber: <a href="gerber.zip">gerber.zip</a></p> -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/fpm-door-lock-lp/pcb.jpg b/_site/log/fpm-door-lock-lp/pcb.jpg Binary files differdeleted file mode 100644 index fbd800b..0000000 --- a/_site/log/fpm-door-lock-lp/pcb.jpg +++ /dev/null diff --git a/_site/log/fpm-door-lock-lp/pcb1.jpg b/_site/log/fpm-door-lock-lp/pcb1.jpg Binary files differdeleted file mode 100644 index 367187d..0000000 --- a/_site/log/fpm-door-lock-lp/pcb1.jpg +++ /dev/null diff --git a/_site/log/fpm-door-lock-lp/source.tar.gz b/_site/log/fpm-door-lock-lp/source.tar.gz Binary files differdeleted file mode 100644 index ef23422..0000000 --- a/_site/log/fpm-door-lock-lp/source.tar.gz +++ /dev/null diff --git a/_site/log/fpm-door-lock-lp/thumb_sm.jpg b/_site/log/fpm-door-lock-lp/thumb_sm.jpg Binary files differdeleted file mode 100644 index a8fa534..0000000 --- a/_site/log/fpm-door-lock-lp/thumb_sm.jpg +++ /dev/null diff --git a/_site/log/fpm-door-lock-lp/video.mp4 b/_site/log/fpm-door-lock-lp/video.mp4 Binary files differdeleted file mode 100644 index a907a9b..0000000 --- a/_site/log/fpm-door-lock-lp/video.mp4 +++ /dev/null diff --git a/_site/log/fpm-door-lock-rf/back.jpeg b/_site/log/fpm-door-lock-rf/back.jpeg Binary files differdeleted file mode 100644 index f458e69..0000000 --- a/_site/log/fpm-door-lock-rf/back.jpeg +++ /dev/null diff --git a/_site/log/fpm-door-lock-rf/back_design.jpeg b/_site/log/fpm-door-lock-rf/back_design.jpeg Binary files differdeleted file mode 100644 index b6c0f5d..0000000 --- a/_site/log/fpm-door-lock-rf/back_design.jpeg +++ /dev/null diff --git a/_site/log/fpm-door-lock-rf/front.jpeg b/_site/log/fpm-door-lock-rf/front.jpeg Binary files differdeleted file mode 100644 index 2b2931f..0000000 --- a/_site/log/fpm-door-lock-rf/front.jpeg +++ /dev/null diff --git a/_site/log/fpm-door-lock-rf/front_design.jpeg b/_site/log/fpm-door-lock-rf/front_design.jpeg Binary files differdeleted file mode 100644 index f81f09c..0000000 --- a/_site/log/fpm-door-lock-rf/front_design.jpeg +++ /dev/null diff --git a/_site/log/fpm-door-lock-rf/gerber_back.zip b/_site/log/fpm-door-lock-rf/gerber_back.zip Binary files differdeleted file mode 100644 index 26659ad..0000000 --- a/_site/log/fpm-door-lock-rf/gerber_back.zip +++ /dev/null diff --git a/_site/log/fpm-door-lock-rf/gerber_front.zip b/_site/log/fpm-door-lock-rf/gerber_front.zip Binary files differdeleted file mode 100644 index 864334e..0000000 --- a/_site/log/fpm-door-lock-rf/gerber_front.zip +++ /dev/null diff --git a/_site/log/fpm-door-lock-rf/index.html b/_site/log/fpm-door-lock-rf/index.html deleted file mode 100644 index 55675ff..0000000 --- a/_site/log/fpm-door-lock-rf/index.html +++ /dev/null @@ -1,125 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Fingerprint door lock (RF)</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">FINGERPRINT DOOR LOCK (RF)</h2> - <h5 class="center">05 JUNE 2025</h5> - <br> - <div class="twocol justify"><p>Wanted to unlock door with fingerprint, wirelessly to avoid drilling.</p> - -<p>2024-11: Started with basic 433MHz RF modules and two Arduinos. Connected data -lines of the transceivers to UART RXD/TXD of an ATmega328P. -Unreliable–constant packet loss.</p> - -<p>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.</p> - -<p>Datasheet riddled with ambiguity.</p> - -<p>ATmega328P runs at 5V; RFM69 3.3V. Suspect logic-level converter (LLC) -issues. High resistance. Not enough swing.</p> - -<p>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.</p> - -<p>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.</p> - -<p>2025-06: Two PCB boards for FPM (front) and servo (back) controllers. Encrypted -RF link between them.</p> - -<table style="border: none; width: 100%"> - <tr style="border: none;"> - <td style="border: none; width: 49.5%; vertical-align: top; text-align: center;"> - <img src="front_design.jpeg" alt="Design (front)" style="width: 100%" /> - <p>Footprint (front)</p> - </td> - <td style="border: none; vertical-align: top; text-align: center;"> - <img src="front.jpeg" alt="PCB (front)" style="width: 100%" /> - <p>PCB (front)</p> - </td> - </tr> - <tr style="border: none;"> - <td style="border: none; width: 49.5%; vertical-align: top; text-align: center;"> - <img src="back_design.jpeg" alt="Design (back)" style="width: 100%" /> - <p>Footprint (back)</p> - </td> - <td style="border: none; vertical-align: top; text-align: center;"> - <img src="back.jpeg" alt="PCB (back)" style="width: 100%" /> - <p>PCB (back)</p> - </td> - </tr> -</table> - -<p>PCB specs: 2-layer, 1oz copper, 0.3mm traces (0.5mm for power). Ground plane.</p> - -<p>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.</p> - -<p>Power problems became clear. Linear regulators dissipated too much heat. Sensor -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.</p> - -<p>Verdict: Functional but not practical. Battery dead in under 24 hours. Led to -<a href="../fpm-door-lock-lp/">redesign</a> with proper power management.</p> - -<p>Commit: -<a href="https://git.asciimx.com/smart-home/commit/?id=f4b0b734a595919cf451ab9448b06274c8e609a4">f4b0b73</a> -| Gerber: <a href="gerber_back.zip">gerber_back.zip</a>, -<a href="gerber_front.zip">gerber_front.zip</a></p> -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/fpm-door-lock-rf/source.tar.gz b/_site/log/fpm-door-lock-rf/source.tar.gz Binary files differdeleted file mode 100644 index c31aa22..0000000 --- a/_site/log/fpm-door-lock-rf/source.tar.gz +++ /dev/null diff --git a/_site/log/fpm-door-lock-rf/thumb_sm.jpeg b/_site/log/fpm-door-lock-rf/thumb_sm.jpeg Binary files differdeleted file mode 100644 index c275b12..0000000 --- a/_site/log/fpm-door-lock-rf/thumb_sm.jpeg +++ /dev/null diff --git a/_site/log/matrix-digital-rain/index.html b/_site/log/matrix-digital-rain/index.html deleted file mode 100644 index 1915d04..0000000 --- a/_site/log/matrix-digital-rain/index.html +++ /dev/null @@ -1,110 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Matrix Rain: 2025 refactor</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">MATRIX RAIN: 2025 REFACTOR</h2> - <h5 class="center">21 DECEMBER 2025</h5> - <br> - <div class="twocol justify"><p>The 2022 version worked but had some loose ends. Unicode support was -inflexible–couldn’t mix ASCII with Katakana; Phosphor decay was stored in a -separate array when it should’ve been packed with RGB; Code was harder to read -than it needed to be.</p> - -<video style="max-width:100%;" controls="" poster="poster.png"> - <source src="matrix.mp4" type="video/mp4" /> -</video> - -<p>Moved phosphor decay into the 4th byte of the RGB union–should’ve done this -in 2022; What was I thinking.</p> - -<p>Keeping the RGB union despite portability concerns. All my systems are -little-endian and the code is cleaner this way.</p> - -<p>Fixed Unicode by introducing a charset array. UNICODE(min, max) packs Unicode -ranges into uint64: low four bytes for start, high four bytes for end. -insert_code() unpacks a random block and picks a character from it:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#define UNICODE(min, max) (((uint64_t)max << 32) | min) - -static uint64_t glyphs[] = { - UNICODE(0x0021, 0x007E), /* ASCII */ - UNICODE(0xFF65, 0xFF9F), /* Half-width Katakana */ -}; - -static inline void insert_code(matrix *mat, - size_t row, size_t col) -{ - uint64_t blk; - uint32_t min, max; - - blk = glyphs[(rand() % glyphlen)]; - min = (uint32_t)blk; - max = (uint32_t)(blk >> 32); - mat->code[index(mat, row, col)] = rand() % (max - min) + min; -} -</code></pre></div></div> - -<p>Full-width Katakana breaks column alignment. Stick to half-width -(U+FF61-U+FF9F) range. Compile with -DNOKANA to disable Katakana altogether.</p> - -<p>blend() is still good. Leaving it alone.</p> - -<p>Tossed license and automake cruft. Just <code class="language-plaintext highlighter-rouge">cc -O3 main.c -o matrix</code> now. Don’t -need the ceremony.</p> - -<p>Runs at 2-3% CPU on OpenBSD (T490). No regressions. Fans are quiet.</p> - -<p>Commit: <a href="https://git.asciimx.com/matrix-digital-rain/commit/?id=f71b0de15a94d21ea60d281d73fa41311d8e5197" class="external" target="_blank" rel="noopener noreferrer">f71b0de</a>.</p> - -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/matrix-digital-rain/matrix.mp4 b/_site/log/matrix-digital-rain/matrix.mp4 Binary files differdeleted file mode 100644 index 7edf5d6..0000000 --- a/_site/log/matrix-digital-rain/matrix.mp4 +++ /dev/null diff --git a/_site/log/matrix-digital-rain/poster.png b/_site/log/matrix-digital-rain/poster.png Binary files differdeleted file mode 100644 index 1f68ca4..0000000 --- a/_site/log/matrix-digital-rain/poster.png +++ /dev/null diff --git a/_site/log/matrix-digital-rain/thumb_sm.png b/_site/log/matrix-digital-rain/thumb_sm.png Binary files differdeleted file mode 100644 index 940965a..0000000 --- a/_site/log/matrix-digital-rain/thumb_sm.png +++ /dev/null diff --git a/_site/log/mosfet-switches/bjt.png b/_site/log/mosfet-switches/bjt.png Binary files differdeleted file mode 100644 index 9858fa7..0000000 --- a/_site/log/mosfet-switches/bjt.png +++ /dev/null diff --git a/_site/log/mosfet-switches/index.html b/_site/log/mosfet-switches/index.html deleted file mode 100644 index a91f205..0000000 --- a/_site/log/mosfet-switches/index.html +++ /dev/null @@ -1,141 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>High-side MOSFET switching</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">HIGH-SIDE MOSFET SWITCHING</h2> - <h5 class="center">22 JUNE 2025</h5> - <br> - <div class="twocol justify"><p>Needed low-power switching for the <a href="../fpm-door-lock-lp/">fingerprint door -lock</a>. Servo and FPM draw high quiescent current–had to -cut power electronically during sleep. MOSFETs can do this.</p> - -<p>Schematics belong to <a href="https://electronics.stackexchange.com/users/292884/simon-fitch" class="external" target="_blank" rel="noopener noreferrer">Simon Fitch</a>.</p> - -<h2 id="problem-with-simple-low-side-switching">Problem with simple low-side switching</h2> - -<p>Typical approach: GPIO → gate of N-channel MOSFET on low side, pull-down -resistor between gate and drain. Works if MCU and load don’t share common -ground. Doesn’t work when they do (like controlling a component powered by the -same MCU).</p> - -<p>Issue: source potential = gate potential - threshold voltage. Example: 3.3V -gate - 1.5V threshold → 1.8V at load–not nearly enough for a servo. Raising -the gate potential above source is not always practical. Solution: high-side -switch.</p> - -<h2 id="p-channel-high-side-switch">P-channel high-side switch</h2> - -<p><img src="p_high_side.png" alt="P-channel high-side switching circuit" /></p> - -<p>M1 is P-channel (high-side), M2 is N-channel (level converter). MCU output low -→ M2 off → R1 pulls M1 gate to +6V → servo off. MCU output high → M2 conducts → -M1 gate drops to 0V → servo on.</p> - -<p>Note: IRF9540 in the schematic doesn’t work. V<sub>GS</sub> (-10V) for -RDS<sub>on</sub> too much for 3.3V ATmega328P to drive. NDP6020P is the only -suitable through-hole MOSFET I could find.</p> - -<h2 id="n-channel-high-side-switch">N-channel high-side switch</h2> - -<p><img src="n_high_side.png" alt="N-channel high-side switching circuit" /></p> - -<p>Less common but works if you have voltage high enough to drive the gate. Both -M1 and M2 are N-channel. MCU low → M2 off → M1 gate rises above threshold → -servo on. MCU high → M2 on → M1 gate drops → servo off. R2 prevents -high-impedance power-up from switching servo on.</p> - -<p>M2 needed in both topologies for level conversion (0V ↔ +6V or +9V). Carries -<1mA. Gate-source threshold must be lower than MCU supply. Common choices: -2N7000, 2N7002, BSS138.</p> - -<p>Note: D1 flyback diodes protect MOSFETs from voltage spikes caused by inductive -loads (servos, relays).</p> - -<h2 id="a-bjt-alternative">A BJT alternative</h2> - -<p><img src="bjt.png" alt="BJT architecture" /></p> - -<p>Simpler, cheaper, more available. Q2 conducts when MCU outputs high. Q2 -amplifies Q1’s base current. Unlike MOSFETs (voltage-driven), BJTs are -current-driven. R3 and R4 must be calculated for desired base currents. <a href="https://teachmetomake.wordpress.com/how-to-use-a-transistor-as-a-switch/" class="external" target="_blank" rel="noopener noreferrer">Guide on BJT -switches</a>.</p> - -<h2 id="which-topology">Which topology?</h2> - -<p>MOSFETs preferred in professional work—more efficient when on. Harder to drive -at 3.3V due to V<sub>GS</sub> requirements for full saturation (low -R<sub>DS(on)</sub>).</p> - -<p>N-channel: Lower on-resistance, cheaper, more efficient than P-channel. Harder -to drive high-side (gate must be above source—requires extra circuitry like -MOSFET drivers).</p> - -<p>Used P-channel high-side for the door lock redesign. Simpler to drive from 3.3V -MCU, no driver needed.</p> - -<h2 id="further-reading">Further reading</h2> - -<ul> - <li><a href="https://www.embeddedrelated.com/showarticle/98.php" class="external" target="_blank" rel="noopener noreferrer">Different MOSFET -topologies</a></li> - <li><a href="https://www.embeddedrelated.com/showarticle/809.php" class="external" target="_blank" rel="noopener noreferrer">How to read -MOSFET datasheets</a></li> - <li><a href="https://teachmetomake.wordpress.com/how-to-use-a-transistor-as-a-switch/" class="external" target="_blank" rel="noopener noreferrer">How to use a -transistor as a switch</a></li> - <li><a href="https://forum.digikey.com/t/guide-to-selecting-and-controlling-a-mosfet-for-3-3-vdc-logic-applications/42606" class="external" target="_blank" rel="noopener noreferrer">Guide to -selecting and controlling a MOSFET for 3.3 VDC logic applications</a></li> - <li><a href="https://forum.digikey.com/t/driving-a-large-relay-from-a-3-3-vdc-microcontroller-using-an-npn-darlington-transistor/41751" class="external" target="_blank" rel="noopener noreferrer">Driving a large -relay from a 3.3 VDC microcontroller using an NPN Darlington transistor</a></li> -</ul> -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/mosfet-switches/n_high_side.png b/_site/log/mosfet-switches/n_high_side.png Binary files differdeleted file mode 100644 index c851768..0000000 --- a/_site/log/mosfet-switches/n_high_side.png +++ /dev/null diff --git a/_site/log/mosfet-switches/p_high_side.png b/_site/log/mosfet-switches/p_high_side.png Binary files differdeleted file mode 100644 index 9f5397a..0000000 --- a/_site/log/mosfet-switches/p_high_side.png +++ /dev/null diff --git a/_site/log/neo4j-a-star-search/index.html b/_site/log/neo4j-a-star-search/index.html deleted file mode 100644 index 2063d68..0000000 --- a/_site/log/neo4j-a-star-search/index.html +++ /dev/null @@ -1,106 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Neo4J path traversal: A* optimization</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">NEO4J PATH TRAVERSAL: A* OPTIMIZATION</h2> - <h5 class="center">06 MARCH 2018</h5> - <br> - <div class="twocol justify"><p>Work. Vessel tracking with Neo4J hit a limit. Need to analyze 13,000 route -points; Dijkstra’s shortest path search slows after 4,000.</p> - -<p>Replaced Dijkstra’s algorithm with A* search using haversine function as -heuristic:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>private double computeHeuristic( - final double lat1, final double lon1, - final double lat2, final double lon2) { - final int earthRadius = 6371; - final double kmToNM = 0.539957; - - final double latDistance = Math.toRadians(lat2 - lat1); - final double lonDistance = Math.toRadians(lon2 - lon1); - - final double a = Math.sin(latDistance / 2) - * Math.sin(latDistance / 2) - + Math.cos(Math.toRadians(lat1)) - * Math.cos(Math.toRadians(lat2)) - * Math.sin(lonDistance / 2) - * Math.sin(lonDistance / 2); - - final double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); - - return earthRadius * c * kmToNM; -} -</code></pre></div></div> - -<p>Core search loop updates costs when better path found:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>private void updateCosts( - final int source, final int target, - final double newCost, final double heuristic) { - final double oldCost = gCosts.getOrDefault(target, Double.MAX_VALUE); - if (newCost < oldCost) { - gCosts.put(target, newCost); - fCosts.put(target, newCost + heuristic); - path.put(target, source); - } -} -</code></pre></div></div> - -<p>300x speedup. Scaled to 13,000 route points.</p> - -<p>Upstreamed changes: <a href="https://github.com/neo4j-contrib/neo4j-graph-algorithms/releases/tag/3.4.0.0" class="external" target="_blank" rel="noopener noreferrer">Neo4J v3.4.0</a> | -<a href="https://github.com/neo4j-contrib/neo4j-graph-algorithms/blob/bd9732d9a690319552e134708692acb5a0d6b37c/algo/src/main/java/org/neo4j/graphalgo/impl/ShortestPathAStar.java">Full -source</a></p> -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/site-search/index.html b/_site/log/site-search/index.html deleted file mode 100644 index 77fe19e..0000000 --- a/_site/log/site-search/index.html +++ /dev/null @@ -1,184 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Full-text search: SA lookup</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">FULL-TEXT SEARCH: SA LOOKUP</h2> - <h5 class="center">03 JANUARY 2026</h5> - <br> - <div class="twocol justify"><p>Article count is growing. Need a way to search.</p> - -<p>Requirements: matches substrings, case-insensitive, fast, secure. No -JavaScript.</p> - -<p>Architecture: browser → httpd → slowcgi → Perl CGI script.</p> - -<p>Perl, httpd, slowcgi are in the OpenBSD base system. Instead of secrets, file -system permissions govern access.</p> - -<p>2025-12-30: Regex search.</p> - -<p>140-line Perl script searches 500 files in 40ms. Fast enough; O(N) pull felt at -higher file counts.</p> - -<p>Introduces ReDoS and symlink attack vectors. Both can be mitigated. Tempted to -stop here.</p> - -<p>2026-01-03: Suffix Array (SA) based index lookup.</p> - -<p>Slurping files on every request bothers me. Regex search depends almost -entirely on hardware for speed.</p> - -<p>Implemented SA index with three files: corpus.bin, sa.bin, file_map.dat. Index -built with site:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ JEKYLL_ENV=production bundle exec jekyll build -$ cd cgi-bin/ -$ perl indexer.pl -</code></pre></div></div> - -<p>Indexer extracts HTML, lowercases, encodes into UTF-8 binary sequences. Null -byte sentinel for document boundaries. sa.bin stores suffix offsets as -32-bit unsigned integers, sorted by lexicographical order:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>my @sa = 0 .. (length($corpus) - 1); -{ - use bytes; # Force compare 8-bit Unicode value comparisons - @sa = sort { - # First 64 bytes check (fast path) - (substr($corpus, $a, 64) cmp substr($corpus, $b, 64)) || - # Full string fallback (required for correctness) - (substr($corpus, $a) cmp substr($corpus, $b)) - } @sa; -} - -CORPUS: a s c i \0 i m x -OFFSET: 0 1 2 3 4 5 6 7 - -SORTED SUFFIXES: - -[4] \0imx -[0] asci\0imx -[2] ci\0imx -[3] i\0imx <-- "i" from "asci" -[5] imx <-- "i" from "imx" -[6] mx -[1] sci\0imx -[7] x -</code></pre></div></div> - -<p>Time complexity: O(L⋅N log N). Fast path caps L at 64 bytes (length of cache -line), reducing complexity to O(N log N).</p> - -<p>Search: Textbook range query with twin binary searches. Random access to -suffixes and the text made possible by the fixed-width offsets:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>seek($fh_sa, $mid * 4, 0); -read($fh_sa, my $bin_off, 4); -my $off = unpack("L", $bin_off); -seek($fh_cp, $off, 0); -read($fh_cp, my $text, $query_len); -</code></pre></div></div> - -<p>Small seek/reads are fast on modern SSDs. Keeps memory usage low.</p> - -<p>NOTE: mmap.</p> - -<p>Benchmarks on T490 (i7-10510U, OpenBSD 7.8, article size: 16 KB).</p> - -<p>500 files:</p> -<ul> - <li>Index size: 204.94 KB</li> - <li>Indexing time: 0.1475 s</li> - <li>Peak RAM (SA): 8828 KB</li> - <li>Peak RAM (Regex): 9136 KB</li> - <li>Search (SA): 0.0012 s</li> - <li>Search (Regex): 0.0407 s</li> -</ul> - -<p>1,000 files:</p> -<ul> - <li>Index size: 410.51 KB</li> - <li>Indexing time: 0.3101 s</li> - <li>Peak RAM (SA): 8980 KB</li> - <li>Peak RAM (Regex): 9460 KB</li> - <li>Search (SA): 0.0019 s</li> - <li>Search (Regex): 0.0795 s</li> -</ul> - -<p>10,000 files:</p> -<ul> - <li>Index size: 4163.44 KB</li> - <li>Indexing time: 10.9661 s</li> - <li>Peak RAM (SA): 12504 KB</li> - <li>Peak RAM (Regex): 12804 KB</li> - <li>Search (SA): 0.0161 s</li> - <li>Search (Regex): 0.9120 s</li> -</ul> - -<p>Security: Derived from architectural simplicity. Zero dependencies to manage, -no secrets to hide, no targets for lateral movement.</p> - -<p>Runs in chroot.</p> - -<p>Resource exhaustion and XSS attacks are inherent. Former mitigated by limiting -concurrent searches via lock-file semaphores. Query length (64B) and result set -(20) capped. All output is HTML-escaped to prevent XSS.</p> - -<p>Secure by default. Fast. Durable.</p> - -<p>Commit: -<a href="https://git.asciimx.com/www/commit/?h=term&id=6da102d6e0494a3eac3f05fa3b2cdcc25ba2754e">6da102d</a> -| Benchmarks: -<a href="https://git.asciimx.com/site-search-bm/commit/?id=8a4da6809cf9368cd6a5dd7351181ea4256453f9">8a4da68</a></p> -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> |
