Introduction: The Right Rep

"Do you even lift Bro?"

For gym newbies, learning how to lift can be a daunting task. The exercises feel unnatural and each rep feels unsuccessful. To make matters worse, adding to the discomfort are onlookers painfully staring at your poor technique and scrawny arms.

If this sorry scene looks like you, then the Right Rep biosensor is for you! For big brained gym newbies looking to get big boy arms, the Right Rep biosensor helps insure that you get the right rep every time. This biosensor counts bicep repetitions and indicates if you are working hard enough and using a full range of motion. With Right Rep you'll learn to rep right.

Step 1: Materials and Tools

Following is a list the Materials and Tools for this Project:

Materials

  1. Arduino Uno MicroProcessor ($23.00)
  2. Half-sized Bread Board (4 pack - $5.99)
  3. 16 Segment LCD Display (2 pack - $6.49)
  4. BITalino EMG Sensor ($27.00)
  5. 1 x 3 Lead Accessory ($21.47)
  6. Sensor Cable ($10.87)
  7. 3 Pre-gelled 3M Disposable Electrodes (50 pack - $20.75)
  8. 4 220 Ohm Resistor (100 pack - $6.28)
  9. 1 10K Ohm Resistor (100 pack - $5.99)
  10. 1 Potentiometer (10 pack - $9.99)
  11. Connecting Wires (120 pack - $6.98, includes M/F, M/M, and F/F)
  12. 9V Battery (4 pack - $13.98)
  13. 2 Paper clips (100 pack - $2.90)
  14. Scotch Mounting Putty ($1.20)
  15. Wearable sleeve (bought compression sleeve or you can cut a sleeve from an old shirt)

Total: $162.89 (This is simply the total of prices above. The price per unit for each component should be much less)

Tools

  1. Computer with Arduino Coding Capabilities

Step 2: Preparation & Background

Before you begin wiring your Right Rep circuit, it's important to take time to learn about action potentials and some basic circuitry. Skeletal muscles have two fundamental properties, they are excitable and contractable. Excitable meaning they respond to stimulus and contractable meaning they are able to produce tension. Each time you lift a weight, muscle fibers are excited due to small voltages across the muscle called action potentials. The Right Rep monitors these action potentials using an electromyogram sensor (EMG) to ensure your muscles are working at full capacity. More information on EMG sensors can be found here.

Experience in wiring electrical circuits should suffice for the scope of this intractable. To make the Right Rep biosensor, you will need to wire up a few devices to the circuit. The main devices are the Arduino Uno microprocessor, 16 segment Liquid Cristal Display (LCD), BITalino EMG sensor and homemade goniometer.

The Arduino Uno microprocessor is a computer that functions as the "brains" of the system. The LCD uses a 16 segment display to indicate reps. The EMG sensor measures the action potentials as stated above. Lastly, the homemade goniometer uses a rotary potentiometer to measure a full range of motion. It does this by measuring a the variable output voltage given by the changing potentiometer resistance.

After the system is built, it must be provided with code. This project uses Arduino code. Before starting this project you should familiarize yourself with the LCD library and other useful Arduno Code found here. The code we used for this project is located on GitHub. The code and be downloaded and used for your own project at anytime.

Step 3: Safety

Warning!

The Right Rep biosensor is not a medical device and should not be used as a substitute for medical instrumentation. Please consult your doctor about exercising and lifting heavy weights before using the Right Rep biosensor.

Right Rep is an electrical device that has to potential for electric shock. Therefore, to ensure that the Right Rep is safe for everyone, the following safety precautions should be implemented.

Here are some electrical safety tips to follow:

  • Power should be disconnected when modifying circuits.
  • Do not modify circuits with wet or broken skin
  • Keep all fluids and other conductive materials away from the circuit
  • Do not use electrical devices during thunderstorms or in other cases where power surges have a higher incidence rate than normal.
  • This system uses a EMG sensor and Electrode pads. Please ensure you follow the proper electrode placement and safety guidelines found here.
  • Connect all components to ground. This ensures there is no leakage current that can come from the device into you.

Electricity is dangerous, following these safety precautions ensure that your intructable experience will be enjoyable and free from danger.

Step 4: Hints & Tips:

Biosensors can be fickle things, one second things work, the next second things fail miserably. The following are some hints and tips to to get your Right Rep sensor running smoothly.

Troubleshooting:

  • If the LCD is counting reps when contraction is not taking place, make sure electrodes are tightly secured to the subject using tape. This reduces unwanted motion artifact. If the former still does not work, consider modifying the EMG threshold in the Arduino Code.
  • The range of motion varies between each user. This may cause a rep at a full range of motion to not be counted. To account for variability, adjust the goniometer threshold to account for this change.
  • LCD to dim? Try turning the brightness up by changing the resistance on "Vo" pin. Or test this example to make sure its working properly.
  • If the Arduino is loosing power, check to see if the 9V battery is dead.
  • If all else fails, ensure that all wires are connected properly and securely.

Tips:

  • It can be easy to lose track of where wires go in a circuit. A helpful tip would be to to establish a color scheme and be consistent throughout your project. For example, using a red wire for positive voltage and using black wire for ground.
  • Lifting is for your personal health don't let the opinions of others affect your workout!

Step 5: Making a Homemade Goniometer

