Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: I need electronics help. #hx711 #teensy3.2 #logic levels #noise #scopePics

  1. #1
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271

    I need electronics help. #hx711 #teensy3.2 #logic levels #noise #scopePics

    Hello all.
    I'm building the electronics for a Torsion bar dyno for a mate. It's a device that tests the load at various amounts of twist on a race car torsion bar.
    It is a Teensy 3.2, a load cell, and an encoder.
    I've used a cheap hx711 breakout board for a similar project successfully. (but using an arduino nano).

    A week ago while testing I found the load cell readings were very erratic, giving random readings posotive & negative and occasionally correct.
    It appeared to be a power supply or noise issue:

    -Running the HX711 board and the teensy off USB power and the readings would be fine. With HX711 at 10SPS or 80SPS
    -Running the board off 7805 power would work well at 10SPS but give random readings at 80SPS

    Testing my supplys on my scope, the usb looked terrible compared to my 7805... or even pololu regulator, which looks even better. (something else I don't understand).

    USB voltage is however sligtly lower than 5VDC.

    I have now got the teensy and HX711 board setup for testing running at 10SPS.
    With pics to follow, you will see that:
    -@ 5000mV max supply I get good looking serial data out of the hx711, load cell readings are stable. Logic 0 at 630mV?
    -@ 5040mV max supply I get slightly dodgy serial data out and load cell readings are starting to look noisy. Logic 0 is still offset.
    -@ 5120mV max supply the serial data (DOUT) is pretty much no good.
    Click image for larger version. 

Name:	496mV.jpg 
Views:	18 
Size:	148.5 KB 
ID:	20574
    Click image for larger version. 

Name:	504mv.jpg 
Views:	10 
Size:	151.5 KB 
ID:	20575
    Click image for larger version. 

Name:	512mv.jpg 
Views:	9 
Size:	153.2 KB 
ID:	20576

    I've reached the point where I don't want to spend allot of time solving the problem.. That is, I just have a feeling I'm going to go down the track of trying to fix this with my limited abilites..resistor deviders and zennor diodes or level shifters.. or separating hx711 analog and digital supplys, but I'm not confident I will succeed in a reasonable time.
    This project has exhausted me for various other issues.. Looks like one of my nextion displays may have a hardware fault, had to custom build a linear encoder from a rotary encoder/linear bearing/rail, after switching away from a straight rotary encoder setup.. to a potentiometer... back to an encoder..

    Anyay. I'm pretty sure I need a nice flat logic zero a bit closer to gnd than it currently is when the supply voltage approaches 5VDC. I would like to run my nice stable pololu reg that flat lines at 5.1VDC.

    Please help me understand what is going on here and how I would fix it.

  2. #2
    Senior Member
    Join Date
    Mar 2016
    Posts
    200
    Hmmm, have you looked at this thread? https://forum.pjrc.com/threads/47002...ighlight=HX711

  3. #3
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271
    No I had not.
    This sounds like a winner. Iíll test as soon as I can.
    I expect scope will show clock pulse is out of spec (less than 0.2uS as per datasheet.
    Thank you PhilB. Iíll post back later..
    Click image for larger version. 

Name:	51F2DDDB-69AD-424D-B570-2C00C33B1FCE.jpg 
Views:	8 
Size:	61.2 KB 
ID:	20577

  4. #4
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271
    Unfortunately this was not my issue. I'm using a version of the library where accommodation has already been made for speedy micro's like teensy. I'm getting a nice 3uS clock pulse.
    Hardware wise I have multiple of these breakouts that do the same thing. Teensy3.2 is connected directly to the hx711 breakout. Nothing fancy.
    I'm starting to consider I have a dodgy batch/clone hx711 if nobody sees this strange behaviour.

  5. #5
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    155
    Tried running the HX711 from +3.3v?

  6. #6
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271
    MatrixRat.. I hit refresh hoping nobody had replied... got my level converters in hand...
    It will run from anyware below 4.99VDC. The crazy logic 0 on my scope got me confused.
    A bit embarrassing. I looked at the scope again and noticed DOUT is staying low sometimes after my 25 clock pulses suggesting they are not all seen by the hx711.
    Click image for larger version. 

Name:	sckIssue.PNG 
Views:	7 
Size:	57.4 KB 
ID:	20580

    I'll try out my logic level converter on sck and report back.
    Thanks.

  7. #7
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271
    yep. level converion fixed this issue.
    Click image for larger version. 

Name:	fixed with level converters.jpg 
Views:	7 
Size:	160.7 KB 
ID:	20582
    However when I increase supply voltage to the hx711 I get increased noise as seen by the min/max serial print. You can see where it goes from +-.1 to +-.6.
    Click image for larger version. 

Name:	increase supply voltage, increase noise.jpg 
Views:	6 
Size:	162.2 KB 
ID:	20584
    I modified the breakout board to use my 5v for AVDD and disable the internal regulator. I also ran this one at 80SPS and I get very consistent results.
    The strange DOUT logic 0 offset is gone too.
    Click image for larger version. 

Name:	theBestHx711.jpg 
Views:	7 
Size:	140.3 KB 
ID:	20583

    Does anyone have a hx711 and a scope get the same results with their boards at anything above 5.120VDC Vp.

    Just to compare two HX711's in 80SPS mode here is modified breakout board running external 5VDC
    Click image for larger version. 

Name:	externalReg.PNG 
Views:	8 
Size:	43.9 KB 
ID:	20585
    and here is a non modified one using it's internal regulator but from the same supply:
    Click image for larger version. 

Name:	internal reg.PNG 
Views:	7 
Size:	35.5 KB 
ID:	20586
    This is only about 1% of the load cell but its relatively worse running from the internal regulator.
    Last edited by Gibbedy; 06-12-2020 at 02:54 PM.

  8. #8
    To test the load cell I would disconnect it and substitute resistors of the same value. If the noise continues, then it's in the HX711 circuit.

    Is the load cell a full bridge? Did you epoxy this onto the beam?

  9. #9
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    271
    Iíve made an assumption itís the hx711 because the modified breakout with the internal regulator disabled gave readings that vary less than another 2 that havenít been altered.

    I donít know about bridges. I made up a dummy load for my setup based on what I imagine is called a full bridge (4 resistors) but havenít checked it for this issue.

    Load cell is 1000kg s type 2mV/V. 350ohm input/output resistance.

    Perhaps my breakout boards have incorrect resistor values for transistor and 5v supply.
    I might look at this if I do more with these. Iím happy itís working well now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •