Computers and modern gadgets

Clock circuit with fluorescent lamps

Many people want and are interested circuit diagram of a clock using vacuum indicators old Soviet times. Well, of course there is a lot of interesting things in this. Watch in retro style, and at night you can see what time it is. You can also insert diodes under the bottom, and it will be like a hint. And so let’s begin to consider this circuit.

The main role is occupied by gas discharge indicators. I used IV-6. This is a luminescent seven-segment indicator with a green glow (In the photographs you will see a bluish tint of the glow, this color is distorted when photographing due to the presence of ultraviolet rays). The IV-6 indicator is made in a glass flask with flexible leads. Indication is carried out through the side surface of the cylinder. The anodes of the device are made in the form of seven segments and a decimal point.

Can be applied indicators IV-3A, IV-6, IV-8, IV-11, IV-12 or even IV-17 with minor changes to the design.

First of all, I would like to note where you can find lamps that were produced in 1983.

Mitinsky market. Many and different. In boxes and on boards. There is room for choice.

It’s more difficult in other cities, maybe you’ll be lucky and you’ll find it in a local radio store. Such indicators are found in many domestic calculators.

You can order from Ebay, Yes Yes, Russian indicators at auction. On average $12 for 6 pieces.


Control

Everything is controlled by the AtTiny2313 microcontroller and the DS1307 real-time clock.

The clock, in the absence of voltage, switches to power mode from a CR2032 battery (as on a PC motherboard).

According to the manufacturer, in this mode they will work and will not fail for 10 years.

The microcontroller operates from an internal 8 MHz oscillator. Don't forget to set the fuse bit.

Setting the time is done with one button. Long hold, incriminating hours, then incriminating minutes. There are no difficulties with this.

Drivers

I used KID65783AP as keys for the segments. These are the 8 “top” keys. I made a choice towards this microcircuit only because I had it. This microcircuit is very often found in display boards for washing machines. Nothing prevents you from replacing it with an analogue one. Or pull up the segments with 47KOhm resistors to +50V, and press the popular ULN2003 to the ground. Just don’t forget to invert the output to the segments in the program.

The display is made dynamic, so a brutal KT315 transistor is added to each digit.


Printed circuit board

The payment was made using the LUT method. The clock is made on two boards. Why is this justified? I don’t even know, I just wanted it that way.

power unit

Initially the transformer was 50Hz. And contained 4 secondary windings.

1 winding - voltage on the grid. After the rectifier and capacitor 50 volts. The larger it is, the brighter the segments will glow. But no more than 70 volts. Current not less than 20mA

Winding 2 - to shift the grid potential. Approximately 10-15 volts. The smaller it is, the brighter the indicators glow, but the “not turned on” segments begin to glow just as brightly. The current is also 20mA.

Winding 3 - for powering the microcontroller. 7-10 volts. I = 50mA

4 winding - Heat. For four IV-6 lamps, you need to set the current to 200mA, which is approximately 1.2 volts. For other lamps, the filament current is different, so take this point into account.


Quite a long time ago, the idea of ​​​​replacing my old watch was long overdue - it was not distinguished either by its accuracy or its special appearance. The idea is there, but with the incentive - either there is no time, or there is no desire to make the Chinese out of a standard remake... in general, a complete mess. And then, one day, on the way home, going into a store selling illiquid goods, a display case with radio tubes from the times of the USSR caught my eye. Among other things, I was interested in the IV-12 light bulb lying forlornly in the corner. Remembering the seller’s remarks in the past: “everything that is there is on display,” I asked even without enthusiasm. … “Miracle, miracle, a miracle has happened!” - it turned out that they had a whole box of these indicators! Damn, I wish I hadn’t sooner.... in general, I bought it;)

In anticipation, when I returned home, the first thing I did was apply voltage to them - they were working! Here, here is a kick in the shaggy tail, here is an incentive to see this miracle in action - the work is in full swing.

Terms of reference:
1. The actual watch;
2. Alarm clock;
3. Built-in calendar (we take into account the number of days in February, including in a leap year) + calculation of the day of the week;
4. Automatic adjustment of indicator brightness.

