What is ADC and how potentiometer works — controlling LED brightness. Comprehensive Arduino lessons.

preview_player
Показать описание

This lesson is about digital and analog signals. To illustrate that I’ll be using a simple character who is about to die in a dungeon, some colored water, a pencil, a gas torch, some stairs, and a hill.

Here is a list of series, which I will add with the release of new lessons:
• LED, resistor and breadboard — making a flashlight:
• What is PWM — pulsar with increasing brightness:
• What is ADC and how potentiometer works — controlling LED brightness: You are here!

We have a rocker. It can move up and down. There are contacts on it. Let’s put a ball inside it. And add our pretty little LED. If I push the rocker down, the ball rolls and closes the contacts. The LED goes ON. And if I pull it up, it opens the contacts. The LED goes OFF. Let’s draw 1 here and 0nhere. Now you can see a simple digital signal. There are no other options, it’s either 0, or 1.

Digital signals were invented by humans, there is hardly anything similar in the world of nature. For example fire. Let’s see how heat works. I start heating that thermometer. The gas torch is pretty far from it, so the temperature is rising slowly. I hold it closer and the temperature is increasing at a much higher rate. It’s an example of a simple analog signal. No matter quick or slow, the temperature doesn’t jump from one mark to the other. It changes gradually.

Arduino, as most computers created by humans, works exclusively with digital signals. In order for it to «understand» the «language» of analog signals, it requires an «interpreter». Inside Arduino, there’s a special device ADC - analog to digital converter. It receives analog input and converts it into digital output. However, you can’t see that hardware as it is concealed inside the chip. Our model has 11 stages while Arduino has 1024. And the voltage from zero to five volts is divided into those 1024 stages.

Now I’ll tell you about the potentiometer. For you to fully understand how it works I made a little bench. It has sandpaper across and contacts on the sides. Those can be rotated to put electricity through. Any battery will do for that. I also need a pencil. I rub graphite on that sandpaper. I got a pretty thick layer. I connect those contacts to the graphite - positive and negative. It is now conducting electricity, though far worse than metal does due to the high impedance. It’s like a resistor. Add the third contact - the extraction ladder. If it is put in the middle, the voltage is down to 50%, and if I move it here - to 25%. Inside a potentiometer, there’s a similar graphite stripe, but it’s rounded. Rotating the knob is like moving that ladder, it lets us adjust the voltage to the desired level.

#comprehensivelessons #arduinofordummies #amperka #arduino
Рекомендации по теме
Комментарии
Автор

How are you not more viewed on YouTube?

revivalofzaurus
welcome to shbcf.ru