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

Thread: TeensyLoadcell Direct Loadcell Readout with T3.2

  1. #1
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    531

    TeensyLoadcell Direct Loadcell Readout with T3.2

    I did a small library to directly readout a standard load cell with T3.2s built in differential ADC/PGA. Works nicely if you don't plan to make a high precision balance :-)
    Here the link to the gitHub repo https://github.com/luni64/TeensyLoadcell and here a quick video demonstrating a simple balance:

    Youtube: https://youtu.be/ls3YLmw5UEo


  2. #2
    Senior Member
    Join Date
    Apr 2019
    Posts
    141
    what made you decide to do this rather than use a HX711 for example ?

  3. #3
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    531
    Well, why add an external ADC if the internal is good enough for the application? But most important, I need a much faster readout (1ms) than the HX711 provides (80ms). I also tested a LTC2053 (instrumentation amplifier) which works great but since I don't need the performance...

  4. #4
    Senior Member
    Join Date
    Apr 2019
    Posts
    141
    its neat to use a T3.2 for the ADC

    for more precision do you need a higher resolution ADC or a more stable voltage supply ?
    Last edited by Gadget999; 10-07-2019 at 07:39 PM.

  5. #5
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    531
    for more precision do you need a higher resolution ADC or a more stable voltage supply ?
    The main issue with using the built in PGA for load cells is its max gain of 64. The signal from a usual load cell after a 64x amplification is still too small to use the full input range of the ADC which limits the precision. As often, you can trade measurement precision by measurement speed. E.g. with a 5ms time constant of the exponential smoothing algorithm "setTau(0.005)" I ended up at about 10bit precision. If you increase the time constant you can improve that.

    Anyway, if you need high precision you are better off with an instrumentation amplifier (see linked data sheet with load cell example above) where you can adjust the gain to the input range of the ADC. Or, if speed is not an issue use the HX711 which does a nice but slow job.

  6. #6
    Senior Member
    Join Date
    Apr 2019
    Posts
    141
    how many load cells can you use with it at once ?

  7. #7
    Senior Member
    Join Date
    Apr 2019
    Posts
    141
    the hx711 can operate at a frequency of 80 HZ

    https://forum.arduino.cc/index.php?topic=620955.0


    that ends up giving you 24 bit resolution at 12.5 milliseconds which is pretty good imo

  8. #8
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    531
    The T3.2 has 2 ADC/PGAs. ADC0 uses the differential pin pair A10/A11 and ADC1 uses A12/A13. So, you can connect 2 load cells. TeensyLoadcell is able to use both in parallel (you pass the used adc module in the constructor). But to be honest, I only tested adc0 :-)

  9. #9
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    531
    the hx711 can operate at a frequency of 80 HZ
    https://forum.arduino.cc/index.php?topic=620955.0
    that ends up giving you 24 bit resolution at 12.5 milliseconds which is pretty good imo
    You are right, I remembered 80ms. And yes, the HX711 is a good device but too slow for my application... Just use it if you like it, nothing speaks against it.

  10. #10
    Senior Member
    Join Date
    Apr 2019
    Posts
    141
    Hi Lini,,

    I am liking what you have done with a T3.2

    I have a project where I want to read 4x Load cells

    could i use 8 x analogue pins to do this on a T3.2 ?

    if i use a normal analogue pin does this mean there is no amplification PGA ?

  11. #11
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    531
    No, the T3.2 only has two differential pairs and only these are connected to the PGA. You can not measure the load cell output voltage directly (they would be too small).

Posting Permissions

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