Charging system

General discussion on mikroC.
Post Reply
Author
Message
karalius
Posts: 25
Joined: 27 Mar 2010 10:46

Charging system

#1 Post by karalius » 08 Oct 2010 13:54

Hi everyone,

I have a project about charging systems. The system looks simple :). I have a power supply, a battery, an inverter (to invert 12V DC to 220V AC), and last a lamp.

Lamp (220V) <---- inverter (12V DC to 220V AC) <---- Battery <---- 220V (Urban electricity)

The electricity needs of the lamp is provided by battery. And Batter is charged by Power Supply.

Micro controller should turn off the power supply,if the battery is full. And also, if the battery is low, power supply is turned on by micro controller again.

My question is that Can i know the instantaneous current value or voltage using micro controller ?

are there any functions about the this ?

I do not want codes, I need functions or informations or etc...

karalius
Posts: 25
Joined: 27 Mar 2010 10:46

Re: Charging system

#2 Post by karalius » 08 Oct 2010 15:58

There is no idea about the topic. this is interesting :?

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Charging system

#3 Post by Dany » 08 Oct 2010 18:31

karalius wrote:My question is that Can i know the instantaneous current value or voltage using micro controller ?
Well, you can measure the voltage of the battery by feeding it to a voltage divider (2 resistors in series), with the connection between the 2 connected to an ADC input of the PIC. Make sure the adc input voltage can not be higher than the supply voltage of the PIC minus t.b.f. A problem can be here that the divider continuously draws some current from the battery.

Measuring the current is not so simple. The PIC always measures voltages, so you will need a converter between current and voltage. A very simple convertor is simply a series resistor in the path of the current flow, but usually only a very low voltage drop is allowed across it, so amplification might be needed. Also other problems can occur, like the voltage across the series resistor not having the right ground level or polarity.
karalius wrote:And also, if the battery is low, power supply is turned on by micro controller again.
It may be not so simple to defined what is a "full" or "empty" battery. See the specification of e.g. a NiMh battery for this.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

karalius
Posts: 25
Joined: 27 Mar 2010 10:46

Re: Charging system

#4 Post by karalius » 09 Oct 2010 09:13

Dany wrote:
karalius wrote:My question is that Can i know the instantaneous current value or voltage using micro controller ?
Well, you can measure the voltage of the battery by feeding it to a voltage divider (2 resistors in series), with the connection between the 2 connected to an ADC input of the PIC. Make sure the adc input voltage can not be higher than the supply voltage of the PIC minus t.b.f. A problem can be here that the divider continuously draws some current from the battery..
if I measure the voltage of the battery, i can know the instantaneous voltage. This can help me. Thak you for this information. Can you give to me a suggestion for Pic Model ? Than, I can look at the specification of the PIC.
Dany wrote:[Measuring the current is not so simple. The PIC always measures voltages, so you will need a converter between current and voltage. A very simple convertor is simply a series resistor in the path of the current flow, but usually only a very low voltage drop is allowed across it, so amplification might be needed. Also other problems can occur, like the voltage across the series resistor not having the right ground level or polarity.
Measuring the current looks like a problem :) but I can try this way.
Dany wrote:
karalius wrote:And also, if the battery is low, power supply is turned on by micro controller again.
It may be not so simple to defined what is a "full" or "empty" battery. See the specification of e.g. a NiMh battery for this.
I have max. and min. values which are the standart for the battery. Thank you for your advice.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Charging system

#5 Post by Dany » 09 Oct 2010 12:05

karalius wrote:Can you give to me a suggestion for Pic Model ? Than, I can look at the specification of the PIC.
The 12F675 has already an ADC on board. Seen the simple tasks the pic has to do (switch on/off the loader power supply), this PIC should be adequate.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

karalius
Posts: 25
Joined: 27 Mar 2010 10:46

Re: Charging system

#6 Post by karalius » 11 Oct 2010 18:21

Thank you for your helping....
I will try this tomorrow night. I hope that I can do it :)

Thanks again...

Post Reply

Return to “mikroC General”