MAX DETECTING VOLTAGE?

Status
Not open for further replies.

JATEU_01

New Member
Thanks for your time.

What is the max detecting voltage for a pic16f819? i wish to detect up to 12v dc, and im guessing it pic wont like that, any ideas on how the get around this problem.


Thanks for your time and help.

JF
 
Its 6 V.

Its a trick caled a voltage divider.You only need 2 resistors.They are in serial and in the midle the PIC is conected and one resistor is puling down to ground and one pulling up to the voltage you want to meshure.

For exsample 1K to ground and 10 K to the voltage to detect ouputs an 10th of the output voltage so then 12V gets out as 1,2V

Its an simple but efective trick.
 
Actually you`d get an 11th of the voltage:
Vout=1k/(1k+10k) *Vin = 1/11 *Vin
Usualy use 9,1k and 1k resistors for a 10th divider.
1k/(9,1k+1k)=10,1

And I think that the input voltage is only 5V as much as the MCUs PSU.
 
Someone Electro said:

Not exactly. It will give its max code- 1023- for anything above Vdd or the Vref. Electrically the pin cannot take anything more than 0.3v above Vdd. This will forward bias an internal protection diode and this means the power gets connected to the Vdd rail. If you are using a 4.5v Vdd then 4.8v is the max allowable voltage.

A voltage divider is commonly used to lower the voltage so you can measure 12v for example. You need to make sure the resistance of the divider meets the 2.5k recommended input impedance for a PIC ADC.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…