
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.
EmotionTracker is an open-source printed circuit board by sullyjason, from the sullyjason/MoodLogger repository on GitHub. It is a 2-layer board of 32.9 × 33.4 mm with 30 parts on 33 nets, routed with 183 tracks and 28 vias.
It is built around the PCF8523T. Its parts include 12 resistors, 6 switches, 5 capacitors, 2 ICs and 1 diode. It belongs with the SAM D and SAM boards of this library.
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 |
|---|---|---|---|
| 6 | 10k | Resistor_SMD:R_0603_1608Metric | R1, R3, R5, R7, R9, R10 |
| 5 | 1k | Resistor_SMD:R_0603_1608Metric | R2, R4, R6, R8, R11 |
| 4 | 1uF | Capacitor_SMD:C_0603_1608Metric | C1, C2, C3, C4 |
| 4 | SW_MEC_5E | Button_Switch_SMD:SW_Push_1P1T_NO_CK_PTS125Sx43PSMTR | SW1, SW2, SW3, SW4 |
| 2 | TestPoint | Connector_Wire:SolderWirePad_1x01_SMD_1x2mm | BATin, BATout |
| 1 | 10uF | Capacitor_SMD:C_0805_2012Metric | C5 |
| 1 | CR1216 | Battery:BatteryHolder_LINX_BAT-HLD-012-SMT | BT1 |
| 1 | Crystal_32.768kHz | Crystal:Crystal_SMD_Abracon_ABS25-4Pin_8.0x3.8mm | Y1 |
| 1 | LED | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | PCF8523T | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U3 |
| 1 | Push_Button | Button_Switch_SMD:SW_SPST_B3U-3000P-B | SW6 |
| 1 | R | Resistor_SMD:R_0603_1608Metric | R12 |
| 1 | SW_SPDT | Button_Switch_SMD:SW_SPDT_PCM12 | SW5 |
| 1 | SeeeduinoXIAO | Seeed Xiao:Seeeduino XIAO-MOUDLE14P-2.54-21X17.8MM | U1 |

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.



saewoonam/ble_adv_covid
Repo to implement the advertise and scanner portion for bluetooth to enable encounter/exposure tracing (e.g. Apple/Google / TCN / etc...) on a nRF52840 based battery powered dongle/device

diegodemarco/cog1
cog1 is an open-source industrial IoT gateway (hardware and software) built as a motherboard hosting an Orange Pi Zero 3 Linux SBC.

can-caglar/Data-Logger-STM32
The Serial Snooper is a UART data logger with automatic baud rate detection, real-time data stamping and a command-line-interface for configuration, running on an STM32F3 microcontroller.

jsenzel1/supra
is multimode Eurorack module with 4 different experiments in long term time. you can run up to 2 modes at once. use the 4 way joystick and buttons to interact with the modes on the oled

pimbongaerts/altimeter
Underwater sonar/USBL interface for photogrammetry surveys. PCB design files and Arduino code.

It measures 32.9 × 33.4 mm and has 2 copper layers, 1.6 mm thick.
30 parts, built around the PCF8523T. 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/EmotionTracker.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.