ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING PIC controller in a car clock. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Microcontrollers 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). 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. 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. 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. 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. Latest news of science and technology, new electronics: Machine for thinning flowers in gardens
02.05.2024 Advanced Infrared Microscope
02.05.2024 Air trap for insects
01.05.2024
Other interesting news: ▪ New profession - space miner ▪ Hearing restoration with butterflies ▪ Electric barrier to protect swimmers from sharks ▪ The strongest material in the world 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 Living shadow. Focus Secret
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |