How do I measure a voltage greater than 5 V with Arduino? [duplicate]
$begingroup$
This question already has an answer here:
How to read high voltages on microcontroller?
6 answers
I want to measure a varying voltage with an Arduino and real time data plotting has to be done.
But the supply voltage will be 10 V and the Arduino is not supposed to have more than 5 V.
Is there a way I can solve this problem?
Do you have any recommendation for the circuit design?
simulate this circuit – Schematic created using CircuitLab
arduino circuit-design high-voltage voltage-measurement
New contributor
$endgroup$
marked as duplicate by Rev1.0, W5VO♦ 7 hours ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
$begingroup$
This question already has an answer here:
How to read high voltages on microcontroller?
6 answers
I want to measure a varying voltage with an Arduino and real time data plotting has to be done.
But the supply voltage will be 10 V and the Arduino is not supposed to have more than 5 V.
Is there a way I can solve this problem?
Do you have any recommendation for the circuit design?
simulate this circuit – Schematic created using CircuitLab
arduino circuit-design high-voltage voltage-measurement
New contributor
$endgroup$
marked as duplicate by Rev1.0, W5VO♦ 7 hours ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
$begingroup$
use one of the ideas presented in the answers below to measure the voltage between the ground and the collector of Q1
$endgroup$
– jsotola
16 hours ago
5
$begingroup$
@jsotola You're explaining the whole point of Stack Exchange. "Use one of the ideas presented in the answers". Is there something I'm missing?
$endgroup$
– pipe
12 hours ago
add a comment |
$begingroup$
This question already has an answer here:
How to read high voltages on microcontroller?
6 answers
I want to measure a varying voltage with an Arduino and real time data plotting has to be done.
But the supply voltage will be 10 V and the Arduino is not supposed to have more than 5 V.
Is there a way I can solve this problem?
Do you have any recommendation for the circuit design?
simulate this circuit – Schematic created using CircuitLab
arduino circuit-design high-voltage voltage-measurement
New contributor
$endgroup$
This question already has an answer here:
How to read high voltages on microcontroller?
6 answers
I want to measure a varying voltage with an Arduino and real time data plotting has to be done.
But the supply voltage will be 10 V and the Arduino is not supposed to have more than 5 V.
Is there a way I can solve this problem?
Do you have any recommendation for the circuit design?
simulate this circuit – Schematic created using CircuitLab
This question already has an answer here:
How to read high voltages on microcontroller?
6 answers
arduino circuit-design high-voltage voltage-measurement
arduino circuit-design high-voltage voltage-measurement
New contributor
New contributor
edited 13 hours ago
Peter Mortensen
1,60031422
1,60031422
New contributor
asked 20 hours ago
MichaelMichael
264
264
New contributor
New contributor
marked as duplicate by Rev1.0, W5VO♦ 7 hours ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Rev1.0, W5VO♦ 7 hours ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
$begingroup$
use one of the ideas presented in the answers below to measure the voltage between the ground and the collector of Q1
$endgroup$
– jsotola
16 hours ago
5
$begingroup$
@jsotola You're explaining the whole point of Stack Exchange. "Use one of the ideas presented in the answers". Is there something I'm missing?
$endgroup$
– pipe
12 hours ago
add a comment |
$begingroup$
use one of the ideas presented in the answers below to measure the voltage between the ground and the collector of Q1
$endgroup$
– jsotola
16 hours ago
5
$begingroup$
@jsotola You're explaining the whole point of Stack Exchange. "Use one of the ideas presented in the answers". Is there something I'm missing?
$endgroup$
– pipe
12 hours ago
$begingroup$
use one of the ideas presented in the answers below to measure the voltage between the ground and the collector of Q1
$endgroup$
– jsotola
16 hours ago
$begingroup$
use one of the ideas presented in the answers below to measure the voltage between the ground and the collector of Q1
$endgroup$
– jsotola
16 hours ago
5
5
$begingroup$
@jsotola You're explaining the whole point of Stack Exchange. "Use one of the ideas presented in the answers". Is there something I'm missing?
$endgroup$
– pipe
12 hours ago
$begingroup$
@jsotola You're explaining the whole point of Stack Exchange. "Use one of the ideas presented in the answers". Is there something I'm missing?
$endgroup$
– pipe
12 hours ago
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Step down the voltage with a resistive divider and buffer it with an rail-to-rail input and output op-amp wired up as a voltage follower. This buffers the resistance in the resistive divider from the ADC so the divider resistance does not skew your ADC reading. This, in turn, lets you use high resistances in the divider so that the divider itself doesn't load down and skew your signal source. You always want a low output impedance going into a high input impedance so that the signal source is driven strongly and doesn't get loaded down which skews and distorts it.
In your case you have a signal source driving a resistive divider, then you have a resistive divider the ADC. THerefore, you want the resistive divider to be very high relative to your signal source's output impedance, but you also want it to be very low relative to your ADC's input impedance. Without the buffer, you have to compromise between the two. The buffer works by having a ridiculously high input impedance that the divider plugs into and has a very low output impedance that drives the ADC.
Higher resistances also reduces power consumption and heat. Using higher resistances without a buffer will also slow down the rate at which your ADC can sample and still have the reading make sense since it slows down the charging of the ADC sampling capacitor. You don't always need a buffer, but it's often a good idea.
If you do not use an op-amp with rail-to-rail input and output, then you will have to divide the voltage down more than is necessary and will not be able to make full use of your ADC's input range.
The op-amp can be a 5V one since the resistive divider, if sized properly to step down 10V, will never allow anything above 5V to enter the op-amp unless the 10V source itself becomes higher than 10V.
(Image source: Figure 2, Analog Mathematics - May 2009, Nuts and Volts Magazine)
New contributor
$endgroup$
add a comment |
$begingroup$
You can make a voltage divider (see e.g. Wikipedia: Voltage Divider
Make sure R1 and R2 are equal, so instead of 10 V max, you get half (5V max).
Connect Vout to an analog pin from the Arduino and use analogRead to read the voltage (0-5V).
You have to make sure the resistors can handle the current.
$endgroup$
1
$begingroup$
A good resistance value to start with would be 10kΩ. This gives you 0.5mA of current across the divider. Depending on other requirements/circumstances (e.g. interference, measurement accuracy, battery run time, input/output resistance) a lower or higher value should be picked.
$endgroup$
– Michael
11 hours ago
$begingroup$
@Michael Good point, thanks, this also means that the resistors will get a max of 0.5 mA * 10 V (max) = 5 mW, which is less than most resistor default of 1/4 or 1/8 W.
$endgroup$
– Michel Keijzers
10 hours ago
add a comment |
$begingroup$
You haven't mentioned if the voltage has a common ground or 0V rail. If it has, then a divider will work fine. Else you could magnetically couple the sample using an inverter. If it's AC, then you'll need to transform it if you need isolation, or AC couple it then turn it to DC.
The question is not as simple as it sounds.
New contributor
$endgroup$
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Step down the voltage with a resistive divider and buffer it with an rail-to-rail input and output op-amp wired up as a voltage follower. This buffers the resistance in the resistive divider from the ADC so the divider resistance does not skew your ADC reading. This, in turn, lets you use high resistances in the divider so that the divider itself doesn't load down and skew your signal source. You always want a low output impedance going into a high input impedance so that the signal source is driven strongly and doesn't get loaded down which skews and distorts it.
In your case you have a signal source driving a resistive divider, then you have a resistive divider the ADC. THerefore, you want the resistive divider to be very high relative to your signal source's output impedance, but you also want it to be very low relative to your ADC's input impedance. Without the buffer, you have to compromise between the two. The buffer works by having a ridiculously high input impedance that the divider plugs into and has a very low output impedance that drives the ADC.
Higher resistances also reduces power consumption and heat. Using higher resistances without a buffer will also slow down the rate at which your ADC can sample and still have the reading make sense since it slows down the charging of the ADC sampling capacitor. You don't always need a buffer, but it's often a good idea.
If you do not use an op-amp with rail-to-rail input and output, then you will have to divide the voltage down more than is necessary and will not be able to make full use of your ADC's input range.
The op-amp can be a 5V one since the resistive divider, if sized properly to step down 10V, will never allow anything above 5V to enter the op-amp unless the 10V source itself becomes higher than 10V.
(Image source: Figure 2, Analog Mathematics - May 2009, Nuts and Volts Magazine)
New contributor
$endgroup$
add a comment |
$begingroup$
Step down the voltage with a resistive divider and buffer it with an rail-to-rail input and output op-amp wired up as a voltage follower. This buffers the resistance in the resistive divider from the ADC so the divider resistance does not skew your ADC reading. This, in turn, lets you use high resistances in the divider so that the divider itself doesn't load down and skew your signal source. You always want a low output impedance going into a high input impedance so that the signal source is driven strongly and doesn't get loaded down which skews and distorts it.
In your case you have a signal source driving a resistive divider, then you have a resistive divider the ADC. THerefore, you want the resistive divider to be very high relative to your signal source's output impedance, but you also want it to be very low relative to your ADC's input impedance. Without the buffer, you have to compromise between the two. The buffer works by having a ridiculously high input impedance that the divider plugs into and has a very low output impedance that drives the ADC.
Higher resistances also reduces power consumption and heat. Using higher resistances without a buffer will also slow down the rate at which your ADC can sample and still have the reading make sense since it slows down the charging of the ADC sampling capacitor. You don't always need a buffer, but it's often a good idea.
If you do not use an op-amp with rail-to-rail input and output, then you will have to divide the voltage down more than is necessary and will not be able to make full use of your ADC's input range.
The op-amp can be a 5V one since the resistive divider, if sized properly to step down 10V, will never allow anything above 5V to enter the op-amp unless the 10V source itself becomes higher than 10V.
(Image source: Figure 2, Analog Mathematics - May 2009, Nuts and Volts Magazine)
New contributor
$endgroup$
add a comment |
$begingroup$
Step down the voltage with a resistive divider and buffer it with an rail-to-rail input and output op-amp wired up as a voltage follower. This buffers the resistance in the resistive divider from the ADC so the divider resistance does not skew your ADC reading. This, in turn, lets you use high resistances in the divider so that the divider itself doesn't load down and skew your signal source. You always want a low output impedance going into a high input impedance so that the signal source is driven strongly and doesn't get loaded down which skews and distorts it.
In your case you have a signal source driving a resistive divider, then you have a resistive divider the ADC. THerefore, you want the resistive divider to be very high relative to your signal source's output impedance, but you also want it to be very low relative to your ADC's input impedance. Without the buffer, you have to compromise between the two. The buffer works by having a ridiculously high input impedance that the divider plugs into and has a very low output impedance that drives the ADC.
Higher resistances also reduces power consumption and heat. Using higher resistances without a buffer will also slow down the rate at which your ADC can sample and still have the reading make sense since it slows down the charging of the ADC sampling capacitor. You don't always need a buffer, but it's often a good idea.
If you do not use an op-amp with rail-to-rail input and output, then you will have to divide the voltage down more than is necessary and will not be able to make full use of your ADC's input range.
The op-amp can be a 5V one since the resistive divider, if sized properly to step down 10V, will never allow anything above 5V to enter the op-amp unless the 10V source itself becomes higher than 10V.
(Image source: Figure 2, Analog Mathematics - May 2009, Nuts and Volts Magazine)
New contributor
$endgroup$
Step down the voltage with a resistive divider and buffer it with an rail-to-rail input and output op-amp wired up as a voltage follower. This buffers the resistance in the resistive divider from the ADC so the divider resistance does not skew your ADC reading. This, in turn, lets you use high resistances in the divider so that the divider itself doesn't load down and skew your signal source. You always want a low output impedance going into a high input impedance so that the signal source is driven strongly and doesn't get loaded down which skews and distorts it.
In your case you have a signal source driving a resistive divider, then you have a resistive divider the ADC. THerefore, you want the resistive divider to be very high relative to your signal source's output impedance, but you also want it to be very low relative to your ADC's input impedance. Without the buffer, you have to compromise between the two. The buffer works by having a ridiculously high input impedance that the divider plugs into and has a very low output impedance that drives the ADC.
Higher resistances also reduces power consumption and heat. Using higher resistances without a buffer will also slow down the rate at which your ADC can sample and still have the reading make sense since it slows down the charging of the ADC sampling capacitor. You don't always need a buffer, but it's often a good idea.
If you do not use an op-amp with rail-to-rail input and output, then you will have to divide the voltage down more than is necessary and will not be able to make full use of your ADC's input range.
The op-amp can be a 5V one since the resistive divider, if sized properly to step down 10V, will never allow anything above 5V to enter the op-amp unless the 10V source itself becomes higher than 10V.
(Image source: Figure 2, Analog Mathematics - May 2009, Nuts and Volts Magazine)
New contributor
edited 16 hours ago
SamGibson
11.1k41637
11.1k41637
New contributor
answered 20 hours ago
ToorToor
1715
1715
New contributor
New contributor
add a comment |
add a comment |
$begingroup$
You can make a voltage divider (see e.g. Wikipedia: Voltage Divider
Make sure R1 and R2 are equal, so instead of 10 V max, you get half (5V max).
Connect Vout to an analog pin from the Arduino and use analogRead to read the voltage (0-5V).
You have to make sure the resistors can handle the current.
$endgroup$
1
$begingroup$
A good resistance value to start with would be 10kΩ. This gives you 0.5mA of current across the divider. Depending on other requirements/circumstances (e.g. interference, measurement accuracy, battery run time, input/output resistance) a lower or higher value should be picked.
$endgroup$
– Michael
11 hours ago
$begingroup$
@Michael Good point, thanks, this also means that the resistors will get a max of 0.5 mA * 10 V (max) = 5 mW, which is less than most resistor default of 1/4 or 1/8 W.
$endgroup$
– Michel Keijzers
10 hours ago
add a comment |
$begingroup$
You can make a voltage divider (see e.g. Wikipedia: Voltage Divider
Make sure R1 and R2 are equal, so instead of 10 V max, you get half (5V max).
Connect Vout to an analog pin from the Arduino and use analogRead to read the voltage (0-5V).
You have to make sure the resistors can handle the current.
$endgroup$
1
$begingroup$
A good resistance value to start with would be 10kΩ. This gives you 0.5mA of current across the divider. Depending on other requirements/circumstances (e.g. interference, measurement accuracy, battery run time, input/output resistance) a lower or higher value should be picked.
$endgroup$
– Michael
11 hours ago
$begingroup$
@Michael Good point, thanks, this also means that the resistors will get a max of 0.5 mA * 10 V (max) = 5 mW, which is less than most resistor default of 1/4 or 1/8 W.
$endgroup$
– Michel Keijzers
10 hours ago
add a comment |
$begingroup$
You can make a voltage divider (see e.g. Wikipedia: Voltage Divider
Make sure R1 and R2 are equal, so instead of 10 V max, you get half (5V max).
Connect Vout to an analog pin from the Arduino and use analogRead to read the voltage (0-5V).
You have to make sure the resistors can handle the current.
$endgroup$
You can make a voltage divider (see e.g. Wikipedia: Voltage Divider
Make sure R1 and R2 are equal, so instead of 10 V max, you get half (5V max).
Connect Vout to an analog pin from the Arduino and use analogRead to read the voltage (0-5V).
You have to make sure the resistors can handle the current.
edited 19 hours ago
answered 20 hours ago
Michel KeijzersMichel Keijzers
6,22592865
6,22592865
1
$begingroup$
A good resistance value to start with would be 10kΩ. This gives you 0.5mA of current across the divider. Depending on other requirements/circumstances (e.g. interference, measurement accuracy, battery run time, input/output resistance) a lower or higher value should be picked.
$endgroup$
– Michael
11 hours ago
$begingroup$
@Michael Good point, thanks, this also means that the resistors will get a max of 0.5 mA * 10 V (max) = 5 mW, which is less than most resistor default of 1/4 or 1/8 W.
$endgroup$
– Michel Keijzers
10 hours ago
add a comment |
1
$begingroup$
A good resistance value to start with would be 10kΩ. This gives you 0.5mA of current across the divider. Depending on other requirements/circumstances (e.g. interference, measurement accuracy, battery run time, input/output resistance) a lower or higher value should be picked.
$endgroup$
– Michael
11 hours ago
$begingroup$
@Michael Good point, thanks, this also means that the resistors will get a max of 0.5 mA * 10 V (max) = 5 mW, which is less than most resistor default of 1/4 or 1/8 W.
$endgroup$
– Michel Keijzers
10 hours ago
1
1
$begingroup$
A good resistance value to start with would be 10kΩ. This gives you 0.5mA of current across the divider. Depending on other requirements/circumstances (e.g. interference, measurement accuracy, battery run time, input/output resistance) a lower or higher value should be picked.
$endgroup$
– Michael
11 hours ago
$begingroup$
A good resistance value to start with would be 10kΩ. This gives you 0.5mA of current across the divider. Depending on other requirements/circumstances (e.g. interference, measurement accuracy, battery run time, input/output resistance) a lower or higher value should be picked.
$endgroup$
– Michael
11 hours ago
$begingroup$
@Michael Good point, thanks, this also means that the resistors will get a max of 0.5 mA * 10 V (max) = 5 mW, which is less than most resistor default of 1/4 or 1/8 W.
$endgroup$
– Michel Keijzers
10 hours ago
$begingroup$
@Michael Good point, thanks, this also means that the resistors will get a max of 0.5 mA * 10 V (max) = 5 mW, which is less than most resistor default of 1/4 or 1/8 W.
$endgroup$
– Michel Keijzers
10 hours ago
add a comment |
$begingroup$
You haven't mentioned if the voltage has a common ground or 0V rail. If it has, then a divider will work fine. Else you could magnetically couple the sample using an inverter. If it's AC, then you'll need to transform it if you need isolation, or AC couple it then turn it to DC.
The question is not as simple as it sounds.
New contributor
$endgroup$
add a comment |
$begingroup$
You haven't mentioned if the voltage has a common ground or 0V rail. If it has, then a divider will work fine. Else you could magnetically couple the sample using an inverter. If it's AC, then you'll need to transform it if you need isolation, or AC couple it then turn it to DC.
The question is not as simple as it sounds.
New contributor
$endgroup$
add a comment |
$begingroup$
You haven't mentioned if the voltage has a common ground or 0V rail. If it has, then a divider will work fine. Else you could magnetically couple the sample using an inverter. If it's AC, then you'll need to transform it if you need isolation, or AC couple it then turn it to DC.
The question is not as simple as it sounds.
New contributor
$endgroup$
You haven't mentioned if the voltage has a common ground or 0V rail. If it has, then a divider will work fine. Else you could magnetically couple the sample using an inverter. If it's AC, then you'll need to transform it if you need isolation, or AC couple it then turn it to DC.
The question is not as simple as it sounds.
New contributor
New contributor
answered 8 hours ago
FrankFrank
1
1
New contributor
New contributor
add a comment |
add a comment |
$begingroup$
use one of the ideas presented in the answers below to measure the voltage between the ground and the collector of Q1
$endgroup$
– jsotola
16 hours ago
5
$begingroup$
@jsotola You're explaining the whole point of Stack Exchange. "Use one of the ideas presented in the answers". Is there something I'm missing?
$endgroup$
– pipe
12 hours ago