From b8443a01b1564676c06b2369db963a23b23e72b0 Mon Sep 17 00:00:00 2001 From: basejumpa Date: Tue, 27 Aug 2024 13:37:33 +0200 Subject: [PATCH] Create block diagram with USB host/slave connection --- .../_figures/bd_weposture.drawio | 231 +++++++++++++ docs/blog/2024-08-WeBalance/index.rst | 308 +++++++++--------- 2 files changed, 385 insertions(+), 154 deletions(-) create mode 100644 docs/blog/2024-08-WeBalance/_figures/bd_weposture.drawio diff --git a/docs/blog/2024-08-WeBalance/_figures/bd_weposture.drawio b/docs/blog/2024-08-WeBalance/_figures/bd_weposture.drawio new file mode 100644 index 0000000..aa17e42 --- /dev/null +++ b/docs/blog/2024-08-WeBalance/_figures/bd_weposture.drawio @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/blog/2024-08-WeBalance/index.rst b/docs/blog/2024-08-WeBalance/index.rst index 7c1e90f..2a0c32b 100644 --- a/docs/blog/2024-08-WeBalance/index.rst +++ b/docs/blog/2024-08-WeBalance/index.rst @@ -1,154 +1,154 @@ -.. post:: 2024-08-19 - :tags: Wii, Balance Board, HX711, Load Cell, Raspberry Pi, ESP32, FARM-Stack, React, Redux, MongoDB, FastAPI, MongoDB, OpenAPI, Kiota - :language: English - - -Mini-Project: WePosture -####################### - -Good posture through equilibrium. - -**Let's tinker a gadget!** - -- Time estimate: One afternoon (net) -- Cost estimate: Far below 50 Euro (Raspberry Pi, Monitor, Keyboard, Mouse not included) -- Skill level: Intermediate hobby tinkerer - -WIP - Work-In-Progress! - - -Background -********** - -Recently I met a physician in the field of orthopaedics, sports medicine and performance diagnostics. I learned from him that a good posture is important for our health and well-being. So let's create some thing! - - -The Gadget -********** - -With a ... - -- **home-made Balance Board** (like a Wii Balance Board) with hardware used in digital scales, voltage amplifiers (HX711) -- a (little) oversized **microcontroller**, Raspberry PI 5 (RPI5), we can directly work on, so a full-blown computer. -- **WebApp** (Full-Stack with FARM-Stack: FastAPI, React, MongoDB) to visualize the data and to provide a user interface for the user to interact with the gadget. In the DataBase historical health data can be stored and analyzed. - - -BOM - Bill Of Material -********************** - -Production (and Development): - -- `1x Raspberry PI 5 (RPI5) `__ -- 1x SD-Card 32G -- 1x Power adapter 5V, enough current for powering RPI5 -- 1x USB-C cable for powering RPI5 -- 1x Breadboard 830 points -- `T-Cobbler for RPI `__ -- Enough Jumper wires male-male -- Enough Jumper wires male-female -- 1x `Ebay: Digital Scale Set (4x Load Cell 50kg each, 1x Amplifier HX711) `__ -- 3x `Ebay: Amplifier HX711 `__ -- 4x `Thingiverse| Half Bridge Load Sensor mount `__ - - -Development (in addition): - -- 1x `Adapter HDMI-D-plug to HDMI-A-Socket `__ -- 1x Monitor -- 1x Keyboard -- 1x Mouse - - -SBOM - Software Bill Of Material -******************************** - -Production (and Development): - -- `Raspberry Pi OS with desktop and recommended software (64-bit) Release date: July 4th 2024, Kernel version 6.6, Debian version: 12 (bookworm) `__ -- Python 3 12.5 -- hx711-multi 1.4.1 - - -Development (in addition): - -- Visual Studio Code 1.92.2 -- pipx 1.1.0 -- Poetry 1.8.3 - - -Resources -********* - -- `Arduino Scale with HX711 and 50kg Bathroom Scale Load Cells | Step by Step Guide | Connecting one load cell `__ -- `HX711 class to sample a 24-bit ADC (or multiple) with Python 3 on a Rasperry Pi Zero, 3 or 4 `__ -- `Raspberry Pi Pinout `__ -- `PipX statt Pip `__ - - -Sketches -******** - -Here some sketches: - -.. figure:: _figures/bd_weposture.png - -.. figure:: _figures/board_with_feed_and_loadcells.png - - -Expert Dialogs -************** - -Here some GPT-4o chats: - -.. toctree:: - :maxdepth: 1 - :caption: Related GPT-4o chats - - _attachments/ChatGPT-ESP32_HX711_Bluetooth_Project.rst - _attachments/ChatGPT-ESP32_Load_Cell_Integration.rst - _attachments/ChatGPT-HX711_Circuit_Function.rst - _attachments/ChatGPT-Using_Wii_BalanceBoard_Raspberry_Pi.rst - - -Insights in Work-In-Progress -**************************** - -.. figure:: _figures/balance_board.png - - Balance board with top side made of glass waiting to get connected to the four HX711 - -.. figure:: _figures/sketch_ui_ux.png - - Sketch on UI/UX - -.. figure:: _figures/rpi_zero_2w_and_circuit.png - - RPI Zero 2W connected to 6 HX711, Power, Monitor, Keyboard and Mouse with 1k Resistors waiting to get connected - -.. figure:: _figures/rpi_5_and_circuit.png - - RPI 5 connected to 6 HX711, Power, Monitor, Keyboard and Mouse with 1k Resistors waiting to get connected - -Software (Repository: https://github.com/basejumpa/WeBalance ) already acquires data. Here the continuous output :: - - --snip-- - - read duration: 0.969 seconds, rate: 10.3 Hz - raw ['1990.750', '-28956.286', '-1740.286', '-17075.444'] - wt ['1990.750', '-28956.286', '-1740.286', '-17075.444'] - - read duration: 0.968 seconds, rate: 10.3 Hz - raw ['1995.625', '-28946.571', '-1719.857', '-17096.286'] - wt ['1995.625', '-28946.571', '-1719.857', '-17096.286'] - - read duration: 0.978 seconds, rate: 10.2 Hz - raw ['1998.714', '-28930.429', '-1654.143', '-17004.875'] - wt ['1998.714', '-28930.429', '-1654.143', '-17004.875'] - - --snap-- - -**Next step:** connect each load cell to its own HX711 as shown here: - -.. figure:: _figures/circuit_hx711_one_load_cell.jpg - - Circuit one cell connected to one hx711. Origin: `Arduino Scale with HX711 and 50kg Bathroom Scale Load Cells | Step by Step Guide | Connecting one load cell `__ +.. post:: 2024-08-19 + :tags: Wii, Balance Board, HX711, Load Cell, Raspberry Pi, ESP32, FARM-Stack, React, Redux, MongoDB, FastAPI, MongoDB, OpenAPI, Kiota + :language: English + + +Mini-Project: WePosture +####################### + +Good posture through equilibrium. + +**Let's tinker a gadget!** + +- Time estimate: One afternoon (net) +- Cost estimate: Far below 50 Euro (Raspberry Pi, Monitor, Keyboard, Mouse not included) +- Skill level: Intermediate hobby tinkerer + +WIP - Work-In-Progress! + + +Background +********** + +Recently I met a physician in the field of orthopaedics, sports medicine and performance diagnostics. I learned from him that a good posture is important for our health and well-being. So let's create some thing! + + +The Gadget +********** + +With a ... + +- **home-made Balance Board** (like a Wii Balance Board) with hardware used in digital scales, voltage amplifiers (HX711) +- a (little) oversized **microcontroller**, Raspberry PI 5 (RPI5), we can directly work on, so a full-blown computer. +- **WebApp** (Full-Stack with FARM-Stack: FastAPI, React, MongoDB) to visualize the data and to provide a user interface for the user to interact with the gadget. In the DataBase historical health data can be stored and analyzed. + + +BOM - Bill Of Material +********************** + +Production (and Development): + +- `1x Raspberry PI 5 (RPI5) `__ +- 1x SD-Card 32G +- 1x Power adapter 5V, enough current for powering RPI5 +- 1x USB-C cable for powering RPI5 +- 1x Breadboard 830 points +- `T-Cobbler for RPI `__ +- Enough Jumper wires male-male +- Enough Jumper wires male-female +- 1x `Ebay: Digital Scale Set (4x Load Cell 50kg each, 1x Amplifier HX711) `__ +- 3x `Ebay: Amplifier HX711 `__ +- 4x `Thingiverse| Half Bridge Load Sensor mount `__ + + +Development (in addition): + +- 1x `Adapter HDMI-D-plug to HDMI-A-Socket `__ +- 1x Monitor +- 1x Keyboard +- 1x Mouse + + +SBOM - Software Bill Of Material +******************************** + +Production (and Development): + +- `Raspberry Pi OS with desktop and recommended software (64-bit) Release date: July 4th 2024, Kernel version 6.6, Debian version: 12 (bookworm) `__ +- Python 3 12.5 +- hx711-multi 1.4.1 + + +Development (in addition): + +- Visual Studio Code 1.92.2 +- pipx 1.1.0 +- Poetry 1.8.3 + + +Resources +********* + +- `Arduino Scale with HX711 and 50kg Bathroom Scale Load Cells | Step by Step Guide | Connecting one load cell `__ +- `HX711 class to sample a 24-bit ADC (or multiple) with Python 3 on a Rasperry Pi Zero, 3 or 4 `__ +- `Raspberry Pi Pinout `__ +- `PipX statt Pip `__ + + +Sketches +******** + +Here some sketches: + +.. drawio-figure:: _figures/bd_weposture.drawio + +.. figure:: _figures/board_with_feed_and_loadcells.png + + +Expert Dialogs +************** + +Here some GPT-4o chats: + +.. toctree:: + :maxdepth: 1 + :caption: Related GPT-4o chats + + _attachments/ChatGPT-ESP32_HX711_Bluetooth_Project.rst + _attachments/ChatGPT-ESP32_Load_Cell_Integration.rst + _attachments/ChatGPT-HX711_Circuit_Function.rst + _attachments/ChatGPT-Using_Wii_BalanceBoard_Raspberry_Pi.rst + + +Insights in Work-In-Progress +**************************** + +.. figure:: _figures/balance_board.png + + Balance board with top side made of glass waiting to get connected to the four HX711 + +.. figure:: _figures/sketch_ui_ux.png + + Sketch on UI/UX + +.. figure:: _figures/rpi_zero_2w_and_circuit.png + + RPI Zero 2W connected to 6 HX711, Power, Monitor, Keyboard and Mouse with 1k Resistors waiting to get connected + +.. figure:: _figures/rpi_5_and_circuit.png + + RPI 5 connected to 6 HX711, Power, Monitor, Keyboard and Mouse with 1k Resistors waiting to get connected + +Software (Repository: https://github.com/basejumpa/WeBalance ) already acquires data. Here the continuous output :: + + --snip-- + + read duration: 0.969 seconds, rate: 10.3 Hz + raw ['1990.750', '-28956.286', '-1740.286', '-17075.444'] + wt ['1990.750', '-28956.286', '-1740.286', '-17075.444'] + + read duration: 0.968 seconds, rate: 10.3 Hz + raw ['1995.625', '-28946.571', '-1719.857', '-17096.286'] + wt ['1995.625', '-28946.571', '-1719.857', '-17096.286'] + + read duration: 0.978 seconds, rate: 10.2 Hz + raw ['1998.714', '-28930.429', '-1654.143', '-17004.875'] + wt ['1998.714', '-28930.429', '-1654.143', '-17004.875'] + + --snap-- + +**Next step:** connect each load cell to its own HX711 as shown here: + +.. figure:: _figures/circuit_hx711_one_load_cell.jpg + + Circuit one cell connected to one hx711. Origin: `Arduino Scale with HX711 and 50kg Bathroom Scale Load Cells | Step by Step Guide | Connecting one load cell `__