There is nothing new or supernatural in the circuit: a DS1307 real-time clock, dynamic display, several control buttons, all controlled by ATmega8.
To measure the illumination in the room, a photodiode FD-263-01 was used, as the most sensitive one available. True, it has a small problem with spectral sensitivity - the peak of sensitivity is in the infrared range and, as a result, it senses the light of the sun/incandescent lamps very well, and fluorescent lamps/LED lighting - a C grade.
Anode/grid transistors - BC856, PNP with a maximum operating voltage of 80V.
To indicate the seconds, I installed a smaller IV-6 that was lying around, since it also has a lower filament voltage - a 5.9 Ohm quenching resistor will help it.
For an alarm signal - a piezo emitter with a built-in generator HCM1206X.
The board is wired for: resistors 390K 1206 in size, the rest 0805, transistors in SOT23, stabilizer 78L05 in SOT89, protective diodes in SOD80, three-volt battery 2032, ATmega8 and DS1307 in a DIP package.
From the power supply, the entire circuit consumes +9V up to 50mA along the line, the heat is 1.5V 450mA, the heat relative to the ground is at a potential of -40V, consumption is up to 50mA. Total total maximum 3W.

It was not possible to get a socket for the indicators - the thing was too scarce even to order; instead I used “bushings” from a pair of broken connectors of the RS-232 modem cable. We cut off the “tail” of them - it turns out more compact than the original panels. (note - drill the seat carefully, the spots are small)

First samples:

The accuracy of the DS1307 quartz oscillator leaves much to be desired - after washing the board and selecting the quartz piping containers, we managed to achieve something like +/-2 seconds per day. More precisely, the frequency fluctuates depending on temperature, humidity and the position of the planets - not at all what we wanted. After thinking a little about the problem, I decided to order a DS32KHZ microcircuit - a fairly popular temperature-compensated quartz oscillator.
We solder the quartz and this animal is conveniently placed in the free space on a piece of PCB. Connection - now by wiring to the nearby DS1307.

It’s not for nothing that the generator is so expensive - according to the reference book, the manufacturer promises to increase the accuracy of the clock to +/- 0.28 seconds per day. In reality, under acceptable power conditions and temperature ranges, I was not able to see a change in frequency due to external factors. In test mode, in a room, the clock worked for about a week, 2 days of which it was in a lethargic sleep, powered by a standard battery - after that, the error, if you believe the exact time services, did not exceed... +0.043 seconds per day!!! This is happiness! Unfortunately, it was not possible to measure it more precisely in such a short period of time.

Housing assembly:

After assembling the case and “combing” the firmware, the watch has 3 buttons left: let’s call them “A” “B” “C”.
In the normal state, the "C" button is responsible for switching the mode from displaying the time "hours - minutes" to the date "date - month", the second indicator displays the day of the week, then by year, then to the "minutes - seconds" mode, in the fourth pressing - to the original state. Button "A" quickly switches to the time display.
From the “hours - minutes” mode, button “A” switches in a circle to the “alarm clock setting” / “time and date setting” / “indicator brightness setting” mode. In this case, the “B” button switches between digits, and the “C” button actually changes the selected digit.
“Alarm setting” mode, the letter A (Alarm) on the middle indicator means that the alarm is on.
Mode “setting time, date” - when the “seconds” digit is selected, the “C” button rounds them (from 00 to 29 resets them to 00, from 30 to 59 resets them to 00 and adds +1 to the minute).
In the “time and date setting” mode, at the SQW output of m/s DS1307 there is a meander of 32.768 kHz - necessary when selecting quartz/capacitors for the generator; in other modes it is 1Hz.
Mode "adjusting the brightness of the indicator": "AU" - automatic, shows the measured illumination in units. ;) "US" - manual setting in the same units.
Phew, looks like I haven’t forgotten anything.

