golfather said:Hi all,
I bet this question has been asked many times. I’m newbie to the wonderful world of PIC’s and electronics.
I would like to build a voltmeter using 16F84A (have these at hand) and LCD to display the voltage.
The voltage I would like to measure is 0 – 16V. I assume I would need to use an ADC such ADC0831.
I know I will need to do some scaling, as the ADC will only be able to read 0 – 5V.
Need help in designing the circuit. I should be fine with the code side for the pic.
All the help given would be appreciated.
golfather said:eblc1388 its worth asking for me around other forums due to me been a newbie in pics and electronic world.
golfather said:I find people generally helpful, but their replies lack the fine details. I think because of my lack of experience I need to be spoon fed as they say.
golfather said:I wanted details of how to build the buffer circuit (op amp) and to do the scaling. Example so for 5v using an 8bit ADC how can I scale 0 -16v and the components I would need. How to calculate the values needed.
eblc1388 said:The requirement of the opamp buffer circuit is due to leakage current of the PIC pin.
Nigel Goodwin said:With a high source resistance this takes far longer, so you need to take readings much less often.
eblc1388 said:Nigel Goodwin said:With a high source resistance this takes far longer, so you need to take readings much less often.
Even if you take one reading per day and use the remaining time charging this capacitor, the source resistance must still be less than 10K if the full accuracy of the A/D is required.
Nigel Goodwin said:... it doesn't suggest accuracy may be any less if it's not, and the possible leakage currents are exceedingly small, and shouldn't affect reading accuracy until you reach much greater source impedances.
eblc1388 said:This is the voltage divider and opamp circuit for your project.
In the following circuit:
With 16V input at L1, adjusts R3 VR 1K to give exactly 4.00V at point A.
Nigel Goodwin said:Why an opamp at all? - a simple potential divider is all that's required, as it's from a car battery the current doesn't really matter, so simply divide the potential divider values by ten, and feed that directly into the PIC pin.
Nigel Goodwin said:I would also suggest using an external precision reference for the PIC's A2D, rather than the not so stable output of the 78L05 - and the potential divider values should be recalculated accordingly.
Nigel Goodwin said:As far as that goes I would advise (most strongly!), that you DON'T divide exactly by four (or eight, if using a 2.5V reference). Doing so makes the scaling for display rather crude and messy - if you scale it so you get maximum output (1023 decimal) for an input of 20.46 volts, then you can simply multiply the result by two, insert the decimal point, and you have a nice simple accurate reading.
golfather said:Thank you eblc1388 for the diagram.
Nigel thank you for the comment on eblc1388. Nigel would it be possible for you to show me a circuit for what you have suggested.
Thank you eblc1388 and Nigel once again
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?