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

Flat cable dialer. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Measuring technology

Comments on the article Comments on the article

The first idea that came to my mind was to make a simple "dialer": connect each pin of the connector installed at one end of the cable through a 330 ... 510 Ohm resistor with a voltage source of 5 V, and at the other - with an LED. Unfortunately, in this way only the integrity of the wires is checked. You may not notice that adjacent wires are interconnected.

Flat cable chime
Fig. 1

It was decided to complicate the verification algorithm and make the device on a microcontroller. On fig. 1 shows a diagram of such a device. It uses the ATtiny13 microcontroller that was at hand. It can be replaced by another, but for this the device may have to be slightly redone. For example, in ATtinyl 1, ATtiny 12, ATtiny15L microcontrollers, the PB5 line cannot work as an output, it will have to be configured as an input, and the PB4 or PB13 line as an indicator blanking signal output. In addition to the microcontroller, it took only two shift registers, a transistor and two linear LED scales showing the error code. Let's take a closer look at the features of the I / O port of the ATtiny5 microcontroller. Its POY-PB0 lines can transmit signals in both directions. Each of them is configured separately using the DDRB register. For example, if the three least significant bits of DDRB[2]-DDRB[2] are written as ones, and the remaining bits are zeros, then the PBO-PB5 lines will become outputs, and the PBXNUMX-PBXNUMX lines will become inputs.

There are two more registers for port control - PINB and PORTB. The first of them serves to enter information into the microcontroller. In its digits, the actual, currently valid logical voltage levels at the microcontroller outputs are displayed as ones and zeros. It does not matter whether this voltage came from an external source or from the output buffer of the microcircuit itself. The PORTB register is used to output information from the microcontroller. If the port line is configured as an output, it will be set to a voltage level similar to the value written to the corresponding bit of this register.

Since the microcontroller in question has only six I / O lines, and you need to check cables up to 14-wire, and even display the results of the test on the indicator, I had to supplement it with two microcircuits - shift registers.

Such a register is a set of D-flip-flops, the output of each of which is connected to the input of the next. The main purpose is to convert serial code into parallel. When the low voltage level at the clock input C is changed to a high one, the information stored in the register is shifted by one bit (D-trigger) towards the older one, and the state of the information input is entered into the released low bit. The used shift register chip 74LS164 has two information inputs D combined with an AND function. To use only one of them, a constant high level (+5 V) is applied to the second one.

To write a seven-bit binary code to the shift register (this is exactly what is required for the operation of the device), you must first enable the register by setting the R input to high, and the C input to a low level, and apply the value of the most significant (D6) bit of the output code to the information input . Then generate a clock pulse at the input C (set a high, and then again a low level). As a result, the value of the D6 bit will be written to the least significant bit of the register and output to its output 1 (pin 3).

Further, the value of the D5 bit is supplied to the information input and the clock pulse is formed again. The value of D6 will be transferred to the next bit of the register and will appear at output 2 (pin 4). The value of D5 will be output to output 1. Each new clock pulse shifts the code in the register by one more bit, and after the seventh pulse it will take its proper place: at output 1 - DO, at output 7 (pin 12) - D6. Timing diagrams in fig. 2 illustrate how the shift register converts the serial code 1011001 to the same parallel one.

Flat cable chime
Fig. 2

To increase the shift register capacity to 14 (the maximum number of wires in the cable), two eight-bit 74HC164 registers (DD1 and DD2) are connected in series, each of them using seven bits. Complete code conversion takes 14 clock pulses.

When developing the circuit and the program of the device, the following distribution of the microcontroller port lines according to the functions performed was adopted:

PBO - shift register timing output;
PB1 - output of the initial setting of the shift register;
РВ2 - output of the parallel code loaded into the register;
RVZ - input from even wires;
РВ4 - input from odd wires;
РВ5 - indicator activation output.

