Everyone that rides a bike knows that it is necessary to stand up sometimes to prevent ass pain. Moreover, can be useful to register the number of times you stand up, so you can compare respect to the time you are seating or even notify you when you should do it again.
The idea is making a smart saddle that notifies using BLE when a rider is sitting or stand-up. Like a heart rate sensor device.Mount the hardware pieces
We are going to use an ESP32 micro-controller to act like BLE server and an FSR 400 sensor to detect the weight on the saddle. This sensor detects the range of 0 to 10 Kg but it is enough because we only need know if the rider is seated or not.
You can use a developer board to test it or mount directly in a final board. The below figure shows the diagram:
An alternative to buying a FSR 400 sensor, you can to try do it yourself.Program the ESP32 microcontroller
The code can be download from the project in Github. You don't need to do any changes to make it works unless you want.
Now you have a BLE device that notifies when someone is seated or not on the saddle of your bike.Test it
You can use whichever BLE tester app to test it, but I recommend the nRF Connect for Mobile app because it is free, powerful and easy to use.
If you subscribe to TX characteristic when sitting on the saddle it notifies a "1" and if you stand up, it sends "0". You can read the RX characteristic and get the state at whatever moment.Develop an application for use it
It's possible to develop a mobile app that connects to the BLE sensor, receive the information about the saddle and create, for instance, some of the next uses cases:
- Set a maximum sitting time, and if you reach it then that the app warning you, such as an alarm, so you stand up. Moreover, for instance, you can define the minimum time you should stand up and let you do it at different times.
- Register the activity to review where and how often you go sitting or standing up.
In the next update, I'll include a mobile app example to use the BLE sensor that we've made.