Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

PIC controller in a car clock. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Microcontrollers

Comments on the article Comments on the article

It happens that the microcircuit that controls the stepper motor of a quartz car watch fails. It is impossible to replace it with the same type, since it is made in a frameless design ("black drop" on the printed circuit board) and is not found on sale.

When this happened to my watch in the VAZ-2106, the first thing that came to mind was to try to replace the microcircuit with an equivalent on conventional digital microcircuits. An analysis of the clock wiring diagram showed that two pins of the microcircuit are connected to a stepper motor that controls the movement of the hands, a quartz resonator is connected to the other two, and a supply voltage is connected to two more, taken from a 6 V voltage stabilizer, made according to the classical scheme. In a word, the functional diagram shown in Fig. 1 (the numbering of parts and pins of the DD1 microcircuit is conditional; the VD1 diode protects the device in case of incorrect connection to the power source).

PIC controller in car clock

It was necessary to develop a device that would replace the failed DD1 chip, i.e., generate pulses in accordance with the timing diagram shown in fig. 2 (removed from a working watch). These pulses drive the stepper motor once per second, turning its shaft half a turn each time. The resistance of the motor winding is about 300 ohms, and at a voltage of 6 V, the current pulses reach 20 mA.

PIC controller in car clock

The study of the circuit solution showed that a simple device does not work: at least three microcircuits, two transistors and several resistors and capacitors are needed. It was decided to assemble a replacement on the PIC controller. It allows you to connect a quartz resonator, has a fairly powerful log level outputs. 1 and 0 (current limit - 25 mA) and, in addition, contains a watchdog timer that will restore the operation of the controller in the event of a "freeze", for example, in case of an accidental failure due to electrical interference.

A schematic diagram of a stepper motor control device on a PIC controller is shown in fig. 3.

PIC controller in car clock

As you can see, the supply voltage stabilizer was left unchanged, only the zener diode was replaced in order to lower the voltage (it is not recommended to operate the PIC controller at the upper value of the supply voltage). Quartz resonator ZQ1 - from the old watch. The value of the resistor R2 (any small-sized) is from 10 to 39 kOhm, the capacitor C2 (KM) is from 0,1 to 1 μF, C3, C4 (K10-17-1) is from 68 to 100 pF.

I carefully removed the faulty chip with a heated soldering iron. I mounted the parts of the replacement assembly on a small breadboard and secured it with four pieces of a single-core mounting wire (two power wires and two motor control wires).

Capacitors C3, C4 and a quartz resonator are located in close proximity to the terminals 15, 16 of the controller, and C2 - from its power terminals.

Before installation in place, the microcontroller must be programmed using any programmer designed to work with PIC controllers (for example, PICPROG, PONIPROG or STERX, which the author used).

Firmware codes in HEX format are shown in the table.

PIC controller in car clock

When programming, you must specify the type of LP generator, set the watchdog timer enable and turn-on delay bits to ON. The chip read protection bit can be in any state, but it is better to set it to OFF (otherwise it will be impossible to check if the microcontroller is successfully programmed).

With serviceable parts and no errors in installation, the device does not require adjustment and starts working immediately after turning on the power.

Source code of the program with comments

Author: O.Valpa, Miass, Chelyabinsk region

See other articles Section Microcontrollers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Diode to protect high-speed interfaces from static electricity 01.12.2014

Toshiba Electronics Europe (TEE) announced the creation of a new diode DF5G7M2N, which is designed for protection against electrostatic discharges.

The DF5G7M2N diode is designed for equipment connected to data lines and is able to protect high-speed USB 3.1, HDMI, DisplayPort and Thunderbolt interfaces from static electricity. In addition, it can be used for electrostatic protection of small portable devices such as smartphones and tablets.

The effects of static electricity on high-speed data lines can lead to numerous problems, including reduced efficiency and reliability of data transmission. New ESD diode ensures stable operation and reliability of voltage sensitive lines.

The diode is placed in a DFN5 package with dimensions of 1,3 x 0,8 mm and occupies half the area on the printed circuit board compared to analogues. The DF5G7M2N simplifies PCB layout, so it is suitable for high-density designs.

In addition, Toshiba's new ESD protection diode has low capacitance and low dynamic resistance (CT = 0,2 pF, RDYN = 1 ohm). It also prevents signal degradation (insertion loss) by reducing capacitance (|S21|2 = -1,3 dB at 10 GHz) and can resist ESD up to +8 kV.

Other interesting news:

▪ New profession - space miner

▪ Hearing restoration with butterflies

▪ Electric barrier to protect swimmers from sharks

▪ The strongest material in the world

▪ Diving breathing tube

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Grounding and grounding. Selection of articles

▪ article Blood with milk. Popular expression

▪ article Why does a person have hair? Detailed answer

▪ article Stalnik prickly. Legends, cultivation, methods of application

▪ article Amplifier on 4 transistors with floating power supply. Encyclopedia of radio electronics and electrical engineering

▪ article Living shadow. Focus Secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024