4 Strain Gauges Coding Problem

So here’s a small summary of my not so big advancements on my project I’ve chosen to use 4 strain to gauges to try and replace the remote of a electric skateboard to control its speed.

I’m a complete begginer in high school so excuse my knowledge in coding

so I’ll give you guys a rundown on how these strain gauges should work:
-once it detects the weight of the force the moteur should start up
-once the front of the skate detects 60% more than actual weight detected it would accelerate.
-once the back of the skate detects 40% more than the actual weight detected it would deaccelerate.

*two strange gauges in the back and two in the front

*I’m using a HX711 and an Arduino Nano

*I’m trying to modify the RazorX Electric Skateboard

  • I added an image on how I connected my HX711, Arduino Nano and 4 Strain Gauges

so this is my code I haven’t gone far yet since I’m uncertain if i can program 1 set of 2 strain gauges seperately.

int Pressure_Pin1 = A0;
int Pressure_Pin2 = A1;
int force1; // force detected on the front
int force2; // force detected on the back
int motor = D3;

void setup()
{

pinMode(moteur,OUTPUT);
serial.begin(9600);
}
voidloop()
{
force1 = analogRead(Pressure_Pin1);
force2 = analogRead(Pressure_Pin2);

Serial.println(force);

motor =map(force1, 0, 1023, 0, 255);
analogWrite(force1,motor);

motor =map(force2, 0, 1023, 0, 255);
analogWrite(force2,motor);

delay(100);
}

looking at your diagram, I see you are under the assumption that each of your 4 strain gauges is 350 Ohms. Have you selected and measured them to be sure of that? If not, how are you making sure the unloaded strain gauges are all the same resistance?

Using the bridge like you diagrammed, how will you know which one of the 4 has changed in value?

Paul

Student1999:
so I'll give you guys a rundown on how these strain gauges should work:
-once it detects the weight of the force the moteur should start up
-once the front of the skate detects 60% more than actual weight detected it would accelerate.
-once the back of the skate detects 40% more than the actual weight detected it would deaccelerate.

So exactly how is a rider supposed to increase their weight by 40-60% more than the strain gauge can detect?
Trying to figure out strain values on a skateboard in motion is beyond my patience.

Now if you were to instal a fore and aft load cell that the rider would put pressure on as they stood on the board, that seems pretty easy to figure out a control equation.

You need to find a code library and documentation/datasheet for the HX711, and do some more research on load cells.

There’s quite a bit of information out there, this will tell you more about using that particular device and how to interface/read it, how load cells work, and how they are configured, used and measured.

If C/C++ is new to you, looking for some tutorials on the basics will also be of immense help.

Paul_KD7HB:
looking at your diagram, I see you are under the assumption that each of your 4 strain gauges is 350 Ohms. Have you selected and measured them to be sure of that? If not, how are you making sure the unloaded strain gauges are all the same resistance?

Using the bridge like you diagrammed, how will you know which one of the 4 has changed in value?

Paul

The 4 strain gauges are 350 ohms already selected and measured.

I would place the 2 of the 4 strain gauges on each side underneath the metal shaft things that attach the wheels to the board that would allow it to get different values or I was thinking of implementing it in th wood of the board then covering it up with something silicon

Slumpert:
So exactly how is a rider supposed to increase their weight by 40-60% more than the strain gauge can detect?
Trying to figure out strain values on a skateboard in motion is beyond my patience.

Now if you were to instal a fore and aft load cell that the rider would put pressure on as they stood on the board, that seems pretty easy to figure out a control equation.

What are fore and aft load cells I can't seem to find them on google or if I did I may not have understood what it actually is. Could you explain these to me more or send me links?