Arduino Tutorial #5 - Digital Voltmeter, Arduino Analog to Digital Converter

preview_player
Показать описание
------------------------------ Click "Show more" -------------------------------------------
In this tutorial we look at a digital voltmeter project and how it used the Arduino analog input. This involves understanding ADC or analog to digital converters and how they work. We also troubleshoot why the output reading on the LCD display is noisy.

The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU (datasheet). It is the first Arduino board based on a 32-bit ARM core microcontroller. It has 54 digital input/output pins (of which 12 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz clock, an USB OTG capable connection, 2 DAC (digital to analog), 2 TWI, a power jack, an SPI header, a JTAG header, a reset button and an erase button.

------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
===================================================
Video sponsor, Pass Ltd - their websites:
At checkout use the discount / promotion code "mjlorton" for 5% off.
===================================================
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Bitcoin (BTC) Donations: 1K7PeF55e7ssE7W3WVCoa7c4j2PHzy6ASv
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
**********************************************************************************
Music clip from PatternMusic by Richard Lawler
(used under creative commons Attribution-ShareAlike Unported 3.0)
**********************************************************************************
Рекомендации по теме
Комментарии
Автор

Thank you.
In 1979 I built my own Z80 with 48k of memory (Nascom 2)
- now I wish my grandkids to get into the Arduino for robots etc.

noelhall
Автор

I first bought my arduino approximately 1 year ago. This was one of the first tutorial i watched and attempted. quickly I realized I needed more programming knowledge in order to build a program my volt meter. Since then i took a course at my local community college intro to python. i was encouraged to do so by this videos you created for us Martin. I thank you for you exposed me to a world i did not know existed !

nusernameavalible
Автор

This is an older video, but to anyone who is curious it's important to note that powering the arduino with the USB port the voltage is not regulated, It's expected to be 5V because that's the USB standard. When powering with the barrel jack there is a LM7085 5V linear voltage regulator used to establish the 5 volts.

Diamonddrake
Автор

I wanted to say a special thanks to you and for posting this you tube video. It has helped me, a recently retired and new to Arduino, tremendously to get started with something useful. I don't have the 4 line LCD but do have a large new Arduino kit that contains a 2 line LCD. So I significantly modified your sketch to build a new one for a 2 line LCD that records close to the same outputs on the LCD with much more detail on the Serial Monitor. I wanted to post this sketch to your site but could not figure out where on your site to put it. In case anyone wants my sketch, I am happy to send it privately.

break
Автор

We know that YouTube arranges videos in a strange manner and the next video in a series may not show-up in the upper corner of the YouTube screen every time, and it is possible that one cannot find the next video in a series inside a  group easily. When you have time you may give the link of the immediate next video on all of your videos in order to let us follow each group in a raw without "jumping" between other groups of subjects.

Your videos are great. I learned much as I watched them. Thanks a lot. Just go ahead.

fahmylina
Автор

WOW! I watched this video again after a while and it's really a great source for at least 3 of my projects! thank you so much for sharing all this good information. I'm glad I am supporting you on Patreon!
I like your style of explaining stuff thoroughly and clearly. It's hard to find someone that goes through all the details the way you do. :)

Taran
Автор

My pleasure, thanks for the feedback.

mjlorton
Автор

For most peoples it could be very boring, but You are explaining that so nice, You make it so interesting, that to end of movie I was't bored! I was surprising that movie with 49 minutes finished so fast :D I watch many tutorials, but You are explaining everything so precise that nothing was bored. And one thing more. You are now my favorite teacher in the world! :D
In one tutorial from You Erlier I must search 5 tutorials from others, and still they didnt explain everything what I want to know.

maximo
Автор

By far the best tutorial thanks for including theory of ADC.

Allthingstech
Автор

Another good one Martin. Thankyou. Coincidentaly I was doing the voltmeter thing just before viewing this vid. One thing you commented on was the number of significant digits shown on the output. By default the compiler software limits the decimal places to 2 but if you make your print statements like this Serial.println(voltage, 4); you will get 4 digits after the decimal point. By the way it seems you have been hanging around with those Yanks too long. Due is pronounced as dew-ay.Think Italian

RobB_VKES
Автор

Another nice thing about the Arduino over true AVR programing is that you can quickly prototype an idea and then when you have proof of concept you can move on to writing your code in C/C++ using the AVR libraries and building your final circuit with just the microcontroller chip and supporting components.

DeeegerD
Автор

also @31:37 you can put a series resistor just the voltage divider is connected to the adc to protect it. External protection diodes are also helpfull.

BuildItAnyway
Автор

I came across an Add-In for Atmel studio that lets you debug the code easier when running it live. It's called "Visual Micro". It takes a bit getting used to it, but is pretty cool. It's a good next step if you're used to Visual Studio or want more than the Arduino IDE can do.

twjonckheere
Автор

Thanks Andrew. T-Shirts...yup...I have a few ideas up my sleeve ;-) when time allows. The rest of this year is going to be manic...

mjlorton
Автор

Excellent video, as always. I watched it all the way through and liked very much. Good value work you're doing! Thanks!

birrbert
Автор

This is good. Was waiting to see the #6, but not found anywhere.

hemashri
Автор

I really enjoy your Arduino vids. Thanks a lot. You're a very good instructor.

CharlesMartel
Автор

Thanks for the Arduino Tutorials, their very detailed.
I would say your voltage divider allows you to read 30V not 50V.
Greg

greg
Автор

Interesting...I'll have to look into that.

mjlorton
Автор

Martin, your explanations are very good, thank you!

pepper