The aim of this project is to create a circuit to measure and analyse the data from two different IMUs (Inertial Measurement Units) to determine the accuracy of the step estimation algorithm (multiple if there is time).
The project will make use of a variety of components:
- Raspberry Pi Pico W (access point, web server, reading sensors, driving TFT display) running MicroPython with various CircuitPython Libraries,
- Pico-10DOF-IMU as the first IMU,
- ST-9-DOF-Combo as the second IMU,
- Pico-UPS-B as a power source,
- 3.5inch_TFT_Touch_Shield to display the measurements and battery level,
- Pico-Dual-Expander to hold some components together w/o soldering,
- 3D printed enclosure for the device to protect the circuit (custom design).
Simple list of connections in ~/.BACKUP/project_circuit_simple_diagram.pdf
This project consists of many files and directories, the most important of which are described below:
- Directory
~/.BACKUP/
containing the backup and important files that should not be transferred to the Pico:- Adding the CircuitPython compatibility layer - short tutorial in
~/.BACKUP/adafiut_libs/README.md
(with required libraries in the same directory), - Raspberry Pi Pico W board pinout in
~/.BACKUP/pico-pinout.svg
, - Firmware used in the project in
~/.BACKUP/RPI_PICO-20240602-v1.23.0.uf2
, ~/.BACKUP/code/
for old / sample / backup code,- (LINUX USERS: MicroPico Extension for VSCode) script used to resolve user permissions in
~/.BACKUP/solvePermissions.sh
,
- Adding the CircuitPython compatibility layer - short tutorial in
~/classes/
directory containing all necessary classes for easy development,~/lib/
directory containing all the CircuitPython libraries that may be needed in the project,~/src/
directory contains all the resources needed for the web server,main.py
as the main file of the project and the program to be executed on startup.
I managed to create an asynchronous web server that handles clients and reads sensor data at the same time (based on a scheduler, multithreading-coming-soon™). Notable achievements of this release:
- Pico acting as an access point,
- Handling of asynchronous requests,
- Added translation layer for CircuitPython,
- Reading IMU sensor data using the CircuitPython library (Adafruit "LSM6DSOX + LIS3MDL 9 DoF" Sensor),
- Control the device from a web page,
- Live UI update and synchronous data retrieval.