Signal Problem Joystick axis with Loadcell and HX711

Status
Not open for further replies.
Hello together,

i´m new to the forum and i hope to find a solution for a rather special problem.

Background:
I´m currently designing Pedals for use in Racing Simulations on PC.
The Brake Pedal uses a loadcell, amplified via a HX711.

I first started to wire up everything directly between the HX711 and the Teensy via jumper cables.
Everything worked fine.

I then used a breadboard for each component (Teensy and HX711) to have it more clear and to play around with it.
That was the first time i encountered a problem in the axis signal for my brake pedal.

In the diagram you can see in blue how the signal should be and in red how it looks unfortunately.

Sugnal-Problem.jpg

After that i tried again the "direct connected" way via jumper cables without the use of breadboards. Everything was fine again.

So based on that i thought, it would be best to design a breakout board where i can directly solder the teensy and the hx711 on.
This to make it a beautiful, directly connected solution.

Now with the breakout board i have the same problem as before (shown in the diagram).

The sketch on the teensy is as followed (even if it should be correct since it is working):


#include "HX711.h"

#define DOUT1 0
#define CLK1 1

HX711 scale1(DOUT1, CLK1);

float calibration_factor1 = 150; //Kalibriefaktor für Scale1 Bremskreislauf vorne

void setup() {

scale1.set_scale();
scale1.tare();

}

void loop() {

Joystick.Zrotate(scale1.get_units()); // Bremskreislauf vorne

delay(50);
}


The breakout board connections between teensy and hx711 is all fine.
The cable from the loadcell is connected to the breakout board with RJ45 Socket/Plug. This connection to the HX711 is also correct.

For GND i use a mass plane where the ground pins of the teensy and HX711 is connected to eachother.

Can anyone guess what the problem could be? Or maybe had a similar one?
Is there a component of some sort missing in between?
Can i somehow solve it in the sketch?

I´m really drivinbg crazy right now, and hope somebody could help.
Thanks a lot in advance!!

Cheers Dan
 
This may need a photo of your setup along with a schemetic. As a basic step you can look at the voltage out of the amp unit with a multimeter, and depending on your design use a variable resistor to apply a test voltage to the Teensy pin. My guess at the moment without seeing the hardware is that as your pedal comes down something shorts to supply or looses ground reference.
 
This may need a photo of your setup along with a schemetic. As a basic step you can look at the voltage out of the amp unit with a multimeter, and depending on your design use a variable resistor to apply a test voltage to the Teensy pin. My guess at the moment without seeing the hardware is that as your pedal comes down something shorts to supply or looses ground reference.

Hi,
Thank you very much for that first suggestion. I will try it and if the problem still occurs i would get a bit more in detail with pictures etc.

Cheers Daniel
 
Is the power up sequence different now that it is not direct connected? That is: is the load cell powered before or after when it was before - is the Teensy doing a cold or warm start different than it was?

If that were the case perhaps a delay(5000); in setup() like this would change behavior:
Code:
void setup() {
  [B]delay(5000);[/B]
  scale1.set_scale();
  scale1.tare();
}

5,000 is extreme - can be adjusted down if it shows signs of helping - but the Teensy maybe be up and running ( < 400 ms after power up ) before the load cell is ready for commands and the .scale() and .tare() are not computing properly. That could explain the unit working in loop() - but not returning expected values.
 
Is the power up sequence different now that it is not direct connected? That is: is the load cell powered before or after when it was before - is the Teensy doing a cold or warm start different than it was?

If that were the case perhaps a delay(5000); in setup() like this would change behavior:
Code:
void setup() {
  [B]delay(5000);[/B]
  scale1.set_scale();
  scale1.tare();
}

5,000 is extreme - can be adjusted down if it shows signs of helping - but the Teensy maybe be up and running ( < 400 ms after power up ) before the load cell is ready for commands and the .scale() and .tare() are not computing properly. That could explain the unit working in loop() - but not returning expected values.

Hi, very good suggestion, will try!! Thank you very much
 
Hi guys,

the suggestions from you above unfortunately didn´t solve the problem.
Therefore i will post some more information about the project.

In the pictures you can see the breakout board with the soldered components and without.

Unfortunately i choosed black so it´s a bit hard to see.
When i check the routing for connection with a multimeter everything is fine.
On the rear side you can see some jumper cables.
Reasons for them:
- one black is for getting VUSB (5V)
- one black is for a ground pin that was not connected to the ground plane (my fault)
- yellow is to get DOUT to a different pin on the Teensy because i originally accidently routed it to PIN13 (LED) on the Teensy.

IMG_20190312_061236.jpg

IMG_20190312_061302.jpg

IMG_20190312_061349.jpg

IMG_20190312_061357.jpg

IMG_20190312_061518.jpg

IMG_20190312_061538.jpg

The order from the loadcell is as followed:
Loadcell (4 wire) -> RJ45 plugs -> HX711 (E-, E+, A-, A+) -> DOUT, SCK, VCC, GND (via ground plane/jumper) to Teensy 3.2.

On the other picture you can see the routing as it "is" on the breakout board.

Schema.jpg

Hope this helps a bit...

Cheers Daniel
 
Found the HX711 at sFun - their part will run from 2.7V -- 5V. Would your load cell work if the HX711 you have would work and was run at 3.3V?

Not sure that would explain why it was working in one setup then not working if it was at 5V before - but if the signal coming back is 3.3V based you'd have more usable signal without it pegging at anything over 3.3V. Same with the throttle. Any chance the unshown working setup was running off of 3.3V?
 
Found the HX711 at sFun - their part will run from 2.7V -- 5V. Would your load cell work if the HX711 you have would work and was run at 3.3V?

Not sure that would explain why it was working in one setup then not working if it was at 5V before - but if the signal coming back is 3.3V based you'd have more usable signal without it pegging at anything over 3.3V. Same with the throttle. Any chance the unshown working setup was running off of 3.3V?

hmm...i always ran them with 5 Volts.

How do you mean exactly, i think it lacks in my basic understanding of useing 3,3 or 5Volts. Why exactly would 3.3V be better?

Anyway i will check if the loadcell also works with 3.3V.

Thank you!
 
Teensy 3.1/3.2 have 5V tolerant pins - but any voltage applied to read as analog at or over 3.3V will simply show as MAX value for the current analog resolution.

So any voltage over 3.3V will only be sensed as 1024 at 10 bits. I'm not sure if the load cell measure output is linear - but the OP drawing doesn't indicate this is the problem where the upper range over 3.3V would be expected to be full scale after output goes over 3.3/5 if so.
 
Teensy 3.1/3.2 have 5V tolerant pins - but any voltage applied to read as analog at or over 3.3V will simply show as MAX value for the current analog resolution.

So any voltage over 3.3V will only be sensed as 1024 at 10 bits. I'm not sure if the load cell measure output is linear - but the OP drawing doesn't indicate this is the problem where the upper range over 3.3V would be expected to be full scale after output goes over 3.3/5 if so.

Ok, i think i understood. Will try. Thank you very much!!
 
Status
Not open for further replies.
Back
Top