Voltmeter Project

Hello to all!!
I have a bit difficulty with this project. I would like to do a voltmeter that can measure its own voltage. I tryed to buy some voltmeters but all of them works only with separate power supply (like 9v battery) and give error if I try to connect power supply on the input pin. So I think to arduino solution.

Explain: I need it for read 02 sensor in motorbikes application. So power supply is about 13v and 02 sensor give a voltage from 0 to 1100 mV... I'd like to read the value on a seven-segment leds for better readability both in night and day time. Three digits are enought (like .XXX). Also Two digits can be fine eventually (like .XX) if this can help with output limits. (I would prefer to avoid classic 16x2 LCD due to available space) I see also OLED LCD solutions but I'm afraid that will unnecessarily complicate all the stuff.

Please someone would like to help me?
Thanks!!!!
F

Can you explain

and give error if I try to connect power supply on the input pin.

What sort of error?
If you voltmeter is giving you trouble then an Arduino is not going to magically fix what ever is the problem.

I would like to do a voltmeter that can measure its own voltage.

Again what do you mean?
Any form of digital voltmeter uses an A/D converter and they all use a reference voltage. This by necessity is lower or equal to the supply voltage on the converter. So you need a reference voltage that is independent of the supply voltage. Then you need a potential divider on the input to the A/D to make your input voltage less than the referance voltage. Then correct to the actual voltage in software using the ratio of the voltage divider.

Get the basics working before being fancy with the display.

The Arduino has a 1.1V band gap internal voltage referance you can switch to.

The output of the Oxygen sensor , as well as being non linear is fast responding - these may be a problem .

Grumpy_Mike:
Can you explain What sort of error?

connecting in- and gnd togheter on cheap voltmeter panel that I found on web I will get 0.00 or -1 on display

Grumpy_Mike:
If you voltmeter is giving you trouble then an Arduino is not going to magically fix what ever is the problem.

Using traditional multimeter (9v battery inside) works! So I assume that the problem is to supply the voltmeter with the same-onboard line. This is the reason why I was searching a 3 1/2 display voltmeter that can works with the same supply , because I would to put a good view on dash instead of multimeter out of it.
I'm wrong?

Grumpy_Mike:
Any form of digital voltmeter uses an A/D converter and they all use a reference voltage. This by necessity is lower or equal to the supply voltage on the converter. So you need a reference voltage that is independent of the supply voltage. Then you need a potential divider on the input to the A/D to make your input voltage less than the referance voltage. Then correct to the actual voltage in software using the ratio of the voltage divider.
Get the basics working before being fancy with the display.
The Arduino has a 1.1V band gap internal voltage referance you can switch to.

So you think is possible to use arduino to dividing the input ?
Sorry for my bad knowledge.

Thanks!
F

hammy:
The output of the Oxygen sensor , as well as being non linear is fast responding - these may be a problem .

Actually fast response -define fast*- is not needed for my application. I need to read on WOT and high rpms, in that condition response is very slow. Thanks.

  • I think a couple of reading for seconds is enough.

I am not going to search for you but I found 2 guides here I the forum yelling me how to get my meter to work on my 12v car battery.

Maybe I don't understand or I cannot explain well

I try to make very basic diagram to show my needings:

Car battery 12v and GND (chassis)

  • ecu
  • all onboard systems
  • wished VOLTMETER

Input to wished voltmeter

  • from lambda sensor (voltage generator 0-1v)

If I buy cheap voltmeter and I power it from car battery 12v when I connect lambda sensor to input , particularly the (-) , voltmeter stop work and give error. I assume that inside voltmeter has GND and (-) input joined.

So I was asking if maybe is possible to realize with arduino a simple voltmeter that has SEPARATE input , like a multimeter , despite the same source of supply.

Many thanks in advance
F

connecting in- and gnd togheter on cheap voltmeter panel that I found on web I will get 0.00 or -1 on display

So can you post a link to that panel please.

So you think is possible to use arduino to dividing the input

and 02 sensor give a voltage from 0 to 1100 mV

You can feed the signal directly into the Arduino, no need to divide it, even if you switch to the internal referance. Any voltage greater than the reference voltage and less than 0.6V above the chip’s supply voltage will return a value of 1023.

