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

  Рет қаралды 46,955

Electronoobs

Electronoobs

Күн бұрын

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

Пікірлер: 118
@zyghom
@zyghom 3 жыл бұрын
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 3 жыл бұрын
"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 3 жыл бұрын
@@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 3 жыл бұрын
@@zyghom In that case refer to reason 1 💪🧠 There is also the third reason that I follow sometimes, just because you can. 😎
@zyghom
@zyghom 3 жыл бұрын
@@deadly_dave we are together ;-) That is why I said: "super nice educational video" ;-)
@deadly_dave
@deadly_dave 3 жыл бұрын
@@zyghom That's fair :)
@BrownieX001
@BrownieX001 3 жыл бұрын
Interested in this type of content for ESP32
@akul24
@akul24 2 жыл бұрын
Me too 🙌
@IncroyablesExperiences
@IncroyablesExperiences 3 жыл бұрын
Very interesting, the "quality" times "deep info" from your channel is unique!
@jackwilliams2010
@jackwilliams2010 3 жыл бұрын
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!
@khomo12
@khomo12 25 күн бұрын
Very good! As an undergrad, I know that it is not easy to explain this in such a short amount of time!👍👍👍
@eduarddez4416
@eduarddez4416 7 ай бұрын
Your series regarding registers has truly helped me better understand how things work . Thank you
@FreeCircuitLab
@FreeCircuitLab 3 жыл бұрын
I have watched it in full quality 1080p. Now I realized it is worth to do so. Nice tutorial
@prashantmalla3094
@prashantmalla3094 2 жыл бұрын
This is what I was searching for whole day and Thanks for making this video.
@bogdan546
@bogdan546 3 жыл бұрын
I was waiting for this episode.
@tomcrofton7744
@tomcrofton7744 3 жыл бұрын
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.
@Sekhar_Home
@Sekhar_Home 3 жыл бұрын
I finally able to learn what to use with ADC.. thanx again.. pls give more videos on analog 101 series
@iamnotsure1
@iamnotsure1 3 жыл бұрын
I love your videos. Your uploads make my day!
@fahadalmansor2688
@fahadalmansor2688 19 күн бұрын
excellent presentation and sequence of information, man you are a good teacher
@RavindraSingh-jw2sm
@RavindraSingh-jw2sm 3 жыл бұрын
That is some really quality stuff. Brilliant 🙌
@incxxxx
@incxxxx 2 жыл бұрын
Informative and clear. Super!
@jaroslawpiotrowski210
@jaroslawpiotrowski210 3 жыл бұрын
Very good tutorial, very good and simple way explain how to program arduino and others microcontrollers on low level. I like it !
@RoterFruchtZwerg
@RoterFruchtZwerg 3 жыл бұрын
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!
@hiteshjain2640
@hiteshjain2640 3 жыл бұрын
Really nice vid mate. You inspire me to learn more and I started a KZfaq channel too.
@VorpalForceField
@VorpalForceField Жыл бұрын
Excellent series ..!!! Thank You for sharing ... Cheers :)
@siddharthmali5841
@siddharthmali5841 3 жыл бұрын
Excellent video as usual. 👍🏻
@adespade119
@adespade119 2 жыл бұрын
Excellent video, thank you.
@backdemoletor4654
@backdemoletor4654 3 жыл бұрын
Interesting video ... Especially the part of the temperature sensor
@amnesie6615
@amnesie6615 3 жыл бұрын
Advanced Arduino = BIG LIKE!
@diyrobotronics
@diyrobotronics 3 жыл бұрын
Awesome sir🔥🔥
@DuroLabs85
@DuroLabs85 3 жыл бұрын
Very helpful and excellent video regards from india
@Benqo
@Benqo 8 ай бұрын
Thank you a lot. Very nice explanation.
@francoisrochefort5759
@francoisrochefort5759 3 жыл бұрын
Very nice and instructive video; thank you
@shuvendupattari8079
@shuvendupattari8079 3 жыл бұрын
As always, incredible man 👌👌👌👌
@Taran72
@Taran72 3 жыл бұрын
Thank you for explaining this so clearly. :)
@sultan7679
@sultan7679 Жыл бұрын
Great video, Thanks
@deepshekhat281
@deepshekhat281 3 жыл бұрын
very well explained....
@FixTronics
@FixTronics 3 жыл бұрын
Great content as always
@ankitnegi2524
@ankitnegi2524 3 жыл бұрын
I love this seriessss.....
@electronic7979
@electronic7979 3 жыл бұрын
Very helpful video
@Mr0neShotAway
@Mr0neShotAway 3 жыл бұрын
This is amazing! more please :)
@daniele1209
@daniele1209 2 жыл бұрын
Thanks for nice works
@user-xb5zu6zu7j
@user-xb5zu6zu7j 3 ай бұрын
excellent video
@Cdswjp
@Cdswjp Жыл бұрын
thank you. nice video friend!
@MasterJOEvlog
@MasterJOEvlog 2 жыл бұрын
nice tutorial thank you
@ranganatennakoon
@ranganatennakoon 3 жыл бұрын
I love 101 tutorial . thanks noobs !
@Tony770jr
@Tony770jr 3 жыл бұрын
More register videos would be great!
@vishal01mehra
@vishal01mehra 3 жыл бұрын
Need similar knowledge about Esp32. Great video thanks.
@gtxsatria2010
@gtxsatria2010 3 жыл бұрын
You are Genius. I want learn but to old for learning
@sci-makem7941
@sci-makem7941 3 ай бұрын
Thx for the fully explained video👏🏻 upload more video like this😃 this really helped me🫡
@PhG1961
@PhG1961 3 жыл бұрын
Nice video, very usefull !
@ELECTRONOOBS
@ELECTRONOOBS 3 жыл бұрын
Arduino Course (Spanish): bit.ly/3ldW6kO Follow me on FACEBOOK for more: facebook.com/Electronoobs Help me on Patreon: www.patreon.com/ELECTRONOOBS
@Zhaymoor
@Zhaymoor 3 жыл бұрын
Amazing ! Thank you
@cuarentenaviral4756
@cuarentenaviral4756 3 жыл бұрын
Saludos! 😍 Espero y puedas hacer un video sobre el ESP32
@muhandes8453
@muhandes8453 3 жыл бұрын
Thank you very much!!
@ahmadhussain6482
@ahmadhussain6482 3 жыл бұрын
good job
@HomeTV-PK
@HomeTV-PK 3 жыл бұрын
Hi Bro you are doing great work. Next video should be be on generating pwm on multiple pins at same time with register
@webslinger2011
@webslinger2011 3 жыл бұрын
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.
@CABohol
@CABohol 3 жыл бұрын
Nice!
@your.free.electrons
@your.free.electrons 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?
@PablumMcDump
@PablumMcDump 3 жыл бұрын
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).
@Utube2Itube
@Utube2Itube 3 жыл бұрын
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?
@FreeCircuitLab
@FreeCircuitLab 3 жыл бұрын
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
@BenMitro
@BenMitro 3 жыл бұрын
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?
@techieelectro
@techieelectro 3 жыл бұрын
What's up my friend 😊👍
@guilhermerochasoares236
@guilhermerochasoares236 3 жыл бұрын
Muito bom!!!
@yousifali1737
@yousifali1737 3 жыл бұрын
amazing video, I hope you keep doing more videos like this.
@Shubham-po2tp
@Shubham-po2tp 3 жыл бұрын
Please do more on microcontroller U r explaining is best
@Shubham-po2tp
@Shubham-po2tp 3 жыл бұрын
Skills
@ELECTRONOOBS
@ELECTRONOOBS 3 жыл бұрын
Thank you so much! I'll do more!
@Shubham-po2tp
@Shubham-po2tp 3 жыл бұрын
@@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
@byronwatkins2565
@byronwatkins2565 2 жыл бұрын
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.
@rifatrahmanriku9018
@rifatrahmanriku9018 3 жыл бұрын
Hope you will make this type of video for esp32
@xnetworkDEVILx
@xnetworkDEVILx 3 жыл бұрын
hi thanx for the video but please can you tell us witch software you use for the teaching animation ???
@zohaibanwer5199
@zohaibanwer5199 3 жыл бұрын
So .. if we .. set .. reference to 1.1v can we used it measure.. thermocouple .. ?
@shoumikahmed6373
@shoumikahmed6373 3 жыл бұрын
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...
@ranaharsh365
@ranaharsh365 3 жыл бұрын
Next: Communication Protocols😁... I'm waiting....
@galihtanu
@galihtanu 3 жыл бұрын
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
@jdelectron
@jdelectron 3 жыл бұрын
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.....
@Schwuuuuup
@Schwuuuuup 3 жыл бұрын
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
@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?
@Shubham-po2tp
@Shubham-po2tp 3 жыл бұрын
Please tell how to use interupt Hardware and software
@edgarbonet1
@edgarbonet1 Жыл бұрын
Very nice tutorial! There is just one issue with your code, this line is incorrect: int value = ADCL | (ADCH
@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
@taranagnew436
@taranagnew436 2 жыл бұрын
where can i print the page you have?
@MikesTropicalTech
@MikesTropicalTech 3 жыл бұрын
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 3 жыл бұрын
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.
@user-gw1pj7fh7q
@user-gw1pj7fh7q 8 ай бұрын
Расскажите пожалуйста если можно как в регистрах настроить 12 битный ацп
@aymaneelfahsi8048
@aymaneelfahsi8048 2 жыл бұрын
what if it's a microphone??? should i first get rid of the negative signal?
@tonyvarghese75
@tonyvarghese75 3 жыл бұрын
Can you please make driver drowsiness detector using raspberry pi and usb camera
@paulpixzy5297
@paulpixzy5297 Жыл бұрын
Please how can i use register for more than one channel?? I need reply
@_munna_
@_munna_ 3 жыл бұрын
👌👌👌👌
@yuriselektro2236
@yuriselektro2236 3 жыл бұрын
👍👍
@fatimawaterdetector
@fatimawaterdetector 3 жыл бұрын
Hi sir I want instrument for underground water detection special software and program can you make for me thanks
@Shubham-po2tp
@Shubham-po2tp 3 жыл бұрын
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 3 жыл бұрын
Is it safe to connect Arduino 3.3 v pin to ref May this resolve it
@georgevarughese2770
@georgevarughese2770 3 жыл бұрын
CAN YOU SUPPLY A WEIGHING SCALE PROJECT INCLUDING SOURCE CODES?
@erdum
@erdum 3 жыл бұрын
Next UART
@zuhaibchoudhary4635
@zuhaibchoudhary4635 2 жыл бұрын
👍
@rakesh__rocky9
@rakesh__rocky9 3 жыл бұрын
💫🤟🏼💞
@sultan7679
@sultan7679 Жыл бұрын
That keysight multimeter is really sexy
@richmondmagallon6948
@richmondmagallon6948 10 ай бұрын
+/- 10 difference in temperature is a night and day difference 🥲
@mitalighosh7801
@mitalighosh7801 3 жыл бұрын
#GlobalElectroTech
@MuhammadDanish-xz3qt
@MuhammadDanish-xz3qt 3 жыл бұрын
Sir i want to know your source of earning.
@legominimovieproductions
@legominimovieproductions 3 жыл бұрын
In the most cases the "5V" on my arduinos is somewhere between 4.2 and 4.8V XD
@royerickmelendez3408
@royerickmelendez3408 2 жыл бұрын
a video without a banana it´s not a video...
@kosmos8460
@kosmos8460 2 жыл бұрын
Для чего писать по русски когда видео на английском ?
EEPROM Memory - Store Anything - Arduino101
13:16
Electronoobs
Рет қаралды 102 М.
Latch Circuit - Wake up + 0 Power Consumption (useful circuit)
9:16
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 38 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 10 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 48 МЛН
Utilizing the Arduino ADC Internal Reference
17:04
ForceTronics
Рет қаралды 27 М.
How to use ADC in STM32 Microcontroller- Read Analog Sensor Value
17:32
Pin Change Interruptions ISR | PCINT | Arduino101
14:19
Electronoobs
Рет қаралды 56 М.
Level Up Your Arduino Code: Registers
21:09
SparkFun Electronics
Рет қаралды 183 М.
SPI: The serial peripheral interface
33:00
Ben Eater
Рет қаралды 674 М.
From Idea to Schematic to PCB - How to do it easily!
11:05
GreatScott!
Рет қаралды 1,8 МЛН
Port Register Control | Increase speed of Read/Write - Arduino101
15:22
Bizda +50☀️ Subscribe❤️
0:14
Hayot Sinovlari
Рет қаралды 4,8 МЛН
Читерская рыбалка!🤯🐟 (@fishinglover790)
0:24
Взрывная История
Рет қаралды 2,2 МЛН
Olha o sorvete 😲
0:13
KaLu Tv
Рет қаралды 3,2 МЛН