#340

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 มิ.ย. 2020
  • I often get questions about how to measure voltage with microcontrollers. We will look at this topic, at the quality of built-in and external Analog-to-digital converters, and I will show you some “secrets.”
    In this video, we will:
    - See how ADCs work
    - Look at how we can determine the quality of ADCs
    - Compare the ADCs of different microcontrollers with external chips
    - Learn how to tweak the calculations to get the best out of any ADC
    - See how we can extend the range of ADCs
    - Discover some “hidden” things of Microcontrollers and their ADCs
    - Look at different external boards and their usage
    I am a proud Patreon of GreatScott!, Electroboom, Electronoobs, EEVblog, and others.
    Links:
    ESP32 dev board: s.click.aliexpress.com/e/_dZRlwBw
    ESP32 Breakout: s.click.aliexpress.com/e/_dYPpD2c
    ADS1115: s.click.aliexpress.com/e/_d9kxGU8
    PCF8591: s.click.aliexpress.com/e/_dTanrOc
    AD7705: s.click.aliexpress.com/e/_d6fDmrw
    Nice looking ADC (AD7606): s.click.aliexpress.com/e/_dYHWm0A
    Voltage reference: s.click.aliexpress.com/e/_d6N3GHc
    Voltage Divider: www.ohmslawcalculator.com/volt...
    ADC Theory: e2e.ti.com/blogs_/archives/b/...
    DAC Theory: en.wikipedia.org/wiki/Digital...
    The links above usually are affiliate links which support the channel (no additional cost for you).
    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com/sensorsiot
    My Patreon Page: / andreasspiess
    Discord: / discord
    If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission (of your purchases the next 24 hours) to buy new stuff for the channel
    My Amazon.com shop: www.amazon.com/shop/andreassp...
    For Banggood bit.ly/2jAQEf4
    For AliExpress: bit.ly/2B0yTLL
    For Amazon.de: amzn.to/2r0ZCYI
    For Amazon UK: amzn.to/2mxBaJf
    For ebay.com: ebay.to/2DuYXBp
    profile.php?...
    / spiessa
    www.instructables.com/member/...
    Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my primary job
    As an Amazon Associate, I earn from qualifying purchases
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 683

  • @shenlong3879
    @shenlong3879 3 ปีที่แล้ว +55

    The external ADC at 2.5V didn't show 2.4994 as you say as per the reference but 2.4594 at 22:22 in the video.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +19

      You are right. My mistake!

    • @projectmanager9116
      @projectmanager9116 3 ปีที่แล้ว

      th-cam.com/video/AIL36S6NpDA/w-d-xo.html awesone project

    • @tigerresearch2665
      @tigerresearch2665 3 ปีที่แล้ว +5

      yup. I felt a little spoofed.
      With that inaccuracy it seems that an external ADC isn't really that much better than a software-compensated ESP32 ADC.
      However, the precision of an external ADC could be interesting for scaled up projects: you are trading the extra costs for an ADC to skip the individual calibration process of each ESP32 ADC.

    • @leocurious9919
      @leocurious9919 3 ปีที่แล้ว +4

      @@tigerresearch2665 The external ADC only performs so bad due to his own "correction formula" that very likely only corrects errors on the analog end (aka from V_ref to the PGA inside the ADC). So it shows the correct value at this one point, but not anywhere else. One error that affects the analog end, which I would suspect here: High sampling rate -> low input impedance -> voltage drop Correcting ADC values in code like he does is not something anyone should do. The first step is to correct the hardware/setup!
      Let me compare that to a car that constantly steers to the left: Do you just "counter steer" to make it straight... or do you fix your car so it drives straight?

    • @matzke089
      @matzke089 3 ปีที่แล้ว +3

      Andreas Spiess So, the conclusion of the Video is wrong?

  • @L-36
    @L-36 3 ปีที่แล้ว +6

    I am using an ESP32 to monitor the battery voltage on my boat and send an email if it gets too low. I found the measurements very noisy due to occasional glitches. My solution was to take 8 readings and ignore the largest and smallest and average the middle 6. I do this twice and average them. It is quite easy to do in the code as you just have to keep track of the largest and smallest measurements and subtract them from the sum and divide by 6. I found this better than longer averages so that I did not get multiple glitches in my sample period. The result is very stable and quite fast. I very much enjoy your videos I am a retired circuit designer. I designed test equipment for HP (Now Keysight) and things like cable modems in the early days. Now it is a hobby.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +2

      Good idea because you can eliminate the far glitches. I did not investigate the distribution of the measured values, but maybe they have a pattern you break with your formula.
      I like my Keysight MSOX3045 ;-) Good products!

    • @L-36
      @L-36 3 ปีที่แล้ว +2

      @@AndreasSpiess The distribution was not Gaussian. It was mostly correct values with a few outliers. It is actually a pretty standard way of filtering. There is even a name for it but I can't find it any longer. I learned it from a statistician who worked for me for a short time.

  • @y2ksw1
    @y2ksw1 3 ปีที่แล้ว +34

    For a very long time I paid my studies by building accurate DAC's for the growing digital industry. Making them precise is a science! 😊

    • @Scrogan
      @Scrogan 3 ปีที่แล้ว +2

      Sounds neat, were they hand-matched R2R ladders? I always wonder why you can’t just buy R2R resistor networks in single packages, like a SIP10. Though these days I’d be tempted to just use a half-bridge and low-pass filter, like a good-old class-d amp.

    • @budward7846
      @budward7846 3 ปีที่แล้ว

      @@Scrogan Try www.digikey.com/products/en/resistors/resistor-networks-arrays/50?k=resistor+array&k=&pkeyword=resistor+array&sv=0&pv9=392120&sf=0&FV=-8%7C50&quantity=&ColumnSort=0&page=1&pageSize=100

    • @AndyPayne42
      @AndyPayne42 3 ปีที่แล้ว

      Yup, I have a esp32 based ph/temp/ec meter I'm doing for hydroponics github.com/physiii/grow

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +2

      @y2ksw1: I can imagine that this is not trivial!

    • @y2ksw1
      @y2ksw1 3 ปีที่แล้ว +1

      James Barclay Yes, with my never patented fool proof method nobody ever thought about before. Pure science 😊

  • @bobblaine1437
    @bobblaine1437 3 ปีที่แล้ว +6

    Thanks for this video! I've been puzzling over how to reduce the noise of a voltage reading for a project without losing responsiveness introduced by filtering. Based on your video, I switched over to an external ADC (ADS1115) and it solved the problem. Much appreciated!

  • @agf9995
    @agf9995 3 ปีที่แล้ว +3

    Greetings from South Africa Andreas. Well done as usual! I am always surprised how much information you share with great clarity and structure in such a short video clip. When I learnt this stuff (long before internet), choices were fewer and one had to study the data sheets thoroughly (or copy somebody's example from Elektor, EE, ETI etc). Microcontrollers (with built in ADCs) only arrived later and choices were fewer - which was a blessing, because obsolescence took longer. Hobbyists today should be thankful that you share years of experience, crammed into a nutshell...and for free. Love your work and your very structured method of teaching (unlike my ADHD brain which likes to skip around). Best Regards, Allen.

  • @ericon.7015
    @ericon.7015 3 ปีที่แล้ว +3

    I never get tired to watch your videos. I like the fact that you put your personal opinion in each fact. I understand better this way. Thank you

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Thank you for your nice words!

  • @TannerFrisby
    @TannerFrisby 3 ปีที่แล้ว +4

    Thanks for putting out such high-quality videos regularly!

  • @dvohwinkel
    @dvohwinkel 3 ปีที่แล้ว

    I like the fact that your opinions/observations are unfiltered. You just tell it like it is. "Subscribed"

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      Welcome aboard the channel!

  • @TheDefpom
    @TheDefpom 3 ปีที่แล้ว +45

    If you tweak the adc settings in the ESP32 down to 10 bits, and some other changes, the noise and accuracy gets a LOT better, I’m not at my computer at the moment but I will post the code when I get a chance.

    • @augustinenwafor7673
      @augustinenwafor7673 3 ปีที่แล้ว +2

      Please leave a link on your comment when you do. Thanks

    • @TheDefpom
      @TheDefpom 3 ปีที่แล้ว +1

      Augustine Nwafor - I posted the code in the comments, it’s here somewhere.

    • @skuashh
      @skuashh 3 ปีที่แล้ว +28

      Here is the code of the @@TheDefpom​ comment:
      "Here you go, here is the code to help get the ESP32 ADC to behave better:
      // configure ADC for getting battery voltage
      pinMode(VoltageSense, INPUT); // Battery Voltage Sense input
      analogSetPinAttenuation(VoltageSense, ADC_0db); // set the attenuator for the ADC to allow 1.1V input range
      analogSetWidth(11); // set the resolution width to be 2048 instead of the default 4096 to try and reduce noise
      analogReadResolution(11); // set the resolution to be 2048 instead of the default 4096 to try and reduce noise"

    • @raymondzhao9557
      @raymondzhao9557 2 ปีที่แล้ว

      @@skuashh cool, will try when i have a chance

  • @mahudson3547
    @mahudson3547 3 ปีที่แล้ว +4

    At 12.07, I love the way you dodge the 1023/1024 argument!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +2

      I had enough discussions about that in my life. So I once used 1023 and once 65536

    • @TheRainHarvester
      @TheRainHarvester 28 วันที่ผ่านมา

      ​@@AndreasSpiessWhy was there ever an argument? (1023/1023 =1) Just curious

    • @AndreasSpiess
      @AndreasSpiess  26 วันที่ผ่านมา

      @@TheRainHarvester Because of the 0

    • @TheRainHarvester
      @TheRainHarvester 25 วันที่ผ่านมา

      @@AndreasSpiess if you can measure the voltage at the high rail, you divide by 4095 so you get 1* vcc.

  • @Mr_Zisky
    @Mr_Zisky 2 ปีที่แล้ว +1

    Perfect! Thank you for this video! I am working on a project now with analog sensors and i learned everything I needed to!

  • @chuxxsss
    @chuxxsss 3 ปีที่แล้ว

    Well done mate reminded me of train school 30 years ago. Keep up the good work Andreas. Have a wonderful week.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Thanks, you too! And hope for gold ;-)

  • @consoleteam
    @consoleteam 3 ปีที่แล้ว

    Thank you for the breadth of the experiments to help reinforce the lessons. Seeing how externally sourced ~5v can impact the readings was an "of course!" moment, since I'm used to using a good regulator versus an adjustable power supply for projects. Spotting things like how the radios on the chip may affect the ADC are very good clues. I'll investigate some of the external ADCs, since I'm thinking about a project that will use a mesh radio network and I had planned to use analog inputs as well... thanks again!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Some distance to radios is never a bad thing ;-)

  • @peterpepo9232
    @peterpepo9232 3 ปีที่แล้ว +2

    Thanks for this awesome intro to the ADCs!
    I'm going to measure voltage of my LiPo cell, so I know when to charge it :)

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      I do this too for most of my battery operated nodes

  • @NimaSajedi
    @NimaSajedi 3 ปีที่แล้ว +1

    Another great tutorial. I enjoy my time watching your videos. Thanks for making such valuable content. 👍

  • @juanramirezjardua2082
    @juanramirezjardua2082 3 ปีที่แล้ว +2

    Thanks Andreas for this interesting video. I've used ADC lots of times, and never had concerns about the quality of the conversion (noise reduction with average method). In a current project, getting feedback from the servo's potentiometers for a robotic arm, I've used a calibration table, but now I'm going to introduce your formulas. Thanks again, Juan.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      It depends on the desired accuracy. I compared, of course, with the data sheet.Calibration tables are good if the ADC is dependable wrong and not stochastically wrong...

  • @tdtrecordsmusic
    @tdtrecordsmusic 3 ปีที่แล้ว

    This is such an important topic. I send a million thanks and encourage this topic.
    Getting signals INTO the computer is probably just as important as having the computer to begin with.
    This topic makes me consider re-writing all of computer science just to make an analog computer.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      You find analog computers if you google. They were used befor the cheap silicon

  • @stevetobias4890
    @stevetobias4890 3 ปีที่แล้ว

    Great video, I just bought some external voltage reference modules so great timing

  • @meclucas
    @meclucas 3 ปีที่แล้ว +4

    Very interesting video as always, thank you.
    Another benefit of using the ADS1115 is that the internal PGA can be configured to read a differential signal, this is very useful for measuring some sensors, although it also results in a slower data acquisition rate.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      True!

    • @sewingmachinesindetail
      @sewingmachinesindetail 6 หลายเดือนก่อน

      This trick can also be used in general by the Arduino by using two analog inputs connected to the signal direct and the signal amplified by a fixed op amp.

  • @yezhang2947
    @yezhang2947 3 ปีที่แล้ว

    I didn't know the truth and tricks of ESP8266/ESP32. Another high quality video. Thank you!

  • @johnhutchens8970
    @johnhutchens8970 3 ปีที่แล้ว +3

    The ADS1115 is my favorite ADC for microcontrollers. I started using it when I moved over to 32bit microcontrollers, but needed a way to read 5V automotive sensors (using a Teensy 3.2). I had 4 sensors (an MPX5700AP pressure sensor, an NTC thermistor, an AEM Wideband oxygen sensor and a 0-100psi oil pressure sensor), the ADS1115 had 4 inputs, it was a match! I didn't have to average values to get a stable reading, like you said, the stability of the ADC is fantastic.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Thank you for sharing your experience. This seems to be a perfect solution.

  • @TheBreadboardca
    @TheBreadboardca 3 ปีที่แล้ว

    Just got to the end, you covered off some of my earlier comments.. nice :), i will leave them there to hopeful help noobs to the ADC world and as a text reminder. Awesome video keep up the good work

  • @Timh-hx2le
    @Timh-hx2le 3 ปีที่แล้ว

    Thanks for this video, it's exactly that what I need for my project!!

  • @jenskaa4044
    @jenskaa4044 3 ปีที่แล้ว +14

    Nice video.
    Remember to consider the input impedance of the ADC, especially if you use high value resistors for a voltage divider in front.

    • @uwezimmermann5427
      @uwezimmermann5427 3 ปีที่แล้ว +7

      since the input is in parallel to the low-side resistor of the voltage divider only its value really matters - well actually it is of course the parallel-combination of the upper and lower resistance in the voltage divider...
      And for the ATmega328 the input resistance of the ADC-channels is astonishingly high! I tested it with discharging a 1µF capacitor from 5 V to zero through a 100 MΩ resistor - it took about 15 minutes to discharge and the resulting curve indicates an input resistance beyond 1 GΩ.

    • @Scrogan
      @Scrogan 3 ปีที่แล้ว +1

      Uwe Zimmermann
      I was going to ask what you used to measure that voltage, but I guess you were just using the ADC itself. I imagine most of the leakage current will be through the protection diodes, if it had none then it would be a real recipe for ESD. Which reminds me of a friend using his atmega ADC for measuring back-emf of a solenoid. Directly on the 12V half-bridge output that was powering the solenoid. With no extra diode or resistors. The arduino got really hot, but somehow the circuit actually worked.

    • @jenskaa4044
      @jenskaa4044 3 ปีที่แล้ว

      @@uwezimmermann5427 I am not talking Any specific microprocesor. I had an adc in a low power circuit where I wanted to messure the battery voltage, here I used a resistor divider in 10 Mohm Range to avoid draning the battery. In this applikation the messured voltage was wrong due to current flowing into the mcu.

  • @tonysfun
    @tonysfun 3 ปีที่แล้ว +1

    I'm amazed every time I see your great videos!!! You are testing stuff that went true testing before manufacture, but you made it better - why isn't Arduino listening??? If Arduino and ESP's had better ADC, the cost would not be that much higher - right? But now we can use your recipe and suggestions! Thank you again Andreas. And wishing your finger to heal FASTER!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +2

      I am sure they have their constrraints. Create chips for a few cents with 3 CPUs and Wi-Fi is for sure not easy.

  • @kwazar6725
    @kwazar6725 3 ปีที่แล้ว +1

    Reminds me of school and r2r ladder dacs. I get my fix of andreas every sunday. Lovely stuff.

  • @Scrogan
    @Scrogan 3 ปีที่แล้ว

    I was just about to buy an ADS1115, good timing!

  • @MarcoTedaldi
    @MarcoTedaldi 3 ปีที่แล้ว +6

    Awesome. Thank you for the great content! Just my two cents:
    1. I've had to learn the hard way, that many (all?) of the ADC that have a MUX only have a single S/H aufter the MUX. This leads to problems, when reading signals on different channels with very different voltages in quick succession. There is quite a bit of "crosstalk". It's really important to make sure that the inputs to such an ADC are low impedance.
    2. When I do averaging on a uC, I do 2^n samles (8, 16, 32...1024) samples, add the read values up (make sure to prevent overflow) and just use shift for the division at the end. Especially on uC without an FPU this speeds the averaging up quite a bit.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      Good info. Thank you! I would have expected only one S/H, though, because it is usually part of the ADC.

    • @myselfremade
      @myselfremade 2 ปีที่แล้ว

      @@AndreasSpiess I was wondering, if one wanted to, for example. Record two audio signals that are exactly synchronized, how could you synchronize two different ADC's to make sure they are sampling at the same time?

    • @TheRainHarvester
      @TheRainHarvester 28 วันที่ผ่านมา

      ​@@myselfremadedid you ever find an answer?

  • @tszulpinedo757
    @tszulpinedo757 3 ปีที่แล้ว

    Están increíbles todos los detalles que enseñó profesor... 👌😎

  • @noslackyak
    @noslackyak 3 ปีที่แล้ว +2

    Seriously good video. Thanks man! Appreciate your hard work :)

  • @WacKEDmaN
    @WacKEDmaN 3 ปีที่แล้ว +2

    very nice info there Andreas, thanks, it will come in handy...
    id be interested in seeing an RTL-SDR ADC compaired to these MCU ADCs

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      It is quite different. If I remember it has only 8 bits. But of course, it is faster.

  • @n.t.1243
    @n.t.1243 3 ปีที่แล้ว +1

    Watched already a lot of videos of your channel and at the beginning it was a lot of „häääää, versteh grad überhaupt nix“ but from one video to the next I start to understand what you are explaining us. Have to say that I am a totally new beginner.
    My goal is to measure the 2 12V Solar Batteries in the OFF-Grid garden of my parents in law. Tried a lot with the ADC from the ESP32 itself and as u mentioned it’s readings are just bullshit.
    Thank you for introducing the ADS1115 to me. I guess that will fix my measuring problem and can finally bring the project into production.
    As I am original from Vorarlberg and worked many years in Kanton SG I love to hear your swiss accent as it remembers me of that great time in my life!
    Electronic wise you are my personal hero ;-)

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      For this purpose you probably could also use a INA226 as suggested by other commenters.
      And I am glad you learn something with each video. We all started as beginners in this field.

  • @klif_n
    @klif_n 3 ปีที่แล้ว +11

    How timely. I'm just trying to do this right now to monitor the voltage on a battery in my mailbox alerter. :). Thank you!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +7

      For monitoring a battery the internal ADCs should be ok.

  • @JohnBoen
    @JohnBoen 3 ปีที่แล้ว

    Great timing. I'm building a flash joule heater, and need to measure the voltage of the supercapacitor before and after the flash... i was just going to use an arduino and not even think about it - because I didn't want to do the research.
    Thanks much!
    Edit: after watching, an ADS1115 or equiv is what I need.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Hopefully it will work out for you!

    • @JohnBoen
      @JohnBoen 3 ปีที่แล้ว

      Yeah... thought this is a bit less effort.
      Welcome to reality :) .
      These 2.7v 500F rh2ings don't want to release their energy instantly.
      Damn physics...

  • @B4x4
    @B4x4 3 ปีที่แล้ว +1

    Thank you for this great episode.
    Loved it.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Glad you enjoyed it!

    • @B4x4
      @B4x4 3 ปีที่แล้ว

      @@AndreasSpiess hope you will make one about amp reading too.
      How to use shunt to read up to 50amp draw.

  •  3 ปีที่แล้ว +62

    The AVR ATmega328p used in the Arduino, and other AVR chips, have a special sleep mode for ADC noise reduction. It keeps the ADC running, but stops all the digital processing. See the "ADC Noise Reduction Mode" in the datasheet. It could be that the external ADC chips appear better simply because they are physically further away from the running digital logic.

    • @Slutuppnu
      @Slutuppnu 3 ปีที่แล้ว

      Interesting. I didn't know Arduino had a sleep mode.

    •  3 ปีที่แล้ว +4

      @@Slutuppnu I don't know about the Arduino library, but with AVR-GCC you have fine-grained control over it. www.nongnu.org/avr-libc/user-manual/group__avr__sleep.html

    •  3 ปีที่แล้ว +8

      PS: The Arduino IDE already uses AVR-GCC, so you can use the functions that I linked from Arduino projects as well.

    • @GISED_Link
      @GISED_Link 3 ปีที่แล้ว

      @ is it worth it with a 10 bit adc ? (Atmega16A)

    • @rojirrim7298
      @rojirrim7298 3 ปีที่แล้ว +5

      @@Slutuppnu Most AVR chips (the ones inside arduinos) don't have just one sleep mode but a few of them. It has (as has been said), an ADC noise reduction in which the CPU and some other digital parts of the chip are turned off in order to remove noise from the ADC signal; it has a CPU sleep mode that allows you to save a bit of power during delays or when waiting for a short timer to wake you up; and finally it has a deep sleep mode, in which the CPU, fast clock signal (either the internal fast oscillator or the external crystal oscillator), and most peripherals are turned off, except for the WatchDog Timer (low power timer) and a few more things like pin interrupt wakeups. This allows for very low power applications, in which you can put the chip to sleep and only use a few microamps of current, which for battery applications is really useful. For those types of applications, you have to take care and desolder all the LEDs on the board that you can't control, make sure to avoid using any LDOs onboard, etc.

  • @nmidu
    @nmidu ปีที่แล้ว

    hey man, your secrets are the best! thanks for all this information . greeting from argentina amigo!

  • @artiem5262
    @artiem5262 3 ปีที่แล้ว +5

    Hints for those starting out -- for built-in ADCs, throw away the bottom bit as it's most likely useless anyway. You can average samples equal to a power of 2 by adding the integer values and doing a right shift -- for example add up 8 integer ADC samples and right shift 3, a useful trick when your microprocessor doesn't have a divide instruction! What's your signal bandwidth? Adding a single pole RC low pass filter in front of the ADC can help. And do not expect the input impedance of the ADC to be constant.

  • @gotbadger
    @gotbadger 3 ปีที่แล้ว

    Really insightful video thanks for posting!

  • @CaddyBlue
    @CaddyBlue 3 ปีที่แล้ว

    Hi Andreas! Great video as always! One note about the ADS1115 is that it is actually a 15-bit signed differential ADC( AC !!! ), or 16-bit single-ended. Differential
    measurements offer more immunity from electromagnetic noise. This is useful when using long signal wires or operating in an electrically noisy environment. I have been using an ADS1115 to measure the amperage of our utility inlet with a sct-013. The fine art of accuracy I've seen is matching the sampling rate of the adc to the frequency of your local provider to sample the highs and lows of the sine wave as accurately as possible (50Hz here in ZA).

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      You are right with differential measurements.
      Concerning 50Hz: You have to synchronize because the ADS1115 is slow. A diode and a RC filter probably would help to get DC out of AC

    • @CaddyBlue
      @CaddyBlue 3 ปีที่แล้ว

      @@AndreasSpiess on the sct013 each 10A represents 1v. Thus getting Amperage readings are easy and safe with non invasive clamps. Only when it comes to the measurement of voltage, territory gets unsafe. I have opted for a 220v primary, 12v secondary to convert ac to DC proportionally followed with a voltage divider and capacitor. With both voltage and amperage the apparent usage can be calculated to identify power consumption patterns at home. I cannot thank you enough for the extensive and concise research you have given to this community! You inspire us!

  • @charlescoult
    @charlescoult 3 ปีที่แล้ว

    Some of the best educational content out there!

  • @vaishakhmonti
    @vaishakhmonti 2 ปีที่แล้ว

    Fantastic as always, Professor!

  • @drusha8791
    @drusha8791 3 ปีที่แล้ว

    Nice! This is what i am looking for. Thanks andreas.

  • @Arrowtake
    @Arrowtake 3 ปีที่แล้ว +7

    Thanks Andreas, once again learned alot!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Glad to hear that! Thank you.

  • @billglass5160
    @billglass5160 8 หลายเดือนก่อน

    You have confirmed my discovery. Thanks! Unfortunate that we have to rely on "small and casual" posts or trial&error methods to correctly use the esp32.

    • @AndreasSpiess
      @AndreasSpiess  8 หลายเดือนก่อน +1

      Fortunately, we have Google and the internet to share our learnings ;-)

  • @SolarWebsite
    @SolarWebsite 3 ปีที่แล้ว +1

    Excellent video, thank you!
    A related interesting subject for a future video might be how to safely and accurately measure the voltages of a multi-cell battery. After a couple of evenings of googling I have found out that's not trivial.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Thank you for the suggestioon.

    • @sylvainlazare1114
      @sylvainlazare1114 3 ปีที่แล้ว

      Maybe thats what you are looking for lazarduinoads1115.blogspot.com/2020/03/voltmetre-de-precision-avec-arduino.html I have a 4 cells version on trial now facebook.com/photo.php?fbid=10220134681951223&set=pcb.1665059790308923&type=3&theater

    • @pfeerick
      @pfeerick 3 ปีที่แล้ว

      The typical manner is to have the most negative connection coupled to ground of your circuit, and then have voltage dividers for each cell. For a 4 cell battery, you could either use four identical voltage dividers, or preferably have four different ones each tuned to voltage ranges for each of the series cells. For simplicity sake, if it were a 4 cell lithium battery, 5v, 10v, 15v and 20v would be good voltage divider ranges to use for monitoring each successive series cell and being the most accurate for each in turn. Being able to measure the individual cells would be nice, but as you suggest, its not trivial, as you would need to somehow keep changing the ground/negative 'reference' when measuring each cell.

    • @matzke089
      @matzke089 3 ปีที่แล้ว

      I thought it‘s really simple if you use an individual esp8266 for each cell. It‘s even scalable. What is wrong about that?

    • @SolarWebsite
      @SolarWebsite 3 ปีที่แล้ว

      @@matzke089 That could work, yes, but has disadvantages:
      1. Relatively expensive, especially for small batteries.
      2. High power consumption, especially for small batteries.
      3. Communication between the ESPs will have to be engineered carefully.
      4. Generally complex and not elegant. A "brute force" solution, if you will. I like elegance and simplicity (the two usually go together).

  • @brecomp
    @brecomp 3 ปีที่แล้ว

    Excellent video! Congratulations!

  • @stefans9990
    @stefans9990 3 ปีที่แล้ว

    I had to chuckle a little about the example of measuring a 24V Solar panel and then setting the range to 30V (around 13:23 in your video). A solar panel that you would use with 24V batteries in a real-world scenario would normally be a 72-Cell panel, which typically has an open circuit voltage around 45V @25ºC, and quite a bit higher when it gets really cold. I realise it was just an example in your video, but for anyone wanting to really measure a "24V Solar Panel", maybe increase that range in your resistor divider a little :-) As usual, thanks for an interesting Video Andreas - toll!

  • @alexandern8671
    @alexandern8671 3 ปีที่แล้ว +1

    Another great video from a very competent presenter.
    Just a point for a possible misconception: there are two other ADC architectures in common use, namely pipelined and sigma-delta. The first tries to keep the number of parallel comparators required in check by converting the output of a comparator stage back to analogue using a DAC, subtracting this output from the original input, and feeding the result to another comparators' stage. Three stages are quite common with typically 4bits per stage; leaving aside the unavoidable latency the conversion takes one clock cycle like the comparators' ADC. This breaks for high resolutions because analog subtractions accumulate too much error. Then sigma-delta comes to the rescue where in fact a control system tries to get its 1 bit output bitstream average as close to the input as possible (its operating principle is not easy to understand in detail though); 24 bits and higher resolutions became possible.
    Successive approximation is favoured by the MCU manufacturers for a very simple reason - it requires a single analog comparator and an R-2R DAC - cheap, accurate and reproducible architecture that covers nearly all practical DAC needs. Moreover it can be difficult to find a standalone successive approximation ADC as most are either pipelined (higher sampling rates) or sigma-delta (for high, eg audio, resolution).
    Again for a typical maker these are too finer points but I wanted to make sure they are mentioned in the footnote. Thanks again Andreas for your work

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Thank you for your explanations. I always learn something from my viewers! As you saw I am more a user and not a specialist in this matter.

  • @AntonioMartinez-xt7gg
    @AntonioMartinez-xt7gg ปีที่แล้ว

    Impecable, como siempre Andreas

  • @davesemmelink8964
    @davesemmelink8964 3 ปีที่แล้ว

    Thanks for another great video! In researching my gas sensor project, I came across a method people say improves the accuracy of the readings, though I don't really understand it. You apply this calculation to the reading on the ADC pin: volts = -0.000000000000016 * pow(reading,4) + 0.000000000118171 * pow(reading,3)- 0.000000301211691 * pow(reading,2)+ 0.001109019271794 * reading + 0.034143524634089; (Also note that there is a more efficient way to do this calculation (10x faster), but it yields a slightly different result, so I'm leaving the original one here.)

    • @davesemmelink8964
      @davesemmelink8964 3 ปีที่แล้ว

      For some reason the calculation got scrambled when I pasted it in to the comment - apparently having a "+" after a "-" gets interpreted as strike thru... Hopefully you can figure it out.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Unfortunately I am no mathematician. Maybe another viewer can help out.

    • @davesemmelink8964
      @davesemmelink8964 3 ปีที่แล้ว

      @@AndreasSpiess I forget how I originally found the calculation, but if you Google "ESP32 ADC Polynomial" you will find a lot of people use it to make the values returned by the ADC more accurate. You noted that the ESP32 wasn't accurate, but apparently it can be improved with this technique. I'm happy with the results I'm getting, but my application doesn't need it to be extremely accurate.

  • @giuseppedanilovaccarella8026
    @giuseppedanilovaccarella8026 3 ปีที่แล้ว +3

    Thanks for another fantastic video. Just for curiosity, if I insert a delay(1) between each analogRead(A0), the measurements related to WeMos D1 Mini have more fluctuations than without it. Is this due to the capacitor in the Sample and Hold circuit that discharges faster by inserting delay(1)? It is evident within low serial baud rate. Thanks

  • @Graham_Wideman
    @Graham_Wideman 3 ปีที่แล้ว +23

    23:35 Really freaky video compression artifact at 23:35 -- the RF connectors appear to randomly telescope in and out!

    • @shreyaskul
      @shreyaskul 3 ปีที่แล้ว +13

      Because they are not soldered in, he just put them on the PCB just to show the board.
      It's not a video artifact.

    • @Graham_Wideman
      @Graham_Wideman 3 ปีที่แล้ว +1

      @@shreyaskul Yes, on closer viewing, I think you're right. They seem to be rocking back and forth.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +5

      Shreyas is right!

    • @shreyaskul
      @shreyaskul 3 ปีที่แล้ว +1

      @@AndreasSpiess Hey! Thanks for your comment.
      Can you share which IC you have used in your ADC board? That would be great :)

  • @imtrue2132
    @imtrue2132 3 ปีที่แล้ว

    The ladder reminds of the Covox sound board, connected to the LPT (printer) output of any computers and the output is a analog mono-sound.

  • @leololdb3299
    @leololdb3299 3 ปีที่แล้ว

    I boosted the ADC sample rate of an Arduino UNO at around 30800 SPS for audio purposes, the sound wasn't really great but when I discovered I can use the 1.1V reference, it immediately made it way more accurate! The issue was that the input audio signal was so low it could only be heard in a single bit.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      You are right. The usage of the internal reference is shown in video #10

  • @mattsaxey529
    @mattsaxey529 3 ปีที่แล้ว

    More helpful content. Thank You!

  • @Scrogan
    @Scrogan 3 ปีที่แล้ว +1

    Neat video! I’d have liked it more if you went over the details of successive approximation registers, and how a delta-sigma ADC (or DAC) works, but maybe that’s outside the scope of this video. On the topic of ADCs and DACs, I’d be interested in a video on DSP algorithms being implemented in an arduino, be it for audio or for filtering out narrow-band noise.
    Also when you said that SDRs use these very high speed GHz ADCs, I don’t think they actually do. They use lower speed ADCs with mixers and tuneable local oscillators to generate the I and Q signals. Direct sampling SDRs are very rare.
    I’d also have mentioned the fact that the ADCs have a finite input impedance, so putting a network of resistors in front of one without buffering it after could cause some systematic error. Well, you often use an instrumentation amplifier there anyhow so maybe it’s not too useful of a tip.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      1. This channels is for makers, so the most important decision is what not to show.
      2. I define SDR not only as "SDR receivers for the general public". I define them as "digitalize the signal and do the processing in software". So radar and many other applications fit my definition.
      3. You are right with the input resistance. If you calibrate the readings I assume you can live witout an instrumentation amplifier for 10 or 12 bit resolution. For more precise applications you are right, of course

  • @foxeskeeper3817
    @foxeskeeper3817 3 ปีที่แล้ว

    Pretty useful, Mr.Spiess

  • @PhG1961
    @PhG1961 3 ปีที่แล้ว

    Fascinating and of course useful.

  • @gacherumburu9958
    @gacherumburu9958 3 ปีที่แล้ว

    Thanks for the info..👍

  • @rodrigoduarte501
    @rodrigoduarte501 3 ปีที่แล้ว

    Very nice characterization fod ADC's.

  • @michaelbruns473
    @michaelbruns473 3 ปีที่แล้ว +9

    That was very enlightening, too bad my favorite MC ESP32 yielded such weak (lab) results - still plenty accurate though for many projects. Will look into the ADS1115. Dankeschön !

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +4

      I also use the internal ADC. If you know what you can expect, it is ok.

  • @ingenia-tec5194
    @ingenia-tec5194 2 ปีที่แล้ว

    Thank you a lot.
    Very impressive :D Thanks for all the info.
    Excelent Video :D

  • @brianhelterline4888
    @brianhelterline4888 3 ปีที่แล้ว

    Great video. One thing to note. If you use an external i2c ADC, you can not set up any sort of interrupt driving timing to collect sames in the background at a given rate since i2c does not work within a ISR. This leads to a bit of work to make sure loop() gets called at a reasonable rate.... Just something to be aware of.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Good to know. Maybe you try a second RTOS task on the ESP32

    • @brianhelterline4888
      @brianhelterline4888 3 ปีที่แล้ว

      @@AndreasSpiess This was on the AVR architecture

  • @JanJeronimus
    @JanJeronimus 3 ปีที่แล้ว +3

    As always a verry interesting video.
    By the way it is also possible to do other things than averaging. E.g. dropping the spikes / outliers.

    • @ThijsVandenrijt
      @ThijsVandenrijt 3 ปีที่แล้ว +5

      To remove this kind of "shot noise", a median or percentile filter is a common and easy-to-implement method!

    • @gerleimarci
      @gerleimarci 3 ปีที่แล้ว +1

      Or simply use "Olympic average"

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +3

      @Jan. True. I just used this simple one, also to show the formula. Many people store all values and then create the average, which is not good in a MCU environment.

    • @zawilious
      @zawilious หลายเดือนก่อน

      ​@@AndreasSpiess
      Can you plz explain how the averaging formula works ? And how you get the 3.09 number for correction you used for esp32 test

  • @m.s.3346
    @m.s.3346 3 ปีที่แล้ว

    very helpful video, thanks!

  • @WistrelChianti
    @WistrelChianti 3 ปีที่แล้ว

    Me at 16 mins: "ah... bugger" :D Had some "extensibility" ideas in mind for a project to potentially later hook some ADC2 pins up to some inputs... Still, good to know an I2C board is an option if I later want to do go that route and still use Wifi. Video wins just for that, but it had already won several times over for teaching me about how ADCs work!

  • @klaushelmgens8403
    @klaushelmgens8403 3 ปีที่แล้ว +4

    The ADS1115 is a good choice, BUT with my ESP-32 I had some trouble due to the fact that they was in the same casing and WiFi was enabled/used. The results was overlayed with lots of noise. The method of averageing takes to much time for my project. I need the result ASAP and the ADS1115 is anyway no the fastest. But I was able to solve the issue and I want to share this with you guys: First step was to build (3D Print) to boxes which fit in each other with a small gap. The outside of the small box got covered with a copper film. Afterwards I fit the small box in the big box. Why two boxes? Quit simple : isolation. The copper film I connected to ground. Inside the box I placed the ADS1115. For the cables I made small holes and the cable which is going to the probe is an coaxial. Problem solved. What I want to say by this is, that the interference of the RF signal has not to be underestimated!

  • @leozendo3500
    @leozendo3500 3 ปีที่แล้ว +1

    I have a similar adc module with just 2 16bit ADCs and 50Mhz sample rate. It's like 40usd on eBay. It would be incredible if you want to make a video about how to read data off these cracy fast parallel lanes. My primary goal was to reduce cost. I thought it would be interesting if we can dump all the ADC data straight into a ram with some hard logic, and read the ram with some cheap slow microcenter. Thus eliminating the need of fpga.

  • @correcthorsebatterystaple
    @correcthorsebatterystaple 3 ปีที่แล้ว

    Nice, very informative!

  • @marcosmaziero
    @marcosmaziero 3 ปีที่แล้ว

    Very inspiring video. thank you

  • @kesor6
    @kesor6 3 ปีที่แล้ว

    Great timing! I just got ten sliding potentiometers and was wondering how to measure their values. Found another video that shows how by connecting all the value pins with a diode to a single analog input, the VCC pin on the potentiometers can be muxed using digital outputs one after another. Also thinking of using a GPIO extender chip like the PCF8575 for this, so I could measure about 16 analog values (slowly) using a single analog pin in the Arduino with pins left over. Will be a MIDI controller project, don’t need resolution or speed or accuracy all that much imho.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      You can buy analog MUX ICs like the 74HC4067

  • @TheAoab50
    @TheAoab50 2 ปีที่แล้ว +1

    Thanks for the video, I had a problem with the adc fluctuating reading with my arduino, I never knew that there are imperfections in these microchips.
    I wish you also compared an STM32 board like the black pill (STM32f411)

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      I thought I did this in another video.

  • @GlennHamblin
    @GlennHamblin 3 ปีที่แล้ว

    Great video. Perhaps in a future video you can explain sigma-delta (or delta-sigma sometimes) ADCs. I think they are pretty cool.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      I am not sure if this would be interesting for many people. Maybe more for a specialized channel...

    • @butsukete1806
      @butsukete1806 3 ปีที่แล้ว

      @@AndreasSpiess But two of the ADCs you linked to, ADS1115 and AD7705, are sigma-delta. They're quite common, especially if you're looking for cheap breakout boards.

  • @SantanderDiogenes
    @SantanderDiogenes 2 ปีที่แล้ว

    Nice video!. When you are in the presence of glitches, one way to improve accuracy is to take a lot of measurements and calculate average. Then compare all samples with the calculated average. Take out all samples outside certain margin. Let say 10%. Then calculate the average again. You can continue to get better results. Also you can use statistic formulas as standard deviation to decide when your result is accurate enough.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      I agree you can reduce noise with those methods. Non-linearities will stay and unfortunately, the speed will decrease. But often, this does not matter.

  • @dl8cy
    @dl8cy 3 ปีที่แล้ว

    thank you for such a lot work for that video

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      You're very welcome! Yes, this one took quite some time.

  • @BritishBeachcomber
    @BritishBeachcomber 3 ปีที่แล้ว

    I spent much time working in Switzerland, but never heard an accent like yours ;)

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      So it seems I am special :-)

  • @taranagnew436
    @taranagnew436 3 ปีที่แล้ว

    a quick suggestion: can you plz do a video about "more in-depth" of voltage dividers using resistors, trying to understand more about voltage dividers and how the work. thank-you and keep up the great content

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      This is too basic. Just google and you will find a lot of stuff.

  • @bpcorner
    @bpcorner ปีที่แล้ว

    Thankyou Andreas. I just subscribed.

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว +1

      Welcome onboard the channel!

  • @bm830810
    @bm830810 3 ปีที่แล้ว +17

    I recommend using median filter for removing ESP32 ADC glitches, averaging is not good for this kind of noise

    • @valcob6617
      @valcob6617 3 ปีที่แล้ว +12

      The formula @Andreas Spiess is using is not the usual average formula. He uses a so called filter with feed back and I don't know why he is calling it average but that one for sure is not just an average. And the second point when he says "when I use 10 samples or even 100 samples in that formula" .. those are not the actual samples. That number tells how much we should fed back to the initial value so basically to explain it we have an initial x=0.551 and in the loop he is calculating the next x by taking 99 parts of original x value (0.551) and adding 1 part of the new analogRead value thus it basically means we are just drifting to the left or right of the initial value and the amount of drift is expressed in the ratio we are using 1/10, 1/100, 1/1000 and so on parts of the new value mixed back to the initial one. Also this number will be the speed of conversion to the initial value so the higher value we use the slower is the speed and the more analog reads we need to go back to normal and at the same time the less is the chance to affect the final number by the new erroneous reading. Maybe @Andreas Spiess does not fully understand the formula he is using which I doubt but who knows maybe he can explain it in some further videos.

    • @bm830810
      @bm830810 3 ปีที่แล้ว +2

      @@valcob6617 This is a simple IIR filter (meaning the response never reaches steady state theoretically), its good for quick & dirty filtering

    • @bm830810
      @bm830810 3 ปีที่แล้ว

      @@valcob6617 Also the filter is prone to accumulating round off error for high filtering coefficients and my guess is this is why he gets 10% error on ESP32's ADC

  • @electronic7979
    @electronic7979 3 ปีที่แล้ว +1

    Very helpful video.

  • @crazythunderchief
    @crazythunderchief 2 ปีที่แล้ว

    Very nice video. One consideration though. The serial ADC will always need the same time independent of the measures voltage.
    As the comparator can only output "too high" or "too low" it can not detect that it hit the right voltage and finish early. It will always increment to the final / least significant bit.
    It can however be accelerated if you choose to reduce accuracy.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for the additional information!

  • @xDR1TeK
    @xDR1TeK 3 ปีที่แล้ว

    Great video. Just for feedback, the first adc is called flash adc, flash for lightning speed. Another idea, adc chips are good for generating a binary value for raw signal within specifications, but the limitation often lies within the controller to manipulate the binary value to usable data. Often, the dilemma is within the controller's ability to manipulate double float values. Some controllers can only handle 8 byte floats. So calculating a thermocouple voltage becomes an inaccurate reading because of the float calculation errors. Not just thermocouples, even ntc resistors. So usually for such operations a good math library is needed to overcome these hurdles but capture rate of course would be at a disadvantage.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      True. Fortunately, The ESP32 has a floating point engine.

    • @xDR1TeK
      @xDR1TeK 3 ปีที่แล้ว

      @@AndreasSpiess i'm using the 8266, moved all my heavy load to the STM32F103C8 due to power requirements. I like these ESP devices; however, I'm interested in another solution where they don't offer a flash.

  • @sailingmarquise9742
    @sailingmarquise9742 3 ปีที่แล้ว

    very good explanation

  • @aldebaranflash2663
    @aldebaranflash2663 3 ปีที่แล้ว

    Danke, alles gut erklärt.

  • @marceloap140
    @marceloap140 3 ปีที่แล้ว

    Thanks from Brazil. 🇧🇷👍🏼

  • @sagar73594
    @sagar73594 3 ปีที่แล้ว

    Great Scott!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      ??

    • @sagar73594
      @sagar73594 3 ปีที่แล้ว

      @@AndreasSpiess Sir, I mean "Great Scott! - expressing surprise or amazement."

  • @Jimmyng1968
    @Jimmyng1968 3 ปีที่แล้ว

    good lesson, thanks

  • @giorgioboiero
    @giorgioboiero 3 ปีที่แล้ว +1

    A good alternative condidate could be the STM32 micros such as the Blue Pill (STM32F103) or the Black Pill (STM32F4x1)
    They could be programmed using Arduino or PlatformIO

  • @easthulk99
    @easthulk99 3 ปีที่แล้ว

    Thank you for another knowledge session. I just bought sonoff power meter module and noticed the update value not that accurate. Maybe i need to do more reading on the usage.
    I just found you video #99. Three years ago....

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +2

      Some of those power meters are made for large currents and not very precise at low currents

  • @Seth-mb9nt
    @Seth-mb9nt 3 ปีที่แล้ว

    I recently built up an electronics test setup that utilizes a bunch of sensors in order to create essentially a DIY motor dynomometer. I've yet to finalize the mechanical design but I am using an ADS1115 in order to read an ACS758 current sensor and a voltage divider so I can record and graph the current over time as fast as possible while the motor spins. RPM is read with a cheap light gate style encoder and a 3D printed encoder wheel, so I can control the CPM. Some motors might be geared down to a few hundred RPM, some brushless motors in excess of 30,000RPM. I'm reading currents in excess of 75 amps at peak which is why I'm using a hall sensor and I also want it to work for much smaller motors too, so I wanted a resolution of ~0.05 amps, hence using the external 16 bit ADC. One problem I ran into is sensor drift. I noticed by just sitting there doing nothing over the course of a couple minutes the ADC read values can drive by up to 50. Other than calibrating to 0 at the start ever each test (which is my current workaround) is there any way to try and stabilize this?

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      These acs hall sensors are not very good at small currents. Maybe you watch my video concerning current measurements.

  • @ThylUlenspiegel101
    @ThylUlenspiegel101 3 ปีที่แล้ว

    Hi Andreas, great video. Any chance you've also looked into reading low voltage signals (in range 0-0.3V) and related challenges (noise introduced by amplification, etc?)

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      No. As you write, this is more a topic of amplification than a topic of ADC.

  • @AkosLukacs42
    @AkosLukacs42 3 ปีที่แล้ว +8

    Don't forget about adc noise reduction in Atmega. Automatic sampling, averaging without CPU intervention or built-in comparators & other advanced features in bigger Atmegas, STM32, nRf52, and most other arm uCs.

  • @lorenzo.c
    @lorenzo.c 3 ปีที่แล้ว

    Andreas, great video, very clear and useful.
    @11:43 you say that the analog reference voltage AREF is not available but it actually appears to be connected to a pin of the header named IOH (I have a genuine Arduino Uno and AREF is marked on the header)

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      There is another commenter explaining the facts below

    • @lorenzo.c
      @lorenzo.c 3 ปีที่แล้ว

      Thanks for replying.
      @@AndreasSpiess, do you mean
      Graham Wideman?
      I understood your sentence as "the pin of the microcontroller is not connected" but you meant that "the pin is not connected to an on-board voltage reference". Is that the case?
      I just bought a couple thermistors and an LM4040C41 and I'm going to use the Arduino to measure a couple temperatures. It would be nice if you showed how, even with a cheap and cheerful Arduino, it is possible to get fairly accurate measures when the signal is slow and the device (thermistor in my case) can be powered by the reference.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +2

      It was Uwe Zimmermann :
      "available yes, connected to circuitry on the Arduino: no.
      But be careful, if you switch the ADC reference to the internal bandgap reference while connecting another voltage to AREF blows out the internal bandgap reference for good."

  • @MatthiasLeimbach
    @MatthiasLeimbach 3 ปีที่แล้ว +1

    Genau das brauche ich gerade, danke !!!!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      Bitte, gern geschehen!

    • @MatthiasLeimbach
      @MatthiasLeimbach 3 ปีที่แล้ว +1

      @@AndreasSpiess
      Klasse, ich möchte schon seit längerem die Spannungen meiner 24V PV-Inselanalge, die meine Garage incl. el. Torantrieb versorgt, monitoren.
      2 Kanäle, für PV-Vin bis 50V, für Batterie bis 30V.
      Ein esp8266 (nodemcu) mit vorgeschaltetem Spannungsteiler hat dabei aber natürlich nur Mist ausgegeben.
      Die Anzeige sprang um mehrere Volt, die Werte waren also nicht zu gebrauchen.
      Jetzt ist auch mir klar warum. (ADC bescheiden, und WLAN an, zur Übertragung 🤦‍♂️🤷‍♂️)
      Habe mir gerade mal den ADS1115 aus Fernost bestellt.
      Dann sollten die Spannungen endlich sinnvolles ausgeben und ich bekomme mein Garagentor immer auf :-)
      Noch einmal ein großes Dankeschön!!!

  • @bm830810
    @bm830810 3 ปีที่แล้ว +1

    I think sigma delta ADC was also worth mentioning which is also used in ADS1115, maybe in future videos

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      You are probably right. But the video was already very long :-(

  • @zainalishammat2866
    @zainalishammat2866 ปีที่แล้ว

    thank you

  • @Homie111092
    @Homie111092 3 ปีที่แล้ว

    Danke Andreas, dieser Teil fehlte mir noch für mein Projekt :)

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Schön, dass du es jetzt beenden kannst.

  • @robertfischer7212
    @robertfischer7212 3 ปีที่แล้ว

    Danke, Andreas, du bestätigst meine Beobachtungen. Ich verwende auch nur noch die kleinen, externen ADCs. Ein Hinweis noch, die Adafruit-Treiber für ADS1015/ADS1115 könnten beim ADS1115 Probleme machen. Der ADS1015 (12Bit ADC) arbeitet perfekt. Für den ADS1115 ggf einen Fork der Adafruit-Lib von User soligen2010 nutzen.

  • @diydsolar
    @diydsolar 3 ปีที่แล้ว

    Hi , about Arduino, i know that you know but is to clarify to others. If you use 5v in your formula and change supply voltage, it is clear that it will not take good values
    I usually work with the internal secret method for measure Vcc (you don't need any other analog pin for that). Also you can use low noise ADC sleep mode to measure.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      This is what I showed in video #10 ;-)