You are browsing as a guest. Sign up (or log in) to start making projects!

7h 23m 31s logged

CRAMP DETECTOR (POWERTHRU) - DEVLOG 3 note: scroll to see images—————————————————————————————————————————— This time, I began to focus more my design and prototype than actually coding the model – but I did make some improvements to the model and am doing some cool coding things.  ————————————————————————————————————————— This was my first breadboard prototype, it uses an MPU-6050, AD8232, 10K Thermistor, GSR, a LED, random (for fun) water sensor (maybe sweat alt), and a pancake vibration module. I used an old kit I had from a while back which had most wires and resistors and basic supplies. While I have an ESP32 I’m so scared that I am going to break it so for now I am using the Arduino MEGA board (bigger and easier) that came with the kit (the newer one I believe). The hardest part was honestly connecting everything – I had no clue how the route all the wires – and honestly it looks like a mess (below). —————————————————————————————————————————— The items that kind of just barely worked were the EMG (proper values maybe a little “out of tune”) and the GSR which didn’t seem to detect sweat as much as I expected (it kept spiking with movement but that just means it needs to be secured better). The MPU just simply wasn’t working mainly because the pins needed to be soldered and I (am scared of) couldn’t solder so there were apparent air gaps where the information was being lost triggering an [Error -240] and 0’s across the Accel and Gyro values. The thermistor didn’t hold very steady and kept shifting – I wanted to use the DHT11 (bad but whatever) but it broke. The LED just didn’t work 😩. But one of my favorite parts of the system was the vibration module, whenever the cramp score (for now EMG biased) I made it so the pin state was set to HIGH effectively creating a cramp warning. Also, the water sensor just didn’t work and I probably won’t be using it in the future. —————————————————————————————————————————— I want to combine an ECG and EMG on the same AD8232 simultaneously but I was told that that might not be possible bc of positioning and frequency and other things. So the next steps are for me to maybe buy better parts  (I did some research, how do these sounds?: MyoWare 2.0 for EMG, MPU-6050 (budget) or ICM-42688 (better), MLX90614 (non-contact) or TMP117/MAX30205 (contact), same GSR, and maybe I’ll throw in a MAX30102 (ECG). And I need to make sure I can integrate them for the future. ——————————————————————————————————————————  I’ve been lazy and I haven’t really done any work on building my own pcb other than downloading KICAD – will update soon. —————————————————————————————————————————— Apparently BiLSTM isn’t going to be the most effective for cramp detection; CNN + GRU is better. A BiLSTM’s backward pass needs future timesteps (t5 to help classify t2) – fine for offline analysis of a complete pre-recorded window, but a live wearable predicting “cramp incoming” at t2 doesn’t have t5 yet. GRU is forward-only by construction; the CNN front end is made casual too (left-padded only) so nothing in the model ever depends on a future sample. So I just finished the first version of that: just swap the bidirectional lstm for the CNN + GRU combo and I got one of the better accuracy markers in a while (below). And later I want to combine the sensors into my dashboard in the last devlog so I can broadcast the prediction in real time—————————————————————————————————————————— Thanks for reading!

0
4

Comments 0

No comments yet. Be the first!