ADC blocks and REGISTERS | Internal Reference | Internal Temperature Sensor Arduino101

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 มิ.ย. 2024
  • High quality PCB prototypes: www.pcbway.com
    3D & CNC service: www.pcbway.com/rapid-prototyp...
    🔥Another class for the Arduino 101 series. This time we take a look at the ADC. Registers we need to control, how to make a read, the internal referecne and the temperature sensor we have onboard.
    🔀LINKS
    -------------------------------------
    Tutorial Website: electronoobs.com/eng_arduino_t...
    ATmega328p datasheet: bit.ly/3csU1i6
    Get Arduino UNO: www.banggood.com/custlink/mvv...
    Arduino Course (Spanish): bit.ly/3ldW6kO
    🤝SUPPORT
    -------------------------------------
    Join my Arduino Course (Spanish): bit.ly/2JY8icE
    ELECTRONOOBS.io: electronoobs.io
    Help my projects on Patreon : / electronoobs
    my Q&A page: electronoobs.io/forum/index.php
    Facebook page: / electronoobs
    Canal en Español: / electronoobs en español
    00:00 Intro
    01:48 ADC blocks
    03:54 Select the INPUT
    04:44 Voltage Reference
    08:17 Conversion
    09:33 Why Use Internal Reference
    12:14 Internal Temperature Sensor
    13:17 The Prescalar
    18:20 Thank you
    Like share and subscribe to motivate me. Thank you
    #Arduino101
    #tutorial
    #ADC
  • แนวปฏิบัติและการใช้ชีวิต

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

  • @zyghom
    @zyghom 2 ปีที่แล้ว +10

    super nice educational video, I still however did not get WHY we would go for register vs built in functions but ok ;-)
    Great point about ref voltage
    btw 1k/4.7k resistors - it makes sense to measure them first or apply some reference voltmeter when the project is finished - and let me tell you from my experience: breadboard vs. soldered final project is huge difference.
    On Raspberry Pico ADC minimum value never goes below 450 but max goes to 64k - strange

    • @deadly_dave
      @deadly_dave 2 ปีที่แล้ว +10

      "I still however did not get WHY we would go for register vs built in functions but ok ;-)"
      Two reasons I suppose.
      1. It's good to understand what is happening on the chip, this is somewhat hidden from you if you are using the built in functions.
      2. Depending on your use case, direct register code is going to run faster/significantly faster than using the built in functions.

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

      @@deadly_dave yeap, in general it would be true but in this case probably not much. When I read ADC I usually make few measurements and then get AVG ;-)

    • @deadly_dave
      @deadly_dave 2 ปีที่แล้ว +4

      @@zyghom
      In that case refer to reason 1 💪🧠
      There is also the third reason that I follow sometimes, just because you can. 😎

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

      @@deadly_dave we are together ;-) That is why I said: "super nice educational video" ;-)

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

      @@zyghom That's fair :)

  • @IncroyablesExperiences
    @IncroyablesExperiences 2 ปีที่แล้ว +5

    Very interesting, the "quality" times "deep info" from your channel is unique!

  • @BrownieX001
    @BrownieX001 2 ปีที่แล้ว +22

    Interested in this type of content for ESP32

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

      Me too 🙌

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

    I have watched it in full quality 1080p. Now I realized it is worth to do so. Nice tutorial

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

    Your series regarding registers has truly helped me better understand how things work . Thank you

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

    I really enjoy watching detailed videos like this. It fills gaps in my knowledge and makes me more confident I can do these things myself. And you have such a great way of explaining things. Thank you!

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

    Arduino Course (Spanish): bit.ly/3ldW6kO
    Follow me on FACEBOOK for more: facebook.com/Electronoobs
    Help me on Patreon: www.patreon.com/ELECTRONOOBS

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

    Advanced Arduino = BIG LIKE!

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

    This is what I was searching for whole day and Thanks for making this video.

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

    I love your videos. Your uploads make my day!

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

    I was waiting for this episode.

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

    I finally able to learn what to use with ADC.. thanx again.. pls give more videos on analog 101 series

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

    This is cool. With a PIC micro I was once able to send the DAC output to the ADC input and get the battery voltage without using any external pins.

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

    Excellent video, thank you.

  • @RoterFruchtZwerg
    @RoterFruchtZwerg 2 ปีที่แล้ว +4

    Great Video, very well explained! However, you missed one important trick ;) One source of the ADC Mux is the internal 1.1V bandgap reference. This allows you to measure the 1.1V internal reference against Vcc as reference and thus determining Vcc without the need of a voltage divider or additional wiring!

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

    Excellent series ..!!! Thank You for sharing ... Cheers :)

  • @RavindraSingh-jw2sm
    @RavindraSingh-jw2sm 2 ปีที่แล้ว

    That is some really quality stuff. Brilliant 🙌

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

    Informative and clear. Super!

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

    Thank you a lot. Very nice explanation.

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

    Very helpful and excellent video
    regards from india

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

    Interesting video ... Especially the part of the temperature sensor

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

    Really nice vid mate. You inspire me to learn more and I started a TH-cam channel too.

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

    Excellent video as usual. 👍🏻

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

    Very helpful video

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

    As always, incredible man 👌👌👌👌

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

    very well explained....

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

    Very good tutorial, very good and simple way explain how to program arduino and others microcontrollers on low level. I like it !

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

    Very nice and instructive video; thank you

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

    I love 101 tutorial . thanks noobs !

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

    Thank you for explaining this so clearly. :)

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

    You are Genius. I want learn but to old for learning

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

    Great video, Thanks

  • @sci-makem7941
    @sci-makem7941 หลายเดือนก่อน

    Thx for the fully explained video👏🏻 upload more video like this😃 this really helped me🫡

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

    Need similar knowledge about Esp32. Great video thanks.

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

    Great content as always

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

    Thanks for nice works

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

    I love this seriessss.....

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

    thank you. nice video friend!

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

    Awesome sir🔥🔥

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

    nice tutorial thank you

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

    This is amazing! more please :)

  • @user-xb5zu6zu7j
    @user-xb5zu6zu7j หลายเดือนก่อน

    excellent video

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

    Thank you very much!!

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

    More register videos would be great!

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

    Nice video, very usefull !

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

    Amazing ! Thank you

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

    Saludos! 😍
    Espero y puedas hacer un video sobre el ESP32

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

    good job

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

    Thanks for explaining this. So using a prescaler increases the sampling rate of the analog pins making it possible to create an audio amplifier using a nano and a dual h-bridge motor driver.

  • @Shubham-po2tp
    @Shubham-po2tp 2 ปีที่แล้ว +2

    Please do more on microcontroller
    U r explaining is best

    • @Shubham-po2tp
      @Shubham-po2tp 2 ปีที่แล้ว

      Skills

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

      Thank you so much! I'll do more!

    • @Shubham-po2tp
      @Shubham-po2tp 2 ปีที่แล้ว

      @@ELECTRONOOBS
      Thank you for your reply,
      I am fan of you
      Following since PID Vedio
      Ping pong ball
      Amazingly explained
      Best ever explanation of pid concept,
      After watching that vedio no one can have confusion on pid
      Thank you so much for putting great effort

  • @HomeTV-PK
    @HomeTV-PK 2 ปีที่แล้ว

    Hi Bro you are doing great work.
    Next video should be be on generating pwm on multiple pins at same time with register

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

    Hope you will make this type of video for esp32

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

    Nice!

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

    Hi brother, I have a question, can we sample higher frequency periodic signals with low sampling ADCs by taking samples not from a single cycle but from multiple cycles, lets say we want a 360° waveform, so if we sample it from 360 cycle by teiggering the conversation at right time while the wave is at that phase. Then we can merge the samples from different cycles to re create the shape of the wave. This will be helpful to make a high bandwidth scope using slow Arduino. Please reply with your opinion.
    Thanks

  • @your.free.electrons
    @your.free.electrons 2 ปีที่แล้ว +3

    Didn't knew that the atmega328p chip had an internal temperature sensor...thanks for this informative video...
    Just wanted to that is it possible for the atmega to get hot while operating at the highest clock speeds?

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

    Muito bom!!!

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

    I love this series and I really wanted to learn about the internal voltage reference, it will be extremely useful for some of my data logging applications. However, does anyone know how stable this voltage reference is compared to the 5V VCC e.g. when the arduino is powered with 12V (always the same supply adapter)? Is there a significant improvement in the stability?

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

    Very useful, thanks. Can you talk about external reference standards that you can buy from ebay such as the AD584KH precision voltage reference modules? Do they improve on the accuracy of the internal reference provided by the Arduino?

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

    You don't need a voltage divider. It is more accurate to use the supply as reference and then to read the internal bandgap reference. Reverse the equation to find out what reference is needed to yield 1.1V... that is your calibrated battery voltage.

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

    In other cases, you've noted that the use of registers can be faster than the Arduino functions -- is there a performance benefit in their use for ADCs?

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

    Good tutorial. Maybe you missed to comment that in order to make accurate measurements using the internal reference, you need to measure it. The datasheet says 1.1V, but the exact value can vary from chip to chip, so in order to make precise measurements, one has to measure it and include the value in the code. There are many videos about the topic on YT (the guy with the swiss accent has one).

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

    What's up my friend 😊👍

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

    hi thanx for the video but please can you tell us witch software you use for the teaching animation ???

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

    amazing video, I hope you keep doing more videos like this.

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

    So .. if we .. set .. reference to 1.1v can we used it measure.. thermocouple .. ?

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

    There is a seemingly better way to read VCC - Without a voltage divider, that drains the battery and without using pins. you can Read the Voltage Reference against VCC, and calculate VCC from there somewhat backwards:
    long readVcc() {
    long result;
    // Read 1.1V reference against AVcc
    ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
    delay(2); // Wait for Vref to settle
    ADCSRA |= _BV(ADSC); // Convert
    while (bit_is_set(ADCSRA, ADSC));
    result = ADCL;
    result |= ADCH

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

    Just for summary:
    So of i create external voltage reference 0.1 v (100mv) and measure 75mv
    I get 75/100*1023 reading?
    Tq for reply

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

    Next: Communication Protocols😁... I'm waiting....

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

    Can you please make driver drowsiness detector using raspberry pi and usb camera

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

    Im not understanding the sampling rate. You said that the sample rate is 16MHz divided by a division factor (one option being 2), but the max rate is 200KHz? what happens when the division factor is 2 and why does the ADC not sample at 8MHz in this situation?

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

    Hello sir, I have made the portable soldering iron V3 . But the buttons are not working properly .May be because there was no interrupts for the push buttons. If you fix the problem that would be great...

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

    👍👍

  • @user-gw1pj7fh7q
    @user-gw1pj7fh7q 6 หลายเดือนก่อน

    Расскажите пожалуйста если можно как в регистрах настроить 12 битный ацп

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

    That's what I queries (why veref or vcc is not internally shorted in chip)
    So we could avoid shorting in vref and vcc in battery powered project.....

  • @jstro-hobbytech
    @jstro-hobbytech ปีที่แล้ว

    Hey man, could you build a peak detector in software using this. I have a few 328pu chips. Great video series btw. I'll be back on your patreon in a few weeks

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

    Very nice tutorial! There is just one issue with your code, this line is incorrect:
    int value = ADCL | (ADCH

  • @Shubham-po2tp
    @Shubham-po2tp 2 ปีที่แล้ว

    Please tell how to use interupt
    Hardware and software

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

    what if it's a microphone??? should i first get rid of the negative signal?

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

    👌👌👌👌

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

    Please how can i use register for more than one channel??
    I need reply

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

    👍

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

    Thanks for this! The inaccuracy of analog voltage measurement has been bugging me for a long time. I see that using the default Vcc as the voltage reference is garbage due to your well-explained points.
    So the only way to get an accurate voltage reading is to:
    1 - Use the 1.1V reference
    2 - Prescale your maximum expected input voltage down to a maximum of 1.1V with a resistor divider.
    This leads me to see that you have to use extremely high precision resistors in your voltage divider, or you're forced to do a calibration process on every unit you build. Otherwise the single fixed scaling factor you use in the software will be inaccurate in each unit due to tolerances in the resistors. How do people normally handle this? 1%? 0.1%? What is the cost differential for these vs. default 5% resistors?
    I've tried to use an external 4.096V reference chip so I don't lose a bunch of resolution bringing my 80V battery pack max target voltage down to under 1.1V. Am I gaining anything with that chip or should I just massively scale down the input voltage and use the 1.1V reference?
    Also, how does using the Bandgap reference come into this? Does every microcontroller have the same Bandgap reference and if so, what value is it and how accurate is it? Thanks!

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

      I have seen many old boards where the manufacturer places a potentiometer on the board to manually calibrate. Another option to calibrate each board without a potentiometer is through software. Have an accurate 5v supply on your bench and run a routine to record the digital value on the board's nonvolatile memory. Your program can use that as the max value and scale accordingly.

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

    where can i print the page you have?

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

    Hi sir I want instrument for underground water detection special software and program can you make for me thanks

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

    Next UART

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

    CAN YOU SUPPLY A WEIGHING SCALE PROJECT INCLUDING SOURCE CODES?

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

    💫🤟🏼💞

  • @Shubham-po2tp
    @Shubham-po2tp 2 ปีที่แล้ว

    But Internal 1.1ref bound me to measure
    Maximum 1.1 v drop
    Is it applicable for 3 3.7 v series connection
    Fully charged 4.2*3 12.6
    Discharged 3.0*3 9v
    12.6 - 9 3.6
    Min 3 volt drops detection required

    • @Shubham-po2tp
      @Shubham-po2tp 2 ปีที่แล้ว

      Is it safe to connect Arduino 3.3 v pin to ref
      May this resolve it

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

    That keysight multimeter is really sexy

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

    #GlobalElectroTech

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

    +/- 10 difference in temperature is a night and day difference 🥲

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

    In the most cases the "5V" on my arduinos is somewhere between 4.2 and 4.8V XD

  • @MuhammadDanish-xz3qt
    @MuhammadDanish-xz3qt 2 ปีที่แล้ว

    Sir i want to know your source of earning.

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

    a video without a banana it´s not a video...

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

    Для чего писать по русски когда видео на английском ?