Software apps and online services
Project have started 2 years ago, as attempt to create a smartwatch with pedometer, hr sensor and skin temperature sensor. I wanted to collect big data about my activity and sync this data to my server when I can process it. That's why MCU chip should have wireless feature, and work pretty fast :)
I haven't wanted to create yet another fancy smart watch, I wanted to create tool which helps people understand their state, which may say something about peoples state based on previous actions. I don't want to have continues connection with phone or wifi (at least for now), watch only collect data, process it and show some messages and digits, for example:
- you under stress now, your galvanic skin resistance increase
- your temperature higher than normal
- you haven't moved for long time, plz do something
- you have strange temperature change pattern every month.
At that time I haven't any experience in creating any electronics, especially battery devices.
As you will see, it is long lasting pet-project, but I will be happy If someone join it =)tshWatch 1.1
First approach was with heltec esp8266 module with small oled display, and battery charging module. It seemed easy, just add sensors and all should works, but... Battery drained dramatically fast. I tried to use sleep mode but in result I've read about esp32 ulp coprocessor, and decided - this is my way :)
Main idea of any battery project - MCU and all sensors should sleep as many as it possible. Esp32 has ultra low power coprocessor, which consume small ampers and can work with i2c bus, but disadvantage of this coprocessor - it has access only to 8kb RTC memory, and works only with 16bit word, and you have to know assembler =) a
So I had to write code which wakes up ULP coprocessor once in minute and read all sensors, write data in RTC memory. Once in some period of time main core should wake up and write all data to MCU. This logic seems obvious, but MCU assembler was "terra nova" for me.
Esp32 opened new assembler world for me, and given cool results. I've created code witch worked decent time on one battery charge. I haven't any experience in assembler and deep knowledge i2c protocol, but all module drivers for ulp coprocessor I wrote by myself. It was fun time when I read bunch of datasheets, and fixed existed i2c library which at that time worked only with simple datatypes. Especially I liked test and debug ulp program via memory dump.
Esp32 Wroom module was good and I tried to fit it in existed case which I took from thingeverse, but... wroom module is BIG enough to place it on hand. After some research I've read about TTGO micro32, and I've decided - this is my way =)
As result, year ago I had orange wrist watch with 180mAh battery which worked for 3 day on one charge, and read every minute 3 sensors - pedometer, current meter, skin-temperature meter.
About components which I chose:
- Oled 1.3" display SH1106, big, chip easy to solder.
- RTC ds3231mz, almost all time MCU is in deep sleep, and after deep sleep it should know what time is now, so Real Time Clock necessary.
- pedometer LSM6DS3C, at first I choose bmi160 but, DS3231 has same i2c address and I had ready pcb, luckily LSM6DS3C has same footprint and build in pedometer function.
- mlx90615. relatively small and accurate temperature sensor
- ina219, I need to show somehow battery level, MCU can detect battery voltage via internal esp32 adc, but I decided to use i2c sensor.
Watch had 4th sensor (a heart rate sensor MAX30100), but I stumbled up on raw data processing from this sensor. I tried to write ulp driver to max30100, it worked now, but even now I can read only raw data (I'm sure, I can take good results in future)
As we may see sometimes I haven't tested all components at one breadboard )) and it led to occasions, but I solved its.
All collected data may be sent to web server, by choosing proper menu item.tshWatch 1.3
My first pcb designs was spooky (btw, current pcb design also not perfect) but it gives me uniq experience and understanding which technology I should use to achieve my goals.
In new version I added bme280 sensor, it gave some knowledge about environment to big data, and implemented pogo pin connection to charge and to flash firmware. In result I've created good looking watches with oled display and good functionality =) but only with 100mAh battery..
Long story short, at that time I was ready to use an eInk display in the next watch version.tshWatch 1.4
All previous a watch version designed spontaneously, I designed the pcb and tried to fit it in to existed case after I had this pcb in real live. And it made me sad, because I can't find enough place to battery. Third pcb version I've designed in CAD before production, It allowed me to fit 300mAh battery into watch case =)
When I bought eink gdeh0154d67 display I looked on price and understood that u8g2 lib, which I use in project, theoretically work with eInk displays. My bad, I haven't deep dive into what type eInk display uses u8g2, and of course gdeh0154d67 display haven't supported, sooooooooo..... I have to write u8g2 driver support to this display.
After long eInk hardware debugging process I build working tshWatch 1.4 specimen. But it can't sync data via wifi now, I need to do some power management (I guess run eInk display refreshment and wifi at the same time is bad idea :-] )
Now my watch works for 4 days and collect data from 4 sensors - pedometer, skin temperature, barometer/air humidity, current/voltage. It uses 300mAh battery, I know how to improve this result, I will try to write partial update for the u8g2 library, because every minute screen refresh takes at least for 3 seconds and all this time main core consume for ~40mAh.
This version under development state now, but I want to say about core feature.
it will use:
- bare esp32-pico d4, as I see, i'm going to have challenge with wifi antenna design, but i'm looking forward about this challenge =)
- eink display gdew0154m09, full screen refresh for 0.82s, it decrease time for every minute screen update, and watch will work longer on one charge, yet again challenge, because I have to write new driver for u8g2 library, but I know how to do it
- galvanic skin response (GSR) sensor, I don't know about results, but I will try to use it, because it fun feature. This sensor, in theory, is going to show stress level.
- bare max30102 module (previous versions had pcb MH-ET live max30100 module, but I want to decrease pcb size) in conjunction with GSR sensor it's going to give better result to detect stress level.
- skin temperature sensor mlx90615.
- bme680 sensor, barometer/air humidity/VOC, environment sensor.
All sensors should work via esp32 ULP coprocessor. I want to create android application which should do setup and read statistics data via Bluetooth. Also I want to use ~400mAh battery, I'm sure it will be enough to work for 1 week.
Big data processing now in freeze state, I working only with hardware. If you have some knowledge in watch design / big data processing / or coding with esp32 or arduino IDE and want to help in this project - welcome =)
if you interesting in my project, you can look more photos and videos on tshWatch project instagram https://www.instagram.com/tshideas/ Subscription is welcome too. Link to github in proper place here.
Thank you for your time :)