Vitalya & FuseFixer
Hey FuseFixer, Iāve been drafting a lowāpower wearable that tracks heart rate and body temperature and warns you before your stress levels spike. Iād love to pick your brain on the circuitryāany chance we could team up and crack this puzzle together?
Sounds like a neat projectāwearable stress monitor, huh? Letās dive in. What kind of sensor stack are you using? Are you already settled on a microcontroller, or are we hunting for something ultraālowāpower? Also, how are you planning the alert mechanismāvibrate, LED, or maybe a tiny audio cue? Let me know where the real headaches are, and weāll troubleshoot together.
Great, letās break it down. For heartārate Iām leaning on the MAX30102 ā itās got pulseāox and photoplethysmography in one, so you get HR and SpOā in a single chip. For body temp Iām using the TMP117 ā Iāve run it for a few weeks and the accuracy is fine for a stress monitor, plus itās a 0.2āÆĀ°C sensor that draws only 1āÆĀµA in shutdown.
Microcontroller: the nRF52832 is my pick. Itās got BLE for lowāpower communication, 256āÆkB flash, 32āÆkB RAM, and a 2.4āÆMHz ARM CortexāM4 that can run at 20āÆkHz sampling without killing battery life. It also has a builtāin watchādog and a 12ābit ADC if we want to keep an eye on battery voltage. I havenāt yet settled on a power source, but a 100āÆĀµAh LiāPo with a buckāboost to 3.3āÆV should let us do a full day on a single charge if we keep the BLE advertising interval to 1āÆs and go to sleep in between.
Alert mechanism: Iām going with a small 5āÆmm piezo buzzers for a subtle audio cue, and a 5āÆmm RGB LED for a quick visual cue. The piezo is cheap and only draws ~1āÆmA when itās on. The LED is driven by a simple PWM and I can dim it to reduce consumption. Iāll also add a tiny 3āpin vibrational motor ā just a coil in a plastic shell ā for when youāre in a meeting and canāt afford to make noise.
Headaches so far:
1. **Power budgeting** ā I need to be sure the BLE stack wonāt eat all the juice when I push notifications. Iām looking at using the Nordic SDKās āsleepāmodeā example but Iām not sure if the CPU can wake fast enough after a vibration event.
2. **Signal noise** ā the MAX30102 is notoriously sensitive to motion artifacts. Iām thinking of implementing a simple digital lowāpass filter and a motionādetection check before I trust a HR reading.
3. **Enclosure size** ā fitting the 100āÆĀµAh battery, the sensor stack, and the MCU into a 1āÆcm³ shell is tight. Maybe we need to look at a microāSIP battery or switch to a 75āÆĀµAh thatās smaller.
Anything else youāve hit in your design space? Maybe we can swap the MCU for the ESP32āS2 if we want WiāFi plus BLE, but thatāll bump the power budget. Letās talk through it.
Hey, love the stack youāve pickedāMAX30102, TMP117, nRF52832, and a tiny battery. Letās chew through the pain points one by one.
1. **Power budgeting**
The nRFās power draw really hinges on how you slice the sleepāwake cycle. The BLE advertising interval of 1āÆs is generous; you could push it to 2āÆs or 3āÆs if your app can tolerate a bit of lag in notifications. Every millisecond of advertising burns ~30āÆĀµA at 3.3āÆV, so cutting that down saves a lot. For the vibration event, the CPU will wake in a few microsecondsāwatchādog timeouts are cheap if you keep the stack low. One trick: keep the CPU in an āidleā state rather than a full deep sleep when youāre waiting for a motion event. That way you can pull the watchdog faster but still get the energy hit.
2. **Signal noise**
The MAX30102ās IR channel is the main culprit for motion artefacts. A simple firstāorder lowāpass (cutāoff ~1āÆHz) can do the job, but youāll need to filter the raw data before you calculate HR. Iād also add a simple āheartbeat confidenceā metricāif the peakātoāpeak amplitude dips below a threshold or the variance spikes, flag it as unreliable and ignore that sample. The sensorās builtāin FIFO can give you a 32āsample window; you can discard windows with high noise before you even compute the FFT or crossācorrelation.
3. **Enclosure size**
A 100āÆĀµAh LiāPo is tight in a 1āÆcm³ case, especially with the LED, buzzer, and vibration motor. You might look at a 2āÆmm thick coin cell, but youāll have to drop the battery to ~50ā60āÆĀµAh. If you really want to keep the same energy budget, consider a āstepādownā buckāboost that runs at 2.5āÆV instead of 3.3āÆVāsome of the peripherals will tolerate that lower rail and you can squeeze a bit more space out of the battery. Another option is to move the LED and buzzer to a single āmultiāmodeā componentāthere are tiny RGBāLED modules that have a builtāin driver and can also act as a buzzer at high frequency.
4. **Temperature sensor**
The TMP117 is great, but you only need a sample every minute or so for stress monitoring. You can piggyback on the same lowāpower wake cycle you use for the MAX30102, or even read it in the same burst if you time it right. The sensorās I²C clock is lowāspeed; you can keep the bus clock at 100āÆkHz to save a bit more.
5. **BLE stack tuning**
If you want to keep the advertising interval short, consider using the āadvertising with connection parametersā feature of the Nordic SDK. That lets you advertise briefly, then immediately switch to a connected mode that keeps the CPU in a lowāpower āconnected idleā state. Also, the SDKās āpeer managerā can help you drop the power draw when youāre not actively streaming data.
Bottom line: the biggest killers will be the BLE advertising and the vibration motor. If you keep the vibration to a single pulse and batch the BLE updates, youāll shave off the majority of the draw.
Anything else youāre worried aboutālike the exact wiring of the MAX30102 or how to keep the PCB stackāup tidy? Let me know, and weāll dig deeper.
Nice breakdownālooks like youāve got the power puzzle nailed, but letās push a bit. For the BLE, Iāll actually push the advertising to 3āÆs; a full second lag is fine if the app can queue the alert. Iāll set the CPU to an āidleā state between samples, then spin the watchdog only when the vibration motor triggers, that keeps the wakeāup tight.
On the MAX30102 side Iām adding a twoāstep filter: first a 1āÆHz lowāpass, then a movingāaverage over 10 samples to smooth out the noise spikes. Iāll also flag any window with a peakātoāpeak below 0.5āÆV as low confidence and skip it. That way the heartārate calc never sees garbage.
For the enclosure Iām going with a 75āÆĀµAh coin cell instead of a LiāPo. The peripherals all run at 2.5āÆV, so Iāll run a tiny buckāstepādown on the 3.3āÆV rail to give the MCU and the sensors just enough headroom. The RGB LED will double as a buzzer by hitting 20āÆkHz, saving a separate piezo.
The TMP117 Iāll read in the same burst as the MAX30102 to keep I²C traffic to a minimum, and Iāll pull the bus clock down to 50āÆkHz on the temp read cycle to squeeze a bit more.
Finally, Iāll use Nordicās āadvertising with connection parametersā to drop the CPU into a lowāpower idle after a brief broadcast, then reconnect quickly for the data burst. That should keep the battery topped for a full day if we keep the vibration to a single 200āÆms pulse per alert.
Anything else youāre wondering about wiring or stackāup? Iāve got the MAX30102 in my handāletās get that wiring diagram ironed out.
Sounds solid so farājust a few wiring niceties to keep the noise low and the battery happy.
- **I²C pullāups**: 1.8āÆkĪ© on SDA/SCL to 2.5āÆV. The MAX30102 and TMP117 are fine with that, and it keeps the line fast enough for 50āÆkHz temp reads.
- **Decoupling**: 0.1āÆĀµF ceramic next to each deviceās VDD/GND pins, plus a 10āÆĀµF bulk cap on the 2.5āÆV rail. That snuffs out the LED driver spikes and the sensorās powerāon glitches.
- **LED driver**: Tie the MAX30102ās RED, IR, and GREEN pins to the MCU GPIOs that can source 10ā20āÆmA. Add a 3ā5āÆĪ© series resistor per channel to limit current and keep the sensor happy.
- **Ground plane**: Run a solid ground trace under the sensor and the MCU, and connect all grounds together at a single point to avoid loops.
- **I²C line placement**: Keep SDA/SCL away from the vibration motorās coil leads. A short, straight run reduces EMI pickup.
- **Temperature sensor**: Mount the TMP117 close to the MCU and place its 10āÆĀµF cap directly on the sensor to keep the I²C bus clean.
- **Power switching**: Use a lowāleakage Pāchannel MOSFET to cut the 2.5āÆV rail to the sensors during deep sleep; the MCU can still pull the FET gate low to reāenable them without a big voltage drop.
That should give you a tidy stackāup, low noise, and a good chance of hitting that fullāday target. Any other quirks youāre worried about?
All that wiring looks solidājust keep an eye on the powerāgate timing for the Pāchannel MOSFET; if you let it sit too long off you might hit the nRFās wakeāup threshold. Also test the vibration coil with the sensor package to make sure the coilās inductive kick doesnāt pop the pullāups. Other than that, weāre set for a clean, lowānoise design. Let me know if you hit any hiccups in the build.
Sounds like weāre good to goājust doubleācheck that MOSFETās turnāon time, and you might want a small ferrite bead on the vibration coil lead to keep any inductive surge away from the pullāups. Keep me posted on the first prototype; Iāll be on standby with a virtual multimeter. Happy soldering!
Got itāwill tighten the MOSFET timing and slide a ferrite bead on the coil. Iāll hit the multimeter and ping you once the first prototype is alive. Thanks for the virtual gear, looking forward to the first test!
Sounds great, keep me posted on how the first run goesāgood luck with the build!
Will doāif I hit a snag or a breakthrough, Iāll ping you right away. Thanks for the support!
Glad to helpājust give me a shout whenever you hit a snag or hit that sweet spot!