3 month countdown alarm (miniature circuit)

Thread Starter

MLD

Joined Dec 7, 2012
76
The unused pins should be left unconnected, as they are outputs, the only input is pin 4 mclr, which is not used.

Your pic sould be only taking about 760 micro amps, if its taking over 10 milli amp there is something wrong.

Dave so if pin 4 is an input, should it be tied low or high? Remember for me to test this accurately it will take me the 90 days to complete the test and if it fails I will have to test it for another 90 more days.
 

JoeJester

Joined Apr 26, 2005
4,390
You should make it run for a shorter period of time to test it. Then increase the time to what you really require. Then you would have one 90 day test.

There are 86400 seconds in a day. There are 1440 minutes in a day. Either will provide a shorter test period.
 

Dodgydave

Joined Jun 22, 2012
11,285
I left pin 4 not connected, its the mclr pin and its configuration is "input not reset", if you want to connect it to ground (pin 8) it will still work,

You have the ASM file, you can modify it to any time delay of your choice, i tried it for a minute, then an hour, and it works ok,

i made pin 7 pulse high low every second to test it,so if you want to put an led with a 470 ohm resistor on it to ground it will flash, omit the led for final build.
 

Thread Starter

MLD

Joined Dec 7, 2012
76
I left pin 4 not connected, its the mclr pin and its configuration is "input not reset", if you want to connect it to ground (pin 8) it will still work,

You have the ASM file, you can modify it to any time delay of your choice, i tried it for a minute, then an hour, and it works ok,

i made pin 7 pulse high low every second to test it,so if you want to put an led with a 470 ohm resistor on it to ground it will flash, omit the led for final build.

I will tie pin 4 to ground to see if it helps reduce the current draw. I will test the circuit once again. Im using a through hole DIP8 style PIC the bigger IC would that make a difference on the current draw? The store that sold me the PICS says there will not be a difference in a DIP8 to a SOIC8
 

Thread Starter

MLD

Joined Dec 7, 2012
76
Daylight sensor, inverter with schmitttrigger input, counter to count to 90 days. :)

The circuit will be also be used in low light conditions so the daylight sensor circuit will not work. Good suggestion though.
 

Thread Starter

MLD

Joined Dec 7, 2012
76
You should make it run for a shorter period of time to test it. Then increase the time to what you really require. Then you would have one 90 day test.

There are 86400 seconds in a day. There are 1440 minutes in a day. Either will provide a shorter test period.

Joe, Thanks got that, but my biggest worries are current consumption. My last test drained my coin battery within hours.
 

JoeJester

Joined Apr 26, 2005
4,390
You need to produce a good drawing as you built it and take photos to attached to a post here.

No one here knows how you actually built it. It's very tough to advise someone without some idea of how you built it. Another user told you what the consumption should be. Yours is different. It's time for you to show us the schematic and pictures.
 

Thread Starter

MLD

Joined Dec 7, 2012
76
I
You need to produce a good drawing as you built it and take photos to attached to a post here.

No one here knows how you actually built it. It's very tough to advise someone without some idea of how you built it. Another user told you what the consumption should be. Yours is different. It's time for you to show us the schematic and pictures.

I've provided detail info on how I have it wired up. Its just 3 components, nothing genius. I don't have it wired wrong. Current consumption is what I said, kills the battery the following morning.
 

Attachments

Thread Starter

MLD

Joined Dec 7, 2012
76
OK I wired up the circuit again to do another test. I see my mistake. I read it wrong. The current draw is .56 mA not 56 mA but still it drained my coin battery in 1 day. Why?

The circuit is wired up right believe me. Polarity is correct otherwise the consumption will be tremendously high and the PIC will be on fire and that is not the case.

Now if my draw is only .56 mA or 560 uA why is it killing my 35 mAh battery in a day?
 

JoeJester

Joined Apr 26, 2005
4,390
Ok ...

Dave recommended you use at least a 1.2 AH battery for this project.

Your 560 uA was less that his 760 uA as built.
 
Last edited:

Dodgydave

Joined Jun 22, 2012
11,285
560uA will take 2.6days to go flat on that 35mah battery, i would say you need a bigger capacity battery like a 1.5aH, will last 90 days at that current.
 

JoeJester

Joined Apr 26, 2005
4,390
We do not know the charge state of the batteries he has used in this project. A USED battery formerly rated at 35 mAH could die in less than the calculated time.
 

JohnInTX

Joined Jun 26, 2012
4,787
The 12F675 is not particularly low power compared to others that are available. 560uA is about right for the part running with its internal 4MHz oscillator according to the datasheet.
DD was good enough to post code and all PICs are pretty low power but it might be time to port it to something like a 10F320 or another XLP part. The 10F320 is spec'd at 6.5uA typ. Vdd=3V. running the internal LFINTOSC mode at 32KHz. What DD and the others said about setting ports to good levels, turning off internal peripherals (including WDT) etc holds and uCHIP has lots of info on their site. See the Battery Life Estimator as well.

DD's code should port pretty easily.
Consider running the thing at min speed for the 3mos. then when its time to fire up and beep the buzzer, you can bump the clock up in firmware if needed. Sleep the processor between beeps since timing there is not critical. As for the ports, uCHIPs test conditions are unused ports set to input and pulled up to Vdd. Probably doesn't make a lot of difference.

Good luck..

FWIW: The battery life calculator guesses 11.2 months for a 12LF1840 (another 8pin XLP running at 4uA) 31KHz LFINTOSC after pro-rating the mAh rating for one of the standard battery types it knows about (CR2032) down to 35mAh. I guess even with only 3 parts they have to be the right ones....
 
Last edited:

Thread Starter

MLD

Joined Dec 7, 2012
76
OK I guess we are getting somewhere now. I really wanted to stick to a small coin battery to the one im using. If JohninTX suggestion works I will go that route to use a PIC with less power consumption. I just need help with the program. THANKS
 
Top