The schematic diagram of the clock is shown in Fig. The clock is implemented on five microcircuits. The minute pulse sequence generator is made on the K176IE12 microcircuit. The master oscillator uses a RK-72 quartz resonator with a nominal frequency of 32768 Hz. In addition to the minute microcircuit, it is possible to obtain pulse sequences with repetition rates of 1, 2, 1024 and 32768 Hz. This clock uses pulse sequences with repetition frequencies: 1/60 Hz (pin 10) - to ensure the operation of the minute unit counter, 2 Hz (pin 6) - for the initial time setting, 1 Hz (pin 4) - for the “flashing” dot . In the absence of the K176IE12 microcircuit or quartz at a frequency of 32768 Hz, the generator can be made using: other microcircuits and quartz at a different frequency.
Counters and decoders for units of minutes and units of hours are made on K176IE4 microcircuits, which provide counting to ten and conversion of binary code into a seven-element code of a digital indicator. Counters and decoders of tens of minutes and tens of hours are made on K175IEZ microcircuits, which provide counting to six and decoding of the binary code into the code of a digital indicator. For the counters of the K176IEZ, K176IE4 microcircuits to work, it is necessary that a logical 0 (voltage close to 0 V) ​​is applied to pins 5, 6 and 7 or these pins are connected to the common wire of the circuit. The outputs (pin 2) and inputs (pin 4) of the minute and hour counters are connected in series.

Setting 0 dividers of the K176IE12 microcircuit and the K176IE4 microcircuit for the counter of minute units is carried out by applying a positive voltage of 9 V to inputs 5 and 9 (for the K176IE12 microcircuit) and to input 5 (K176IE4 microcircuits) with the S1 button through resistor R3. The initial setting of the time of the remaining counters is carried out by applying tens of minutes to the input 4 of the counter using the S2 button with pulses with a repetition rate of 2 Hz. The maximum time for setting the time does not exceed 72 s.
The circuit for setting 0 counters of units and tens of hours when the value 24 is reached is made using diodes VD1 and VD2 and resistor R4, which implement the logical operation 2I. The counters are set to 0 when a positive voltage appears on the anodes of both diodes, which is possible only when the number 24 appears. To create the “flashing dot” effect, pulses with a repetition frequency of 1 Hz from pin 4 of the K176IE12 microcircuit are applied to the hour unit indicator point or to segment d of an additional indicator.
For watches, it is advisable to use seven-element luminescent digital indicators IV-11, IV-12, IV-22. Such an indicator is an electron tube with a directly heated oxide cathode, a control grid and an anode made in the form of segments forming a number. The glass bottle of indicators IV-11, IV-12 is cylindrical, IV-22 is rectangular. The electrode leads of IV-11 are flexible, while those of IV-12 and IV-22 are in the form of short rigid pins. The numbers are counted clockwise from the shortened flexible lead or from the increased distance between the pins.
A voltage of up to 27 V must be supplied to the grid and the anode. In this clock circuit, a voltage of +9 V is supplied to the anode and grid, since the use of a higher voltage requires an additional 25 transistors to match the outputs of microcircuits designed for a 9 V supply with a voltage of 27 V , supplied to the anode segments of digital indicators. Reducing the voltage supplied to the grid and anode reduces the brightness of the indicators, but it remains at a level sufficient for most applications of the watch.
If the indicated indicators are not available, then you can use indicators such as IV-ZA, IV-6, which have smaller digit sizes. The filament voltage of the cathode filament of the IV-ZA lamp is 0.85 V (current consumption 55 mA) IV-6 and IV-22 - 1.2 V (current 50 and 100 mA, respectively), for IV-11, IV-12 - 1, 5 V (current 80 - 100 mA). It is recommended to connect one of the cathode terminals, connected to the conductive layer (screen), to the common wire of the circuit.
The power supply ensures the clock operates from a 220 V alternating current network. It creates a voltage of +9 V to power microcircuits and lamp grids, as well as an alternating voltage of 0.85 - 1.5 V for heating the cathode and indicator lamps.
The power supply device contains a step-down transformer with two output windings, a rectifier and a filter capacitor. Additionally, capacitor C4 is installed and a winding is wound to power the incandescent circuits of the lamp cathodes. At a cathode filament voltage of 0.85 V, it is necessary to wind 17 turns, at a voltage of 1.2 V - 24 turns, at a voltage of 1.5 V - 30 turns with PEV-0.31 wire. One of the terminals is connected to the common wire (- 9 V), the second - to the cathodes of the lamps. Connecting lamp cathodes in series is not recommended.
Capacitor C4 with a capacity of 500 μF, in addition to reducing supply voltage ripple, allows the operation of hour counters (saving time) for approximately 1 minute when the network is turned off, for example, when moving a clock from one room to another. If a longer shutdown of the mains voltage is possible, then a Krona battery or a 7D-0D type battery with a rated voltage of 7.5 - 9 V should be connected in parallel with the capacitor.
Structurally, the clock is made in the form of two blocks: the main one and the supply one. The main unit has dimensions of 115X65X50 mm, the power supply unit has dimensions of 80X40X50 mm. The main unit is mounted on a stand from a writing instrument.

