Summary of ATMEGA48 TIMER TRIGGERED BY CURRENT FLOW ASM-010
The article discusses a timer project using the ATmega48 microcontroller to monitor device standby time by measuring current flow. It features a current-sensing circuit using a transformer and an LM358 operational amplifier (with suggestions to replace it by TLC277 for better accuracy). The design includes a 4-digit LED display directly driven by the microcontroller for time indication. On power failure, an interrupt stores the running time in EEPROM to avoid data loss, with low power consumption and operation down to 1.8V. The frequency is stabilized by a 4 MHz quartz resonator.
Parts used in the ATMEGA48 Timer triggered by current flow ASM-010:
- ATmega48PA microcontroller
- Quartz resonator (4 MHz)
- Current transformer (up to 10 A)
- Resistor R15 (adjustable for sensitivity)
- Operational amplifier LM358 (suggested alternative TLC277)
- 4-digit common anode LED display
- EEPROM memory (built-in ATmega48)
- Power supply (8 – 30 V, constant voltage, filtered)
ATMEGA48 Many devices may be in standby mode during downtime. They do not perform any work, they are apparently disabled, but the control circuits are powered. To extract useful information from the point of…Electronics Projects, ATMEGA48 Timer triggered by current flow ASM-010 “avr project, microcontroller projects, power electronic projects, “
ATMEGA48 Many devices may be in standby mode during downtime. They do not perform any work, they are apparently disabled, but the control circuits are powered. To extract useful information from the point of view of working time, you should download it from the inside of the device, which may end up with a loss of warranty. ATMEGA48
If the sensitivity of the system is too low then the resistance R15 can be increased. Otherwise, if the current in the transformer flows high current, the transformer itself must be adjusted to avoid damage. Used in the prototype ASM-010 is adapted to a maximum of 10 A.
The LM358 is undoubtedly inexpensive, but its disadvantage is its relatively high unbalance voltage, which can, in very unfavorable conditions, mask the sinusoidal input signal. If the changes described above do not work, you may consider using another operating amplifier, eg TLC277. It is important that its input stage properly handles the voltage close to zero.
Once done, the counter system is ready to go. Current consumption is approximately 11 … 15 mA, depending on the current content of the LED display. The power supply should be a constant voltage, well filtered and not necessarily stabilized, in the range of 8 … 30 V.
At the moment of power failure the stabilizer stops supplying the divider and the output of the comparator is set. This rising edge causes the interrupt handler to operate in which the display is turned off, and the current time indication is stored in the EEPROM. This solution does not overwhelm the EEPROM with regular writing, which is justified because the number of write cycles written to it is limited.
ATMEGA48 ASM-010 SCHEMATIC DIAGRAM
The work time clock schematic diagram The microcontroller used here is ATmega48PA. In this application, its great advantage is the ability to operate at a supply voltage of 1.8 V. This is critical when writing data to non-volatile EEPROM when the system is powered exclusively from the filter capacity. The frequency of the microcontroller clock generator is stabilized with a quartz resonator (4 MHz). The same generator is used to measure time.
The display has 4 digits, each with a common anode. Control of all leads is done directly from the microcontroller terminals because the current of the segments is limited to about 2.5 mA, so that the whole digit does not take more than 20 mA.
Source: ATMEGA48 TIMER TRIGGERED BY CURRENT FLOW ASM-010