Clock with software brightness control. Automatic brightness adjustment of the LED clock. Table clock differences

  • 10.09.2021

Recently bought network LED clock VST-731. The watch compares favorably with other models by functionality, large size of indicator symbols and bright glow of these symbols. Unfortunately, the programmatic decrease in brightness at night (22-00 - 7-00) declared on the website of the online store was not found in this watch model. Due to the lack of software control of the brightness of the indicators, one of the advantages of the watch - the bright glow of the symbols - is also their disadvantage: the numbers of the watch glow too brightly in the dark, creating some discomfort at night.

The proposed scheme for automatically adjusting the brightness of clock indicators allows you to automatically set the brightness of the indicator depending on the level of illumination of the place where the clock is located.

To build an automatic brightness control circuit, let's look at the power circuits of the VST-731 clock nodes. Below is a fragment of an electrical circuit similar to the circuit of this watch - I could not find the VST-731 circuit.

It can be seen from the diagram that the power supply of different groups of segments of the display indicators is organized from two half-wave rectifiers assembled on diodes D1, D2. Resistors R2, R4 set the current through the segments of the indicators, and hence the brightness of the characters.

The principle of operation of the automatic brightness control of the indicator for the VST-731 clock or similar power circuits is illustrated by the diagram:

Transistor T1 in this circuit performs the functions of a regulating element and a rectifier diode. Elements D1, C1 - a circuit for generating a constant voltage. If all clock nodes are connected to the same constant voltage source, then this circuit is not necessary: ​​a chain on resistors R1 - R3, which sets the base current of the transistor T1, can be connected to +UCC. With an increase in illumination, the resistance of the photoresistor R1 decreases, while the current through the transistor T1 increases, which leads to an increase in the brightness of the glow of the indicator segments turned on by the controlled keys of the microcircuit. Resistor R2, whose resistance is several orders of magnitude lower than the resistance of the photoresistor R1 in the dark, determines the brightness of the LEDs in the dark. On the transistor T2, a second brightness control channel is assembled by analogy with the first. In our case, the second channel is necessary, since, as noted above, the nodes in the clock are powered from two constant voltage sources.

The scheme for automatically adjusting the brightness of the indicators for the VST-731 watch (highlighted in color) looks like this:

Hinged mounting of circuit elements (except for a photoresistor) can be done on a separate board, for example, a piece of breadboard and place this board in the clock case - there is enough empty space there. Photoresistor 1R1 must be mounted on the front panel of the clock, having previously drilled two holes for its conclusions. I glued the photoresistor over the ® trademark in the VST® lettering on the front panel, but this is a matter of taste: the main thing is that the sensor should be located in the plane of the watch display. Before connecting the brightness control board to the clock control board, do not forget to break the old power circuits of the indicator segments (diodes D1, D2) mentioned above.

List of radio elements

Designation A type Denomination Quantity NoteScoreMy notepad
1D1 rectifier diode

1N4007

1 To notepad
1T1, ​​1T2 bipolar transistor

2N2222A

2 To notepad
1С1 Capacitor47uF1 10V To notepad
1R1 photoresistorGL55281 To notepad
1R2 Resistor

1.5 kOhm

1 To notepad
1R3, 1R5 Resistor

This article describes the clock on the ATMega48PA microcontroller with LED indicators and many functions:

  1. Automatic brightness adjustment depending on the ambient light.
  2. Clock control with touch buttons.
  3. Built-in stopwatch
  4. Built-in timer
  5. Built-in alarm clock
  6. Day of the year indicator, from 1 to 365.
  7. Sending the current time via UART interface every minute.
  8. Time and date setting menu.
  9. Switch between HH:MM and MM:SS modes.
  10. Animation of the end of the day, drawing zeros at the transition 23:59-00:00.

The clock is a rectangular box and stand made of plastic (polyvinyl chloride). All parts of the body are cut with a knife and glued with second glue. On the front of the case there is a dark light filter that filters out part of the red light from the indicators. There are three touch buttons on the stand. Each button is a circle of small diameter, cut out of copper foil and glued to the base with glue. On the back side there are: a connector for connecting the power adapter and external devices, and a speaker sound hole. Above is a photocell that reacts to changes in lighting. The indicators in the watch are seven-segment LED indicators, with connection type: common cathode. In total, there are four indicators in the watch, that is, four digits with additional dots at the bottom can be displayed simultaneously. The watch is powered by a mains adapter with an output voltage of 5 volts and a minimum current of at least 150 mA.

