Ideal clock for home: honest and accurate, simple and complex, smart and sensitive, not big and not small, with a magic setting to the wishes of any person without buttons and confusing tuning algorithms, modest and not requiring attention, comfortably visible day and night, having universal power, easily changing the color of the body and the display under the setting and mood, not beating when falling, easy to manufacture, white.
Happened?
')
The first televisions were black and white, then color ones appeared. With electronic clocks all the way around, they are colored from birth: yellow, green, red and only recently - blue. Black and white hours in the afternoon with fire can not be found. And so many years of dreams come true. The initial versions of the name were “white clock” or “end of color”. In the process of creating the design, it was possible to get rid of the drawbacks of most electronic clocks: inaccuracy of movement, the presence of buttons, complex control algorithms, and the lack of automatic brightness. So the watch became almost “perfect”.
To maintain the accuracy of the clock, it is necessary to achieve stability of oscillations of the quartz resonator and promptly compensate for the departure of readings from the model time. Stability is achieved by hardware methods, and compensation is produced programmatically or manually from external sources of a precise time signal: radio stations, the Internet, navigation system satellites. In this watch uses the latter method. Since the signal of the navigation satellites transmits UTC - coordinated universal time, there is no need to “feed the hands” of the clock. You only need to specify the offset relative to universal time.
The idea was tested in previous designs with the time shown using multi-colored flashes: a time lamp and a cube . "Magic wand" from the cube - just received new clothes, and then the old shiny coating wore out and the scale began to crumble from the magnet. The “lamp” is held in the heat and cold, rain, snow and smoke for more than a year and still has not deviated for a second. It is the turn of the usual way to show the time. The dream was to use a large white LED to provide good visibility within the room.
After the relatively large GL8088s module used in the “cube”, this time the choice fell on a small receiver of signals from the satellite positioning system, the Gms-g6a module — the eyes and ears of the watch to communicate with the Cosmos. A pair of these modules was purchased for the watch creation experiment. Chipset: MT3333. 33 tracking channels and 99 search channels for GPS, GLONASS and Galileo. Tracking sensitivity: -165 dBm. Detection sensitivity: -148 dBm. Hot / cold start time: 1/35 sec. Power supply: 3.0 ... 4.3 V. Consumption current at capture / tracking (for Up. = 3.3V): 35/29 mA. Size: 16x16x2.1 mm. Weight: 1 gram.
In addition to excellent pedigree and excellent technical data, this receiver has an important feature - the presence of a chip antenna built-in on the board. Not all hams are specialists in the design and manufacture of antennas, so this feature of the module makes it easy to achieve a positive result. In this design there are limitations in the form of the presence of a forbidden zone when wiring the board and the maximum distance from large-sized radio components, but these are all trifles. Experienced developers can use another module in their watches: Gmm-g3, which has the same characteristics, but its dimensions are reduced to 11.5 x 13 x 2.1 mm due to the absence of an antenna. Such small dimensions will allow installing the module a couple of millimeters higher, and placing the antenna in the form of a printed conductor or in a separate version at the very top of the printed circuit board, which will bring it even closer to Cosmos. Addition 23.08.13. A new GPS module Gmm-r1 has become available. Also without built-in antenna. From the differences: it only catches GPS, but the body is even smaller than 9.7x10x2.1 mm.
The Gms-g6a module, in contrast to the receiver used in the “cube” project, did not undergo any settings. All messages “out of the box” - without changing the speed and disabling unused lines. The speed of the RS-232 port by default is 9600 bps. This speed is convenient for work, but the time for sending long messages takes considerable time and comes close to the second - when it is necessary to start working with the next piece of information. Therefore, this time in the program there is no waiting for the end of messages. From the stream of information, the necessary values ​​are simply “pulled out” and processed. Compared to determining the location, it is easier to get information about the time, and the module begins to provide the necessary data even before showing the number of visible satellites. The program divides the satellites into yours and ours, but the clock shows the total number of visible vehicles, which brings together space groups to perform one task.
The brains of the clock - a PIC16F688 microcontroller in a small package for surface mounting. The program of work is driven into the controller's memory using a fragment of the ROM chip with UV erasing KS573RF2. The microcircuit can be connected by springing needles to the contact pads for programming, or you can simply solder. When mounting the receiver, it is necessary to put an insulating film under it, as there are several tracks below.
Set up and forget. As in the previous developments, the only button initially intended to impose only an amendment regarding the coordinated universal time arriving from satellites. But in the future, as the design was developed, the button became overgrown with new tasks. It was decided to replace the button with a unipolar Hall sensor TLE4905L, which reacts to the “magic wand” magnetic field. This is the third option to replace the classic mechanical button. In the “lamp” the button was absent as a class, and the amendment was made by closing the controller outputs, in the “cube” the reed switch played the role of the button. But the reed switch is a fragile glass construction that has a large size by today's standards, therefore, the “ideal clock” uses a modern version - the Hall sensor. The time adjustment is made simply. Before powering up, you need to bring the “magic” wand or magnet (magnetism is also magic) to the sensor located at the top of the unit of minutes indicator. After power is turned on, the correction clock begins. When the required value is reached, the magnet is removed, the correction is remembered and this is confirmed by the indicator flash. If during the lap time - 23 hours, the decision is not made, it will exit the time correction mode.
For many people, you don’t have to configure them. By default, the clock is set to Moscow time, the dividing points do not blink, the display of a quarter of a minute is turned off - everything is familiar. But people's habits are different, so with a magic wand you can change the mode of operation of the clock. When the magnet is presented, the watch alternately displays various display options. It is only necessary to remove the magnet at the moment when the necessary variant of the work is demonstrated. The action is similar to the work of a computer mouse: when you release the button, the command starts. If the display mode has changed in comparison with the one that was set earlier, then it is recorded in memory with a short flash of the entire indicator. If no decision is made during the cycle, all segments are included before the magic wand is retracted.
Display Modes: - number of visible satellites C = GPS + GLONASS, disconnection by repeated pass of the “magic wand”; - display of a quarter of minutes (top point): enabled / disabled; - time display mode: 24/12 hours; - dividing points: do not blink / blink; - brightness control: automatic / manual; - eight levels of maximum brightness for manual and automatic modes.
The indicator connection table , which takes into account the features of PCB layout, helped to reduce the time for preparing symbolic information for the name of channels. The segment that needs to be included is marked with the number 1. Next, in semi-automatic mode, the result is given: an expression like A954 AAAA, which in the language of the indicator means “include eight vertical lines”.
The dream to make a watch with a white indicator was big and long. First, the search for shops and the Internet, then an attempt to self-production of the indicator. The red 7-segment indicator was disassembled, the light guide was left in place, and the LEDs were replaced with white ones. But the size of 0.56 inches is still small for the room.
In large indicators, several successively connected white LEDs are installed in order to uniformly illuminate the light guide of the segment. As a result, even in a chain of a pair of LEDs, you must use a voltage of more than 7 volts, which exceeds the usual 5 volts. There was no desire to use a voltage converter. And so, a miracle happened. He told about a problem to one workmate who purchases component parts on eBay. Less than an hour, he found the necessary LEDs: white, an inch and a quarter, with a common anode, working on 4 Volts - what you need! A few days later he brought them home. Thank you so much! The indicator was rootless, of the identification marks on it was only the symbol “B”. A detailed description was not found, I had to use the data from the purchase page. As far as I understand English, they ended there, but those who wish to assemble the watch will be able to find something similar according to the parameters specified in the scheme. Four indicators located next to each other and determine the dimensions of the clock: width 96 mm, height 34 mm, depth 16 mm, excluding the power connector. Tests showed that the numbers are perfectly visible in the daytime at a current of 5 mA through the segment. At night, this value can be reduced by 10 times. A small drawback of the indicator is that at low currents the white color begins to acquire various shades, apparently, this is due to the characteristics of the phosphor.
There is an expression “the minute seems like an eternity.” This phrase, most likely, arose after the appearance of hours, which have no indication of seconds: a person sees which minute is going on, but does not know when it will end. In order to better understand the place in time, in the ideal clock a quarter-minute display is introduced - this is the point that burns above one of the four indicators. This feature is new and still unusual. People who do not want to get lost in time, can turn it on. There were several options for showing seconds, but the idea of ​​one colleague won out - just turn the indicator over and then the useless points begin to be useful. For a good idea plus in his karma! In the quarter-minute display mode, a person needs only one glance to determine the time with an accuracy of 15 seconds. If you count the number of flashes when the dividing points blink, then second accuracy becomes available. Separating points are made of two white LEDs and installed by doping the housing. They are connected instead of one unused indicator segment of tens of hours.
In the electronic clock it is important to have an automatic brightness control. I encountered this in the ancient clock on K145IK1901, then I had to refine them in order to calm the green searchlight. From the modern there are light sensors MAX44007, MAX9635, APDS-9300, which allow you to abandon the ADC channel in the controller. But only the APDS-9002 analog sensor (9002 series ... 9007) was within reach, with all the ensuing consequences. Here it can be seen - a small golden rectangle in the upper right part of the indicator of tens of minutes, the Hall sensor case turns black to the right of it - you need to bring a magnet to it.
The most even level of illumination gives the Sun and only clouds try to modulate this light. Finding the light sensor under the film somewhat reduces its output signal, but the controller's ADC copes with the incoming voltage.
The “Potemkin villages” method is widely used in cities when repairing houses, when the facade of a building looking to the street is being restored, and the rear part remains in all its “glory”. This technique was used in these watches. The indicator has a white facade, and the type of electronic components allows the amateur watchmakers to understand how watches work. To protect against moisture, the parts are covered with a layer of clear varnish.
If desired, the side of the electronic components can be covered with a transparent / opaque plate or a thin soft self-adhesive material left over from the sizing of the car.
A white film is pasted on the front side of the indicator, which reduces the visibility of the currently disconnected segments and creates a clean background. If you wish, you can leave the native black background of the front surface, then the clock, as well as TVs, will become black and white.
An ideal clock in addition to showing the exact time should be combined with the surrounding situation. The Potemkin Villages method also helps in this. On the side surfaces of the case, you can simply and quickly stick a film that has the color that best suits the situation. The white color of the front surface is combined with everything, but you can also use a translucent color filter film and then the numbers will turn into your favorite color. The operation to change the image takes a couple of minutes: peel off the old, glue the new, cut off the excess. In a short time, seven-segment RGB indicators will probably appear, then the color of the radiation can be selected on one of the control channels in a few seconds. When making watches, before sizing the case, it is necessary to level the upper and lower sides of the soldered indicators with emery paper on a flat surface, yet they differ in height by a fraction of a millimeter. The adjustment of the front side of the indicators is performed when soldering on a flat table surface. After gluing the front film, we are convinced that the front surface does not look very much due to the fact that when pouring the indicator light guides, hollows of different depths have formed, and the film cannot hide this defect. In the case it would be imperceptible, but in our case it is no good. Remove the film, put the design on the table and using sandpaper of two different calibers, we bring the state of the front surface to the form corresponding to the name of the watch. It was terrible to be taken for this operation on the deficient indicator, but everything ended successfully: the depth of the optical fibers is sufficient to remove a small part. Another subtlety in the assembly - the formation of a neat outlet separation points. This helps the clay and tubule of small diameter. Plasticine fills all the free space around the LED, and a soft tube from the insulation of the wire forms a hole of the desired diameter. This operation is convenient to conduct when the indicator is on.
In addition to the housing structure, the developer's headache is the power supply unit (PSU). Recently, there has been a tendency to use the computer's USB port to charge numerous wearable devices. Thus, the USB output of a computer can be considered in our time as the most universal power source. The task of the developer: to moderate the appetite of the device and not exceed the capabilities of the USB port. In order not to depend on the computer, manufacturers have established the release of network power supply units having a USB connector with an output voltage of 5 volts. When using modern components it is possible to significantly reduce the current consumed by the device, and hence the dimensions of the PSU. Pulse mode of operation allows to reduce its dimensions to the size unattainable in the “tube” century.
The “ideal clock” can be powered either from the computer’s USB connector, either directly or via an extension cord, or from a mains supply unit, for example, A1265: size 26x26x28 mm without power plug, input voltage 100 ... 240 V, output: 5 V x 1 BUT. Fortunately, before connecting with the clock I decided to disassemble this power supply unit. As a result, a “greasy” drop of solder was found on the inside of the plate with the power plug. On the low-voltage side of the PCB, there was an adherent metal piece of the cut-off pin from the USB connector.Further life of this unit is easy to imagine. Greetings to the manufacturer! Before connecting the clock, I checked the power supply voltage: 5.35 V at idle and 5.33 V under a load of 40 mA. Not suitable - exceeding the maximum voltage. We'll have to open and twist something. With difficulty we managed to find one copy, issuing 5.05 / 4.95 V under the same conditions. At this point, you need to pay attention. The miniature size of modern power supplies allows for wall-mounted clocks. Option 1. Socket - power supply with USB - clock. Option 2. On the wall, hiding the power supply in the wiring box. There will be a small rectangular hole in the wall where the USB connector of the clock is plugged. It is necessary to provide protection and disconnection “just in case of fire” in case of the power line of the hidden power supply unit.
If the power supply is using the USB connector of the laptop, it is necessary to solder it to the correct orientation when soldering the clock power connector. When installing, I did not think about this possibility, and it turned out as always. The clock can be installed in the car, the small size makes it easy to do. Nobody has canceled the classic watch case. Alternatively, you can arrange the clock in the window by attaching it to one of the glasses or the frame. In general, it can even be a portable option: taken from home, plugged into the connector at work or at a resort.
For radio amateurs who want to simplify the scheme, you can apply a dynamic display. Drivers for MAX7219 / MAX7221 or MAX6950 / MAX6951 cathode indicators. You can use STLED316S for a common anode. Light sensors can be used with a digital output, which will reduce a couple more elements from the circuit.
A small problem manifested itself when setting up the device. In this version of the clock I decided not to connect the receiver to the computer, but to do everything using only the text description. But it was smooth on paper. The controller did not want to catch the signals of the GPS-receiver. And not only the signals transmitted via RS-232, but did not react at all to changes in the signal from the receiver. I had to connect the clock to the oscilloscope and through a small converter to the RS-232 port of the computer. The receiver was alive and every second gave out the messages put to it. It's amazing how many letters and numbers fit into such a small receiver!
An example of messages arriving every second: $ GPGGA, 124541.000,5551.3636, N, 04834.2565, E, 1,5,2.72,161.8, M, 1.4, M ,, * 69 $ GNGSA, A, 3,02,04,29 ,,,,,,,, ,, 2.90.2.72.0.99 * 1D $ GNGSA, A, 3.81.88 ,,,,,,,,,,, 2.90.2.72.0.99 * 19 $ GNRMC, 124541.000, A, 5551.3636, N, 04834.2565, E, 0.43,334.91,130213 ,,, A * $ 75 GPVTG, 334.91, T ,, M, 0.43, N, 0.79, K, A *
$ 38 GPGGA, 124542.000,5551.3636, N, 04834.2564, E, 1.5 , 2.72,161.8, M, 1.4, M ,, * 6B $ GNGSA, A, 3,02,04,29 ,,,,,,, 2.90,2.72,0.99 * 1D $ GNGSA, A, 3, 81.88 ,,,,,,,,,,, 2.90.2.72.0.99 * 19 $ GPGSV, 3,1,11,23,84,113,, 13,66,275,17,30,41,076,, 16,37,114, * 71 $ GPGSV, 3,2,11,20,33,168, 04,26,275,24,07,20,223, 02,18,320,27 * 7A $ GPGSV, 3,3,11,32,16,150, 31, 15,054,, 29,08,021,19 * 44 $ GLGSV, 2,1,08,73,79,100, 71,64,149, 74,39,206, 80,29,041, * 66 $ GLGSV, 2.2,08,81,15,011,19,88,12,318,18,70,12,140,, 65,05,317, * 6A $ GNRMC, 124542.000, A, 5551.3636, N, 04834.2564, E, 0.35,334.91 , 130213 ,,, A * 76 $ GPVTG, 334.91, T ,, M, 0.35, N, 0.65, K, A * 34
One line is possible GSA $ GPGGA, 033345.000,5551.3525, N, 04834.2534, E, 1.5, 3.11,102.9, M, 1.4, M ,, * 69 $ GPGSA, A, 3.06.16.06.03.07.08 ,,,,,,, 3.26.3.11.0.98 * 0A $ GPRMC, 033345.000, A , 5551.3525, N, 04834.2534, E, 0.35,286.26,200213 ,,, A * 6E $ GPVTG, 286.26, T ,, M, 0.35, N, 0.65, K, A * 30 The
research question showed the following. During development, the power supply of the receiver: 4.15 V was brought to the upper limit of the operating range: 4.3 V, so that the output “unit” detects a five-volt controller. In practice, it turned out that there is a voltage regulator inside the receiver and the receiver’s “1” level is 2.7 V - the VIH parameter is not performed for the controller. It was necessary to make a revision: a miniature level converter on two transistors in the SOT23 package and a pair of resistors with a size of 0603. The correction was attached to the printed circuit board attached to the project. Making an assembly of such small details on weight is a great pleasure! The slightest awkward movement or random sneeze leads to teleportation of elements into the unknown. Therefore, the details required a little more than indicated on the circuit diagram. In connection with these events, in the following versions of the clock, the receiver supply voltage can be safely reduced to 3 ... 3.3 V, for example, by installing two consecutive diodes in the power supply circuit, instead of the one used now. It is only necessary to take into account that if the receiver is switched to the low consumption mode, then the diode voltage limiter cannot be used, since the voltage in this case rises above the maximum allowed. In this case, a classic linear stabilizer of 3 ... 3.3 V is needed in the SOT-23 package. Alternatively, you can use a pin-fit PA6B module with an upper supply voltage limit of 5 V. Of the differences: another chipset, body height 4 mm, you need to send a signal to the “Enable” input (close pins 2 and 1), fewer channels, but for hours it will fit perfectly, since the sensitivity is similar. The level converter can be made on one transistor and a pair of resistors or use a specialized converter of the type MC74VHC1GT125. You can do without the converter, making for all elements, except for white LEDs, the supply voltage is 3.3 V.
Connecting the receiver to the computer saved in another situation. As it turned out, the receiver does not always produce two lines of $ GNGSA. If there are no satellites of one of the groupings, for example, after turning on the power of the clock, then there will be only one row. In general, of the variety of data received from the receiver, the watch needs very little.
Further work direction - adding to the alarm clock. Instead of buttons, you can use the MGC3130 microcircuit, which analyzes the changes in the characteristics of the electric field when the hands move up to 15 cm away. Then you can adjust the alarm time and change the mode of the clock without a magic wand - just passing your fingers, which only adds to the ideal clock.
Now, about the idea for which the exact clock was started. The existing radio channel data collection systems contain a central point and remote objects with a receiver and transmitter. An ideal clock makes it possible to abandon the transmitter at the central site and receivers at remote points, using time synchronization. Instead of the brightness channel, the transmission delay channel is made: 0 ... 59 s - every minute alarm clock of the transmitter. At each facility, the transmission on time is adjusted relative to the beginning of the minute to 1 second. As a result, each object has an individual data transfer start time, distributed over each minute. The system of collecting information is simplified, cheaper and improves the quality and reliability of its work. The clock in this application can also be greatly simplified. 1. The indicator is made red, which will allow you to use a voltage of 3.3 V. 2. The hours and minutes become unnecessary, it is enough to know only seconds. 3. Seconds can be indicated by a dot on an 8x8 matrix LED display. 4. You can use only three LEDs - “the beginning of the minute”, the second impulses ”,“ switching on the transfer ”. As an option: one RGB LED.
I hope that the article will help in studying the circuitry of electronic clocks with time synchronization, in the use of modern components, as well as push for independent production and improvement of the “ideal” clocks. Help - the electrical circuit , the PCB, a block diagram of one / two and the program of work with a lot of comments that allow you to understand the principle of the clock and even help me in a week to remember what is there and what.