3 month countdown alarm (miniature circuit)

AnalogKid

Joined Aug 1, 2013
10,986
How about this: Rather than continue to give us incomplete, inaccurate, and uninformed requirements, why don't you do some work on your own. Think through exactly what you want to achieve, and what it will take to do it. Think through the device's operation, handling, assembly, and repair. Determine how loud a beeper has to be in order to be heard from 30 feet away. Factor in background noise and the fact that the beeper might be partially covered. Work out the power requirements and determine the battery size. Determine the packaging - maximum package size, material, construction, mounting (belt clip, wall hook, etc.). In other words, think. There is more than enough information in the previous posts to fill in what you need.

What class and grade is this for? Wherever and whatever the school is, I hope it does not consider passing off all of the major aspects of a project to total strangers as work.

ak
 

Thread Starter

MLD

Joined Dec 7, 2012
76
How about this: Rather than continue to give us incomplete, inaccurate, and uninformed requirements, why don't you do some work on your own. Think through exactly what you want to achieve, and what it will take to do it. Think through the device's operation, handling, assembly, and repair. Determine how loud a beeper has to be in order to be heard from 30 feet away. Factor in background noise and the fact that the beeper might be partially covered. Work out the power requirements and determine the battery size. Determine the packaging - maximum package size, material, construction, mounting (belt clip, wall hook, etc.). In other words, think. There is more than enough information in the previous posts to fill in what you need.

What class and grade is this for? Wherever and whatever the school is, I hope it does not consider passing off all of the major aspects of a project to total strangers as work.

ak

AK seems like you are looking for trouble. You no longer have to participate on my thread, Check out other threads, there is lots of them out there on the forum.
 

Dodgydave

Joined Jun 22, 2012
11,284
The programmer you use depends on which chip your using, if your programmer will programme the 12f675 ,with the hex file that i gave ,then use it, otherwise choose the pic chip first then the programmer.
If you want a pulsed output after 3 months, i can alter the programme for you.
 

DickCappels

Joined Aug 21, 2008
10,153
It was not apparent until late in this thread that your project is homework, but it is. I moved this thread to Homework Help where you are expected to attempt to solve the problem (in this case come up with a design) and after that obtain help with "getting it right".
 

Thread Starter

MLD

Joined Dec 7, 2012
76
It was not apparent until late in this thread that your project is homework, but it is. I moved this thread to Homework Help where you are expected to attempt to solve the problem (in this case come up with a design) and after that obtain help with "getting it right".

That will be fine. THANKS
 

Thread Starter

MLD

Joined Dec 7, 2012
76
The programmer you use depends on which chip your using, if your programmer will programme the
The programmer you use depends on which chip your using, if your programmer will programme the 12f675 ,with the hex file that i gave ,then use it, otherwise choose the pic chip first then the programmer.
If you want a pulsed output after 3 months, i can alter the programme for you.
,with the hex file that i gave ,then use it, otherwise choose the pic chip first then the programmer.
If you want a pulsed output after 3 months, i can alter the programme for you.

OK the pulse will be better like Bernard suggested.
The programmer you use depends on which chip your using, if your programmer will programme the 12f675 ,with the hex file that i gave ,then use it, otherwise choose the pic chip first then the programmer.
If you want a pulsed output after 3 months, i can alter the programme for you.

Is there a way to send a private message? I don't see a tab anywhere.
 

Thread Starter

MLD

Joined Dec 7, 2012
76
Im looking for the code in HEX to program the PIC12675 8 pin DIP MCU. Just basically looking for the timer to start the 3 month countdown when powered up then output the alarm beep once every 1 second. I will be using a Piezo Buzzer on the output so there has to be a tone output.
 

Thread Starter

MLD

Joined Dec 7, 2012
76
I tried a 12f675 MCU with no positive results. I used a 35mAh coin battery and the MCU drained my battery in a day. I looking for a countdown timer that can hold power all the way through the 90 day countdown. Similar to a wrist watch circuit with a countdown timer but just needed specially to countdown 90 days.

My tests:

The 12f675 operating current at standby is about 100uA and with the MCU using the program that Dave made me when programmed it begins to draw 56mA way to much kills the coin battery in a matter of hours, next day I came to do a voltage test of the battery and it was completely ran down.


