Friday, March 29, 2024

Multifunction Rechargeable Clock

The LDO UCC383 is capable of driving loads upto 3A with a maximum dropout of 0.45 volts which is excellent for our application. The Vin pin accepts the battery rail which nominally varies in the range of 6 to 7.5 volts while charging and 5.25 to 6 volts while normal usage.

Through R7 and R8, the output voltage of the LDO is set to 5 volts. C4, C5 and C6 are used for stability purpose of the LDO. The 5 volt rail thus obtained will be used to power most of the circuit. TPS2051C which is a 500mA current limited load switch from Texas Instruments is used to drive a 500mA current limited 5volt rail which will be used to power/charge USBapplication. We have used a current limited load switch so as to prevent the USB application from fastly draining the clock battery however this feature is optional. C7 is again used here for stability purpose of the current limiter.

Power LED & USB charging connections

LED & USB circuit
Figure 4. Power LED and USB charging jack connections

The circuit connection for the power LEDs and USB charging socket is shown in figure 4.

Here two pairs of 3 x 1watt power LEDs are used for lightening application. A current limiting resistor of 2 ohms is used to limit current in each pair of LED channels in series with a SPST switch. These two LED channels receives power directly from the non current limited 5 volt rail (from the power unit section). A female USB-A type jack is used here for USB charging applications which receives power from the 500mA, 5v current limited channel (from power unit section).

clock circuit
Figure 5. Main clock circuit diagram

The circuit diagram for the microcontroller based main clock circuit is shown in figure 5.

- Advertisement -

Multifunction rechargeable clock circuit

The circuit is responsible for implementing a clock which, apart from general time display also features alarm function and indication of date, month, year and temperature. The circuit is built around the famous ATMEGA8 microcontroller from ATMEL. ATMEGA8 is responsible for performing display updation, sensing user inputs/sensors and performing required decision making.

Microcontroller

The ATMEGA8 provides the features like 8 Kbytes of In-System Programmable Flash with Read-While-Write capabilities, 512 bytes of EEPROM, 1 Kbyte of SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible Timer/Counters with compare modes, internal and external interrupts, a serial programmable USART, a byte oriented Two wire Serial Interface, a 6-channel ADC with 10-bit accuracy, a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and five software selectable power saving modes.

A separate in circuit serial programming port SV1 is available for programming the microcontroller. The time keeping is done by the RTC chip bq32000 from Texas Instruments. The bq32000 features an automatic backup supply using a 3v battery.

- Advertisement -

The bq32000 has a programmable calibration adjustment from –63 ppm to +126 ppm, so that it can also be used with low quality crystals. The bq32000 includes automatic leap-year compensation. The RTC chip is connected to the microcontroller via the I2C bus and in this project uses a 3v CR2032 lithium cell for the backup supply. For the functioning of the internal oscillator, a 32.768 KHz crystal is used at OSC0 & OSC1 pins. The IRQ pin on the RTC chip is connected with ATMEGA8 on PIND.2 and is also responsible for driving the two middle LEDs which are located between the two seven segment display pairs. The anodes of two yellow colored LEDs (in parallel) are connected to this IRQ pin while the cathode to ground on the JP1 socket.

Temperature sensor

Three momentary push to ON switches namely SET, PLUS and MINUS are connected to the pins PD.3, PC.1 and PC.2 respectively. An analog temperature sensor TMP35 from Analog Devices is used for room temperature sensing. The TMP35 analog signal output is proportional to the temperature by the relation 10mV/degree Celsius which is interfaced to the analog to digital converter on the microcontroller. The sensor is connected on the ADC channel 3 (ADC3) on ATMEGA8. A beeping buzzer is connected to the PC0 pin which will be used for acknowledging the user inputs and for alarm indication.

Display

For display, four multiplexed common cathode displays are connected to PORTD and PORTB on pins 2, 3, 6, 11, 12, 13 and 14 and their individual cathode pins are connected to the SV4 jack which are driven by four NPN transistors. A RGB LED is connected to PB3(red), PB4(green) and PB5(blue) pins on the controller. The RGB LED is employed here to indicate AM/PM and date on the display unit. The active low reset pin on the ATMEGA8 is pulled up by a 10k resistor and also tied to a 1uf electrolytic capacitor for stability purpose to prevent the controller from regenerative resetting during supply transients. The AREF pin which is the reference in/out pin for ADC is tied to a 100nF ceramic capacitor for stability purpose, while the AVCC(20) and AGND(22) pins are the power supply pins for the ADC circuitry on the microcontroller.

Pins VCC (7) and GND (8) are the power pins for rest of the circuitry on the microcontroller. It is important to note that we are using the internal 1MHz RC oscillator on the ATMEGA8 for its functioning hence we do not need to connect any crystal to the microcontroller, and it is important to set correct fuse bits on the ATMEGA8 to configure it for 1MHz internal RC oscillator. For powering the clock circuit, a 3.3v LDO TPS73733 is used which gets its input from non-current limited 5v rail from the power section. The TPS73733 is a 3.3v, 1A regulator with a maximum input voltage of 5.5volts. The EN pin is used for enabling the LDO, however here we have tied it directly to the Vin pin for continuous operation.C5, C6 and C7 are used here for stability purpose of the LDO. An external capacitor C4 to the NR/FB pin on the LDO bypasses noise generated by the internal bandgap, reducing LDO output noise to very low levels.

Display connectionsMultifunction Rechargeable Clock: 7-segment display unit

Figure 6. Multiplexed seven segment display unitThe circuit diagram for the multiplexed seven segment display unit is shown in figure 6.

This circuit contains four seven segment displays arranged in pairs of two, two in left side for displaying variables like hours, date, etc and two in right side for displaying variables like minutes, month, etc. Connections on SV1 and SV2 go to the display driving ports on the main clock section. Two middle LEDs with a 47ohm current limiting resistor in series are provided for indicating whether time or other data is displayed on the seven segment displays.

7 COMMENTS

SHARE YOUR THOUGHTS & COMMENTS

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators