PIC Microcontroller with accurate timing of long intervals.

Status
Not open for further replies.
T

treez

Guest
Hello,

I am doing the microcontroller for an emergency LED light which comes on whenever the mains fails......the PIC must also manage the charging of the battery and self-test routines.

Every month, the PIC must switch off its local mains supply , and power the LEDs from the battery.....just to proove that the battery is still charged up.

Since i need to time such long intervals..(1 month), then how do i do this, can i not use the internal oscillator?

I presume i must use a timing crystal.....?.....do yo uknow which type?, and which PIC can be suitable for this?
 

RTC [real time Clock] DS1307/MAX6902
 
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
You can use some real time clock IC such as DS1307, DS1337, MCP...

With this you can define and control your device in relation with time.
 
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
You can do this with the internal oscillator since the timing isn't crucial. A few minutes (I'm sure hours as well) here and there won't be a problem. So, there's no need to add an additional RTC chip.

Any PIC with a timer should be usable. How many pins do you need in total? Take a look at PIC12F629, PIC16F630 and PIC16F628A.

Hope this helps.
Tahmid.
 
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Imagine that is 2 o'clock in the afternoon, and this light is turned on in some office, while the user is staring curiously at the light, and asking what is happening?

Better get some precisely control of "jogging-condition test" in some spare time, when office or that room is not in use, example each first sunday evening at 20h in month. Some circuit monitor and test battery, and as result of that test, let say battery is discharged in some short time, red led will be turned on, so someone can see that the battery is bad and need replacement.

or

You can make battery test with some dummy load such some power resistor with exact current of led light. This will exlude need for turning on led lights.
 
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Well, depends on his exact requirement.

Every month, the PIC must switch off its local mains supply , and power the LEDs from the battery.....just to proove that the battery is still charged up.

To me, it sounded like he wants just that the LEDs are run from the battery to show that the battery is okay and that it can power the LEDs.

As suggested by tpetar, a resistor could just be used. The PIC could keep track of discharge time and deduce if the battery is good or not. Choose a resistor such that discharge current is about the same as that for the LEDs. A discharge time of approximately the same as the backup time will indicate a good battery. A very low time would mean a bad battery (provided the resistor doesn't get damaged - so be careful with resistor power rating).
 
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
thanks but theres no room for a power resistor.

I am not sure what the standards say about when the "self test" should happen............i doubt it really matters when it happens......only the real slackers will be put off by it

cheap and cheerful for me....though i bet thi sis covered on the standards somewhere.......i emailed the ICEL but i have no answer as yet
 

What I saw in some commercial "panic lights" devices, they periodically discharge almost complete battery and recharge it, this ensures NiMh batteries to stay in good condition.

If there is no room for power resistor, then activate led lights and discharge battery to determined level, and monitor discharge time, if this time is shorten for lots from some determined time as worst acceptable, then battery is bad. To determine that normal time, test and monitor new and good battery, and make calc.

Use manufacturer battery datasheet as reference what to expect from batteries, and conditions and rules for charging and discharging. Also lifetime for batteries can be found there. Lifetime for NiMh and NiCd is linked with time, regardless of the use and exploitation, because batteries is chemistry technology, some chemical material inside aging and change its structure reflecting that on battery work.

If you use lead acid battery chemistry, you dont need to "jogging" battery, just maintain battery on float charging voltage. Dont forget to include temperature inside device case for determining float charging voltage level.

;-)
 
Last edited:
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…