Fonte-assit is a connected object allowing you to assist and analyze your workout. More precisely, it allows you to retrieve a lot of information during your exercise but also throughout your progress and this from a small connected disk that is added to your sports bar. Look at this !
You can become your own coach thanks to a single accessory. A connected object that will assist you during your workout and will allow you a complete analysis of your performance and statistics. These statistics are on the one hand available directly from the LCD screen and joystick on the connected disk, and on the other hand from a WEB server. Thus the real time data of your sport session such as the number of repetitions, series or time are available on disk and the global performance data on the WEB.
To create this object we had to develop a program to analyze the movements of a user while he performs his exercise. To do this we used different sensors and components. An accelerometer that after processing can determine if the user is performing repetitions. A joystick, some LED, a buzzer and an LCD screen to navigate through an integrative menu but also to adjust and visualize your workout during your exercise.
A synthesis of the data such as the characteristics chosen by the user (type of exercise or execution mode) but also the performances performed at the end of the exercise are transmitted to the TTN network throught the LoRa antenna integrated on one of the cards. Then these information are recovered and processed on a dashboard.
In the following parts you will find the physical design of the object then its treatment in programming and finally its networking.
Conception
- Electronic part
the electronic part will ensure the electrical connection between a set of electronic components, in order to set up a complex electronic circuit. Here we used Kicad a free software to realize the electronic schematic of the board as well as its routing in order to print the circuit to solder the components.
It is necessary to know that each component has its utility and must be rigorously connected. Here are the details of the use of each of our components in this project:
- Arduino Leonardo :
An electronic board for rapid prototyping to which sensors (inputs) and actuators (outputs) can be connected. The brain that hosts our menu programme.
- LCD screen :
Display useful data. Output device. Without an I2C module, a potentiometer and a more complicated connection must be used.
- Joystick
A joystick is an input device. A press button is also available.
- Accelerometer
Used to measure the linear non-gravitational acceleration of the latter. Input device.
- Arduino The Things Network
Works like the classic arduino leonardo except that it has a LoRa module to communicate on the network. Many ports are therefore unusable because they are used by the LoRa chip.
- Buzzer ; LED
send a selected frequency song or switch a light when you want. output peripherals work with the high/low setting.
Here is how each component is connected to its respective arduino board :
We have also anticipated the use of other ports on each arduino such as additional ground, digital/analogue ports or power supplies.
The Kicad software then allows you to route the board (draw the copper tracks for printing).
Consideration of the size of the object. In our case a circular disk with a radius of 9 cm and an opening for the sports bar with a radius of 2.55 cm.
The track size is also important (0.6 mm) so that you don't have to start over and are sure of the quality of the connections (5V). Here the tracks are on the same side because the creation of the map is done in chemistry.
The ground plan is essential here. It allows firstly to reduce considerably the number of tracks because each mass of each component is directly connected to the disk. Secondly the two arduino boards will share the same ground and therefore can be used in parallel during TX/RX communication for example.
Then for soldering simply drill out the copper pads and add connection PIN header 2, 54mm (angled or not so that the components are all in the same direction).
So every component is connected and ready to use. In addition, there are no cables, which makes it easy to run a battery of tests for the programming part.
- 3d modelling
To make the prototype more robust and practical for use in demonstrations. We have modelled two discs that will enclose the electronic card and give the final appearance of the connected weight.
The laser cutting will allow to obtain the different notches for the screen, the joystick, the buzzer but also to adapt to the official sport bars.
The fastener notches are present on each of the plexiglass parts and on the electronic board so that the whole is aligned. We have to use itorange screw (screws on the riser) to make room for the components.
Programming treatmenthttps://github.com/whozghiar/projetIoT
In our development, we have separated the functionality of the program into different files in order to modulate our code and make it more easily debuggable.
Also, it should be noted that due to lack of pins, we had to place the accelerometer on The Things Uno card. Therefore, this card had to send data in RX_TX and wait in return to send data in LoRa.
NetworkingThe information sent back by The Things Uno card is then sent to The Things Network platform through the LoRa Network.
Once on this platform, the data will transit to an MQTT server (Mosquitto). We will also process this data through a Node-RED server which, thanks to a processing, will allow us to display on an interface, several charts presenting the results of the session, in particular by comparing them with the previous sessions.
Difficulty encounteredOne of the first difficulties we encountered was to find an ideal size of electronic board to support all our components.
The second difficulty was related to the RX-TX communication. In addition to the fact that it is sometimes unstable, we had to find the ports not used by LoRa communication on The Things Uno card. The most complicated was to receive a particular type of data.
In the end, we found a way to communicate efficiently and receive the initial data without being altered. By adding in the instruction "mySerial.write(data[x] & 0xFF)" the "0xFF".
The data[x] & 0xFF ensures that only the 8 least significant bits of data[x] can be non-zero.
if data[x] is already an unsigned type that has only 8 bits (e.g., char
in some cases, or unsigned char
in most) it won't make any difference/is completely unnecessary.
If data[x] is a type that's signed or has more than 8 bits (e.g., short
, int
, long
), and any of the bits except the 8 least significant is set, then there will be a difference (i.e., it'll zero those upper bits before or
ing with the other variable, so this operand of the or
affects only the 8 least significant bits of the result).
In terms of axes of improvement,
First of all, we could have done a more advanced development, in which the user could have indicated his weight / height and the proposed exercises would have been personalized.
Thus, we would have added a database in order to store this information. By using PHP & HTML the user could have more interaction with the dashboard.
ConclusionThis project was an opportunity for us to use a large number of skills and technologies around IOT. We were able to identify a need and find a functional prototyping solution. Collaborative work in pairs allowed us to reach our objectives in the time allotted but also to share our knowledge. The search for a solution and the various test phases also allowed us to increase our knowledge but also to envisage the use of other more appropriate technologies such as Bluetooth or an altitude sensor for the repetitions. This project was a very good introduction to the different phases of product creation and to the entrepreneurial spirit.
Comments
Please log in or sign up to comment.