Skip to content

Latest commit

 

History

History
74 lines (63 loc) · 4.77 KB

README.md

File metadata and controls

74 lines (63 loc) · 4.77 KB

Week 6 homework: Final Project Rough Draft

1. Application description

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:

  1. Device is picked up and handled
  2. 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

2. Hardware description

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

Hardware block diagram

Hardware block diagram Hardware block diagram

3. Software description

Code uses the main control loop which handles the majority of the logic of the device. Below are main parts of the software:

  1. 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
  2. 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
  3. 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

4. Diagram(s) of the architecture

Hierarchy of control diagram Hierarchy of control diagram

5. Build instructions

5.1 How to build the system (including the toolchain(s))

Hardware

For putting hardware together a pcb was developed so it can hold the

Software

5.2 How you debugged and tested the system

6. Future

What would be needed to get this project ready for production

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

How would you extend this project to do something more? Are there other features you’d like?

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.

How would you go about adding them?

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.

7. Grading

  • 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?