Any other suggestions in using another MCU with a 35mAh coin battery that can stand the 90 days?


THANKS
 

AnalogKid

Joined Aug 1, 2013
10,986
See post #2. If that is not low enough, consider the PIC10LF320.

Enable the 31 kHz internal oscillator.
Disable all peripherals except the Watchdog timer (WDT).
Set the WDT for 256 seconds.
When the WDT brings the CPU out of Sleep Mode, increment a software counter, compare it against the 90 day count value, go back to sleep. After 90 days, alarm.

With this approach the CPU is running for less that 1/2 second per day. Current during sleep with the WDT running is less than 1 uA typ.

ak
 
Last edited:

dannyf

Joined Sep 13, 2015
2,197
Mcus tend to drain a few ma running at full speed. If yours does 50ma, there is something seriously wrong.

the key to liw power consumption is

one, put the mcu to sleep. Wake it up periodically.

two, run the mcu at lowest possible speed.
 

OBW0549

Joined Mar 2, 2015
3,566
...with the MCU using the program that Dave made me when programmed it begins to draw 56mA way to much...
56 milliamps????? Good grief, something is very, VERY wrong. A PIC12F675 running in the LP Oscillator Mode (which is the mode you should be running in) draws only 35 μA typical at 5 volts, and only 18 μA at 3 volts. Even when running at 4 MHz in the INTOSC mode, the 12F675 only draws 1.1 mA, maximum.

You've got something shorted, somewhere. Ain't NO WAY your PIC should be drawing that much current.
 

AnalogKid

Joined Aug 1, 2013
10,986
Front page of the datasheeet:

Operating Current:
- 8.5uA @ 32 kHz, 2.0V, typical
- 100uA @ 1 MHz, 2.0V, typical
• Watchdog Timer Current
- 300 nA @ 2.0V, typical

ak
 

dannyf

Joined Sep 13, 2015
2,197
Any ideal mcu for this application should have low sleep current, quick wake up, and most important, a timer that runs in sleep and supports a large preacaler so the mcu is waken up as infrequently as possible.
 

AnalogKid

Joined Aug 1, 2013
10,986
The PIC can sleep with a 23 bit watchdog timer running and drawing less than 1 uA. That and a counter in software are all this needs. I think the PIC WDT runs at 8 kHz. If so it wakes up the cpu every 17 minutes for a few milliseconds, a seriously small duty cycle.

ak
 

dannyf

Joined Sep 13, 2015
2,197
Wdt is so inaccurate ....

For a typical low consumption design you try to budget for the battery.

Take this case. Say your sleep current is 5ua, mostly to run tmr1. No bod, no wdt, no adc, no comparator, .....

On a 32k crystal, 8-bit counter, Max 8-bit prescaler. Within a second, it wakes up 16 times. Assume minimum stabilization, each wake up is 1ms, consuming 1ma. Or 16 * 1ms * 1ma = 16 ua*s. Total average current in that second is 21 ua.

You can then easily figure out the battery needed from that.
 

Thread Starter

MLD

Joined Dec 7, 2012
76
These current tests were ran with my Fluke meter and at first I though I had a burnt MCU but I grabbed a spare new one and programmed it with the program that Dave made me and same results so I know the MCU is good and not shorted or faulty. Im using a DIP8 package style MCU. The tech guy where I purchased the MCU looked at the spec sheet and told me that the SOIC8 package style draws the same amount of power with no difference if using the DIP8 package style. I though a SOIC8 package which is smaller will draw less current.

Im feeding the MCU direct to the battery, direct connection.

I don't think neither my MCU's are faulty or my Fluke meter is faulty.

Im knowledgeable in hardware and wiring up and testing circuits but don't know anything about firmware or software programming.


can someone email me different programs in HEX format for me to test out and check out the current draws of each program?

When the 90 days countdown is completed, the output needs to be pulsating every second like BERNARD suggested since the buzzer im using has a constant tone when power is fed to it. So I want the beep / alarm to be a pulsating output.

My coin battery is rated at 3 volts @ 35 mAh, that is the battery I will be using.


Thanks
 
Top