• Arduino accurate voltage measurement

    Arduino accurate voltage measurement

    Starting with a simple multimeter to a complex power quality analysers or DSOs everything has their own unique applications. Most of these meters are readily available and can be purchased based on the parameters to be measured and their accuracy. But sometimes we might end up in a situation where we need to build our own meters. Say for instance you are working on a solar PV project and you would like to calculate the power consumption of your load, in such scenarios we can build our own Wattmeter using a simple microcontroller platform like Arduino.

    Building your own meters not only bring down the cost of testing, but also gives us room to ease the process of testing. Sounds interesting right!? The upper part of the circuit is the measuring unit and the lower part of the circuit is the computation and display unit.

    For people who are new to this type of circuits followed the labels. Labels are normally used to make the circuit diagram look neat. The circuit is designed to fit into systems operating between V with a current range of A keeping in mind the specification of a Solar PV. But you can easily extend the range once you understand the working of the circuit.

    The underlying principle behind the circuit is to measure the voltage across the load and current through it to calculate the power consumes by it. Measuring Unit. The measuring unit consists of a potential divider to help us measure the voltage and a shut resistor with a Non-Inverting Op-amp is used to help us measure the current through the circuit. The potential divider part from the above circuit is shown below.

    Here the Input voltage is represent by Vcc, as told earlier we are designing the circuit for a voltage range from 0V to 24V.

    arduino accurate voltage measurement

    But a microcontroller like Arduino cannot measure such high values of voltage; it can only measure voltage from V. So we have to map convert the voltage range of V to V. This can be easily done by using a potential divider circuit as shown below.

    The resistor 10k and 2. The output voltage of a potential divider can be calculated using the below formulae. The mapped V can be obtained from the middle part which is labelled as Voltage. This mapped voltage can then be fed to the Arduino Analog pin later. Next we have to measure the current through the LOAD.

    As we know microcontrollers can read only analog voltage, so we need to somehow convert the value of current to voltage.An ammeter is an instrument used to measure current flow in a circuit, which is measured in amperes. In a Digital ammeter, we measure the voltage across a shunt resistance, which is series to the load; hence the current through the Load and shunt resistor is the same. An ammeter is connected in series with the load whereas a voltmeter is connected across the load.

    A shunt resistor should have very low resistance, that is it should not drop any considerable amount of voltage. Because the actual load current varies if an additional resistance is added in series. By taking the voltage difference between the input A0 and GND we can obtain the voltage across the resistance R.

    Code — Serial Display. The resolution of the measured value of the current can be adjusted by varying the value of the shunt resistor. For measuring loads with low resistance that is a high current, the value of the shunt resistor can be selected low.

    And if the load resistance is high means a small amount of current, then a shunt resistor of higher resistance is required so as to obtain a minimum voltage drop for measuring. By adjusting this measuring range the instrument can measure current in wide ampere ranges. The maximum input voltage of the Arduino pin is 5V. It should be considered that the voltage drops across the analog input pin never rise above 5V.

    In the above circuits, you can find that the voltage across the analog input A0 and GND will be always below 5V for an external supply of 9V. Hence no voltage drops across the A0 with above 5V. For safety, an additional 5V Zener diode can be added across the resistor to bypass any voltage above 5V. Even though it is not recommended to drop a voltage of 5V across the shunt because the drop across it should be always as low as possible. That is, it is not contributing any resistance or voltage drop to the circuit.

    Also, consider the power rating of the resistor that the circuit current is not exceeding its maximum current rating. The shunt resistor value has now been changed. Use the shunt resistor value the same as the value used in the circuit; the value of the resistor connected between A0 and GND. Your email address will not be published.

    How to make arduino attiny programmer shield. Controlling a LED using arduino serial monitor. Ultrasonic automatic braking RC car project. Why do we Need a starter in DC motors? Why fuse wires are always thin? What happens if it is thick? Continuity tester circuit with buzzer using timer and IC. Simple touch switch circuit using transistor,IC. Rectifier — Half wave rectifier and Full wave rectifier. Audio Tone generator circuit usingIC.

    LED chaser circuit using IC and Arduino 2. Hassan says:. April 14, at pm. April 17, at pm. Leave a Reply Cancel reply Your email address will not be published.This project relies upon accurate measurement of voltage as this is used to control the regulator. I have been having some difficulty getting reliable and accurate voltage measurement, so I wanted to figure out why that was.

    Arduino UNO, Using precision ADCs and DACs - Part 1 ADC

    I am using a simple potential divider to measure the voltage. This is being read by the bit accuracy analog to digital converter ADC.

    Arduino Ammeter – How to Measure DC Current using Arduino?

    I have covered some of this in my voltage measurement postbut this post mainly relates to using the options within the microcontroller to improve accuracy.

    This gives me some smoothing via the capacitor, over-voltage protection via the 5. Another item relating to resistance, which I have just read in the data sheet, is the input impedance of the ADC input. This is designed to be optimal for around 10k input impedance. This will mean that the capacitor used to do the ADC will take longer to fill and hence the ADC conversion time will be longer than optimal.

    This relates to the fact that we are converting an analogue signal into a digital signal. This is sometimes called quantization. Digital signals can either be on or off. Analogue signals can be anything at all and can vary infinitely within their range. We are trying to get this varying analogue data into our digital device the micro-controller.

    In order to do this we use the concept of levels also called quanta. Say we have a sine wave signal varying from 0 to 5V. Lets say we only have one bit resolution. The digital representation can only be on or off. If we set the level at 2. You can see that we do not get much detail from the signal. This might be enough data to do what we want, but generally we use more levels.

    arduino accurate voltage measurement

    The more levels, the higher the resolution and hence the better data accuracy. Adding an extra bit to the resolution increases the resolution by a factor of 2. This quickly multiplies up and at 8 bits we have levels or at 10bits we have levels. Some have 12, 14 or even 16 bits.

    John Errington's Experiments with an Arduino

    If you go to higher numbers of bits this puts more work onto the microprocessor, so you can also use special analogue to digital chips ADC which process the data and sends it to the micro-controller.My goal is to read values low as a 1mv change. I've read that 10 bit ADC in atmega is enough for this job. Is it or am I doing something wrong? Thanks P. S i have made a lot on changes to my circuit so please go over to my new link to get up to date.

    Ive read all of your feedback and tried to implement it. Thanks a lot for all your answers. You did the wrong approach. The guys already pointed to the basic problem at ahnd but I think there is more to it once we see some code you used. You don't need a lot of fancy stuff, just something accurate enough ; A precision shunt will be good for measuring amps in the direct comparison way. But with a fixed reference voltage and a comparator IC you can get get quite accurate measurements for voltages too.

    The trick is to know what the CPU can provide and where you need to compensate externally. You would need to create a precise circuit to give you a reference voltage between 0 and 5V for you measurement range. This can then be mapped to a normal input but only with the "spacing" available from different values which will bring you back to 0.

    There is an old computer trick that back in that day worked with low and high bits, a simple way to get more resolution by using two inputs instead of just one.

    Still you would need at least 4 inputs for this to get what you desire. Before we did any further: Do you need a voltmeter or do you need the Atmega to use whatever input you get to do weird things?

    arduino accurate voltage measurement

    For the first I would just invest in a multimeter Answer 2 years ago. Well pointed out A software guru can coax out an extra bit by doing a hundred car running average. Take a real long look at your voltage divider for stability too If you use this info with a precision reference voltage that is quite low, e. Only problem is that, like on a normal old school multimeter you will need to create a switch system to cater for different input ranges.

    Let's do two simple ratios and compare. Adding to this the LM can only promise a maximum stability mv and has a tendency to oscillate. What do you mean by "precision"? A voltage regulator is NOT a voltage reference by the way. Follow Asked by faraz ahmed khan in Circuits.In this project, I will show you how to build an Arduino Wattmeter, a device that can be used to measure the power consumed by a load.

    In addition to the Wattmeter, this circuit can also act as a Voltmeter and Ammeter to measure voltage and current. Measuring Voltage, Current and subsequently the Power is an essential task of any electronics engineer. For measuring voltage and current, you can use simple handheld multimeters as they provide both the range and accuracy for normal usage.

    But in order to measure power, you have several options like simple wattmeters to complex power analyzers and power meters. Instead of buying a readily available and an expensive Wattmeter, you can easily make your own Arduino Wattmeter.

    I will explain all necessary steps required for the same. There are number of ways that you can implement the Arduino Wattmeter Project. One of the easy ways is to interface a Voltage Sensor and a Current Sensor with Arduino, measure the voltage and current values and finally with some mathematics, you can calculate the Power in Watts. Although using sensors can provide accurate results, where is the fun in using sensors if you can build the entire system yourself.

    This is beneficial if you are a student and trying to grab the underlying concepts.

    arduino accurate voltage measurement

    The method which I will be implementing involves complete design of the circuit. The Sensor Part of the circuit is responsible for measuring the Voltage across the load and Current through the load.

    Subscribe to RSS

    Both these values, which are analog in nature, are given to the Arduino to its ADC. Arduino converts these values to digital values and makes a few calculations as displays the results on the LCD. The following image shows the circuit diagram of Arduino Wattmeter. In the sensor part of the circuit, there are two areas which are responsible for measuring voltage and current.

    Using these resistors, you can measure voltages up to 24V. These resistors also help us bringing the voltage range to 0V — 5V, which is the range Arduino works on. Now, coming to the current measurement, Arduino or any Microcontroller for that matter can only accept analog voltage as input i. If Arduino can only read voltages, then how can we measure current?

    In order to measure current, you have to convert the current values to appropriate voltage values. Hence, a small shunt resistor is placed with respect to the load.Voltagealso called electromotive forceis a quantitative expression of the potential difference in charge between two points in an electrical field. It is measured in Volts.

    Voltage measurement is the simplest task that we can perform using Arduino internal ADC. Single ADC value represents 4. To measure higher voltages than 5V we need external voltage divider to match the ADC requirements, It converters required measurement voltage in to 0 to 5V scale. It can be created using two resistors as shown in figure 2. Here we are measuring 0 to 50V DC. In this example battery is used as voltage source to be measured you can measure maximum 50V DC.

    In market voltage sensors are available these are just voltage divider circuits. To get the voltage reading formula is. Circuit is consists of only two resistors which are used as voltage divider. Actually we measure voltage drop across the 1K Ohm resistor which is 5V when we apply 50V input across the voltage divider. Use of smaller values load the voltage source and affects the measurement. Use higher value resistors for better accuracy and avoid Loading Effect.

    In this voltage measurement example we are measuring Voltage of the DC 9V battery, you can connect any DC source to red and black wires. This voltage measurement example can measure maximum of 50 Volts, It is useful for measurement of solar voltage, DC adapter or battery voltages. Over voltage protection circuit can be created by adding zener diode across 1K resistor. For measurement of mili Volts non inverting amplifier can be used as shown in below figure 2.

    You must be logged in to post a comment. Definition Voltagealso called electromotive forceis a quantitative expression of the potential difference in charge between two points in an electrical field. What you will learn? How to measure DC voltage?

    How to make DC voltmeter using Arduino? Milivolt measurement technique 4. How to calculate voltage divider circuit resistors? Reads an analog input on pin 0, converts it to voltage, and prints the. Leave a Reply Cancel reply You must be logged in to post a comment.

    Login with:.Pages: [1]. OhMyCod Sr. Accurate voltage measurement. Whilst I consider all the exciting ways of injuring myself and setting fire to my workshop, it occurred to me that it would be useful to be able to accurately and consistently measure the battery voltage. Many of my projects include a simple voltage divider circuit connected to an analogue input pin to log voltage, but my guess is that this is unlikely to be as consistent or accurate as I'd like.

    What's the best way of accurately measuring voltage? Re: Accurate voltage measurement. I would just stick one of the cheapo multimeters on it, nice big display and in its own case. You can get some very accurate Resistors, with very little temperature drift.

    How much accuracy do you need? Think we are missing somethinghow are you defining accurate if a mid range multimeter is not acceptable to you? The typical way of checking a multimeter is against a 5 or 10 volt reference diode or special reference device, many around.

    Checking for v accuracy is somewhat harder. You're I think the internal 1. How accurate do you want to get? Quote from: OhMyCod on Sep 04,pm. TomGeorge Design and Repair of industrial control systems. Hi, Quote.

    Everything runs on smoke, let the smoke out, it stops running You should measure cell voltage, not stack voltage. Cell voltage is far more important in a volt LiPo battery. A DIY "flying capacitor" circuit might also do what you want.

    Hi, Nice,pity it didn't come with the BMS.


    Comments

    Leave a Reply

    Your email address will not be published. Required fields are marked *