Introduction: ARDUINO STRENGTH QUANTIFIER

About: I love Electronics, Robotics, and Machines. I am a huge fan of Arduino and everything that comes with it. I am also aspiring to be a Biomedical Equipment Technician

A person’s max strength is typically recognized by how much that individual can lift or hold. When a person reaches max strength, meaning that they cannot lift anymore weight, their muscle will also reach max tension, meaning the muscle cannot flex further. This means that Max tension is equal to strength. Max tension can be written on a graph but has not been quantified with a specific number until now. The MUSCLE STRENGTH QUANTIFIER reads a virtual graph and uses a simple algebra equation to quantify a person’s muscle strength with simply one flex of the muscle. The user can take this information and decide how much they can stress a particular muscle without causing damage to their body.

Supplies

Arduino UNO

LCD Display (with LCD adaptor)

MyoWare Muscle Sensor

8 Wires

Laptop with Arduino IDE

Arduino UNO Case (you can build your own unique one as well)

Step 1: Circuit Time

Begin building the circuit by attaching the SDA and SCL pins on your LCD adaptor (make sure it is attached to the lcd display) to the the SDA and SCL pins (these pins are I2C interface pins) on the Arduino board. There are specific SDA and SCL pins on the Arduino, but if you choose, A5 and A4 are also SDA and SCL. Next, attach the power pin and ground pin on the adaptor to the power and ground pins on the Arduino. Third, attach the signal pin on your MyoWare muscle sensor to analog A1 pin and the power and ground pins to the power and ground pins on your Arduino. Refer to the diagram below. last step is to fit the whole circuit into your enclosure of choice.

LCD Adaptor – Arduino

SDA – SDA

SCL – SCL

5V – 5V

GND – GND

MyoWare – Arduino

Sig – A1

5V – 5V

GND – GND

Step 2: The Code

//This code is able to quantify STRENGTH as a value

// This code is able to display the STR value of a muscle on a screen

//Compatible with the Arduino IDE 1.0 //Library version:1.1 #include #include

//initialize integers int c; const int pushbutton = A1;

LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup() {

pinMode(pushbutton, OUTPUT);

lcd.init(); // initialize the lcd

lcd.init();

//display start up image

lcd.backlight();

lcd.setCursor(2,0);

lcd.print("NanoGen");

lcd.setCursor(4,1);

lcd.print("Technologies!");

delay(5000);

lcd.clear(); }

void loop()

{

//turn pushbutton pin out to low

analogWrite(pushbutton, LOW);

//set a value for c

c = analogRead(pushbutton);

//initialize str quantifying equation

int b = sqrt(pow(c,2)-pow(20,2));

//display top row image

lcd.setCursor(1,0);

lcd.print("STR QUANTIFIER");

delay(100);

//display MTH

if(pushbutton, HIGH) {lcd.clear(); }

lcd.setCursor(4,1);

lcd.print(b);

//display lower row image l

cd.setCursor(10,1);

lcd.print("STR:");

lcd.setCursor(0,1);

lcd.print("MTH:");

//display str value

if(b<100){

lcd.setCursor(14,1);

lcd.print(0);

} if(b >= 100){

if(b < 200){

lcd.setCursor(14,1);

lcd.print(1);

}

}

if(b >= 200){

if(b < 300){

lcd.setCursor(14,1);

lcd.print(2);

}

}

if(b >= 300){

if(b < 400){

lcd.setCursor(14,1);

lcd.print(3);

}

}

if(b >= 400){

if(b < 500){

lcd.setCursor(14,1);

lcd.print(4);

}

}

if(b >= 500){

if(b < 600){

lcd.setCursor(14,1);

lcd.print(5);

}

}

if(b >= 600){

if(b < 700){

lcd.setCursor(14,1);

lcd.print(6);

}

} if(b >= 700){ i

f(b < 800){

lcd.setCursor(14,1);

lcd.print(7);

}

}

if(b >= 800){

if(b < 900){

lcd.setCursor(14,1);

lcd.print(8);

}

}

if(b >= 900){

if(b < 1000){

lcd.setCursor(14,1);

lcd.print(9);

}

}

if(b >= 1000){

if(b < 1100){

lcd.setCursor(14,1);

lcd.print(10);

}

}

}

Step 3: How It Works

The first thing that happens is that the muscle sensor will pick up on the frequency and strength of each muscle twitch. This can be written onto a virtual graph which looks like the first image above.

The dotted orange line is the max threshold. The placement of that line will change depending on the user’s muscle strength. Next, the muscle sensor will send this information to the micro-controller (Arduino MEGA, Arduino UNO, Arduino NANO) in the form of an analog signal and then the micro-controller will read the values. Using the Pythagorean theorem, the micro-controller is able to tell the placement of the max threshold line on the graph. Refer to the second image. The equation is below.

Let’s say we are working with a bicep.

A = 20 (the length of time it takes to reach max threshold (this will vary with each muscle and will have to be adjusted depending on the muscle that is being studied))

B = ? (the height of the max threshold on the graph)

C = ? (the amount of electrical power it takes to flex the muscle to max threshold (this value is supplied by the muscle sensor))

Let’s say the sensor gave us 65 for the value of C

A = 20

B = ?

C = 65

B = √(C­)2 – (A)2 (sqrt(pow(C,2)-pow(A,2)))

B = √(65­)2 – (20)2 (sqrt(pow(65,2)-pow(20,2)))

B 61.85

Because the strength of a muscle is equal to its max threshold, the strength of the muscle in this example would be 61.85. The number is displayed on the LCD Display and can tell the user how much to push a muscle so as to not injure it. If the weight of an object is greater than the max threshold displayed, that muscle will not be able to lift the object. But if the weight of an object is less than or equal to the max threshold displayed, that muscle will be capable of lifting the object.