
Plinth
I want to build a wrist-worn fatigue detection band that reads heart rate variability via a MAX30102 PPG sensor and correlates it with an EEG front-end (like the ADS1299 breakout) to detect microsleep onset, then fires a vibration motor alarm within 2 seconds of detection. Budget is around $120 and I want to benchmark against NHTSA drowsy-driving alert response-time guidelines.
Still to buy: $0.00 sourced · $0.00 estimated · $82.67 source unknown
Saved USD planning prices for parts still to buy. Tax and shipping excluded; this does not include past purchases.
Central microcontroller that reads SPI data from ADS1299 EEG front-end and I2C data from MAX30102 PPG sensor, runs fatigue/microsleep detection algorithm, and triggers vibration alarm within 2-second NHTSA response window.
Coin vibration motor driven by a MOSFET that fires a haptic alarm within 2 seconds of microsleep detection, per NHTSA drowsy-driving alert response-time benchmark.
Coin (Disc) Vibration Motor ERM 3V 10mm — Haptic Alarm Actuator
other
VIBE-DISC-10MM-3V
Still to buy / Source not recorded
2N7002 N-Channel MOSFET SOT-23 — Vibration Motor Gate Driver
digikey
2N7002NXAKR
Still to buy / Source not recorded
MAX30102 optical heart-rate and SpO2 sensor worn at the wrist to capture photoplethysmography (PPG) signals for heart rate variability (HRV) fatigue correlation.
ADS1299-based 8-channel biopotential front-end for capturing brainwave (EEG) signals used to detect microsleep onset via alpha/theta wave analysis.
ADS1299 8-Channel EEG Biopotential AFE Breakout Board (OpenBCI-compatible, Olimex or equivalent)
other
ADS1299-BREAKOUT
Still to buy / Source not recorded
LiPo battery with USB charging IC and 3.3 V LDO regulation to power the microcontroller, ADS1299, MAX30102, and vibration motor safely from a single wrist-worn cell.
3.7V 500mAh LiPo Battery — Wrist-Worn Power Cell
other
LIPO-3.7V-500MAH
Still to buy / Source not recorded
MCP73831T-2ACI/OT — Single-Cell LiPo Charger IC (USB 4.2V, SOT-23-5, 500mA)
digikey
MCP73831T-2ACI/OT
Still to buy / Source not recorded
MIC5219-3.3YM5-TR — 3.3V 500mA LDO Regulator SOT-23-5 (Powers MCU, ADS1299, MAX30102)
digikey
MIC5219-3.3YM5-TR
Still to buy / Source not recorded
100nF 10V X7R Ceramic Capacitor 0402 SMD (Decoupling Caps, 20-pack)
digikey
CL05B104KP5VPNC
Still to buy / Source not recorded
Source unknown $82.67
Still-to-buy priced subtotal: $82.67 USD
12-week plan
All parts ordered; Nano Every blink sketch compiles and runs
Order every component today — priority on the three long-lead items: ADS1299 Olimex/OpenBCI breakout, 3.7 V 500 mAh LiPo, and the coin vibration motor ERM, all of which can take 2–4 weeks to arrive. Simultaneously install the Arduino IDE with the ATmega4809 board package, clone SparkFun's MAX30105 library, and verify the toolchain compiles a blink sketch on the Nano Every. Set up a GitHub repo with folders firmware/, hardware/, data/, and docs/ so all work is version-controlled from day one.
Raw PPG waveform streaming to Serial Plotter at ≥50 Hz from wrist
While long-lead parts are in transit, focus entirely on the MAX30102. Wire the breakout to the Nano Every over I2C, configure Red/IR LED currents and sample-rate registers, and stream raw ADC counts to Serial Plotter. Confirm a clean photoplethysmography pulse waveform at the wrist — this validates I2C wiring and produces the real signal you will feed into HRV math in Week 4.
Pan-Tompkins R-peak detector running; SDNN/RMSSD HRV metrics logged to SD/Serial
Build the HRV signal-processing pipeline on top of the PPG stream from Week 2. Implement a simplified Pan-Tompkins peak detector to find inter-beat intervals (IBI), then compute SDNN and RMSSD over a 30-second rolling window — the two HRV metrics most predictive of fatigue. Log timestamped metrics to Serial so you have ground-truth data for algorithm tuning later. This step must precede any fusion with EEG data.
ADS1299 SPI link verified; raw EEG ADC samples streaming at 250 Hz
The ADS1299 breakout should arrive by now. Study the ADS1299 datasheet SPI timing carefully, then wire DRDY, CS, SCLK, MOSI, MISO, and START to the Nano Every. Send the WAKEUP → SDATAC → WREG CONFIG sequence, then switch to RDATAC mode and confirm 24-bit samples arrive at 250 Hz. Scope the DRDY interrupt line to verify timing — getting this handshake solid now prevents subtle data-corruption bugs later when you fuse with PPG.
Alpha/theta band power computed from EEG; drowsiness threshold defined
Implement a fixed-point or float FFT (e.g., Arduino's ArduinoFFT library) on 1-second EEG windows to extract alpha (8–13 Hz) and theta (4–8 Hz) band power, which are the canonical EEG markers of microsleep onset. Define a threshold ratio (theta+alpha / beta) above which the system flags a drowsy epoch. Log flagged epochs with timestamps so you can compare against self-reported fatigue ground truth in Week 9's benchmarking.
Gerbers submitted to PCB fab; 2–3 week lead time begins
Design the wrist-band PCB in KiCad: place the MCP73831T LiPo charger, MIC5219 3.3 V LDO, 100 nF decoupling caps on every power pin, 2N7002 MOSFET motor driver with flyback diode, and headers for Nano Every, ADS1299 breakout, and MAX30102 breakout. Route differential EEG traces with a ground pour and keep power traces ≥0.5 mm. Submit Gerbers to JLCPCB or OSH Park this week — the fab lead time lands the board just in time for Week 9 hardware integration.
Vibration motor alarm fires in <2 s on breadboard; MOSFET gate logic verified
While waiting for the PCB, wire the 2N7002 MOSFET motor driver on a breadboard: connect gate to a Nano Every digital output through a 100 Ω resistor, source to GND, drain to the coin motor's negative lead, and motor positive to the 3.3 V rail with a 1N4148 flyback diode in parallel. Write a firmware interrupt triggered by the EEG/HRV threshold flags from Weeks 3 and 5, then measure gate-to-motor-spin latency with an oscilloscope — it must be well under 2 seconds to satisfy the NHTSA benchmark target.
Dual-modal fusion algorithm running; fused drowsiness score logged on breadboard
Combine the HRV fatigue score (Week 3) and the EEG alpha/theta band ratio (Week 5) into a single weighted fusion score using a simple decision tree or weighted sum. Tune weights by intentionally simulating fatigue states (eyes-closed, deep breathing) and logging the fused output. Confirm the algorithm can distinguish alert vs. drowsy within the 2-second NHTSA window on breadboard hardware before moving to the PCB. This is the most algorithmically complex week — budget extra time.
PCB powered up; all subsystems verified on custom board (dedicated debug week)
The PCB arrives this week. Before soldering ICs, perform a bare-board power-on test: measure LDO output (3.3 V), verify LiPo charger PROG resistor sets correct charge current, and check for shorts with a DMM. Solder progressively — power rails first, then Nano Every header, then breakout headers, then motor driver. Re-run all prior subsystem tests (I2C scan for MAX30102, SPI DRDY on ADS1299, motor pulse) on the new board. This dedicated debug week is your safety net before integration.
Full system wrist-worn prototype assembled; end-to-end detection fires in <2 s
Mount the PCB, ADS1299 breakout, MAX30102, LiPo, and coin motor into the wristband enclosure with dry EEG electrodes on electrode leads. Flash the complete fusion firmware from Week 8 onto the Nano Every. Run an end-to-end test: wear the band, induce simulated drowsiness (eyes closed, relaxed breathing for 30 s), and verify the vibration alarm fires — timing the detection-to-vibration latency against the NHTSA 2-second threshold with a stopwatch and oscilloscope timestamp log.
NHTSA benchmark data collected; false-positive/negative rates quantified
Conduct structured trials against the NHTSA drowsy-driving alert response-time guideline (≤2 s detection-to-alert). Run at least 10 alert and 10 drowsy epochs on yourself (and, if IRB-exempt for self-study, one other volunteer), logging detection latency, false positives, and false negatives. Build a simple confusion matrix and compute sensitivity/specificity. Tune the fusion weights from Week 8 if accuracy is below 80%. Record raw data in a spreadsheet so you can cite quantitative results in your final report.
Demo-ready prototype; final report and repo fully documented
Polish the firmware (clean up debug Serial prints, add a low-battery LED indicator via the MCP73831T STAT pin), photograph and annotate the hardware, and finalize the GitHub README with a system block diagram, BOM with actual costs versus the $120 budget, and the NHTSA benchmark results table. Prepare a 5-minute live demo script: power on, don the band, show alert state baseline, induce drowsiness, and demonstrate sub-2-second alarm — exactly the narrative a judges panel or course evaluator expects.
Generated by Plinth's AI agents. Verify before purchasing parts, following the schedule, or making safety-critical decisions.
Generated by Plinth - turn a project idea into a real buildable plan.