To make a Homemade Goniometer you need to acquire Scotch mounting putty, a rotary potentiometer, and 2 paper clips.

Step 6: Putting It All Together

To create the goniometer straighten out two paper clips. Next, wrap the dial of the potentiometer with mounting putty. Taking one of the straightened paper clips, insert it into the mounting putty. This will be the variable goniometer leg that moves with the forearm. For the reference leg affix a paper clip to the base of the potentiometer by using mounting putty. This leg will be fixed parallel to the bicep.

Step 7: Getting Started

To construct the circuitry, begin by wiring power and ground from the Arduino Uno to the proto-board.

Step 8: Adding EMG and Goniometer

Wire each both the EMG and goniometer to power, ground, and an analog pin. For the diagram above, the small sensor on the left represents the EMG and the potentiometer represents the goniometer. Take note which pin each sensor is in, we have the EMG in A0 and the goniometer in A1.

Step 9: Adding LED Outputs

Wire two LEDs to ground and a digital pin. One LED indicates when a rep is completed and the other LED indicates when a set in completed. Take note of the digital pin each LED is in for the coding portion. We have one LED going to pin 8 and the other going to pin 9. Each LED should be wired to ground using a 220Ohm resistor.

Step 10: Adding a Digital Display Output

To add the digital display, carefully follow the wiring provided above. A resistor divider runs through the third pin from the left. A 10K Ohm resistor runs from power too said pin and a 220Ohm resistor runs from the same pin to ground.

Step 11: Adding a Button

Place a button on the photo-board as shown in the picture above. Supply the button with power and ground it using a 220 Ohm resister. Run the output of the button into a digital pin (we used pin 7).

Step 12: Fitting the Goniometer and Wire Attachments

Once the construction of the goniometer is complete, you are ready to attach the goniometer to the compression sleeve. This is done by weaving the straightened paper clips into the compression sleeve. For the variable leg of the goniometer, attached to the potentiometer dial, weave the paper clip parallel to the forearm. Similarly, for the reference leg, connected to the base of the potentiometer, weave the paper clip parallel to the bicep.

Next, to wire the goniometer into your circuit use 9 female to male jumper wires. The two pronged sides of the potentiometer is connected to power and ground. The single pronged side of the potentiometer is connected to analog input A1.

Step 13: EMG Electrode Placement

To integrate the BITalino EMG sensor to the Arduino, the first step is the proper placement of electrodes. 3 electrode pads will be needed. Two electrodes are placed along the belly of the bicep muscle and one is placed on the elbow bone. To wire theses electrodes to the Bitalino are red, white, and black leads. The white lead is attached to electrode on the elbow. The red and black leads are attached to the electrodes on the belly of the bicep muscle. Note: the red lead is connected higher on the bicep and the black lead is connected lower on the bicep. Lastly, to connect the EMG sensor to the Arduino connect the red and black wires to power and ground. The purple wire should go into analog pin A0.

Step 14: Coding Right Rep Biosensor

Now that the circuit is complete, it is ready for code to be uploaded. The attached code is the full code used to complete this project. The picture above as a sample of what the code should look like once opened. When the code is working properly, the following will occur:

1. The EMG and goniometer signals are read using the analogRead() function.

2. Using an if() statement, the program checks if the EMG and goniometer signals are greater than their respective thresholds. If both signals are greater, then a rep is added to the LCD display and the green LED turns on indicating a rep was completed. If either signals fail to meet their threshold, the LED turns off and no rep is counted.

3. The signal send in data point fast so there is a line of code that checks how much time has pasted between reps. If half a second has pasted since the previous rep, it will count a new rep so long as the EMG and goniometer thresholds are met.

4. Next, the code checks if the number of reps completed is greater than or equal to the number of reps per set (we set this value at 10 reps per set). If the rep count is greater than or equal to this value, the blue LED turns on indicating the set has been completed.

5. Finally, the code check if the button is being pressed. If the button is being pressed the rep count is set back to 0 and the LCD display is updated accordingly.

To access this code in GitHub, click HERE!

Step 15: RIGHT REP EAGLE SCHEMATIC

Here is an eagle schematic of the same circuit build in the steps above. All the components, aside from the LCD display, are straight forward to wire. A reminder for the LCD display: carefully follow the wires shown in the diagram. While the digital pins each wire goes to isn't fixed, we recommend using the configuration we used for simplicity. If the pins aren't matched with the wire specified in the code, the program will not run correctly. You may need to double or triple check all is where it should be.

Step 16: FURTHER IDEAS

An idea we have to further the software is to added different phases to the display. These phrases would be dependent on the data coming into the program. For example, once the rep count is one or two reps away from the end of the set, the LCD display could read "Almost done" or "Just a few more!". Another example could be time dependent messages. If dt doesn't reach the min time between reps, the display could read, "slow down".

Another software idea could be a self-calibration feature. Instead of needing to check the serial monitor to find an appropriate threshold, the code could find it for you. The level of coding require for this is simply beyond our current knowledge which is why it is only a further idea.

An upgrade for the hardware could be using a potentiometer for the LCD display instead of a resistor divider. The pin which the resistor divider runs through control the brightness of the text on the display. Using a potentiometer would allow the user to dim the brightness with a dial rather then having a fixed brightness level.