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.

Looking for a PIC program for battery voltage indicator cum cut off circuit.....

Status
Not open for further replies.

pradeep_k_b

Full Member level 3
Full Member level 3
Joined
Dec 21, 2011
Messages
160
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,306
Location
Nilambur, India
Activity points
2,509
Hi, I need a PIC program for my project,there it is required to display the present battery volage in a seven segmant disply and wants to switch on a circuit when it will reach in predetermined value.For example if we set the circuit to 10V,then when the diplay monitor the value '10" then it is required to switch on the circuit automatically.It is important that the switching circuit must only depends on the value that displayed on the sevan segmant display.
 

may be...but I think 7 segment is the better one for voltage indicators..right??..
 

I haven't written programs for 7 Seg. I can do it with LCD.
 

okay..then if you don't mind can you help me with that?.but it is important that the switching circuit must depend on the the displayed value only...i
 

let us say adc value = 12.6 volts and user limit is also 12.6 volts then with the following code you can turn on or off a relay for the prescribed value

Code:
 if(adc_value >=12.6) {
                      PORTD.F0 = 1;
          }

PORTD.F0 is a relay which disconnect the power or load. Which PIC do you want to use. PIC with 10bit adc or 12 bit adc?

Check the circuit. Is your circuit like this? Post your circuit? How are you entering values for setting the voltage limits? Are you using incrment/decrement keys or are you using keypad? Should there be a provision to store the set values in eeprom, so that the value is read after a power failure?

What is the range of voltage you are measuring?

Download this video and see. It is set that if volt is >= 10 volts then toggle the relay.
 

Attachments

  • sim3.rar
    23 KB · Views: 156
  • ss14.jpg
    ss14.jpg
    283 KB · Views: 207
Last edited:

No..My circuit is different from this....but the circuit is only for to monitor the battery voltage,I want to modify this...voltmeter.jpg
 

And this is some photos of the current volt meter

- - - Updated - - -



- - - Updated - - -

this is my circuit

- - - Updated - - -

this is the current one
 

Do you want to use PIC16F676. Can you tell me which pins the lcd should be connected? Which pins the relays should be connected? What is the range of voltage you want to measure?
 

Let's assume the 10k pot is adjusted to give approximately 5.2k ohm resistance. So, the input is divided by 10. So, a 30V input gives 3V to the ADC input pin.

RA4 is AN3 - ADC channel 3. Sample the input and save the ADC result.

Calculate what voltage is represented by the corresponding ADC result. Generate the signals accordingly and drive the 7 segments.

Use the ADC value and compare it to the value that would have been received at the low-voltage.

Before all of this, you must make sure you know how to use the ADC properly. Then, you must know how to interface with 7 segments.

Hope this helps.
Tahmid.
 
I said cant you use LCD? I told you I haven't used 7 Segments.

Check the video.
 

Attachments

  • sim4.rar
    30.4 KB · Views: 138
Last edited:
okay..if we use LCD,is it more easy???....I am less experienced with PIC programming thats why I am asking...can I replace the 7-segment with LCD in my circuit???
 

Which PIC do you want to use? We need 6 pins for LCD. Check the video in my last post. sim4.rar
 

Then you can use my design with PIC16F877A. Are you using external / internal oscillator. What is the oscillator frequency?
 

I think it is better to use external oscillator...I am planning to do with a frequency if 8Mhz
 

I am sorry,I don't have the Proteus...is it a free software ??or can I download any demo versions??
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top