Kettlebell Counter (fail)

160

1

1

Story:
I built this project purely as an experiment.

I wanted to see if I could use the freefall detection of an accelerometer to count the swings of a kettlebell.

Parts:

1* Arduino nano

1* MAX7219 7 Segment LED display module

1* ADXL345 Accelerometer

2* 4k7 Resistors

2* 15 way 0.1 inch sockets - for the nano

1* 8 way 0.1 inch socket - for the accelerometer

1* 5 way 0.1 inch pin strip - for the display

1* 2 way screw terminal - for power

1* 27 by 34 Stripboard

1* 9 volt battery clip

1* 9 volt battery (PP3)

Step 1: Construction:

I designed and built a small board to hold the nano, accelerometer, resistors and connectors for the display and battery.

There are 12 wires and 20 track breaks (15 of which are between the 2 sockets for the Arduino nano).

I plugged the nano into it's 2 connectors to set them correctly and positioned them on the board.

I soldered the corner pins first and checked everything was seated properly before soldering the rest of the connector pins.

I then soldered in the pins for the display and the socket for the accelerometer, I held both in place with blue tack as I soldered.

I then soldered in all the wires and the 2 resistors.

Finally I put in all of the track breaks.

Note that conventionally you should work from the lowest height components to the highest, the wires and resistors go in first and the sockets last.

I simply taped the board, battery and display to the kettlebell for my tests, not a great solution but this was only an experiment.

Step 2: Software:

I edited all the software and programmed the Arduino nano using the Arduino IDE.

The code was an exercise in reuse, most of the code is the Sparkfun Library demonstration code "SparkFun_ADXL345_Example.ino".

I simply added in some code for the counter and cut out a few bits that weren't doing anything.

The display writes are handled by the DigitLedDisplay library.

Experimentally I tried to get the code to work using the accelerometer interrupt instead of polling but had no success.

Note that there is a test option within the code file, if you uncomment the line //#define test the counter will be incremented on a double tap of the accelerometer rather than on freefall.

Step 3: Mixed Results:

After taping everything together I did a set of 10 swings resulting in a value of 20 on the counter. I tried again and had the same result.

I associated freefall with the drop phase of the kettlebell so in the first code I wrote I counted each freefall event, my subsequent thinking was that the top of the swing must also be a freefall event, so I modified my code to increment after every second time.

My first test after modifying the code worked successfully.

Subsequent tests had mixed results with the count under reporting the number of swings by various amounts.

I am guessing that my variations in swing technique are causing the missed counts.

My conclusion is that the freefall detection is not reliable enough to reliably count the swings of a kettlebell.

All the swings in my test were to the horizontal, not to overhead as some do with kettlebells.

Step 4: References:

Libraries used:

SparkFun_ADXL345_Arduino_Library https://github.com/sparkfun/SparkFun_ADXL345_Ardui...

DigitLedDisplay Version 1.1.0 https://github.com/ozhantr/DigitLedDisplay/

Both retrieved 29 June 2019.

Sensors Contest

This is an entry in the
Sensors Contest

Share

    Recommendations

    • Sensors Contest

      Sensors Contest
    • Planter Challenge

      Planter Challenge
    • Stone Concrete and Cement Contest

      Stone Concrete and Cement Contest

    Discussions

    0
    None
    Alex in NZ

    9 days ago

    Interesting use case! Thank you for sharing your work. It's always good to learn from someone else's experiences.