Depending on the number of wires in the tested cable, they are connected to 14-pin connectors XP1 and XP10 or 2-pin XP4 and XP1. The indicators HL2 and HL1 are connected to the same outputs of the shift registers as the wires of the tested cables. To avoid flickering of the indicators, they must be turned off while the microcontroller is performing the verification procedure, and turned on only after the code displaying its result is loaded into the registers. This is done using the transistor VTXNUMX, controlled by the microcontroller signal.

When checking a cable, it is necessary to "ring" each of its wires and make sure that it is not connected to one of the neighboring ones. There are no other defects in flat cables.

The verification procedure begins by writing a unit to an external shift register. As a result, the first pin of the XP1 connector is set to a high level. If the cable wire connected to it and to the first pin of the XRP connector is good, then a high-level voltage will be applied to the PB4 input of the microcontroller, and it will remain low at the PB input.

If this condition is met, the program will write 0 to the least significant bit of the n_err variable, otherwise it will write 1. Next, another clock pulse is generated and the second wire is checked. Since its number is even, the result is written to the ch_err variable. To check all fourteen wires, the procedure is repeated seven times, and before checking the next pair of wires, the values ​​of the variables n_err and ch_err are shifted by one binary digit.

Upon completion of the check, the obtained values ​​of the variables n_err and ch_err are loaded into an external shift register and indicators are turned on. After a pause, the test is repeated. Checking a ten-wire cable connected to the XP2 and XP4 connectors is similar, but four wires (two on each side) are shown as missing on the indicator.

If the microcontroller's internal 4,8 MHz clock generator is used, the cable test (before the indicator turns on) takes about 70 µs and repeats with a period of about 240 µs. Therefore, it seems that the indicators are always on. Diodes VD1-VD14 are needed in order to decouple the outputs of the registers.

Flat cable chime

The appearance of the "dialer", assembled on a breadboard, is shown in fig. 3. LED assemblies (scales) GNA-R102510ZS-11 can be replaced with the required number of single LEDs; transistor KT3156 - any of the series KT315, KT3102 or other low-power transistor of the npn structure with an allowable collector current of at least 100 mA. Instead of 74NS164 microcircuits, 74LS164 or domestic K555IR8 can be installed. The ATtiny13-10PU microcontroller can be replaced with ATtiny13-10PI, ATtiny13-20PU, ATtiny13-20PI.

Flat cable chime

The microcontroller program is written in assembly language in the AVR Studio environment. Its codes for loading into the program memory of the microcontroller are given in Table. 1. The configuration of the microcontroller must correspond to that specified in Table. 2. The zero value of the RSTDISBL bit is necessary for the operation of pin 1 of the microcontroller as a port line, and not as a setup signal input. This, unfortunately, makes the microcontroller unavailable for programming via the SPI interface. Therefore, it is necessary to apply the "high-voltage" programming method. It is provided by most universal programmers.

The speed of the test and the frequency of repetition of its cycles can be doubled by increasing the clock frequency of the microcontroller from 4,8 to 9,6 MHz. To do this, it is enough to set the value of the configuration bit CKSEL1 to 1, and CKSEL0 to 0.

The device does not require adjustment and immediately after proper assembly is ready for use.

The program of the microcontroller "dialer" can be downloaded here.

See other articles Section Measuring technology.

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

ultrasonic frog 16.09.2006

A small group of animals emitting ultrasound - bats, dolphins and some rodents - have been joined by the frog Amolops tormotus, which lives in eastern China in a stream near hot springs.

Ultrasound is emitted and heard only by males. According to zoologists, they use this means of communication to overcome the noise from the flow of a turbulent stream.

Other interesting news:

▪ Seoul Semiconductor SunLike LED is the safest

▪ Asustor AS3102T and AS3104T NAS with 4K video support

▪ CAMM is the new standard for ultrabook RAM

▪ Meat steak grown from tenderloin

▪ Created the most accurate scales in the world

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ site section Field strength detectors. Article selection

▪ article The state is me. Popular expression

▪ article What function, in addition to the direct purpose, did theatrical fans perform? Detailed answer

▪ article Packing equipment. Travel Tips

▪ article Television, video equipment. Directory

▪ article Napkin bouncing off the floor. 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