Skip to content

Project Overview

xavier_rojas edited this page Apr 29, 2024 · 12 revisions

Overview

For my final project I will use a Raspberry Pi to create a force measurement device that can be used as a rock climbing training tool, akin to a commercial product that exists by Tindeq called the Progressor. The idea is to create a tension force sensor that attaches to a fixed point on one side, while the other side attaches to a wooden climbing hold block (commonly used for training finger muscles and ligaments). The user pulls on the training block with as much force as possible for a fixed amount of time and repeats the process. The force sensor outputs serial data to the linux device, which will process the data and output the force reading to a smartphone/laptop display via bluetooth. If I have enough time, it would also be cool to make a kernel driver for the device (rather than just a userspace app). diagram image

Target Build System

I plan to use Yocto for this project, mainly because this is likely the build system that will be used at my work.

Hardware Platform

This project will be implemented on a Raspberry Pi 4 Model B. I own this RP4 so I will not need to borrow it from the department. This project will also require three additional pieces of hardware:

  1. Tension/compression sensor, found here. It outputs an analog signal in a standardized format.
  2. A sparkfun breakout board that is essentially an ADC made specifically for this type of load cell sensor. It outputs serial data but in an atypical format. The RP4 will have to handle this data acquisition and processing. The ADC that the dev board is built around can be found here.
  3. A smartphone or laptop with bluetooth and ability to connect to a hosting app.

Open Source Projects Used

This project will not rely on any other open source projects.

Previously Discussed Content

This project will include:

  • Aspects of socket programming to create a data link between client and server
  • Timing and sleeping
  • Creating a standalone linux distribution with Yocto that links to git repos
  • Including in the Yocto build scripts to be installed and ran upon startup so that the system is fully functional at startup with zero interaction.

New Content

New aspects include:

  • Writing c/python on the RP4 to read from and write to GPIO
  • Potentially implementing a (sort of) spi driver on the RP4, although given the atypical serial data coming from the sparkfun ADC, it may make more sense to bit bang.
  • Data transfer from the RP4 over bluetooth
  • Smartphone/laptop handling of bluetooth data

Shared material

This project shares some aspects with my Principles of Embedded Systems course final project. For that project, I am also using the force sensor but interfacing to it via a very basic microcontroller dev board (FRDM-KL25Z), where the data will simply be output to a serial interface. That project requires bare metal programming in C for data acquisition which will be different from this project. These two project will not share code, only the logic used to acquire and handle the serial output.

Source Code Organization

This link connects to the source code of the Force App

Group Overview

Working solo!

Schedule Page

Link to the Schedule Page

Video Page

Link to the Video Outline

Future Work

This project was mostly a success. Below are the areas that could be improved upon:

  • GPIO control for sensor reading (bit bang) was implemented with python instead of C due to the time constraints. Future work could implement in C.
  • Bluetooth connection improvement: ideally, the user pulls the device out of the box, powers it up and their device (laptop or smart phone) can immediately pair via bluetooth. Currently with RPi, this is much more difficult than it sounds. However, once the devices are paired, the pi can be turned off and will operate as desired from that point on. The two pairing issues are:
    • in order for pairing to take place, the user has to log in with the raspberry pi and toggle 'discoverable' mode in bluetoothctl (even though my startup script already successfully sets it into discoverable mode!!!). Circumnavigating these shenanigans is possible but very difficult and requires even more bluetooth related tools (primarily dbus). A significant amount of time was already spent on this particular aspect of the project so cleaning up this bluetooth interaction is left to 'future work'.
  • A pretty app on a smartphone to put it all together. There was certainly no time for such things in this semester.