So I was asking if maybe is possible to realize with arduino a simple voltmeter that has SEPARATE input

No. Any voltage measurement is between two points you can not use just one point to measure a voltage, that makes no sense.

voltmeter stop work and give error

No what you are seeing is not an error. The reading might be wrong but it is not an error. Your usage of words is very strange and hard to understand. Most likely the voltmeter has a very low impedance and the sensor gives a high impedance signal.

By fast I mean ,from the raw sensor ,you may see variations in output as each cylinder fires and , as it’s non linear output , normal low pass filtering will not give a true average.

hammy:
By fast I mean ,from the raw sensor ,you may see variations in output as each cylinder fires and , as it’s non linear output , normal low pass filtering will not give a true average.

Yes you're right, but I have been using multimeter to read these sensor for about 15 years, I know how to read the value and how to understand his behavior, please don't care about that.
I'm only searching a way to implement a pretty display on the dash instead of an awkward multimeter and flying cables :slight_smile:
Thanks

Grumpy_Mike:
So can you post a link to that panel please.

You can feed the signal directly into the Arduino, no need to divide it, even if you switch to the internal referance. Any voltage greater than the reference voltage and less than 0.6V above the chip’s supply voltage will return a value of 1023.
No. Any voltage measurement is between two points you can not use just one point to measure a voltage, that makes no sense.
No what you are seeing is not an error. The reading might be wrong but it is not an error. Your usage of words is very strange and hard to understand. Most likely the voltmeter has a very low impedance and the sensor gives a high impedance signal.

I'd like to apologize, I realize that reading back what I have written is struggling myself to understand.

I try to explain from zero removing my mental digressions:

I bought some digital voltmeter, like:
https://tinyurl.com/ycch26ll
and
https://tinyurl.com/y8vxlf79

Concerning first one, there is a tech in-dept here: Panel meter 5-30V DSN-DVM-568 three digits LED, Calibration tests ITTSB Blog
I don't know if can bu useful.

Moving on, I try to to this:

  • bench power supply (eg 12v) to black and red wires (marked + and -)
  • resistive divider from the same supply to obtain a range-compliant-voltage (eg 0.5v , since I need to read from 0 to 1v) to "in+"
  • "in-" joined to black wire

results: 0.00V in some case, very low voltage in other cases (eg 0.15v when expect 0.50)
other annoying problem: very poor accuracy on these low voltage (I see about 50mv-200mv error according to model)

