I am using an Atmel Attiny 45 as an embedded chip on a project that I’m working on. It is my understanding that once turned on, this chip cannot be turned off without disconnecting its power source. I’m using a 3 V battery and would like to know the most effective way to have it (the chip) disconnect itself from the power source. I should mention that this device may not be used for months, thus it does need to be turned off. Should I use a relay, latching switch or other device or method unknown to me? I have very limited space within which to house the circuitry. Thank you for your replies.
I am not good with the Atmel Attiny 45 but:
Slow down the clock! It is programmable. You can divide the clock by 1 through 256. The power is very much related to clock speed.
Shut down peripherals like the ADC.
Many of these types of parts have a "sleep" mode or low power mode. I think there is a sleep mode where the CPU shuts down until a timer tuns out. Then it wakes up and can reset the time and go back to sleep.
We have made products with Atmel and MicroChip with no power switch. The micro pulls so little power that it ships from China with the micro on, just in sleep mode. When a button is pushed the micro wakes up and starts working at full speed. If it is not used for 30 seconds it drops back in sleep mode.
Thank you for your advice. I believe the Attiny has a sleep mode. I suppose that I should at least test it to see how long the battery lasts. I may be surprised.
Looking at the data sheet.
Active and working at:
20mhz 5V=11mA
12mhz 3.3V=2.5mA
1mhz 3.3v=500uA
100khz 3.3V=100uA
Idle supply current:
20mhz 5V=3mA
12mhz 3.3v 1mA
1mhz 3.3v 140uA
100khz 3.3v-60uA
I don't know but it looks like the 3.3v "power down current" is about 0.2uA
The watch dog timer alone pulls 4uA at 3.3V if you leave it on.
you could always use and extra i/o pin to keep the power source on (transistor,mosfet,relay...) to the chip and shut it's power source back off, and when needed again, have a momontary switch to turn the unit back on, in-turn the IC pin keeps itself on ?
Slow down the clock! It is programmable. You can divide the clock by 1 through 256. The power is very much related to clock speed.
Shut down peripherals like the ADC.
Many of these types of parts have a "sleep" mode or low power mode. I think there is a sleep mode where the CPU shuts down until a timer tuns out. Then it wakes up and can reset the time and go back to sleep.
We have made products with Atmel and MicroChip with no power switch. The micro pulls so little power that it ships from China with the micro on, just in sleep mode. When a button is pushed the micro wakes up and starts working at full speed. If it is not used for 30 seconds it drops back in sleep mode.
I am still working on the code for this approach to see how viable it is. While I am sure it can be done, I have much to learn about this chip. The datasheet is 234 pages, so the going is slow.
you could always use and extra i/o pin to keep the power source on (transistor,mosfet,relay...) to the chip and shut it's power source back off, and when needed again, have a momontary switch to turn the unit back on, in-turn the IC pin keeps itself on ?
I have been working on your approach. Unfortunately, I have not found a viable solution, as it appears as though too many components are required in too small a space - that is unless I have it professionally made (miniaturized), thus pushing it out of my price range. Any suggestions are welcomed.
what he means is, instead of bouncing the input voltage off of a set reference voltage, bounce a set voltage off of an adjusting reference voltage. As the battery dies, the reading will get higher and higher, and will max out when the battery voltage gets down to 1.1V. The micro's analog to digital converter has an internal 1.1V bandgap reference.
Mr. T., this is a really cool way to measure battery voltage. Get better resolution in the 1-2v range.