Skip to main content

Arduino Voltmeter


Nowadays Voltmeters are commonly using devices like in the digital voltmeter or multi meter or solar panel  power monitoring system anyway do you know how it is working here I'm trying  to understanding that how it is working
Here I'm creating an Arduino based voltmeter so we need to understand Arduino a little bit before getting into that take a look at this Arduino example program called ReadAnalogVoltage our base program is this, by modifying the program and the hardware we can measure a wide range of voltages.

ANALOG PIN & ITS THEORY


First, we have to take a look at the Arduino pins here we are using the Analog pins to measure the voltage and it is a 10 bit ADC (Analog to Digital Converter) 
so it can chop or sampling  the input signal = Input signal/210 
but Arduino can only handle the voltage 0 to up to +5V if the voltage exceeds it will probably burn the entire Arduino or  the pins so be careful with this voltage,

so if we take the maximum voltage such as +5V then the ADC will chop or sampling value is
1 value = 5/210 = 0.00488 ~4.9mV
1023 value = (5/210 )*1023 =5V
OR
 Don't worry, Simply I will explain that here 

0 Volts = 0 Value

5 Volts = 1023 Values (
210=1023)

1 Volts =1023/5 =204.6 values

2.5 Volts = (1023/5)*2.5 = 511.5 values

5 Volts = (1023/5)*5 = 1023 values

OK I know it's somewhat boring so let's jump to our hardware designing part

VOLTAGE DIVIDER

In electronics, the voltage divider rule is a simple and most important electronic circuit, which is used to change a large voltage into a small voltage. Using just an i/p voltage and two series resistors we can get an o/p voltage. Here, the output voltage is a fraction of the i/p voltage. The best example of the voltage divider is two resistors are connected in series. When the i/p voltage is applied across the pair of the resistor and the o/p voltage will appear from the connection between them. Generally, these dividers are used to reduce the magnitude of the voltage or to create reference voltage and also used at low frequencies as a signal attenuator.




 Simply voltage divider circuit is a very common circuit that takes a higher voltage and converts it to a lower one by using a pair of resistors. The formula for calculating the output voltage is based on Ohms Law and is shown below.



DERIVATION



You can use this calculator to calculate Vout voltage😁



Voltage Divider Calculator:


 OK let's end this I think we can jump to the action😃

ARDUINO VOLTMETER

Here we are using an Arduino as a voltmeter I'll give the circuit diagram and the code. 
This for the Arduino interfaced with 4bit mode LCD..  

This is the Arduino interfaced with I2C LCD module

Code & Schematic diagram : Click here


We need 40V voltmeter then we need to calculate the resistance of R1 and R2.
The calculation are given here


Comments

Popular posts from this blog

ATMEGA328P-TQFP32-PINOUT

Here'a a pinout diagram I created for the ATMEGA328P TQFP32 . It is shared under CC-BY-SA license. You're free to modify it and share. Just give a backlink to my project website if possible (I have not posted the pinout diagram on my website yet. I'm also attaching a PDF,SVG version so that you can edit with any vector editing software. If you want me to create pinout diagrams for other boards, I'd be happy spend some free time on it. Let me know. Hope you'll find it useful :)  Github: https://github.com/Krishnawa/ATMEGA328P-TQFP32-PINOUT

Arduino-Register Programming

Simple LED Blink Program Here I'm explained my first register level coding, It is awesome and it's make me much more understand about how the microcontroller is working, I'm still learning, so here I'm sharing what I understood. Are you ready for this then let's go Arduino language Blink program This is simple Blink program without using any functions!. Take a look at the code the same code is converting to register level unsigned long counter = 0 ; // initializing  counter variable and set to 0 void setup ( ) {   pinMode ( LED_BUILTIN , OUTPUT ) ; // set 13th pin LED as output   Serial . begin ( 9600 ) ; // initializing Serial communications } void loop ( ) {   counter ++ ; //increment the counter   Serial . println ( counter ) ; // print the counter value on Serial monitor   if ( counter > 250 ) {     digitalWrite ( LED_BUILTIN , HIGH ) ; // if counter value greater than 250 then LED turn ON   }   if ( counter > 5

Bootloader - Arduino

What is a bootloader, and what is bootloading? The bootloader is the little program that runs when you turn the Arduino on, or press the reset button. Its main function is to wait for the Arduino software on your computer to send it a new program for the Arduino, which it then writes to the memory on the Arduino. This is important, because normally you need a special device to program the Arduino. The bootloader is what enables you to program the Arduino using just the USB cable. When we refer to "bootloading" the Arduino, we are talking about using a special device (called an In-System Programmer or ISP) to replace the bootloader software. Normally the default bootloader of arduino is Optiboot Here I am showing that an alternative and some more advanced options in Arduino bootloader option called MiniCore Why MiniCore? An Arduino core for the ATmega328, ATmega168, ATmega88, ATmega48 and ATmega8, all running a custom version of Optiboot for increased functio