Indicator,

chip

Indicator anode segments Net Katsd General
A b

b

V G d e and Dot
IV-Z, IV-6 2 4 1 3 5 10 6 11 9 7 8
IV-1lH 6 8 5 7 9 3 10 4 2 11 1
IV-12 8 10 7 9 1 6 5 - 4 2 3
IV-22 7 8 4 3 10 2 11 1 6 12 5
K176IEZ, K176IE4 9 8 10 1 13 11 12 - - - 7
K176IE12 - - - - - - - 4 - - 8

Literature

LEDs, which were previously enthusiastically perceived in any electronic display devices, have recently become sour and have begun to noticeably lose out to retro indicators, such as vacuum tubes, which look much nicer. Therefore, a version of the electronic clock was created that shows the time using IN-12 gas dischargers.

Features of homemade watches

  • the display is made using IN-12 lamps (nixie),
  • small body,
  • circuit without microcontrollers,
  • powered by 9 volt power supply adapter
  • current consumption 150 mA.

The basis of the design is the universal housing Z5A. Four such lamps fit perfectly in width in such a housing. According to the original design, clock pulses for the clock were taken from the 220 V network, which was also a high voltage source for the lamp anodes.

It’s true that it’s risky to use a device in which everything is under network potential. Therefore, in the second option, the power was taken from a step-up voltage converter, and the clock frequency was changed to a typical generator circuit: quartz 32.768 kHz, CD4060, divider CD4013.

The final diagram is a few other diagrams from the internet, slightly modified and combined into one. Above is a schematic electrical diagram, which can be enlarged by clicking on the picture. Next comes the printed circuit board for the homemade clock.

The cost is difficult to determine, the lamps were bought a long time ago, but even if you buy all the radio components now, you can keep it under 1000 rubles, which is naturally a good price for such a fashionable retro gadget.

Installation view from above and below.

For those who want to repeat the design, we recommend making cases for watches with gas-discharge indicators from aluminum, copper, brass or wood (to emphasize the vintage look). As a last resort, cover the plastic with self-adhesive wood-like film. And instead of a red color filter in front, it is better to put transparent plexiglass - then the natural color of the IN-12 lamps will remain.

.

I'm talking about this watchMoto_v3x(from Radiokot) they said 2 years ago. A year ago I managed to buy indicators (inexpensively) and make an indication board, which lay on my desk until December last year. You can see what cleaning the box entailed in this article.
The clock consists of 3 boards: display board, main board, sensor board.
For now we will talk about the first two, because... I'm going to do the latter at the stage of body production.
The boards are single-sided, of course with jumpers. Some of them were carried out by MGTF. Divorced in Sprint- Layout 6.

Payment made a year ago:

Tracks 0.3mm. LUT.

Main board:

Tracks 0.6, also LUT.

A few words about the scheme.
Stone chose the PIC16F887 mainly due to the number of pins. Its presence was a plus. Numbering of pins on the diagram for the DIP-40 housing.
The filament power supply is alternating, with a frequency of 3 kHz (set by capacitor C11). The circuit is cheap, all components are available, and does not require configuration.
I get negative voltage using the available MC34063.
Why such a scheme? Because I have my own cockroaches in my head.
Low-voltage power supply could also be implemented on 78l33 (perhaps the cheapest), but I have a desire to attach the NS-05 to the clock and control it from Android, but it consumes 40-60 mA. I made DC-DC using... guess what? That's right, MC34063 :) .
I bought DS3231 on Ali for $0.8, as many as 10 pieces. The choice of RTS is obvious.
By the way, it’s not for nothing that our “enterprising friends” sell them inexpensively in China. Dska sometimes does not start the first time, which has never been observed on MS purchased for $3.5.


