The project is digital barometer with algorithm that predicts the oncoming storms. Device sleeps with the screen off until one of the two things happen:
- Device is picked up and handled
- Storm is detected
Accelerometer and gyro will assist in detecting that the device was picked up and would also detect the orientation of the device. In case of storm the device would periodically light up a screen and would diplay a short warning about the oncoming storm. The algorithm for detecting of storms would read the trend of the atmospheric pressure during last 6 or 12 hours and would interpret the results
Device is assembled out of DISCO-F429ZI development board and the small "shield" attached to it. The sheild is carrying the accelerometer and the barometer. Following sensors are used in addition to the gyro already supplied by the board:
- LPS28DFW Dual full-scale, 1260 hPa and 4060 hPa, absolute digital output barometer with water-resistant package
- MMA8653FC 10-Bit Digital Accelerometer
Code uses the main control loop which handles the majority of the logic of the device. Below are main parts of the software:
- Main code contained in
main.c
- The code in
main.c
has initially been generated by the STMCube code generation and was then completed with custom functions
- The code in
- HAL code generated by the STMCube code generating addon
- All of the HAL code has been generated by STMCube program, the setup was carried out in the graphical interface
- Software drivers:
- LPS28DFW(BSD 3-Clause License)
- MMA8653FC(Licence: LA_OPT_NXP_Software_License v34 February 2022)
- Graphics library LVGL(MIT License)
- HAL (including generated code for the TFT LCD and touch controller)
- Debug command line (Code taken from the Elicia White MES Week 5 assignment and adapted to match the requirements of the system):
- Accelerometer test functions
- Barometer test functions
- Screen test functions
- Logging and mocking procedure for storm prediction algorithm
- Describe the parts you wrote in some detail (maybe 3-5 sentences per module)
- Describe code you re-used from other sources, including the licenses for those
For putting hardware together a pcb was developed so it can hold the
To be viable digital barometer following should be considered:
- Size of the screen needed for the project if screen needed at all
- Minimum viable MCU for the project
- Battery power required
- PCB design and development
- Hardware and software tests required
- Enclosure design and production
- CE and FCC testing
This project could be made much smaller as a keychain for example so that it just warns user of the possible storm without any screen. It could maybe vibrate or have just a few status leds. Or, we can go different direction and have this as a part of the weather station project with the larger screen (possible e-paper) and with additional sensors. Sensors could be made remote using BLM or similar wireless technology.
I would rather prefer this to be small wearable project which could be part of a keychain or would be installed on a small boat with long lasting battery and would just flash or vibrate to warn that the storm is approaching. With the modern mobile phones usability of this device is really limited in the current form.
- Self assessment of the project: for each criteria, choose a score (1, 2, 3) and explain your reason for the score in 1-2 sentences.
- Have you gone beyond the base requirements? How so?