Do you have a data sheet for that Jaycar part or a part number?
8 bit or 10 bit?
Hard to say. Depends on the resolution you want.
Here is something to look over.
http://www.rentron.com/serial.htm
Do you have a data sheet for that Jaycar part or a part number?
8 bit or 10 bit?
Hard to say. Depends on the resolution you want.
Here is something to look over.
http://www.rentron.com/serial.htm
Dave
Always wear safety glasses while programming.
Turns out I might by lying about the Jaycar panel meter.
Looking back, I found a picture with a 7805 I used to power it.
It's a 10 bit ADC I think since it's a 16f876.
I have it working as far as it returns 0 if the ADC line is grounded,
and 255 if It's connected to the pic circuit's 5 Volt power.
Re: your link, I've seen many 5 Volt Voltmeter circuits on the net,
but this is to operate in the range of 12 Volt batteries.
I've found a few hints about that on other forums.. ie:
I have sound now, and an I2C EEPROM for logging. I'm just ready now to play with voltage dividersOk, so you've decided on 0.1V resolution. Set the A-D ref volt to 5V and construct a voltage divider on the A-D input with a mid-point voltage of 5V when 25.5V is applied at the top-end e.g 15k fixed resistor at the top, 10k multi-turn pot at the bottom and take the output off the wiper. (you can refine this but just as an example)
I believe the PIC has a 10-bit A-D converter so RRF the result to give an 8-bit result. You now have a 0-25.5V voltmeter with a 0.1V resolution and a direct relationship between the value returned by the A-D and the input voltage i.e. 125 = 12.5V, 147 = 14.7V ....
to prepare a voltage input.
![]()
Yup, a voltage divider is the way to go.
Do a search on this forum and what you are planning has been talked about.
The link I referred to was more for the ADC explanation part and not the circuit.
Dave
Always wear safety glasses while programming.
I always surface mount everything on prototype boards.
I like to have one flat side sitting on the desk.
I have a working Voltmeter unit now
It also has an interrupt/timer driven real time clock.
I guess the next thing is to start the logging, and make it smarter.
The only issue I'd complain about now is that the ADC result used for the
Voltage readout is not stable where an off the shelf Multimeter/Voltmeter would be.
This doesn't seem to happen if the pic circuit is powered by a separate battery.
I used a voltage divider to scale down the input voltage from the battery as
described in the quote (from another forum) in one of my above posts.
What does it mean when it says "Set the A-D ref volt to 5V" ?
Cheers, Art.
Try a capacitor of maybe 10 to 22uF from the ADC pin to the zero rail. Should help smooth things out.
VREF needs to be stable/steady. If the voltage swings the ADC will also. Some will power the pic at 5.2 or so. If that is the case then the VREF needs addressed.
Many times if I am powering the PIC at ~5 volt I will have the VREF at 3 or 4 volts. That way if VDD changes a little it will not cause a problem with the ADC reading.
Dave
Always wear safety glasses while programming.
Bookmarks