How to accept an analog input signal in Arduino.
In the last episode we saw how to take digital input to Arduino. We also knew that there are two types of signals in the electronics world: Digital and Analog. Digital 0 and 1 means that we know that everything is operated and calculated only on 5 volts in digital electronics. If there is a signal value below 2.5 volts, if it is 0 or logical low in digital signal and 2.5 volts, then it is considered to be 1 or logical.
One thing we noticed is that we calculate the whole 5 volts by just 0 and 1. Well, no signal voltage of 0.3 volts and another signal 1.2 volt. We will get two logical logical values in digital. That is, in this case we do not know the value of the voltage. But in the analog system we will know how much the signal voltage is. What seems to be difficult? It is not difficult at all.
While working on analog inputs in Arduino, total value is calculated from 0 volts to 5 volts at 1024. That means if the signal voltage is equal to 5 volts then its value is assumed to be 1024. When Arduino returns 5 volts, it will be checked with analog input, value will be available 1024. Now we can find out how much its value is for any voltage level between 0 to 5 volts, by taking this information. It can be done very easily through the simple rules. One thing to say is that when we take data from different sensors, we will have to calculate it in milli volts. 1 volt is equal to 1000 ml volts. Meaning we will say value 1024 for 5000 volts. We have to take about several millig voltages input from different sensors. So, using this formula, we will know how much the input voltage is.
Well, think a little bit differently. When Arduino we will give an input Arduino but not how much voltage is given to him. He just tells us the value. Well, if you know the value, how can we find out the input voltage? Of course. Turn that back to the thread that I said a little earlier. Now we will say if the value is 1024, the input value of the voltage provided is 5000 mm volts or 5 volts. Thus, we can calculate the voltage for any value. The subjects did not even write this way. Because I discussed these videos in the video. However, once you write for your convenience. Watch this video.
Hopefully today’s episode you’ve got done well. However, if there is any problem, then tuamana will tell.