Connecting the ADS1256 and Teensy Microcontroller for Precision Voltage Measurements

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024

Комментарии • 54

  • @tommygadget2182
    @tommygadget2182 3 года назад +2

    Thank you for your code. I got this module from a Chinese vendor. My board is very "drifty". I used a 7.5 digit calibrated Keithley 2001 as the reference. With only 8 degrees Fahrenheit room temperature variation, I got .04% voltage fluctuation. Since the board is SO cheap, I suspect that the "ADR03B" may really be a cheap vref chip. Placing my finger on the ADR03B's plastic body caused large voltage reading fluctuations. Anyway, lots of bang for the buck, but without a reliable vref chip it's strictly hobby grade. Thanks so much for the video. It saved me so much time!

    • @MattBilsky
      @MattBilsky  3 года назад +2

      You're only as good as your weakest link. 7.5 digits is a lot. I use a better reference in this video: ruclips.net/video/w7FGcib9KA4/видео.html

    • @tommygadget2182
      @tommygadget2182 3 года назад +2

      @@MattBilsky Yes, I see you took more samples and averaged them. I took this a bit further and added zero and span calibration constants for each gain value to your code. I lowered the bit rate for a higher ENOB and averaged 200-500 samples to minimize the effects of noise in the measurements. When I get the time, I will replace the voltage reference and buffer chips with genuine Analog Devices parts to see if I get any further improvement. Best regards, TomG.

  • @arnold5328
    @arnold5328 5 лет назад +2

    I actually got it to work with the arduino mega after some hassle:
    -Include the digitalWriteFast library and connect DataReady to Pin 2,
    -Edit line 13 in ads_1256_stuff to "attachInterrupt(0, DRDY_Interuppt, LOW);"
    (Pin2 is interrupt 0 on the mega, very confusing for a newbie).
    -I used Pin 10 for cs and 9 for reset.
    Thank you Matt :-)

    • @MattBilsky
      @MattBilsky  5 лет назад +1

      Great work! I'm glad it worked out for you!
      For those trying to use the library with the UNO, follow Arnold's lead and look up what pins are which for the interrupt in the documentation

    • @margmaga9296
      @margmaga9296 5 лет назад +1

      Arnold, thank you for this comment! It's always easier to try when you know the thing is possible. I hope I will make it work with Arduino UNO :)

  • @fakhrirahadian8640
    @fakhrirahadian8640 6 лет назад +2

    Thanks! such a massive help for my thesis

  • @Mircea007
    @Mircea007 3 года назад

    Hi,
    Can you please explain at minute 11:45 how did you connected channel 0 and 1 to the 25 mV input signal? positive wire to channel 0 and negative / ground wire to channel 1?

  • @nikolavasovic
    @nikolavasovic 3 года назад +1

    Great job, thanks!

  • @ПетрПетров-ь3р
    @ПетрПетров-ь3р 2 года назад

    Hi Matt. i am planning use High-Precision AD/DA Board for audio AD processing. what do you think about it? any advice?

  • @hua-shanwu2530
    @hua-shanwu2530 4 года назад

    Hello Matt! I wonder if "Write to Register 0x0 failed!" showed in 12:26 means any errors or bugs in the "STATUS" setting.
    Did ADS1256 still work for measuring analog voltage when "Write to Register 0x0 failed!" was showed.

    • @MattBilsky
      @MattBilsky  3 года назад

      Check your wiring. If you can't read or write registers, you're likely not online

  • @georgederleres8489
    @georgederleres8489 3 года назад

    Hello, nice tutorial. However, could you explain the point of the interrupt function? Why not just poll the digital pin attached to DRDY?

    • @MattBilsky
      @MattBilsky  3 года назад

      Interrupts stop the moment something happens. Like if your code was busy in a loop, it would interrupt and read the data

    • @georgederleres8489
      @georgederleres8489 3 года назад

      @@MattBilsky Agreed. But since in your code you wait for DRDY, before transfering data through SPI, what is the point of creating an interrupt instead of just checking the pin DRDY, which is altered in a hardwaric manner

    • @MattBilsky
      @MattBilsky  3 года назад +1

      @@georgederleres8489 Either way would work (it's been a few years since I last looked at the code). I based my code off of existing code bases for ADS chips

  • @meenakshimaurya7949
    @meenakshimaurya7949 5 лет назад

    can interrupt is generated by the external hardware device(switch) ?

  • @sanya87video
    @sanya87video 6 лет назад +1

    Excellent video and library! Thank you!
    30 ksps is transmitted perfectly!
    Can I connect two identical ADCs (ADS1256), and synchronously receive data at a frequency of 30 ksps?
    How to connect correctly? And what changes make in the code?
    Board - Teensy 3.5
    Sorry for my bad English )

    • @MattBilsky
      @MattBilsky  6 лет назад +1

      Hello, I've been thinking about this for some research applications where it may be beneficial to have multiple ADCs running at full speed. Connecting multiple ADS1256s is very doable. Each one would be connected to the common SPI lines and have its own CS pin and DRDY pin with interrupt. You can then just create 2 versions of the functions in the libraries changing the CS pin (and also the DRDY pin setting the interrupt pin to also run on the second one). The thing I am unsure of is receiving data "synchronously." At the end of the day, you will need to receive the value from one ADC then the next. But what you can do is the following (reference: e2e.ti.com/support/data_converters/precision_data_converters/f/73/t/373631?ADS1256-synchronization-and-multiplexing-in-a-parallel-system):
      Send over the sync and wake-up commands with the CS pins for both ADCs pulled low. Then read the data from one then the next. They should be synchronized. In this case you can likely forego the DRDY interrupt on the second one and basically read one ADS value in then the next as sequential commands.
      I also had a quick thought, the Teensy 3.5 & 3.6 have 3 SPI ports. You may be able to open them both at the same time and alternate sending commands (one to each ADS on each bus) which could possibly speed up retrieving data by minimizing delays. But if they are synced the readings should occur at the same time regardless.
      I have a lot on my plate right now with other projects so will not be able to experiment with this myself for a while but please let me know how it works!

  • @TheRESMAT
    @TheRESMAT 5 лет назад

    Measure force ? Strain with strain gages?

  • @pawbre0028
    @pawbre0028 4 года назад

    Hi Matt,
    You're doing great job and it helps much. However i have a question about signal input into ADS1256. I want to measure with it a voltage drop across HV circuit breaker contacts using a differencial meaure across AIN0 and AIN1. However the power supply that's runs 100A across contacts probably will give around 5-10V into the main current circuit. Will ADS1256 survive that kind of voltage with buffer on? The buffer gives around 80MOhm addicional input inpedance however the datasheet says that max input voltage can be about Vref. How you think? Thanks

    • @MattBilsky
      @MattBilsky  4 года назад

      That sounds way too high. You need an amplifier with a much lower gain than the one in the ads1256. There are other ics that are designed for voltages that high or you can create an analog front end with some op amps to knock it down

  • @jaebumhong6335
    @jaebumhong6335 4 года назад

    Thanks!!
    how can i use 8 channel?

  • @thusithasamanbandara5222
    @thusithasamanbandara5222 3 года назад

    This is a well-explained nice tutorial, thank you!
    I would like to use this for my research work on spectrometers.
    With your code, can we use this ADC1256 device with Teensy 4.1 as its pins are similar to the defined pin diagram of 3.1?

    • @MattBilsky
      @MattBilsky  3 года назад

      Thanks. I haven't tried it but go for it and feel free to share the results

    • @thusithasamanbandara5222
      @thusithasamanbandara5222 3 года назад

      @@MattBilsky Thank you for your reply, I will try and share the results

    • @theodoreburns1330
      @theodoreburns1330 Год назад

      @@thusithasamanbandara5222 Did it work?

  • @integratedbio
    @integratedbio 4 года назад

    Have you measured a static load over time? I've been working with the HX711 and it would slowly drift upwards each day under same load. I'm moving to this ADC to see if the signal can be improved and the drift minimized for 60 days worth of measuring.

    • @MattBilsky
      @MattBilsky  4 года назад

      I haven't done any long term measurements where I ran it for days. But I've setup machines where I calibrated once and continued to used it as is and didn't notice too much drift. Curious to hear how you make out

    • @integratedbio
      @integratedbio 4 года назад

      @@MattBilsky understood. Needed an additional channel anyways so I am moving forward with the ADS1256 and will likely run it as a fraction of its sampling capacity.
      ....someday when it arrives....
      Anyways, there is much prep to do before then and your videos give me the confidence to move forward securing the hardware.
      One confirmation you may be able to help me out with is that the SPI 3.3V out? I'm running this with a Arduino Nano 33 Iot and the schematics are kind of rough, but seem to indicate a 3.3V DVDD for digital logic?
      My understanding is to feed the module a stable 5V and it will stabilize further for AVDD and power 3.3v DVDD?

  • @samshurp4518
    @samshurp4518 3 года назад

    Hey Matt, i plan on buying teensy and an adc module. I want to know how possible is it to measure voltage of a sine wave that has a frequency of 400Khz. Does teensy even have a capability of a sampling rate of 4Msamples per seconds? Or is it enough to buy an adc module with a sampling rate of 4Msample per second?

    • @tommygadget2182
      @tommygadget2182 3 года назад

      This module is capable of 30Khz max sample rate. As such, it is not suitable for your application.

  • @martinlarranaga5474
    @martinlarranaga5474 5 лет назад

    Thanks a lot for the video! I want to use Arduino Uno with ADS1256. My objective is to use the 8 channels simultaneously, connecting using the clock, MISO, and MOSI and each channel to different IO of the arduino, that will work as a CS. My goal is to read 8 different sensors connected to the same ADC at 15KSPS. I wonder if you already manage to do so or you think that arduino is not powerfull enogth to read 8 channels at 15 KSPS.
    In addition I wonder if you already have experience with SPI bus distances. If you have any extimated idea of how far the adc can be from the Arduino in order to read data without error.

  • @martinvollderpro
    @martinvollderpro 4 года назад

    good video

  • @anuragmahajan177
    @anuragmahajan177 6 лет назад

    Okay, Thanks for uploading this video. This clears lots of my doubt.
    I have only one question. Is it possible to read all the eight channels at once with the same sample rate with your modified library?
    This video tutorial seems to be explained for single channel at different sampling rate.
    I want to read all the eight channels in single ended measurement with fix sampling rate minimum 100 and max 500 SPS and other ADS with some channels in single ended mode and some channels in differential mode with fix sampling rate.

    • @MattBilsky
      @MattBilsky  6 лет назад

      Hello! I discuss the cycling throughput for differential measurements around minute 10:54. As for single vs double ended speeds I haven't tested it myself but I would estimate that you take the frequencies listed in the datasheet (Table 14) and divide them by 2 to get the 8 channel cycle time

  • @user-mu1tc2ls6e
    @user-mu1tc2ls6e 5 лет назад

    Hello Matt i now figurit out that i can boot up ADS1256 but now i have problem with reading value from -5V to 5 V sinus wave. is this even possible to measure with this chip

  • @user-mu1tc2ls6e
    @user-mu1tc2ls6e 6 лет назад

    Hello i have one question will this code work for Arduino Mega2560 also or not?

    • @MattBilsky
      @MattBilsky  6 лет назад

      Hi Matej, I have not tried to use my code with the MEGA2560 but it should work (with a couple of tweaks). I believe you need to manually add the digitalreadfast and digitalwritefast libraries to the arduino IDE when using a mega (rather than a teensy). You will also need to make sure you have the correct SDA/SCL, pins (and the others as well). Please let me know if you try it and it works.

    • @user-mu1tc2ls6e
      @user-mu1tc2ls6e 6 лет назад

      @@MattBilsky so this is easy change just replace line with digitalreadfast with arduino code for same foncution

    • @MattBilsky
      @MattBilsky  6 лет назад

      @@user-mu1tc2ls6e That's the primary thing I can think of off-hand. Please let me know if it works!

    • @user-mu1tc2ls6e
      @user-mu1tc2ls6e 6 лет назад

      i have librarie from watterot
      it's ok ???

    • @user-mu1tc2ls6e
      @user-mu1tc2ls6e 6 лет назад

      and what do i need to connect NC and PDWN pin

  • @joses8076
    @joses8076 6 лет назад

    Can you subtitle your video? Please, I am not very good with the English language, and this is a very good video

    • @MattBilsky
      @MattBilsky  6 лет назад

      Hi Jose! I unfortunately do not have the time right now to transcribe the audio myself. I have used the service speechpad.com for other videos in the past. They charge $1.50 per minute so it would be $25 for them to do the video. If you are interested in sponsoring the translation please let me know and I will get it done for you. Thanks, Matt

  • @arnold5328
    @arnold5328 5 лет назад

    Also stay away from the Board which claims to have a adr431 Reference(Round corners and one Inductor on it). The reference seems to be fake and drifts very fast (About 60ppm in 30min!). I've also tested the board in this Video with the ADR03 Reference against a 732C Reference and got deviations of about +- 10uV/2ppm in one hour.