Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

pic 16f684 a to d

Status
Not open for further replies.

jkmadsci

New Member
Ive used the a to d many times before, but im about to make a project using a battery(6volts) and no regulator. What is the cheapest easiest way
to get a refrence voltage to measure battery voltage?
 
Well i guess im gonna answer my own question. I took an led with
a 3k resistor and found that the voltage on the led varied between 1.83 and 1.87 volts as the supply varied from 3 volts to 7 volts. i guess ill hook up the led to a to a pin(high) and read the voltage on the led with an adc pin. Then all i need to do is back calculate my input based on the led ref voltage.
 
Iy you connect your LED to the 6V line and a 1n4148 (or any small diode) to the LED and then your series resistor to gnd. By measureingthe voltage at the resistor/1N4148 junction you should get between 0.5V and 4.5V. The voltage will be Vcc - LED voltage -Forward voltage of 1N4148.

= 6 - 1.8 - 0.7 = 4.5
= 3 - 1.8 - 0.7 = 0.5

HTH

Mike.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top