report - abluewish/387_Final-Individual- GitHub Wiki
Smart Treadmill
Zhuo Xu
Introduction:
Treadmill is usually used in gym to help people do running exercise. To help the gym owner to manage things in gym with lower cost, I design a smart treadmill that can be launched only by people with membership's fingerprint. Also, to let users know better about the performance they did in their exercise and what they should do in the future. The data from the treadmill can be transmitted to computers or laptops to do data processing.
Procedure
In this project, I use a DC motor to simulate the treadmill because motor is used in treadmill to control the user's running speed. Since the the output voltage of Arduino pin is not enough to make DC motor work, I have to use a transistor in the circuit as an amplifier. The circuit is shown in the next picture.
PS: When I used the transistor to amplify output voltage, I felt the transistor became very hot. This case also happened when I used amplifier in ECE 448 project. Considering safety reasons, I did not let the program run for a long time. This problem might can be solved by using a microprocessor that can supply larger than 5V voltage.
Also, a red led and a green led are used to indicate whether the fingerprint is valid. Two buttons are provided for the user to decide when they start and when they stop.
The Adafruit fingerprint sensor is one of crucial parts of this project. It is connected to Arduino with four pins. They are Vcc (+5V), GND (ground), pin 2 (TX), and pin 3 (RX).
After wiring the circuit, this project can go to the next section. In the next section, I focused more on how to collect the data from treadmill.
An software named processing is used to help me to record information about time and users' running status. The program I wrote with Processing can identify useful information and store in a csv file named "data.csv" which makes data much easier to be further processed by other programming language like Python. Given that users' running data are only printed as int in my previous program, in this program, what I need to do is to identify those numbers and get rid of some fingerprint sensor outputs.
The picture below shows a sample record in data.csv.
By using data from another database, I can use random forest to have several patterns for users' exercise. After training, I can plug in the users' in our gym's data to give a general analyses and suggestions. This part still has some problems because the database I found did not provide enough information.
Prototype:
###Cost(without a laptop):
- Arduino UNo -$15
- DC motor -$3
- 220 Ohm and 2k Ohm resistors -<$1
- two LEDs -<$1
- fingerprint sensor -$20
- total -<$40
Demo: