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.

24 Volts Power Source - PIC based Voltmeter & ADC0832

Status
Not open for further replies.

terka

Advanced Member level 4
Joined
Dec 15, 2003
Messages
100
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Activity points
936
Hello to everyone

I need make this project. But I know ADC0832 support up to 5 Volst as analog input signal. If i want measure up to 24 Volt, How I make it???

Help me please


Thank you
 

Re: 24 Volts Power Source - PIC based Voltmeter & ADC083

Just build a voltage divider with two resistors...
 

Re: 24 Volts Power Source - PIC based Voltmeter & ADC083

Be carefull
The divider may interfere the original Voltage.
In that case you need a buffer opamp.



Regards
 

Re: 24 Volts Power Source - PIC based Voltmeter & ADC083

Hi
This circuit can be used in any digital cpu, no need for an A/D
Its quite simple, you need at least 2 pins.
PIN2 is used to turn on an NPN transistor with emmiter to gnd
PIN1 is used as voltage sense, i.e., zero or high
From your source voltage, you put a big resistor like 390K to a
100nF capacitor, This capacitor is discharged through gnd by the transistor.
You tie this capacitor to PIN1 with a 10K resistor.
Step 1: Discharge capacitor setting PIN2 to HIGH
Step 2: Turn PIN1 to INPUT
Step 3: ZERO or get a HIRES Counter
Step 4: Set PIN2 to LOW, stopp discharging
Step 5: Test PIN1 until HIGH or timeout
Step 6: Get COUNT
Step 7: Discharge until next loop or whatever, i.e., use PINS1&2 otherwise

So you will have a COUNT from start charging until the PIN1 fliped high.

Basically we can say that it will take twice the time to charge from 12V thant from 24v
Read these counts with 24V input, you will get a 24CAL count
so use this simple routine:
int getvalue(cal, count)
{
int result=0, shift=0x8000;

while(shift)
{
if( count >= cal) count -= cal;
else
{
result |= shift;
cal /= 2;
}
shift /= 2;
}
return (result);
}

Use this function passing 24CAL
so:
VBAT= (24 * getvalue(24CAL, COUNT)) /0x8000;

You may also try to make a mean voltage value doing
last_count = (last_count + count) /2 ;

But for indicating batery charge this very nice.

Best

PadsPCB

:D
 

Try this ..........Nice and Cooooooooooooool ans Please give this to who want to make a LCD/PIC Volt meter.....



Thanks

Manoj Soorya
 

Attachments

  • DVM.rar
    112.4 KB · Views: 56
  • Schematic.PNG
    Schematic.PNG
    36.8 KB · Views: 92
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top