# Wireless Data Transfer from a 3-axis accelerometer

#### mikecore33

Joined Dec 5, 2021
4
I'm trying to develop a wireless connection between a 3-axis accelerometer ( ADXL343 - Triple-Axis Accelerometer (+-2g/4g/8g/16g) w/ I2C/SPI : ID 4097 : $5.95 : Adafruit Industries, Unique & fun DIY electronics and kits) and a Raspberry Pi 4 with display (https://www.amazon.com/Raspberry-Touchscreen-320x480-Monitor-Display/dp/B07WQW6H9S) what type of system do I need to set up in order to transmit the data, if its even possible to? I have very little experience with Bluetooth or anything wireless. Also the system needs to be able to with stand high speed movement, as it will be attached to a boxing glove and be used to measure the speed of a punch from a boxer. Thanks in advance #### MikeA Joined Jan 20, 2013 316 That sensor only goes up to 16g. I'd imagine a boxer's glove acceleration is higher. Thread Starter #### mikecore33 Joined Dec 5, 2021 4 That sensor only goes up to 16g. I'd imagine a boxer's glove acceleration is higher. You are right, I just looked into that. I'm seeing an average professional punch up to 45 g, so for my case I'll probable only need 30g. Thread Starter #### mikecore33 Joined Dec 5, 2021 4 I'm now thinking of using a LSM6DSO32 accelerometer for the project. I'm still needing to find a way to transmit the data from the accelerometer on the boxers wrist to my raspberry pi that will be attached to the bag. I've been told that using an Arduino would work, but I'm not sure it will communicate well with the Raspberry Pi. #### tindel Joined Sep 16, 2012 906 This seems like a pretty sophisticated embedded project. Could you use an iPhone or Fitbit or some other commercial product to do the same thing? Being able to test and calibrate a device to know it’s measuring correctly also seems challenging. Commercial is the way to go here. #### MSun Joined Dec 22, 2021 2 I'm trying to develop a wireless connection between a 3-axis accelerometer ( ADXL343 - Triple-Axis Accelerometer (+-2g/4g/8g/16g) w/ I2C/SPI : ID 4097 :$5.95 : Adafruit Industries, Unique & fun DIY electronics and kits) and a Raspberry Pi 4 with display (https://www.amazon.com/Raspberry-Touchscreen-320x480-Monitor-Display/dp/B07WQW6H9S) what type of system do I need to set up in order to transmit the data, if its even possible to? I have very little experience with Bluetooth or anything wireless. Also the system needs to be able to with stand high speed movement, as it will be attached to a boxing glove and be used to measure the speed of a punch from a boxer.
Yes, very possible ... but a chunk of work.

There are many other Bluetooth Low Energy modules out there that already have sensors, so that may be a quicker starting place. Takes a bit of time to sort out exactly what is available, what is a good choice for your scenario, and whether it is a "ready to go" solution. For newer Raspberry Pi models, they will have Bluetooth capabilities that you can use to communicate with your bluetooth sensor module. From there, many decisions on driving the Touchscreen.

We did something similar for a customer early in the year, so definitely feasible. Just not something that is "turnkey" or easily hacked together unless you have deep software skills.

#### Jon Chandler

Joined Jun 12, 2008
432
This really shouldn't be as difficult to do as people are making out.

Use an appropriate accelerometer with an I2C interface. Use an ESP32 microcontroller to read the digital data from the accelerometer, do the necessary scaling and trimming and transmit the data wirelessly using either a direct wireless protocol (I believe there is sample ESP32 code to do this) to a receiver ESP32 or configure the first ESP32 to act as a web server.

The receiving end can be an ESP32 with an LCD display or with a little more effort, a Raspberry Pi or even a laptop. What's best depends on what you want to do with the data.

Key issues are making the sending end (accelerometer and ESP32) rugged and light weight, coming up with a reliable power supply (probably a small rechargable lithium battery), figuring out how and where to mount the accelerometer to provide representative data, and deciding how to parse the data to provide the information you desire.

I'd break it down onto pieces. Learn how to read the accelerometer with the ESP32 and output serial data. Once you have some numbers you believe, figure out how to send it wirelessly. Once you can send it wirelessly (and receive it!), figure out how to display it in a useful way on an LCD display.

#### MSun

Joined Dec 22, 2021
2

#### MrSalts

Joined Apr 2, 2020
2,611
A pair of 1.5V AAA batteries will easily last one boxing match in an ESP32.