
MoodLogger v1
sullyjason/MoodLogger
A tiny, battery-powered button logger. Press one of (at least) four buttons and the device wakes up, appends which button was pressed at what time to a CSV file, and goes back to sleep.
A tiny, battery-powered button logger. Press one of (at least) four buttons and the device wakes up, appends which button was pressed at what time to a CSV file, and goes back to sleep.
Dummy device is an open-source printed circuit board by sullyjason, from the sullyjason/MoodLogger repository on GitHub. It is a 2-layer board of 20.3 × 22.9 mm with 4 parts on 6 nets.
Its parts include 1 resistor, 1 diode and 1 switch.
Attribution note: This README (state documentation, roadmap) and the Proposed v1 architecture section were drafted by Claude (Fable 5) on 2026-07-07 and updated as the design converged (part selection finalized 2026-07-10 with Claude (Opus 4.8)), based on the KiCad files in this repo, the project motivation, and the Picoclick-C3 reference project. Sections contributed by Claude are marked with 🤖. Hardware design decisions, part orders, prototypes, and project direction by Silvan Roth.
A tiny, battery-powered button logger. Press one of (at least) four buttons and the device wakes up, appends which button was pressed at what time to a CSV file, and goes back to sleep. To get the data, you plug the device into any USB host (cable or docking station) and it shows up as an ordinary USB flash drive — no companion app, no driver, no cloud. Grab the CSV, done.
timestamp, button to a CSV fileTwo prototype PCB revisions exist, both built around a Seeed Studio XIAO ESP32-S3 module. They differ only in the RTC chip. Both are functional as prototypes but share one critical flaw (see Known problems).
EmotionTracker_DS32/)Board silkscreen: EmotionLog v0 8.2025
![]()
EmotionTracker_PCF8523/)Dummy device/ contains a mechanical dummy PCB of the same outline for enclosure fitting![]()
Firmware/)Only a bring-up sketch exists so far: Mood_track_v0/Mood_track_v0.ino is a WS2812B/FastLED color-cycle test. The actual logging firmware (RTC, deep sleep, CSV writing, USB mass storage) has not been written yet.
No battery over-discharge protection. The XIAO ESP32-S3 has a charging circuit but no discharge cutoff, so when the device sits unused, the quiescent draw slowly pulls an unprotected LiPo below its safe minimum voltage and permanently damages it. This has already killed one battery. Nothing on either PCB revision protects against this.
The XIAO is oversized for the job. A full ESP32-S3 module with WiFi/BLE is overkill for "log a timestamp and sleep", and its deep-sleep and regulator overhead works against the battery-life goal.
Section author: Claude (Fable 5, refined with Opus 4.8), 2026-07-07 / 2026-07-10. Based on the boards above and the Picoclick-C3 reference project (fork in Reference Projects/). Parts are selected and ordered but not yet built or bench-verified — treat as a design proposal, not a validated design.
The key technique to adopt from the Picoclick is its soft-latching power circuit: between presses the MCU is not asleep, it is completely unpowered. A button press physically connects the battery to the regulator; the firmware's first act is to hold that connection via a latch GPIO, it logs the event, then releases the latch and the device switches itself off. The Picoclick C3 reaches < 200 nA idle this way — roughly three orders of magnitude below the XIAO's deep sleep — and it doubles as the discharge-protection strategy: a device that draws almost nothing cannot slowly kill its LiPo. A dedicated protection IC remains as the hard backstop.
Both were considered — the deciding factor was PCB simplicity for a first custom board that may be partly hand-assembled:
The RP2040 remains a reasonable alternative (faster boot for the latch, larger storage headroom); it just makes the board harder. The nRF52840 is the single-chip option if avoiding external flash matters more than assembly ease.
| Block | Part | Notes |
|---|---|---|
| MCU | ATSAMD21G18A (TQFP-48) | 256 KB flash / 32 KB RAM, native USB, crystal-less USB via clock recovery |
| RTC | RV-3028-C7 | ~45 nA, internal crystal, ±1 ppm; runs on the always-on rail so time survives with the MCU off. (DS3231M / PCF8523 are the higher-draw fallbacks proven on the existing boards) |
| Data storage | W25Q32JVSSIM (SOIC-8, 4 MB) | External SPI NOR for the FAT/CSV volume. Chosen over internal-flash-only for write endurance (~100 k vs ~25 k erase cycles) — each logged press is one FAT-metadata write, so endurance, not capacity, is the limit |
| Battery protection | BQ29700DSER | Over-discharge / over-current cutoff — the hard backstop for the failure that killed the prototype battery. Controller only: needs an external dual N-channel MOSFET (e.g. FS8205) in the cell's ground path |
| 3.3 V LDO | AP2112K-3.3 | Sits after the latch, so its ~55 µA quiescent is irrelevant (only powered when the device is awake). Regulates the 3.0–4.2 V cell down to a SAMD21-safe 3.3 V |
| Charger | MCP73831-class | Charge current set by R_prog for the chosen small cell |
| Latch + button OR | P-FET high-side switch + Schottky diode-OR | Clone the Picoclick C3T latch topology (in the submodule) |
Each of the four buttons does double duty: all are diode-ORed (Schottky) into the latch enable, so any press powers the board, and each also drives its own sense GPIO with a small RC hold so firmware can still read which button fired after boot. USB VBUS feeds the same latch OR, so plugging into any host wakes the device.
timestamp,button to CSV (FatFs on NOR flash) → release latch.settime.txt to the drive) — FAT directory entries carry the host's local time, so any OS can set the RTC just by writing a file. Set-on-flash as baseline.A log event costs roughly 1 µAh (~30 mA for ~100 ms); 20 presses/day is ~0.5 mAh/month. Standby is dominated by the latch leakage plus the protection IC's quiescent draw (sub-µA). Even a 100 mAh cell lasts multiple years and is realistically limited by self-discharge — with the protection IC cutting the cell off safely at the end instead of destroying it.
Captured so the board doesn't have to relearn them:
VDDCORE is a regulator output — decouple it to ground with 1 µF and connect nothing else. Tying it to 3.3 V is the classic dead-SAMD21 mistake.| Path | Contents |
|---|---|
EmotionTracker_DS32/ | KiCad 8 project, DS3231 revision (production/ has JLCPCB gerbers, BOM, placement files) |
EmotionTracker_PCF8523/ | KiCad 8 project, PCF8523 revision + mechanical dummy board (production/ as above) |
Firmware/Mood_track_v0/ | Arduino bring-up sketch (LED test only, no logging yet) |
Reference Projects/ | Picoclick-C3-Logger (git submodule, fork of makermoekoe/Picoclick-C3) — reference for the latch circuit and battery protection |
docs/ | Architecture diagrams |
The concept was first prototyped on a breadboard with a XIAO ESP32-S3 and a DS3231 RTC module. That prototype worked, but the lack of discharge protection destroyed the battery — which is what motivated the roadmap above.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 1 | >VALUE | Seeed Xiao:Seeeduino XIAO-MOUDLE14P-2.54-21X17.8MM | >NAME |
| 1 | LED | LED_THT:LED_D3.0mm_Horizontal_O6.35mm_Z10.0mm | D1 |
| 1 | Resistor | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1 |
| 1 | Slide_Switch_SPDT_P3mm_10x5x10mm | SilvansFootprintLibrary:SW_Slide_SPDT_Angled_CK_OS102011MA1Q | SW1 |