Maybe problem is the impediance as you notice. With this solution, voltage generated from the sensor that I would measure will drop down. Otherwise if I measure it with a multimeter (that has separate power supply from 9v battery inside it) voltage generate from the sensor will remains as it is without going down. (I double check it with obd2 diagnosis tool so I'm pretty sure)

So I would ask if you can help me (and if is possible?) to use an arduino-voltmeter to achieve a solution that has these advantages:

  • no battery needed (supplyed from on-board car battery)
  • high impediance for avoid above cheap voltmeter problems
  • at least 20mv resolution and 1hz refresh rate (better values obviously they would be like a charm)
  • three digit panel display 7-segment (yes of course) or oled i2c for ultimate top-class-esthetics :slight_smile:

Many thanks in advance, sorry again for my bad way to explain.

This can very well an input impedance problem. That voltage divider may have too low a resistance, killing any signal the sensor can produce. Without knowing what exact sensor you're trying to read, and what its output impedance is, no idea.

By the way, did you already try to connect it to an Arduino? That'd be the simplest thing to do. Just connect to one of the analog pins and see what you get. Those have pretty high input impedance.

Do mind that multi meters are usually MUCH slower than Arduinos, and when it comes to an ADC those of the Arduino are not especially fast, either. The Arduino takes a sample over a period of <100 µs. Your typical volt meter has reaction times of several orders of magnitude higher. If you have spikes in your signal that last 100-200 µs you will see that in your Arduino's signal, but not on your multi meter.

fl4sh:
Yes you're right, but I have been using multimeter to read these sensor for about 15 years, I know how to read the value and how to understand his behavior, please don't care about that.

Sorry, not taking your word for that. The problems you have actually tell me you DON'T fully understand the sensor's behaviour.

Lack of images and links to the actual sensor and detailed info on which methods worked and which don't (the posts are simply too confusing) means we have no chance to get any understanding of the sensor and how to read it, either.

wvmarle:
By the way, did you already try to connect it to an Arduino? That'd be the simplest thing to do. Just connect to one of the analog pins and see what you get. Those have pretty high input impedance.

please, can you provide a schematic to realize a test circuit with arduino nano??
I would try willingly.

For the sensor, I don't understand well what you need.
I think that if arduino inputs can give approx the same impediance of a standard multimeter , there will be no problem at all.
However, here a pdf for o2 sensors. Maybe you can find what you need for?

Keep in mind that we are talking about o2 lambda sensor NARROWBAND , not wideband.

I'm not able to write code and wiring diagram for create an arduino voltmeter , can you help me?? I would try.

Thanks in advance

Hi,
Have you googled auto o2 sensor and arduino

Tom.... :slight_smile:

I bookmarked that one:

but is 0-48v (I need 0-1v) and the output is for I2C LCD (I would use 7-segment led)

But I see a voltage divider 10k/1k and I wonder if is too low for my application ?

Thanks again.

Wawa:
~US$2.00 including worldwide shipping is too expensive?

This sketch might be the best a bare Arduino can do.
Leo..

/*

0 - ~17volt voltmeter
  works with 3.3volt and 5volt Arduinos
  uses the stable internal 1.1volt reference
  10k resistor from A0 to ground, and 150k resistor from A0 to +batt
  (1k8:27k or 2k2:33k are also valid 1:15 ratios)
  100n capacitor from A0 to ground for stable readings
*/

unsigned int total; // holds readings
float voltage; // converted to volt

void setup() {
  analogReference(INTERNAL); // use the internal ~1.1volt reference | change (INTERNAL) to (INTERNAL1V1) for a Mega
  Serial.begin(9600); // ---set serial monitor to this value---
}

void loop() {
  total = 0; // reset
  analogRead(A0); // one unused reading to clear any ghost charge
  for (int x = 0; x < 64; x++) { // 64 analogue readings for averaging
    total = total + analogRead(A0); // add each value
  }
  voltage = total * 0.0002567; // convert readings to volt | ---calibrate by changing the last three digits---

Serial.print("The battery is ");
  Serial.print(voltage); // change to (voltage, 3) for three decimal places
  Serial.println(" volt");
  delay(1000); // readout delay
}

Now i did it anyways. This works for me. 12v battery powering my arduino, measuring the same 12v battery. Or you can measure voltage of something else.

TomGeorge:
Hi,
Have you googled auto o2 sensor and arduino

Tom.... :slight_smile:

no!!!!! :o :o :o
you are a genius... two months for that.... i'm going that just now!!! you have already found some projects ???

...

I have 5 minutes antiflood..... meanwhile..... I found that for previous user that ask me major details about sensor:

(always remember that I'm talking about narrowband, not wideband one)

...

this guy has done it!!!!!!!! who could help me repeat this project? I don't need bar graph.... I will be very happy with only 3 digit display ".xxx" V !!

...

Also found this:

https://forum.arduino.cc/index.php?topic=69351.0

and

http://forum.arduino.cc/index.php?topic=17481.0

Bringamosa:
Now i did it anyways. This works for me. 12v battery powering my arduino, measuring the same 12v battery. Or you can measure voltage of something else.

Bringamosa, thanks. I think that in previous post kind users explained to me that the problem wasn't to measure the same voltage, but the impediance of the input. I understand that input must have sufficient impedance otherwise it will drop the sensor voltage down.

standard multimeter impedience is enought, since I have always read the sensor in that way.

Just connect one output of the sensor to an analog input, the other to GND, and measure away. It's that simple. For 0-1V you should get readings of 0-200, give or take. If you're sure you're staying under 1V enable the internal 1.1V reference and you get a scale of 0-1000 or so (max 1023).

Thanks! that's sound cool!!

I never did a sketch before, can I use some of sketch posted above??

If I will go over 1v I will damage something or just read out of scale?? In the second case, it's ok . I don't care reading over 1v , so out of scale is fine for me over 1v.

How can I enable 1.1 internal reference?
Would you help me to create schematic and sketch?

Many thanks in advance!