Contacts

Desk clock. Desktop Watch Electronic Clock with Brightness Adjustment

This article describes the clock on the ATMEGA48PA microcontroller with LED indicators and multiple functions:

  1. Automatic brightness adjustment depending on the illumination.
  2. Manage clocks using touch buttons.
  3. Built-in stopwatch
  4. Built-in timer
  5. Built-in alarm clock
  6. Indicator of the day of the year, from 1 to 365.
  7. Sending the current time over the UART interface every minute.
  8. Menu Time Settings and Date.
  9. Switching between CC modes: mm and mm: ss.
  10. Animation of the end of the day, drawing zeros when moving 23: 59-00: 00.

The clock is a rectangular box and a stand made of plastic (polyvinyl chloride). All parts of the housing are cut with a knife and glued with second glue. On the front of the case there is a dark light filter, selecting part of the red light from the indicators. Three touch buttons are located on the stand. Each button is a circle of a small diameter, cut from copper foil and glued to the base. On the back sided: the connector for connecting the power adapter and external devices, and the sound hole of the speaker. From above there is a photocell reacting to the change in lighting. Indicators in the clock are seven segment LED indicators, with a connection type: a common cathode. In total, there are four indicators in the clock, that is, at the same time you can output four digits with additional points below. The clock works OT. network adapter With output voltage of 5 volts and a minimum current force of at least 150 mA.

When you first turn on the clock must be configured. To do this, click and hold 2 seconds the middle button (Next SC), the clock will switch to setting mode. Then you need to configure the current hour with the left and right buttons (hereinafter referred to as the LC and PC, respectively) and press the SC. You also need to set up minutes. Then it will be necessary to configure the current day and click the SC (hereinafter, the same setting of numbers will be used in all additional modes). The clock will switch to the main CC mode: mm (mode 0), that is, the indicators displays hours and minutes. A single press on the UK can be transferred to MM mode: SS (mode 1) and back. If in 0 click on the LC mode, then the clock will enter the alarm mode. After setting the signal time, click and hold 2 seconds of PC or LC. At the appointed time, the tone signal with a frequency of about 700 Hz will turn on, after 10 seconds the signal will turn off, and the alarm clock is automatically deactivated. If you press PC in 0 mode, then the clock will enter the timer mode. By default, the timer is set for 5 minutes. After setting the time, press and hold 2 seconds of PC or LCs and the timer is activated. After time, the same as in the case of the alarm clock, the tone signal will be silent and turn off after 10 seconds. If you press PC in mode 1, then the clock will switch to the stopwatch mode. By pressing the LC stopwatch runs or stops, pressing the PC stopwatch is reset. If you press LC in mode 1, then the clock will switch to the date mode, the current day of the year will appear on the indicators. To exit this mode, you can press any button. Also, from the additional modes you can go to the main mode by pressing the SC. Since everyone additional modes They are parallel, you can set the alarm clock, put the timer and start the stopwatch at the same time.

The brightness of the indicators varies depending on the lighting, the day the clock is shine bright, night dimly. Just a few brightness gradations that are calculated based on the photo sensor readings.

In the clock there is a UART interface, with which every minute on external devices (if any) is sent 2 bytes: the clock byte with the eighth bit (for example, if 15 hours, the byte is 15 + 128 \u003d 143), and byte minutes. The eighth bit when passing the clock is used so that external devices can immediately determine whether the clock byte is transmitted or byte minutes. You can connect other devices to AVR and get in them current Time by UART.

Each midnight (when moving from 23:59 to 00:00), simple animation is played in the indicators in the form of alternate drew zeros, after which the clock continues to work in normal mode.

FUUM BIATS:

In the attached file: project in Proteus, firmware, source, printed circuit board in SLayout.

List of radio elements

Designation A type Nominal number NoteScoreMy notebook
MCU1 MK AVR 8-bit

ATmega48pa-Au.

1 In notebook
VT1-VT4. Bipolar transistor

Kt3130А9.

4 In notebook
VT5-VT12 TransistorCT218A.8 In notebook
C1. Electrolytic condenser1000MKF 6.3V.1 In notebook
C2, C3. Capacitor20 PF2 In notebook
R1 Resistor

200 Oh.

1 In notebook
R3-R5 Resistor

1 MΩ

3 In notebook
R6-R17 Resistor

390 Oh.

12 In notebook
R18. Resistor

150 Oh.

1 In notebook
R19-R25 Resistor

68 Oh.

7 In notebook
R2, R26. Resistor

10 com

2 In notebook
R27 Resistor

470 Oh.

1 In notebook
LDR1 Photoresistor1-50 com1 In notebook
Z1. Quartz8mgz.1