I collected the power and checked how the lamp was shining.


And a great disappointment awaited me:(! All the lamps were used and they all lit differently. Therefore, you need to take lamps with a reserve, so that there is plenty to choose from. The difference in the intensity of the glow is colossal, there is no point in making software correction:(.

Then I put off making this clock a little :), and decided to try all the proposed parts of the circuit on a simpler project. We got it.
Taking into account the experience gained, a circuit board was made, which was later renamed the main one and an improved version of which can be seen in this project.


So what is present in the watch( wired on the board):
- accuracy of movement is ensured by DS3231;
- night mode;
- LED backlight (single color) with adjustable intensity;
- time indication;
- date indication;
- indication of the day of the week.
- bluetooth control;
- touch on/off

For the first version, perhaps, it is enough, because perhaps there will be a second one.

Control:

  • time setting
left button (short press) enters the installation menu;
average - plus;
left - minus;
  • backlight control
middle (short press) - increases the backlight;
left (short press) - decreases;
  • Turn bluetooth on/off - long press the left button.

It's time to talk about assembly.

We start the assembly, as always, with power supplies.
The first on our list is IP -27 Volt.


The part of the board occupied by the circuit is highlighted below.
At the points indicated in the figure you should observe -27V.


Then it’s time for a change to heat.
Part of the board occupied by the circuit:

A correctly assembled circuit does not require configuration. Its performance can be checked with a tester. On my old DT-838 it shows ~2.3 volts AC.


And in the final IP at 3.3 volts:

As a result, we check the collected IPs at the points indicated in the figure:

If everything matches, then solder jumpers A and B.

I won’t go into detail on how to assemble the display board. All you need is accuracy and attentiveness. LEDs must be installed before installing lamps :).
The indicators can be checked by connecting the filament to pins 11, 1 two lamps, connected in series and +5V to the grid and anode. You should see the lamp segment burning.

Assembling the keys requires care and upon completion it is necessary to thoroughly rinse the board so that there are no glares. I would also recommend checking the adjacent tracks with a tester in the 2Moh range :).


Next, I connected the assembled display board and checked each key.

After everything was adjusted, I soldered the MK.

I’ll dwell a little on the MK firmware. I flashed it on the board. The programming outputs are signed:

You can stitch, for example, Extra-PIC(software PICPgm) or PICkit-2 lite, factory PICkit-2 or PICkit-3. The choice is yours.
If you are not going to flash the MK anymore, then after flashing the Schottky diode can be replaced with a jumper and a 100-470 μF capacitor shown in the picture above can be installed.


We assemble the rest of the circuit, turn it on and you should see this:

Happy building!

Update 2015\09\27:
Owners of TL866CS programmers may have difficulty programming and verifying the firmware. This is due to the fact that the MK has a bus width 14 bit, and these 14 bits are stored in 2 bytes ( 16 bit) => 2 bits are not significant. Some compilers fill them with zeros, some with ones. In my firmware they are filled with units, which causes difficulties for the TL866CS software.
Solution: download WinPic800 (the program is free), select a controller, download the firmware, File- Save as and save it again. All:).

Update 2015\10\04:

Added support for DS18b20 temperature sensor to firmware v 1.1. Both positive and negative temperatures are processed.

Added support for DS18b20 temperature sensor and BMP085(BMP180) atmospheric pressure sensor to firmware v 1.2.
The thermometer processes both positive and negative temperatures.

They are added to the board by mounted mounting.
Don't forget that the BMP085 or BMP180 module already has pull-up resistors on the I2C bus, so resistors R86 and R87 on the board must be removed.

The temperature sensor must be moved outside the housing.

A new number font has been added to both firmwares (in the clock setting menu).
Fixed issue with freezing when turning on.

Connection diagram:
Modified board for firmware 1.1 and 1.2 (added holes for connecting sensors)
Firmware file v 1.01 (additional font)
Firmware file v 1.1 (temperature sensor support + additional font)
Firmware file v 1.2 (support for temperature sensor + pressure sensor + additional font)

