Software apps and online services
Hand tools and fabrication machines
As engaging in daily workout is good for our everyday fitness and wellness, so as its also worth being fun for us as well. that's one of my reasons for creating this project, Where you have to workout and at the same time have fun doing so. This project describes a simple design of a workout gear a "jump rope" which gives you a workout experience that has the potentials of helping you track your average calories burnt in a skip session and also have an opportunity to share your experience on a social media and even compete with your friends using the same jump rope. The jump rope simply counts the number of cycles and synchronizes the count to your Android mobile phone using Bluetooth Low energy (BLE 4.0) and calories burnt based on the count would be calculated and displayed on your Android phone. The diagram below explains the flow of operation of the project.
The first part of actualizing this project is building the BLE enabled jump rope what I call Skiptti. The simple idea is to have a sensor that can measure a complete cycle, and use each complete cycle to trigger a counter and have our BLE to transfer counts via Universal Asynchronous Receiver Transmitter (UART) Bluetooth Service to the android mobile phone already paired and connected to it.
Yes the idea is simple but it was also a difficult task to find what best could be used to sense a complete cycle to trigger a counter. So I tried rotary encoders "yes beautiful" rotary encoders like the ones in the diagram below looked like the best fit for this with the following advantages.
<Image title: encoders>
- The rotary encoder has a quadrature output which can be used to check for direction of rotation
- It has push button while it can rotate.
- And I guess more advantages I'm currently not aware of.
Despite the beautiful advantages I mentioned above, I discovered it might not just be the best. Why?, For a solution like this, it means the encoder would be subjected to a serious and fast mechanical movement (rotation) as the skipping goes on which would generate heat and also reduces the life span of the encoder due to mechanical wear and tear especially if this is to be served to the consumer market. So what was an alternative? I looked forward to something that could be more efficient and I discovered the Infineon 3D magnetic sensor, which has the ability to detect movement of magnetic field from a magnet. The sensor has the ability to output magnetic field in 3 dimension and hence can use this data for detecting magnetic field from a magnet moving in a linear and rotational motion and also for joystick kind of movement. Though it was difficult to understand how it works at first until I ordered for an evaluation board which has on onboard 3D magnetic sensor (TLE493D-A2B6) called The 3D Magnetic Sensor 2GO. Now with this sensor used for the jump rope design it has helped in:
- Eliminated the issue with heat generation and the wear and tear.
- Also detects backward or forward rotation of the jump rope's shaft
- Compact and simple to install
below is the arrangement of the Sensor 2GO and the magnet that came with it stuck on the rotating part of the jump rope
Having gotten the clear understanding of the requirement, the following components were used in realizing the design.
- The Infineon 3D magnetic 2GO evaluation board
- A Bluetooth Low Energy module Core51822
Like I said the critical part of the project was detecting a complete cycle from a rotating shaft, and the 3D magnetic sensor came to the rescue.
Detecting Rotation with the Magnetic Sensor
The evaluation board came with a software tool (Windows OS only) that helped in developing the code in detecting the rotation of magnets on a particular axis of rotation. I Installed the software and all I needed to do was just connect the evaluation board to the USB port selected the type of configuration and clicked start and voila! data everywhere!. The software implemented motion type visualizations such as joystick, graph, linear and rotation. Of these visualizations I found the graph most useful for me at least for the purpose of this project. The Image below shows how I got data to develop a naive rotation detection I finally used to program the evaluation board.
Using the above grave view and data I was able to coin a simple and naive way of detecting rotation. I simply rotated the magnet that came with the sensor 360 degrees. For each step of 90 degree of rotation, I observed the following as shown in the table below.
Note each coordinates are approximations, that means actual values were like 30 45, and 40. In order to reduce the complexity implementing the detection I further normalized the data to just represent Positive, Negative and zero. values that are between a particular range of positive to the negative are regarded as zero. while values greater than a chosen positive number is regarded as positive one and the one less than another number is considered as negative. In other words the code implementation as shown in the code section implemented 5 as the threshold number. any value greater than 5 is positive. Values between -5 and 5 are zero and values below -5 are regarded as negative. Hence the above table is re-written having the 50s replaced with + or -1.Programming the 3D Sensor
The magnetic Sensor was programmed to implement rotation detection using the data in the table from the previous section.
The 3D sensor evaluation board is Arduino compatible. To program the board with the Arduino IDE minimum of version 1.6 is required. To program the board this link provides a full detail of how to install the evaluation board on Arduino IDE and also the libraryThe Android Application
Creating an android application is an essential part of the project. The application scans for nearby Bluetooth devices and displayed them as a list. users can easily select the device that they wish to connect to. But not just any device. The app's logic only responds to Skiptti devices. the source code is available
. Here are some snapshots from the app
The Core51822 was programmed using nRF-DK 51 development board. The Mbed OS and its online compiler was used to write the code. The code is simply straight forward as it can be found in the code section below. To use the Mbed compiler simply signup as a developer create a project and use the code here in and paste in main.c and that's it choose your board and follow every other instruction to generate the hex file to program the BLE module. If you have NRF-51Dk here a connection you would use to program the core51822 BLE module.
Note any other programmer or can still be used for programming the module. for more info on how to program check here
The Mbed Interface Looks Like This:
In Constructing the jump rope, I planned to use my 3D printer to print a design I had, but I was still trying to get a hang of how to use the printer so I decided to get a plastic non-smart skipping rope and I did a tear down on it and rebuilt it, now with the 3D sensor.
Here is a video demonstration of me using the jump rope.
Also, here are images of it!