Buy desktop clock is not difficult today, since such products are found in many specialized and not only stores. They may not only serve in their intended purpose - to inform about the current time, but also to decorate the interior or workplace, in particular. Distributed different models Therefore, you can always choose an interesting option that would like to like anyone. Glowing desktops will be very convenient in operation, especially when later than the time of day and problems arise with lighting. No need to constantly approach the clock to find out the time. Note that the intensity and color of the backlight can be adjustable in some table clock models. The functionality of such devices differs, so it is extremely important to pay attention to their specifications before the purchase.

Glowing desktops will perform an excellent gift for a loved one. They will be guaranteed to be used, bring comfort on workplace. Such things are appropriate not only in the office, but at home. Practice shows that demand for desktop hours is not reduced over the years, as this is a convenient and affordable thing. Buy desktop watches in Moscow can everyone can, but it is important to decide which model is required. Some of them are equipped with timers, alarm clocks, stopwalls and other options, however, for some people, they may seem unnecessary, and overpay the excessive functionality will not be desire. You can choose a model that will perform your basic functions by affordable price. The desktop store offers a wide range of specialized goods, among which it will be possible to find the desired option.

Differences of desktop watches

Desktop clock store offers big choice Products, but it is completely different with each other. Products can be manufactured in different countries, out of different materials and components. All this has an impact on the final cost of the product. The main thing is to take into account all your wishes at the stage of purchasing such products. The price of the desktop clock depends on whether they are produced within the country or abroad, mechanical or electronic, as well as other factors. It is important to understand that in low price range Also plenty of interesting models, so you can get a good product, not overpaying for it. The price of desktop clock is available for everyone, so there is no reason to refuse to use such accessories.

Recently bought network LED watch VST-731. The clock is favorably distinguished from other models functionality, the large size of the indicator symbols and the bright glow of these characters. Unfortunately, the online brightness reduction software declared on the site (22-00 - 7-00) in this model clock did not turn out. Due to the lack of software management The brightness of the indicators, one of the advantages of the clock - the bright glow of characters is also their disadvantage: the numbers of the clock are too bright in the dark, creating a certain discomfort at night.

The proposed circuit of automatic adjustment of the brightness of the clock indicators allows you to automatically install the brightness of the indicator depending on the level of illumination of the place where the clock is located.

To build an automatic brightness adjustment scheme, we will deal with the VST-731 clock node circuits. Fragment is shown below electrical circuit, similar to the scheme of these hours - the scheme VST-731 I could not find.

From the scheme it can be seen that the power of different groups of segments of the display indicators is organized from two single-alterid rectifiers collected on diodes D1, D2. Resistors R2, R4 set a current through the segments of the indicators, which means the brightness of the luminescence of characters.

The principle of operation of automatic adjustment of the brightness of the indicator for VST-731 clocks or similar to constructing power circuits illustrates the scheme:

The T1 transistor in this diagram performs the functions of an adjusting element and a rectifier diode. Elements D1, C1 - formation chain constant voltage. In the event that all clock nodes are connected to one source of constant voltage, then in this circuit there is no need: a chain on the resistors R1 - R3, which specifies the T1 transistor base current, can be connected to + UCC. With increasing illumination, the resistance of the photoresistor R1 decreases, while the current is increasing through the T1 transistor, which leads to an increase in the brightness of the glow of the indicator segments included by controlled keys. Resistor R2, the resistance of which is several orders of magnitude below the resistance of the photoresistor R1 in the dark, determines the brightness of the luminosity of the LEDs in the dark. On the T2 transistor, the second brightness control channel is assembled by the first. In our case, the second channel is necessary because, as noted above, the nutrition of the nodes in the clock is carried out from two sources of constant voltage.

The circuit of automatic adjustment of the brightness of the indicators for the clock VST-731 (highlighted in color) looks like this:

You can perform on the installation of the elements of the scheme (except for the photoresistor) on a separate board, for example, a piece of layers and put this fee in the housing of the clock - there is enough empty space. The 1R1 photoresistor must be fixed on the front panel of the clock, the two holes are drilled under its conclusions. I glued a photoresistor over trademark ® In the inscription VST® on the front panel, but this is a matter of taste: the main thing - the sensor should be located in the watches display plane. Before connecting the brightness adjustment board to the clock control board, do not forget to break the old power supply circuits of the indicator segments (diodes d1, d2), which mentioned above.

List of radio elements

Designation A type Nominal number NoteScoreMy notebook
1D1 Rectifying diode

1N4007.

1 In notebook
1T1, \u200b\u200b1T2. Bipolar transistor

2N2222A.

2 In notebook
1C1 Capacitor47 μF1 10V. In notebook
1R1 PhotoresistorGL5528.1 In notebook
1R2. Resistor

1.5 com

1 In notebook
1R3, 1R5 Resistor


Did you like the article? Share it