sullyjason/MoodLogger
A tiny, battery-powered button logger. Press one of (at least) four buttons and the device wakes up, appends which button was pressed at what time to a CSV file, and goes back to sleep.
sullyjason/MoodLogger
A tiny, battery-powered button logger. Press one of (at least) four buttons and the device wakes up, appends which button was pressed at what time to a CSV file, and goes back to sleep.
sullyjason/MoodLogger
A tiny, battery-powered button logger. Press one of (at least) four buttons and the device wakes up, appends which button was pressed at what time to a CSV file, and goes back to sleep.

joypad-ai/joypad-os
Universal controller firmware for building adapters, dongles, and custom controllers.


hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

tardate/LittleArduinoProjects
a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

drandyhaas/KiCadRoutingTools
A set of Python/Rust tools to aid routing in KiCad

osy/XG_Mobile_Station
Open source eGPU dock for ROG Ally and ROG Flow

Luos-io/luos_engine
Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

NVNTLabs/switch2-SDEX2M2
Micro SD Express to M.2 NVME Adapter for Nintendo Switch 2
It measures 20.3 × 22.9 mm and has 2 copper layers, 1.6 mm thick.
4 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the sullyjason/MoodLogger repository on GitHub, at the commit this page was made from: the board is EmotionTracker_PCF8523/Dummy device/Dummy device.kicad_pcb and its schematic EmotionTracker_DS32/EmotionTracker_DS32.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask sullyjason before reusing the design.