Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Battery Monitor; 12F683 ADC 12V|4.2V switchable -ON HOLD-

Status
Not open for further replies.

jabberwocky_one

Newbie level 6
Joined
Apr 14, 2010
Messages
14
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
MY
Activity points
1,406
Topic put on hold, I think the simulation had a short.
I have a circuit that is powered by a 12V or 4.2V battery source, for versatility reasons.
This circuit will be used to monitor either batteries. If they fall below a range, LED(not in pic) lights up.
The circuit should be designed to work with 2 types of batteries, 12V and 4.2V.
The mode is selected using a SPDT switch.
Because there are 2 types of input, the VDD of PIC would be connected to both input lines. (diagram)
Problem is, one of the lines(4.2V line) is connected to a LM317 regulator(used for 12V not 4.2V) and dc would flow back into it. How do I solve this? Adding a diode would ... 'break' the circuit.

Probe1 was showing 3.20V(correct value) before adding the diode. After adding the diode at the voltage divider, 685mA is obtained. I need at (~3.2V)
Probe2 was showing 4.0V without voltage drop across diode. (pic was taken without diode consideration)

Sorry totally forgot to mention other problems and info.
The diode, D2 totally wrecks the voltage divider part as seen in the picture 685mV instead of a 3.20V.
The 12V can be swapped with 4.2V but it has to be on the other switch pos.
I have no hardware to test with at the moment, just simulating for the time being.
 

Re: Blocking reverse DC voltage ? 12F683 ADC 12V|4.2V

I don't think putting 12V on the PIC or the ADC is advisable !

The schematic is nonsense, please explain what you are trying to achieve.

Brian.
 

Re: Blocking reverse DC voltage ? 12F683 ADC 12V|4.2V switch

All right updated the first post hopefully it would be more readable now. Sorry for that. If anything is not clear please comment. I am really bad at presenting things.
 

Re: Blocking reverse DC voltage ? 12F683 ADC 12V|4.2V switch

It's a little bit clearer.

Can you explain what voltage you want the PIC to have on it's VDD line. If you are measuring the ADC while using the internal voltage reference you will run into problems as the reference and measured voltages may track each other.

Is it possible to run the PIC on 3.3V? Many of the newer and 18F series use 3.3V supplies and it makes the design much easier. With a stable 3.3V from a small regulator (ST's LE33 for example) you no longer have to worry about switching the input from one battery to the other. All you have to do is check for a different threshold in the low voltage check.

Brian.
 

Re: Battery Monitor; 12F683 ADC 12V|4.2V switchable -ON HOLD

betwixt said:
It's a little bit clearer.

Can you explain what voltage you want the PIC to have on it's VDD line. If you are measuring the ADC while using the internal voltage reference you will run into problems as the reference and measured voltages may track each other.

Is it possible to run the PIC on 3.3V? Many of the newer and 18F series use 3.3V supplies and it makes the design much easier. With a stable 3.3V from a small regulator (ST's LE33 for example) you no longer have to worry about switching the input from one battery to the other. All you have to do is check for a different threshold in the low voltage check.
Brian.

"Can you explain what voltage you want the PIC to have on it's VDD line. "
err... both voltages. When the 12V is plugged in, the PIC is powered with the regulated 3.3V(w/ diode[if the circuit with diode was working]). However if the 4.2V is plugged in, the PIC will run directly from 4.2V.
Sorry, let me read up on "internal voltage reference", I have no idea what or how it works atm.

OK, so it looks like I am unable to use VDD and ADC from the same source...
Should I add another lower voltage regulator? like 2.5V and ADCREF to 4.2V? I was initially aiming for lowest power consumption possible but I guess this should suffice.
Wide operating voltage range (2.0V-5.5V) was mentioned in the PIC12F683 datasheet, it should work with 3.3V and 2.5V I hope.

"you no longer have to worry about switching the input from one battery to the other."
I was aiming for versatility should I have no 12V available, 4.2V could be used from a phone battery or similar.

Please put this topic on hold, I think the simulation I've done had a short. Thus causing unwanted errors.
Totally ignored "current flows through paths with least resistance"...

Added after 1 hours 30 minutes:

A quick question, the ADC pin of the PIC mentions that impedance <= 10k?.
Now does it take both resistances of the voltage divider R1+R2 or only R1, since current flows through only R1 and into the PIC?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top