The clock must be set the first time you turn it on. To do this, press and hold the middle button (hereinafter referred to as SC) for 2 seconds, the watch will enter the setting mode. Then you need to set the current hour with the left and right buttons (hereinafter LK and PC, respectively) and press SK. You also need to set the minutes. Then, in the same way, you will need to set the current day and press the SC (further, the same digit setting will be used in all additional modes). The clock will switch to the main mode HH:MM (mode 0), that is, the indicators show hours and minutes. With a single click on the SC, you can switch to the MM:SS mode (mode 1) and vice versa. If you press the LK in mode 0, the watch will enter the alarm mode. After setting the signal time, you need to press and hold PC or LC for 2 seconds. At the appointed time, a tone signal with a frequency of about 700 Hz will turn on, after 10 seconds the signal will turn off, and the alarm clock will automatically deactivate. If you press PC in mode 0, the clock will enter the timer mode. By default, the timer is set to 5 minutes. After setting the time, press and hold PC or LC for 2 seconds and the timer is activated. At the end of the time, just as in the case of the alarm clock, a tone signal will ring and turn off after 10 seconds. If you press PC in mode 1, the watch will enter the stopwatch mode. Pressing LK starts or stops the stopwatch, pressing PC resets the stopwatch. If you press LK in mode 1, the watch will switch to date mode, the current day of the year will appear on the indicators. You can press any button to exit this mode. Also, from additional modes, you can switch to the main mode by pressing SK. Since all additional modes are parallel, you can set the alarm, set the timer and start the stopwatch at the same time.

The brightness of the indicators changes depending on the lighting, during the day the watch shines brightly, at night it is dim. Only a few gradations of brightness, which are calculated based on the readings of the photosensor.

The clock has a UART interface, with the help of which 2 bytes are sent to external devices (if any) every minute: the clock byte with the eighth bit set (for example, if it is 15 hours, then the byte is 15 + 128 = 143), and the minutes byte. The eighth bit of the clock transmission is used so that external devices can immediately determine whether the hour byte or the minute byte is being transmitted. You can connect other devices to the AVR and get the current time in them via UART.

Every midnight (during the transition from 23:59 to 00:00), a simple animation is played on the indicators in the form of alternate drawing of zeros, after which the clock continues to work in its normal mode.

Fuse-bits:

In the attached file: project in Proteus, firmware, source, PCB in SLayout.

List of radio elements

Designation A type Denomination Quantity NoteScoreMy notepad
MCU1 MK AVR 8-bit

ATmega48PA-AU

1 To notepad
VT1-VT4 bipolar transistor

KT3130A9

4 To notepad
VT5-VT12 TransistorKT218A8 To notepad
C1 electrolytic capacitor1000uf 6.3v1 To notepad
C2, C3 Capacitor20 pf2 To notepad
R1 Resistor

200 ohm

1 To notepad
R3-R5 Resistor

1 MΩ

3 To notepad
R6-R17 Resistor

390 ohm

12 To notepad
R18 Resistor

150 ohm

1 To notepad
R19-R25 Resistor

68 ohm

7 To notepad
R2, R26 Resistor

10 kOhm

2 To notepad
R27 Resistor

470 ohm

1 To notepad
LDR1 photoresistor1-50 kOhm1 To notepad
Z1 Quartz8MHz1

It is not difficult to buy a table clock today, since such products are found in many specialized and not only stores. They can not only serve their intended purpose - to inform about the current time, but also be a decoration of the interior or workplace, in particular. Different models of such products are widespread, so you can always choose an interesting option that would please any person. A luminous table clock will be very convenient to use, especially when it is late at night and there are problems with lighting. You won't have to constantly approach the clock to find out the time. Note that the backlight intensity and color can be adjustable in some desk clock models. The functionality of such devices varies, so it is extremely important to pay attention to their technical characteristics before buying.

Luminous table clock will make an excellent gift for a loved one. They will be guaranteed to be used, bring comfort to the workplace. Such things are appropriate not only in the office, but also at home. Practice shows that the demand for table clocks has not decreased over the years, as it is a convenient and affordable thing. Anyone can buy a table clock in Moscow, but first it is important to decide which model is required. Some of them are equipped with timers, alarm clocks, stopwatches and other options, but for some people they may seem superfluous, and there will be no desire to overpay for unnecessary functionality. You can choose a model that will perform its basic functions at an affordable price. The desk clock store offers a wide range of specialized products, among which you can find the right option.

Table clock differences

The table clock store offers a wide range of products, but all of them are radically different from each other. Products can be manufactured in different countries, from different materials and components. All this affects 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 a table clock depends on whether it is produced domestically or abroad, whether it is mechanical or electronic, and other factors. It is important to understand that there are also plenty of interesting models in the low price range, so you can get a good product without overpaying for it. The price of table clocks is affordable for everyone, so there is no reason to refuse to use such accessories.