Firmware 1.1 temperature readings (photo Nikolay V.):

Update 2015\10\17:
Re-uploaded firmware 1.1 and 1.2!
Fixed the letter "U" in firmware 1.2
Fixed the letter "U" and symbols for the day of the week before displaying the temperature in firmware 1.1

The contact email has changed, so those who wrote to me on Rambler note. I don't have access to my old email :(.

Update 2015\12\17:

Spoiler:

Oh, due to the influx of work, unfortunately (or fortunately:)), I now have no time to indulge in hobbies.
It’s been a month (!) making a new scarf for the IV-17 watch.
I wanted to be in time even with the building for the New Year, but....
The board implements:
- everything that was in v 1.2;
- touch button on/off on TTP223 (directly on the board);
- powered by USB;
- alarm clock with backup battery;
- there is a beeper (alarm clock, key press):
- RGB backlight WS2812B (allows you to set each lamp its own color);
- humidity sensor;
- if possible, push a trainable IR receiver into the body;
- and ESP8266 on board (clock setting via browser, NTP synchronization);
- heh, only the radio is missing :)))))))))) (although if you try hard, you can make an online radio).





Watch in the case from Maxim M.

Update 2016\02\27:
Anyone want to try WEB-face and NTP synchronization on an ESP-12/ESP-12E module or a module with 2 free legs that can be controlled?
In addition to desire, you need to have the assembled watch and the module itself in stock.
Email me.

Update 2016\03\07:

Time setting:
Setting up NTP communication:
Select polling period:

WiFi client settings:
WiFi server setup:

ESP-12(ESP-12E) is located on a separate board. The module connection diagram is shown below.

The module itself is attached to the board with double-sided tape or glue.
It will look something like this:

In the photo the module already has an SD card. It was supposed to collect more statistics, but this is still in the distant future.
Bottom ESP-12 required isolate from the board.

We flash the clock processor with firmware 1.35 before installing the module, because Usually programmers flash the MK with a supply voltage of 5V, which can have a detrimental effect on the ESP pins!

About the module firmware.

When you receive the ESP-12 from China, it will be in AT command mode.
We need to find out at what speed it operates via UART.
How to do this is described in.
Separately, I note that programming the module requires 3.3V levels => you need to use either a level matcher (I use ADM3202 because I have them) or USB<-->com (there are plenty of them on ALI) with a 3.3V output.

Upload the firmware to the module using esptool.exe
The utility comes bundled with the ESP library for Arduino.
Paranoids can install the Arduino environment (how to do it is described in the article linked above) and find it along the path:
C:\Documents and Settings\Your account name\Application Data\Arduino15\packages\esp8266\tools\esptool\0.4.6\
You can look at the sources.

Command for uploading firmware:
c:\esptool.exe -vv -cd ck -cb 115200 -cp COM1 -ca 0x00000 -cf c:\ESPweb20160301.bin

Parameters that you need to change for yourself:
To switch the module to firmware upload mode, you need to short-circuit GPIO0 to ground.

During the firmware, this will appear on the screen:

After completing the firmware, turn off the power and remove the jumper from GPIO0.

Job:
When turned on, the ESP-12 (if possible) connects to the NTP server and receives the exact time.
By long pressing the middle button of the watch, the web interface is activated and the user can configure the watch settings.

Everything in the menu seems to be intuitive.
I’ll just focus on the item on the menu WiFi server - WiFi mode

Choice:
-client only. ESP will raise the soft access point "esp8266" with the password "1234567890"). This option is enabled by default. In the browser to connect the watch you need to dial the address - 192.168.4.1;

-server only. The ESP will be available within your home network. The connection address can be found by long pressing the left button of the watch. ;

You can also disable the WEB interface by long pressing the middle button (NTP synchronization is not disabled).

Time synchronization via NTP occurs: when turned on at the end of the first minute (if the corresponding item is selected in the menu " Setting the clock"), when the selected time in the menu " External time server".
Video:
<будет позже>

If you notice an error, select a piece of text and press Ctrl+Enter
SHARE:
Computers and modern gadgets