Hello all,
I've been searching around to find some hints to my project, but still I'm pretty confused. So any help would be great.
I'm going to make a digital voltmeter to measure my car's battery voltage. First I was going to make more complicated system that would read the OBD2 line and show some data on a lcd. Then I faced the truth that this thing would contain too much tricky problems to solve. Now I'm planning to make just a digital voltmeter and present the result on three 7-segment displays.
I'm going to use PIC, probably 16F870. I have some experience about ad conversion, but the biggest problems at this point are scaling the input voltage and handling the measured result in the sw. The result should be shown in three-digit form, for example 13.4 V.
Of course the battery voltage should be around 12...13 volts all the time. There should not be voltage like 7 volts, so being able to measure the total 12 V scale is somehow unnecessary and waste of resolution. So would it be better to reduce the measurement scale and put the focus on those few volts which are important? I mean measuring just around 10...14 volts and fix the low reference point of the conversion range somewhere else than 0 V? On the other hand, the 10-bit ad conversion is a little overkill anyway, because only about 30-40 different voltage steps are needed.
I think it doesn't make a sense to do the 10-bit conversion for showing the voltage only at 0.1 volt resolution. What should I do with the ad result? Roughly leave some least significant bits out of the process? I know about using a lookup table to get the numbers for the output, but how to make the result in a suitable form for that stage? And how to separate the decimal part of the result?
So much questions... Any suggestions? Thanks in advance.
I've been searching around to find some hints to my project, but still I'm pretty confused. So any help would be great.
I'm going to make a digital voltmeter to measure my car's battery voltage. First I was going to make more complicated system that would read the OBD2 line and show some data on a lcd. Then I faced the truth that this thing would contain too much tricky problems to solve. Now I'm planning to make just a digital voltmeter and present the result on three 7-segment displays.
I'm going to use PIC, probably 16F870. I have some experience about ad conversion, but the biggest problems at this point are scaling the input voltage and handling the measured result in the sw. The result should be shown in three-digit form, for example 13.4 V.
Of course the battery voltage should be around 12...13 volts all the time. There should not be voltage like 7 volts, so being able to measure the total 12 V scale is somehow unnecessary and waste of resolution. So would it be better to reduce the measurement scale and put the focus on those few volts which are important? I mean measuring just around 10...14 volts and fix the low reference point of the conversion range somewhere else than 0 V? On the other hand, the 10-bit ad conversion is a little overkill anyway, because only about 30-40 different voltage steps are needed.
I think it doesn't make a sense to do the 10-bit conversion for showing the voltage only at 0.1 volt resolution. What should I do with the ad result? Roughly leave some least significant bits out of the process? I know about using a lookup table to get the numbers for the output, but how to make the result in a suitable form for that stage? And how to separate the decimal part of the result?
So much questions... Any suggestions? Thanks in advance.