A simple lichnik of the number of wraps - Designs of simple folding - Schemes for pochatk_vts_v. Zastosovuєmo calculator as a lіchilnik impulsіv for different devices

Golovna / Additional functionality

Lichnik impulsiv- the last digital addition, which ensures the selection of the word information and the micro-operation over it, which changes the value of the number in the lichnik by 1. The main parameter of the lichnik is the rahunka module. This is the maximum number of single signals, as it can be protected by a lichnik. The lichniks are indicated through the ST (in English counter).

Impulse lichniks classify

● behind the rahunku module:
. double-tens;
. double;
. with a sufficient post-module rahunka;
. zі zminnym module rahunka;
. for directions rahunka:
. subsumuuyuchi;
. see;
. reversible;
● according to the method of molding the internal links:
. with subsequent transfers;
. with parallel transfers;
. with combined transfers;
. Kiltsev.

Summing up lichilnik impulsiv

Look at the summed lichnik (Fig. 3.67, a). Such a stimulus on some JK flip-flops, as for the presence on both inputs of the logical signal “1”, is mixed at the moment negative voltage drops appear at the synchronization inputs.

Timchasovі diagrams, scho іlustruyut work lichilnik, pointed to fig. 3.67, b. Through K сі the module of the rahunka (the coefficient of the rahunka of the impulses) is assigned. The camp of the left trigger is given to the youngest rank of the two number, and the right to the senior rank. At the output station, logical zeros are set on all triggers. The skin trigger changes its own state only if there is a negative voltage drop.

In this order, the whole lichnik realizes the sum of the input impulses. It can be seen from the clock diagrams that the frequency of the skin offensive impulse is lower, lower in front, so the skin trigger divides the frequency of the input signal by two, which wins over the frequency intervals.

Three-digit lichilnik, which you can see, with a subsequent transfer

Let's take a look at the three-row lichilnik with the last transfers, the scheme and the clock diagrams of the robot and its guidance in fig. 3.68.
(xtypo_quote) Three JK-triggers are available for the counter, which can be used in the T-trigger mode (trigger with a random input).(/xtypo_quote)

Logic 1 is applied to the input J i Before the skin trigger, the trigger is changed front mill. On the back, signals on the outputs of all triggers are restored 1. tenth 7. After the end of the first pulse F, the first trigger changes the state: the signal Q 1 reaches 0, a ? Q1 − 1.

Other triggers do not change when you turn your camp. After the completion of another synchronization pulse, the first trigger changes its camp again, passing to camp 1 (Q x = 0). I’ll take care of changing the turn of another trigger (another trigger will change the turn with a delay after the end of another synchronization pulse, so that an hour is needed for the changeover, so it’s time to use the very first trigger).

After the first impulse F, the lichnik saves the camp 11O. Away from the change, I will become a lichnik, in the same way, before the last one. When I become 000, the lichnik will re-transform to station 111.

Three-digit lichilnik with a subsequent transfer, which self-records.

It is clear that the three-digit self-recording lichnik is visible, with a subsequent transfer (Fig. 3.69).

After the transition of the turntable 000 on the outputs of all triggers, a logical 0 signal is generated, which is fed through the logic element of the ABO to the inputs J i Until the first trigger, after which the entire trigger enters the T-trigger mode and stops responding to pulses F.

Three-digit reversible lichilnik from the last transfers

Let's take a look at the three-row reverse lichnik from the last transfers (Fig. 3.70).

In the mode of monitoring, the input signals are to be sent to the input of the T st. A logical 0 signal is sent to the input T z when this occurs. Let all triggers be in station 111. If the second trigger on the inverse input causes a logical 1 signal. When another impulse arrives at the input T, a logical 1 will appear at the input of another trigger, then the other trigger will change its state (the first trigger will also change its state when another impulse arrives). Away, I will change in the same way. In the folding mode, the lichnik works similarly to the 4-digit subsum lichnik. When this signal is applied to the input T s. A logical 0 is applied to the input T.
As an example, let's look at the microcircuits of reversible drivers (Fig: 3.71) with the parallel transferred series 155 (TTL):
● ІЕ6 - two-tenth reversible lichnik;
● ІЕ7 — double reversible lichnik.

Directly the rahunka is assigned to it, like a visnovok (5 or 4) impulses are given. Inputs 1, 9, 10, 15 are informational, and input 11 is selected for forward recording. Number of 5 inputs allows you to make a forward entry with the lichinik (resetting). For whom it is necessary to submit additional data for the information entry, and then submit an impulse to record a low level for entry 11 and the clerk will remember the number. Input 14 - input of the Pro installation when a high voltage is applied. In order to encourage the lichilniks to have a greater number of vicarious varieties, there are direct and vicarious transfers (vysnovki 12 and 13 are viable). From appearance 12, the signal is to be sent to the entrance of the direct rachunka of the offensive cascade, and from 13 to the entrance of the reverse cascade.

In this case, the application is described how to implement an electronic electric power meter on the MSP430FE42x series microcontroller. The document contains a description of some of the fundamental principles and recommendations for choosing microcontrollers in the MSP430FE42x series, as well as small other boards and demo versions of programs.

1. Introduction

In this case, the application describes the principle of the electrical circuit and software for the electronic power supply on the microcontroller of the MSP430FE42x family. As an addendum, you can transfer the helper of the core driver of the ESP430CE1 module.

Microcontrollers of the MSP430FE42x family with a built-in signal processor ESP430CE1 for a single-phase electric power generator with a built-in analog input terminal and a temperature sensor were developed specifically for use in the annexes to control the pressure. The ESP430CE1 recovers more power savings automatically, without depleting the resources of the computational core. This allows you to save the resources of the computational core for victories in other tasks, for example, for establishing a connection with other outbuildings. ESP430CE1 can be used with different blast sensors. As a strum sensor Vіn can vikoristuvate Rogowski without additional external components shunt, strum transformers (ST), including transformers fast strum that great phase failures, or coils of inductance. All parameters can be adjusted by software, and calibration constants can be saved in the Flash memory of the MSP430 microcontroller and transferred to the ESP430CE1 during system initialization.

2 Hardware part

Schematic of the mounting board this butt zastosuvannya. The circuit board can be wired with strum transformers or by shunts and can be rewired. This circuit board is available from Softbaugh. serial number for casting DE427. You can remember on the website of the company Softbaugh, whose address on the Internet is www.softbaugh.com.

Connecting channels V1, I1 and I2 are shown in the diagram, guidance at the addendum A.

2.1 Shunt switch

Malyunok 1. Block diagram of connecting a shunt to a two-wire single-phase line

2.2 Vikoristannya CT as a converting strum


Malyunok 2. Block diagram of connecting CT to a two-wire single-phase line

2.3 Connecting a CT that shunt is like a permutation of the struma, which allows you to show an unauthorized connection


Figure 3. Block diagram of connecting a shunt and a CT to a two-wire single-phase circuit, which allows an unauthorized connection to be detected

2.4 CT connection for connection to three-wire single-phase meshes, which zastosovuєtsya in the US


Figure 4. Block diagram of an ANSI electric chiller that vicorates in three-wire single-phase strings

2.5 Connecting the voltage sensor inputs

Drukovana fee it is equipped with a voltage dilator, invested in the robot in terms of r.m.s. voltage values ​​of 230 V. So it’s not possible to avenge the scheme of zahistu, rozrakhovanu for this voltage.

Єmnіsne dzherelo zhivlennya zdatne zabezpechuvat strum spozhivannya up to 4 mA. It is necessary to ensure that the strum does not exceed the allowable value. For which, in the demonstration scheme, there was a light with a low stream of light.

2.6 Connecting sensor inputs to the jet

On another board there is a place for mounting an SMD resistor, which is used as a voltage for a jet transformer, but the resistor is not installed in the board, which is supplied. Note: The default resistor for the CT is not installed, but if a CT is connected, it must be installed, otherwise the MSP430 will be disabled.

2.7 Smoothing filter

As a filter, which smoothes, it is recommended to use a resistor with a nominal value of 1 kOhm, connect in series to the ADC input, and a capacitor with a nominal value of 33 nF, connect between the input of the converter and ground. To turn off the infusion of in-phase shifts, it is recommended to turn on the filters to smooth out in both channels of the strum shifter.

2.8 ADC channels, which are not vicorated.

ADC channels, which are not tampered with, are not responsible for anything connected to.

3 Razrahunok constants for ESP430CE1 vimiruvach

Vimiruvachі nebhіdnі constants, scho vіdpovіdat zastosovanim transformers and/or shunts. In this branch, a distribution of constants for vimiruvac ESP430CE1 was shown.

3.1 Voltage conversion factor

The conversion coefficient for the voltage, depending on how much the real input voltage at the input voltage of the ESP430CE1 module is reversed, is calculated by the following formulas:

    V(inp.max) = VoltageGain x V (Line, Nom.) x sqrt(2) x R2 /(R1 + R2)
    kV1 = Voltage (Line, nominal) x 2 x sqrt(2) / (2 15 x (1- (Vref – V(inp.max) x 2)/Vref))

3.2 Strum conversion factor for shunt

Strum conversion coefficient for the shunt, depending on how much the real input strum to the strum of the ESP430CE1 module is reversed, is calculated by the following formulas:

    V(I, inp.max) = CurrentGain x Imax x R(Shunt) x sqrt(2)

3.3 Strumu conversion factor for Strumu transformer

The strum conversion coefficient for the strum transformer, depending on how much the real input strum in the strum of the ESP430CE1 module is reversed, is covered by the following formulas:

    V(I, inp.max) = CurrentGain x Imax / CTRatio x R(Burden) x sqrt(2)
    kI1 = Current (Line, nominal) x 2 x sqrt(2) / (2 15 x (1- (Vref – V(I, inp.max) x 2)/Vref))

3.4 Revenge for sweating

ESP430CE1 sweating allowance is covered by the following formula:

    InterruptLevel = Pulses/kWh x (1000/3600) x fADC / (kV1 x kI1 x 4096)

Pulses/kWh sets the rate of change per kW*year will be generated.

4 Vimiruvach calibration

Calibration of an electronic electric power meter based on the MSP430 family microcontroller for additional sizable calibration equipment, which can be used to calibrate sizable electric meters, is possible, but not effective. The calculated pressure of the MSP430 allows it to work with other methods, pointing lower.

Basic calibration can be initiated by an additional C0 command sent via the UART. To follow the command, you need to specify the input values ​​of the upcoming parameters in the parameter.h file:

    -calVoltage
    -calCurrent
    -calPhi
    -calCosPhi
    - calFreq

Calibration of the phase sound between the strum and the tension is to be vikonan with an accuracy of 0.5 degrees, so the pardon of the phase sound, which is to blame in the sensors, exceeds the value, so the greater accuracy cannot be reached.

For the calibration of the electric power meter, it is necessary to separate the paths of the vimiryuvannya of the stream and the voltage. It allows vikonat calibrating with small inputs of energy and determining the magnitude of the voltage, the struma and the phase sound. On the little 5 shows the scheme of turning on the electric heater during calibration.


Figure 5. Electronic power meter on MSP430 from external terminals

4.1 Calibration with no interruption

The normal operating mode of the ESP430CE1 is set by the overpowered enumerator of the SetMode command. The value of susceptibility, recorded after skin suspense in the ActEnSPer1 register (register ActEnSPer2 for systems with two sensors), is converted by the core into a signal with a constant frequency, proportional to susceptibility to suspense. For shaping a signal with a constant frequency, you can turn on the timer module Timer_A.

When calibrated, the following are counted:

  • The calculation kernel is set at the zero control register ESP430CE1 ensigns Curr_I1, Curr_I2, depending on the mode of the mode.
  • Parameter registers are initialized to control the tension of the tension. Seek out for the help of the SET_PARAM command.
  • After canceling the mSet_Mode ESP430CE1 command, it will switch to the power mode.
  • The first result of mitigation, which is ActEnSPer1 (and ActEnSPer2 in systems with two sensors), is not victorious, the shards are nowhere to be found.
  • The current results of the simulation, which are in ActEnSPer1 (and ActEnSPer2 in systems with two sensors) are the correct ones for calculation.
  • Flag St_ZCld at the zero register I will indicate that with the onset of the available selection (the flag St_NEVal is set), new results of the transition for the last period are available in the registers ActEnSPer1 and ActEnSPer2.
  • The calculation kernel drops the St_NEVal ensign for the additional mCLR_EVENT command and reads data (div. description of the reading algorithm below).
  • As necessary, for example, in order to calculate the result for a longer period, the rest of the paragraphs are repeated.

Vishchezgadanі kroki are repeated and in another point of calibration.

Calibration of both sensors may be independent. When calibrating one sensor, the strum vibrating through another sensor can be null. I navpak.

4.1.1 Formulas

Calibration is carried out for one main period (or for nper main periods) with two advancement streams I1HI and I1LO. Nominal calculated pressure for two calibration points:

    nHIcalc = Cz1 x I1HI x V1 x cos?1 x (nper / fmains) x (fADC / 4096) [croc 2]
    nLOcalc = Cz1 x I1LO x V1 x cos?1 x (nper / fmains) x (fADC / 4096) [croc 2]

Resulting values ​​for sickly and usunennya:

    Healer: GainCorr1 = ((nHIcalc - nLOcalc) / (nHImeas - nLOmeas)) x 2 14
    Offset: Poffset = (((nHImeas x nLOcalc) - (nLOmes - nHIcalc)) / (nHImeas - nLOmeas)) x (fmains / nper) x (4096 / fADC),

de fmains - main frequency Hz;

    fADC – ADC sampling frequency in Hz (sound 4096 Hz);
    nper - the number of main periods, victories for the first hour of calibration;
    nHIclac - calculated tension at the point of calibration with a high strum in the croques near the square;
    nHImaes - wiry tension at the point of calibration with a high strum at the crochets at the square;
    nLOclac - calculated tension at the calibration point with a low strum in the croques near the square;
    nLOmaes – low tension at the calibration point with a low strum at the crochets at the square;

4.1.2 Stock calibration

For the scheme shown in Figure 1, calibration is carried out for such minds:

    V1 = 230, I1HI = 20 A, I1LO = 1 A, cos?1 = 1, nper = 1, fADC = 2048 Hz, fmains = 50 Hz.
    nHIcalc = Cz1 x I1HI x V1 x cos ? short 2]
    nLOcalc = Cz1 x I1LO x V1 x cos ? short 2]

The result of vimir at both points:

    n1Himeas = 14.6040h (pardon -1% equal to n1Hicalc = 14.94F1h)
    n1Lomeas = 1.0CB7h (pardon +2% matched with n1Localc = 1.0772h)
    GainCorr1 = ((nHIcalc - nLOcalc) / (nHImeas - nLOmeas)) x 2 14 = ((14.94F1h - 1.0772h) / (14.6040h - 1.0CB7h)) x 2 14 = 40С0h

    Poffset = (((nHImeas x nLOcalc) - (nLOmes - nHIcalc)) / (nHImeas - nLOmeas)) x (fmeins / nper) x (4096 / fADC) = (((14.6040h x 1.0772h) - (1 .0CB7h - 14.94F1h)) / (14.6040h - 1.0CB7h)) x (50 / 1) x (4096 / 2048) = -215.489 = FFFC,B63Fh

How to correct the calibration points for the improvement of the sickness and the usunennia, todі:

    ncorr = (nmeas x GainCorr1)) x 2-14 + (Poffset1) x (nper / fmains) x (fADC / 4096) nHIcorr = 14.6040h x 40C0h x 2-14 +FFFC,B63Fh x ((1 x 20 / (50 x 4096)) = 1.348.890 = 14.951Ah nLOcorr = 1.0CB7h x 40C0h x 2-14 +FFFC, B63Fh x ((1 x 2048) / (50 x 4096)) = 67.4

The resulting pardon for both corrections is +3.1 Е-5, then. 31ppm.

4.2 Calibration for the help of a PC

On the little one 6 indications one z possible options installations for calibrating electronic meters in electric power The electric meters are connected to the PC serial port via the USART0 serial port, which works like a UART chi SPI. All necessary for the calibration of the calculation are calculated by the PC, and the MSP430 of the skin electric heater only remembers the correction values ​​from the data memory or the EEPROM of the external memory.

The PC includes a calibration setup, which consists of a voltage generator, a stream generator and a phase shifter, through a communication interface. The PC reads the results of the multiplier of the voltage and the struma, calculated by the ADC (or the number of pulses Ws at the output of the skin electric heater) that equals the values ​​to the values, taken away by the reference electric chiller, which is part of the calibration equipment. The PC calculates the pardon of the electric chiller in one (for example, at a nominal stream) or two (for example, at the maximum that nominal stream) calibration points. Based on the results of these pardons, individual coefficients for bad luck and kuta zsuvu are calculated and transferred to a specific electric kettle, in which the MSP430 microcontroller takes the value.


Malyunok 6. Calibration of electronic electric chillers for auxiliary PC

The formulas for calculating the value of the calibration constants are provided by the helper of the ESP430CE1 module.

4.3 Self-calibration

Another method for calibrating the cost of the MSP430 is to calibrate the calculation. The main advantage of this calibration method is its simplicity: For the transfer of data with this method, it is not necessary to carry out data (Div. Malyunok 7). Equally corrected pardons, which are victorious with a victor during the hour of the test, as well as instructed at the "Calibration with uninterrupted vimiruvanny" division.

  • Vimiryuvachi, how to calibrate, switch to the calibration mode for the help of a connected jumper, UART, key, input pulse, etc.
  • The PC turns on the calibration equipment, as it shows the amount of energy, which is supported by the reference vimiruvach, calibrated by the electric heaters.
  • The electric heaters calculate the amount of energy and calculate the value of the WEM1 electric supply for 100% of the nominal jet Inom.
  • The next calibration equipment is switched on (I = 0, U = 0). Tse allow for the need to calculate and calculate the offset of the ADC itself.
  • The PC turns on the calibrating equipment, so that I change the amount of electricity to the electric heaters (for example, 5% Inom, 100% Vnom, cos?=1). The next time the equipment is re-micked (i = 0, U = 0).
  • Residents re-calculate electricity and calculate the WEM0 value for 5% of the nominal stream Inom.
  • For two values ​​of WEM1 and WEM0, which are found for 100% and 5% of the nominal strum Inom, the electric heaters calculate the individual values ​​of zvu and nahil.
  • After calibration, a simple visual test can be performed:
    - To reset іndikatorіv elektrolіchilniki skidayutsya - kalіbruvalna Accs vidaє exactly Pevnyi Quantity energії (at rіznih values Strum, naprugi that cos?) - vіzualno perevіryaєtsya, dwellers on vsіh elektrolіchilnikah vіdobrazhalasya odnakova value vimіryanogo values spozhitoї energії - the indications PKI mozhna viznachiti scho rozrahovanі koefіtsієnt nahilu and zsuva go beyond the allowable boundaries.

Butt: how to carry out calibration for the upcoming parameters:

  • 10,000 Ws (100% Inom, 100% Vnom, cos? = 1)
  • 5000 Ws (100% Inom, 100% Vnom, cos? = 0.5)

electric chillers, which are calibrated, show the Ws value, which is good 15 900 ± permissible accuracy. If the calculated value goes beyond the allowable limits, then the electric heater is recognized as such that it did not pass the calibration.


Figure 7. Self-calibration of electric chillers

5

There are 8 readings for a small amount of voltage, which forms one voltage Vcc \u003d +3 V. Even though the output stream is not enough, you can use an output buffer based on an NPN transistor.

The level for the distribution of the lower lifeline is set in the section 3.8.3.2 "Sleep of the lifeline" of the butt of the stock of the SLAA024. At whom rozdіlі are described іnshі dzherel zhilennya and іvnyannya for їх rozrahunka.


Figure 8

5.1 Line voltage detection

Since the ESP430CE1 voltage drop detector is connected to the line voltage cycle indicator, it does not work when the line voltage is detected. To display this, you can check the VRMS value by stretching the song interval for an hour below the specified threshold, or you can select the callable lance for the designation of the line live. When victorious zvnіshny lanceug to reduce latency, you can unplug the ESP430CE1 module.


Figure 9. Line voltage detection

6.1 Grounding

The correct routing of the calculated payment is even more important for systems that use the ADC high-rise building. Below are the main recommendations for routing boards.

1. Vykoristannya, as far as possible, okremikh buses of analog and digital "earth".

2. The maximum number of tracks from the living room to the development of DVSS, AVSS, DVCC and AVCC.

3. Installation of a capacitor at the point of convergence of all lines of analog "earth". Installing a capacitor at the point of convergence of all digital "lands".

4. Capacitor Cb should be roztashuvat at the point of convergence of all busbars. It is necessary to provide a low-level support for the condenser.

5. AVSS and DVSS terminals are connected at the same time.

6. AVCC and DVCC terminals can be called at the same time.

7. Dzherelo zhivlennya that accumulative capacitor Cb due to buti roztashovani as close as possible to one to one. Mіzh vysnovkami, podklyuchenimi to bus analog and digital life, due to the installed capacitors Ca and Cb.

8. To open the analog and digital buses, it is necessary to switch the coil of inductance L. It is also possible to switch the resistor, but if the coil of inductance is switched, it is safe to reduce the filtering of high frequencies.

9. If there is a path to pass along the perimeter of the other board, it is to blame but it is connected to the ground bus of the board.


Figure 10. Grounding the analog-to-digital converter

6.2 Sensitivity to EMI

On the little 11, it is not shown the optimal alignment: we saw the cottages, the buildings took the right guidance old dzherel EMI. To reduce the infusion of the ovnishnіh dzherel EMI tsі dolі for the area may be minimal.


Malyunok 11

On the little 12, the board is shown, which can be optimally routed. Dіlyanki, yakі є priymachami EMI, mіtіmіlnu ploschu.


Malyunok 12

7 Demo program

7.1 Analog terminal initialization

When the ESP430CE1 module is enabled, the MSP430 core can access the SD16 module. The MSP430 core can be counted at a glance to initiate the analog input terminal. With whom to carry out the installation of the gain coefficient, the sampling rate and the frequency of the clock generator for SD16:

//=============================================== ==================== /** * Subprogram for initializing the analog terminal. * * Adjustment of the sigma-delta ADC module as an analog terminal for * a resistive switch, which indicates an unauthorized connection, * a vicorous strum transformer and a shunt as a strum sensor * (div. adjustment of channels 0 and 1). */ void init_analog_front_end(void) ( /** * It is checked again that the signal processor is switched on, * otherwise it will not be possible to change the data in the SD16 register. * */ ESPCTL &= ~ESPEN; /** to the terminal, * to be sent to all channels: sync selection (SMCLK), * timer parameter (independent of SMCLK frequency) and reference * voltage. // Clock Sync selection: SMCLK + (Amp:) #if (MCLK_FREQ == 2) | SD16DIV_1 // split by 2 => ADC clock frequency: 1.094 MHz #endif #if (MCLK_FREQ == 4) | by 4 => ADC clock frequency: 1.094 MHz #endif #if (MCLK_FREQ == 8) |SD16DIV_3 // split by 8 => ADC clock frequency: 1.094 MHz // =============================================== =================== /** * - Select ADC gain factor: * - VI N,MAX(GAIN = 1) = 0.5V > VCT(peak) * - VIN,MAX(GAIN = 2) = 0.25V< VCT(пиковое) * - VIN,MAX(GAIN = 16) = 0.031V >VShunt(peak) * - VIN,MAX(GAIN = 32) = 0.015V< VShunt(пиковое) */ // =================================================================== // Настройка нулевого канала аналогового терминала - Ток 1 SD16INCTL0= I1_Gain; // Установка коэффициента усиления для нулевого канала (I1) SD16CCTL0 |= SD16OSR_256; // Установка коэффициента дискретизации = 256 (по умолчанию) // =================================================================== // Настройка первого канала - Ток 2 SD16INCTL1= I2_Gain; // Установка коэффициента усиления первого канала (I2) SD16CCTL1 |= SD16OSR_256; // Установка коэффициента дискретизации = 256 (по умолчанию) // =================================================================== // Настройка второго канала - Напряжение SD16INCTL2= V_Gain; // Установка коэффициента (V) SD16CCTL2 |= SD16OSR_256; // Установка коэффициента дискретизации = 256 (по умолчанию) /** * \Замечание * Пожалуйста запомните, что коэффициент дискретизации для всех каналов должен * быть идентичным. По умолчанию он равен 256. */ } // Конец init_analog_front_end()

7.2 Initialization of the electric heater

Before using the ESP430CE1, you need to configure. An example of a subprogram for customizing the module:

//=============================================== ==================== /** * Initialization of ESP430CE1. * */ void init_esp_parameter(unsigned char flashvars) ( volatile unsigned int timeout; // /\ Save "optimization" of changes. // Copy initialization value to RAM if (flashvars) s_parameters = s_parameters_flash;,** processor * activations, */ ESPCTL |= ESPEN; MBCTL = 0; "Idle" MBOUT1= modeIDLE; // ESP_IDLE; MBOUT0= mSET_MODE; timeout= 0xffff; , which asks * version software. */MBOUT0= mSWVERSION; timeout=0xffff; do ( while (((MBCTL & IN0IFG) == 0) && (timeout?? > 0)) ; if (timeout == 0) ( display_error(); return; ) ) while (MBIN0 != mSWRDY); firmware_version=MBIN1; / / Write program version. /** * After that, initialization of parameters is carried out. * * Control 0: the setting for: * - I2 squirt control channel? detektuvannya nesanktsіonovanogo broadband Internet * - Rozrahunok absolute value aktivnoї energії * (negative energіya roztsіnyuєtsya nesanktsіonovane broadband Internet yak) * - Peremikannya algorithm vidalennya postіynoї skladovoї Strum I1 * - Peremikannya algorithm vidalennya postіynoї skladovoї Strum I2 * / set_parameter (mSET_CTRL0, defSET_CTRL0); /** * \set the wim_ru number: * tobto. 4096*50Hz. => reset every second */ set_parameter(mSET_INTRPTLEVL_LO, s_parameters.pSET_INTRPTLEVL.w); set_parameter(mSET_INTRPTLEVL_HI, s_parameters.pSET_INTRPTLEVL.w); /** * Rated fundamental frequency: * then. 50 Hz. */ set_parameter(mSET_NOMFREQ, defSET_NOMFREQ); /** * Correction of the phase break: * Setting the phase break for strum 1/2 according to the nominal fundamental frequency for * the strum transformer for yogo technical characteristics* The phase pardon of the shunt is equal to zero. */ set_parameter(mSET_PHASECORR1, (int)s_parameters.pSET_PHASECORR1); set_parameter(mSET_PHASECORR2, (int)s_parameters.pSET_PHASECORR2); /** Adjustment of parameters for two streams: * Current transformer: * * Two possibility of adjustment of the value of two * streams: */ set_parameter(mSET_ADAPTI1, defSET_ADAPTI1); // = 1 * POW_2_14 = 16384 set_parameter(mSET_ADAPTI2, defSET_ADAPTI2); // = 1 * POW_2_14 = 16384 /** Set the configured gain factor: */ set_parameter(mSET_GAINCORR1, s_parameters.pSET_GAINCORR1); set_parameter(mSET_GAINCORR2, s_parameters.pSET_GAINCORR2); /** Set custom zsuvu: */ set_parameter(mSET_V1OFFSET, s_parameters.pSET_V1OFFSET); set_parameter(mSET_I1OFFSET, s_parameters.pSET_I1OFFSET); set_parameter(mSET_I2OFFSET, s_parameters.pSET_I2OFFSET); // set_parameter(mSET_POFFSET1_LO, s_parameters.pSET_POFFSET1_LO); // set_parameter(mSET_POFFSET1_HI, s_parameters.pSET_POFFSET1_LO); /** Set parameters become more precise: */ #if withStartCurrent == 1 set_parameter(mSET_STARTCURR_INT, s_parameters.pSET_STARTCURR_INT); set_parameter(mSET_STARTCURR_FRAC, s_parameters.pSET_STARTCURR_FRAC); #else set_parameter(mSET_STARTCURR_INT, 0); set_parameter(mSET_STARTCURR_FRAC, 0); #endif /** Adjustment parameters for the period of permanent warehouse withdrawal: */ set_parameter(mSET_DCREMPER, defSET_DCREMPER); ) // End of init_esp_parameter()) // End of subprogram init_esp_parameter()

7.3 Program Demo 1

Demo 1 is a simple demo program that will initialize the ESP430CE1 to simulate electrical energy and display the result on the indicator. When you see it, there is a glimmer of light. This program can be used with IAR's Kickstart package.

Below are the files of the demo program of their recognition:

File Assigned functions
main.c Performing the initialization of the system and calling functions to indicate the updated value, which is powered by the reset processing routines:
  • Init FLL and System Clock
  • Init Basic Timer and Real time Clock
  • Init LCD
  • Init analog front end
  • Init ESP430CE1 Parameters
  • Start measurement
FET4xx_RTCwLCD.s43 The main subprogram for servicing RKI and RTC
display.c Subprogram of high level for RKI
FLL.c PLL installation subprogram and synchronization system
PortFunc.c Processing subroutine for port port 1
TimerA.c Subprogram for initialization and maintenance of Timer_A timer. Timer_A cycling for pulse shaping
EMeter.c EMeter.c Mistify the initialization subroutine and the analog terminal maintenance subroutine, ESP430CE1 and resetting the ESP430CE1
FE427_Measure_v3.ewp
FE427_Measure_v3.eww
Project files for Workbench software version 3 of the IAR company
FE427_Measure.ewp
FE427_Measure.eww
Project files for Workbench version 2 IAR
FE427_Measure.hzp
FE427_Measure.hzs
Project files for CrossStudio by Rowley

Block diagram of the demo program pointed to little 13.


Malyunok 13. Block diagram of the demo program

7.4 Generation of an electric shock pulse

This impulse can be victorious for indication of the equal level of the saved energy. Three methods can be used to form this output signal.

7.4.1 Intermediate override signal output

In the first method, it is randomly victorious to remove the resetting of the ESP430 module of a given level. The implementation of this method is even simpler and requires the acquisition of additional hardware and software resources. Ale through those who are vimiryuetsya energy sinusoidal colivans, tsey signal may be a deacid transitional colivannya.

This method is activated:

    // *define TIMERA_PULSE_OUTPUT
    // *define WITH_AVERAGING

7.4.2 Using Timer_A output

In another method of removing transitional coliving, the timer module Timer_A is broken. This method is suitable for forming pulses with a frequency of up to 30 Hz. Before trying which method in the parameter.h file, you need to make such settings.

    *define TimerAClock TASSEL_1/* ACLK = 32 kHz
    *define TACLOCK 32768ul
    *define CLOCKSPERPERIOD(TACLOCK/defSET_NOMFREQ)

Activation of the method is carried out as follows:

    *define TIMERA_PULSE_OUTPUT
    // *define WITH_AVERAGING

7.4.3 Averaging timer output Timer_A

The third method uses only the Timer_A timer module for averaging the hour and shaping the carrier frequency pulses.

Activation of this method is carried out as follows:

    *define TIMERA_PULSE_OUTPUT
    *define WITH_AVERAGING

7.5 Management

Є two buttons, like vikoristovuyutsya for vykonannya offensive functions:

  • S_A: Disabled ESP430CE1 module and put MSP430 into low sleep mode. The year of the real hour at the same time is spent pratsyuvati.
  • S_B: Switch between display modes.

7.5.1 Parameter.h file

All configuration settings are linked to the parameter.h file. Before them one can see:

  • Riven output impulse.
  • Transmission coefficients for voltage and strum
  • Configuration parameters for the ESP430CE1 module

#define for withDisplay allows code to be scaled for other functions and reconciliation. Floating point function code for UART output and calibration. Emphasizing one of these two parts to increase the size of the code.

Shunt definition *define shunt allows you to choose up to which input I1 will be connected - to the shunt or the stream transformer.

To simplify the analysis of the main parameters, which are tagged in the parameter.h file, you can tweak the Excel file FE427_Settings.xls. After entering the necessary information for this field, all parameters will be released and displayed. After pressing the "Save Parameter to File" button, all parameters will be saved in the Test_Parameter.h file.

This file with unlocked parameters will include the inclusions in the output code of replacing tasks for locking in the Parameter.h file parameters in order to remove the #define Test remarking in the Parameter.h file itself.

7.6 Demo 2 demo program

The Demo 2 demo program is installed as a complex add-on that includes UART and auto-calibration subprograms, which saves parameters in flash memory. For the calculation of the electric adjustment of the function of the formation of the adjustment for the shift of a given level, the values ​​are calculated, which are rotated by the ESP430CE1 module. The Demo 1 program monitors the initialization of the ESP430CE1 module, displays data on the indicator, and then displays the data with a light indicator. This demo program is too big to win over IAR's Kickstart kit.

The demo program Demo 2 includes all the files that can be found in the program Demo 1, and the files hovered over in the table below:

7.6.1 Call to UART

    Data format: 57600 / 8 N 1
    A skin command can be terminated with a "CR" character.
    The 'h' command displays the following help text at the hover terminal window:

    MSP430FE427 software version: 0114
    UART commands:

      SHxx: Anniversary installation
      SMxx: Installed whilin
      SSxx: Seconds set
      SDxx: Sunday
      SOxx: Installed month
      SYxx: Roku setting
      Dx: Set to indicator mode
      D1: Vimknennya
      D2: Hour
      D3: the date
      D4: Voltage, V)
      D5: Strum (A)
      D6: Peak voltage (V)
      D7: Strum peak value (A)
      D8: Frequency Hz)
      D9: CosPhi
      DA: Temperature
      DB: Intensity, kW)
      DC: Electric supply (kW * year)
      H: show help text
      Tx: setting test mode
      R: system skid
      Mx: Vikonannya test vymіrіv stretching x*50 tsiklіv
      I: Initialization
      C0: Autocalibration U / I / P / phase zsuvu
      C1: Calibration of equal reparation
      C2: Calibrating phase correction 1
      C3: Calibrating phase correction 2
      C4: Offset calibration V1
      C5: Calibration offset I1
      C6: Calibration offset I2
      C9: Saving parameters in flash memory
      SA: Calibration of the transmission coefficient for the voltage
      SW: Strum transmission coefficient calibration
      SS: Calibration of the transmission coefficient for tension
      +: Improved calibration value
      -: Change of calibration value

7.6.2 Calibration

The main part of the calibration process can be done with the help of the UART command C0.

To complete the command in the parameter.h file, the input parameters must be assigned:

  • calVoltage
  • calCurrent
  • calPhi
  • calCosPhi
  • cal Freq

By UART command "C9" the redeemed value can be saved in flash memory.

7.6.3 Parameter.h file

All configuration settings are linked to the parameter.h file:

  • Setting equal output impulse
  • Coefficient of voltage and struma
  • ESP430CE1 module setup parameters

#defines for withUARTComm, withCalibration, withDisplay allow you to change the code for various functions and expansions. Emphasizing one of these two parts to increase the size of the code.

2006

For rozrahunku electrical energy, who cares for singing period hour it is necessary to integrate into the hour of mittve the value of active tension. For a sinusoidal signal, the tension is more expensive to increase the voltage on the stream at the edge at a given moment. On what principle is it practised, whether there is a lichnik of electric energy

2006

The installation and connection of the electric chiller does not cause difficulties. The shield with the lichilnik needs to be installed on four rollers (along the corners of the shield) in the room, near that city, the stars must pass the electrical wiring to the entrance of the residential lichilinik

2012

Tsey pristry to follow the alternatives of the electric power supply and record the readings on the SD memory card. Simple analogue pressure signals to measure the signal from the voltage sensors and the struma, and to take data off the ATmega168 microcontroller calculates the pressure reduction. The voltage and strum are controlled with a frequency of 9615 Hz, which is why it should be shown accurately on non-sinusoidal voltages, such as computers or fluorescent lamps.

Lіchilnik on the microcontroller to make it easy for repetition and selection on the popular MK PIC16F628A with the display of indications on 4 seven-segment light indicator. There are two control inputs: +1 and -1, as well as the Reset button. The management of the scheme of the new lichnik is implemented in such a way that, as soon as the entry button has not been pressed for a long time, the account will continue to run only when the entrance is pressed. Maximum number what pulses are needed and the indication is ALS - 9999. In case of turning on the input “-1”, the readings are carried out in the reverse order up to the value 0000.

Schematic diagram of a reversible light switch on the PIC16F628A microcontroller:

Skidannya lichilnik's display and at once I will become a memory 0 zdіysnyuєtsya button "Reset". Keep in mind that when the reverse turntable on the microcontroller is turned on for the first time, the ALS indicator may display untransmitted information. Ale, with the first onslaught on the buttons, the information is normalized. De and yak you can win the scheme - to deposit for specific needs, for example, install it in the store or the office for a winding-up worker, or as an indicator of the winding verst. I think that this lichnik on the microcontroller will bring mischief to someone.

If someone does not have a necessary ALS indicator at hand, but if there is another one (or put 4 other indicators), I'm ready to help remake the other one and rebuild the firmware. In the archives on the forum, there is a diagram, a board and firmware for indicators with a hot anode and a hot cathode. The handcrafted board is shown in the small picture below:

Є also New version firmware for the lichnik on the PIC16F628A microcontroller. in this case, the scheme and the payment of the lichilnik were left out of quantity, but the recognition of the buttons was changed: button 1 - input pulses (for example, the reed switch), 2 button turns on the monitor for the input pulses, when the indicator lights up on the left - the right point, button 3 dot. Button 4 - skid. With this variant, the lichnik scheme for the microcontroller can be easily put on the winding versat. Just before winding or winding up the turns, press the "+" or "-" button on the back. To live a lichilnik in the form of a stabilized dzherel with a voltage of 5V and a strum of 50mA. For consumption, you can live on batteries. The hull is to fall in line with your likeness and ability. Pressure scheme - Samopalkin

Principle dії

As a starting point for accepting a zero rank in our outputs of triggers (Q 1 - Q 3), i.e., the digital code 000. For the most senior digit, it is Q 3. To transfer all triggers to the zero camp, enter R triggers combined and apply the necessary voltage level to them (this is an impulse that resets the triggers). In fact, tse skidannya. Clock pulses should go to the input Z, so that the digital code is increased by one, so after the arrival of the first pulse, the first trigger switches to station 1 (code 001), after the arrival of another pulse, the other trigger switches to station 1, and the first trigger switches to station 0 (code 010) , then the third one, etc. As a result, similar attachment you can reach up to 7 (code 111), shards 2 3 - 1 = 7. Upon the arrival of the advancing (ninth) impulse, the lichnik will be reset to zero and everything will be back to normal. On the charts, the change in trigger levels is seen from a certain zatrimkoy t z. On the third row, the hitch is already the third. Zatrimka, which increases with the increase in the number of discharges, with a small number of discharges with a subsequent transfer, which, regardless of simplicity, is between them stagnant in outbuildings with a small number of discharges.

Classification of children

Lіchilniki nazvat pristroї for pіdrakhunka number naіyshli on їkhіd іpulsіv (teams), zapom'yatovuvannya that zberіgannya result rahunka and vidachі tsyogo result. The main parameter of the lichilnik is the counting module (capacity) Kс. This value is equal to the number of stable camps of a lichilnik. After the need for impulses Kc the lichnik turns into holiday camp. For double lichniks, Kс = 2 m, de m is the number of discharges of the lichnik.

Krіm maximum frequency rahunki fmax i hour of setting tust, yakі characterize swidkodіyu lichilnik.

Tust - the duration of the transitional process of switching the lichilnik to a new camp: tust = mttr, de m - number of shots, and ttr - trigger switching hour.

Fmax is the maximum frequency of input pulses, if input pulses are required.

For the type of function:

- to sum up;

- see;

- Reversible.

In case of a suspected lichilnik, the arrival of a skin input impulse increases the result of a rash by one; in reversible lichniks, it can be used as a pidsumovuvannya, and vіdnіmannya.

behind structural organization:

- Last;

- Parallel;

- Sequential-parallel.

At the last litter, the input impulse is given only to the input of the first discharge, the output impulse of the forward discharge is given to the entrance of the skin offensive discharge.

At the parallel lichilnik, with the arrival of a chergovy lichilny impulse, the transition to a new camp begins at the same time.

Sequential-parallel scheme includes front-to-back options.

In order to change the positions:

- With the natural order of the rahunka;

- With enough order rahunka.

Behind the rahunku module:

- Dviykovi;

- Nedviykov.

The modulus of a double lichnik's rachunka is Kc=2, and the rahunka module of a non-wire lichnik is Kc= 2m, where m is the number of lichnik's discharges.

Subsumuovuyuchiy last lichnik

Fig.1. Subsumuovuyuchiy last 3rd rank lichnik.

The triggers of this liquor should be sent along the back front of the lichic impulse. Entry of the senior order of the lichilnik of injunctions from the direct exit (Q) of the young court order. Timchasova diagram of the work of such a lichnik is shown in Fig.2. At the beginning of the hour, I will start all triggers to check log.0 on all direct outputs of log.0. It is available for the help of a short-hour log.0, submitted to the inputs of the asynchronous setup trigger log.0. The scorching camp of a lichilnik can be characterized double number(000). For an hour there is a fluctuation at the inputs of the asynchronous installation of triggers up to log.1, log.1 is trimmed. After the arrival of the trailing edge of the first impulse, the 0-bit is switched to the protile mill - log.1. At the entrance to the 1st category, the leading edge of the healing impulse is established. Camp of a lichnik (001). When another impulse arrives at the entrance of the litter of the trailing edge, the 0-discharge is switched to the proliferating mill - log.0, at the entrance of the 1-discharge, the rear front of the curative impulse is established, which switches the 1-discharge to log.1. Zagalny camp of a lichilnik - (010). Set the advancing trailing edge at the input of the 0-digit to set їх at log.1 (011) and so on. In this way, the lichnik accumulates the number of input impulses, which should be on this input. When 8 impulses are needed from the yogo input, the lichnik turns at the exit camp (000), also the coefficient of the quarter (KSCh) of this lichnik is 8.

Rice. 2. Timchasova diagram of the last sub-sum lichnik.

Last lichnik, what do you see

The triggers of this litter should be put on the back front. For the implementation of the operation, the medical entry of the senior order is connected to the inverse exit of the younger order. In front of the trigger, set the camp log.1 (111). The work of this lichilnik is shown by the hour diagram in fig. 4.

Rice. 1

Rice. 2 Timing chart of the last litter, what you can see

Reversive last lichnik

For the implementation of a reverse lichnik, it is necessary to combine the functions of the summed lichnik and the functions of the lichnik that you can see. The scheme of this lichilnik is shown in fig. 5. For keruvannya mode rahunku є signals "sum" and "retail". For the subsuming mode "sum" = log.1, "0"-short-hour log.0; "Retail" = log.0, "1"-short-hour log.0. With this element DD4.1 and DD4.3, it is possible to supply on clock input triggers DD1.2, DD2.1 through the elements DD5.1 ​​and DD5.2 signals from direct outputs of triggers DD1.1, DD1.2 are valid. If each element DD4.2 and DD4.4 is closed, log.0 is set on each output, then the inverse outputs cannot be entered at the regular inputs of the triggers DD1.2, DD2.1. In this manner, the operation of summation is being implemented. For the implementation of the operation of wiping, log.0 is sent to the input "sum" and log.1 to the input "retail". With this element DD4.2, DD4.4, it is possible to send signals to the inputs of the elements DD5.1, DD5.2, and on the inputs of the triggers DD1.2, DD2.1, signals from the inverse outputs of the triggers DD1.1, DD1.2. When this element DD4.1, DD4.3 is closed, the signals from direct outputs of triggers DD1.1, DD1.2 are not injected into the inputs of triggers DD1.2, DD2.1. In this order, the operation is realized.

Rice. 3 Last reversible 3-digit lichnik

For the implementation of these lichilniks, it is also possible to create triggers that will work on the front of the rachunkovy impulses. At the same time, it is necessary to give a signal for the inverse exit of the younger rank, and at the same time, to stop the medical entry from the direct exit.

The failure of the last lichnik - with the increase in the number of ranks, the hour of installation (tust) of this lichnik is proportionately increased. The advantage is ease of implementation.

Rice. 3 - Reversible lichnik

For rachunk impulses, two inputs were transferred: “+1” – increase, “-1” – change. The external input (+1 or -1) is connected to input C. You can also use the ABO circuit to connect it before the first trigger (exit the element to the input of the first trigger, enter - to tires +1 and -1). Misunderstood bullshit between triggers (DD2 and DD4) is called the I-ABO element. This element is composed of two elements and one element of the ABO, united in one building. The input signals to this element are logically multiplied, then the result is logically added up.

The number of inputs of the element I-or corresponds to the number of the category, that is, the third category, then three inputs, the fourth - chotiri, etc. The logical scheme is a two-position jumper, kerovanim direct or inverse output of the front trigger. At the beam. 1 on the direct exit of the lіchilnik v_drakhovuє impulsi from the tire "+1" (like a stench, obviously, to come), with a log. 1 on the reverse output - from the “-1” bus. Elements I (DD6.1 and DD6.2) form transfer signals. On output >7, the signal is generated at code 111 (number 7) and the presence of a clock pulse on bus +1, on output<0 сигнал формируется при коде 000 и наличии тактового импульса на шине -1.

Everything, wonderfully, tsіkavo, ale, looks more beautiful in the microcircuit vikonannі:

Rice. 4

The axis is a typical lichilnik from a re-installation. CT2 means that the lichnik is two-fold, as if it were ten, put ST10, as two-ten - ST2 / 10. Entrances D0 - D3 are called informational inputs and є records in the lichnik of some kind of double camp. Tsei camp will appear on yoga holidays and in the new one will be rospochato vіdlіk. Otherwise, it seems that if you enter the front settings, you can change the presets. Vkhіd V serve to allow the code to be written to the inputs D0 - D3, or, as it seems, allow the front installation. This entry can be used in other letters. The forward recording of the lichnik is carried out when a signal is given to allow recording at the moment the impulse arrives at the input C. The input of clocks. Impulses shove in here. Trikutnik means that the lichnik spratsovuє behind the decline in momentum. Like a tricutnik of rotations by 180 degrees, that is a dupe to the letter C, which means that you will spratsovuє along the front of the impulse. The input R serves to reset the lichnik, i.e., when an impulse is applied, the beam is installed in the outputs of the lichnik. 0. The PI input is called the transfer input. Exit p is called transference exit. At this output, a signal is formed when the lichnik is reset (if all outputs are set to log. 1). This signal can be given to the entrance of the transfer of an offensive lichilnik. Then, when the first lichnik is repositioned, the other one will move to the offensive camp. Come out 1, 2, 4, 8 - just come out. There, a double code is formed, depending on the number of impulses that came to the entrance of the lichnik. Like visnovki with mugs, which become richer often, it means they stink inversely, to replace the beams. 1 beam is fed. 0 i navpak. The report of the work of the clerk at the same time with other outbuildings can be looked at from a distance.

Parallel subsumuovuyuchiy lichnik

The principle of action of this lichilnik is based on the fact that the input signal, which avenges the lichilnі impulses, is sent at once to all discharges of the lichilnik. And the installation of the lichilnik at the camp log.0 chi log.1 is controlled by the control scheme. The scheme of which lichilnik is shown in Fig. 6

Rice. 4

Discharging a lichnik - triggers DD1, DD2, DD3.

Scheme of control element DD4.

The priority of the lichilnik is the minimum hour of installation, which does not lie in the capacity of the lichilnik.

Nedolik - the folding of the scheme in the case of a different increase in the rank of the lichnik.

Persons with parallel transfers

To move the swidcode, you need to set up the method of one-hour formation of the signal for transferring all discharges. Reached by the supply of elements I, such clock pulses should be in the same time at the entrance of all discharges of the lichnik.

Rice. 2 - Parallel transfer of graphics that explain this robot

From the first trigger, everything made sense. At the input of another flip-flop, the clock pulse will pass only once, if there is a beam at the output of the first flip-flop. 1 (feature of scheme I), but the entrance of the third one - as in the exits of the first two there will be a log. 1 and so on. Such a lichnik is called a lichnik with parallel transfers. As you can see from the diagrams, with the increase in the number of discharges, the number of beams increases. I elements, moreover, the higher the order, the more inputs at the element. Not a lot of such lichniks.

Development of the principle diagram

Formuvach impulsiv

Impulse shaping device - attachment, necessary for the usunennya greaskot kontaktiv, which is to blame for the zamikanny mechanical contacts, which can lead to an incorrect operation of the scheme.

On little 9, a diagram of shaping pulses in mechanical contacts is drawn.

Rice. 9 Forming impulses in mechanical contacts.

Display block

In order to show the result of the rahunka, it is necessary to vicorate light. To create such a bunch of information, you can use the simplest scheme. The scheme of the indication block on the light diodes is pointed to the little 10.

Rice. 10 Block of indication on light-emitting diodes.

Rozrobka KSU (combination control scheme)

For the implementation of the first lichilnik from the TTLSh series of K555 microcircuits, I selected:

two microcircuits К555ТВ9 (2 JK triggers with installation)

one microcircuit K555LA4 (3 elements 3I-NOT)

two microcircuits K555LA3 (4 elements 2I-NOT)

one microcircuit K555LN1 (6 inverters)

These microcircuits ensure the minimum number of cases on a different board.

Folding the structural scheme of the lichilnik

Structural scheme - the order of the blocks of the lichnik, which should be fixed whether it is a function that ensures the normal work of the lichnik. On the little 7 shows the block diagram of the litter.

Rice. 7 Structural diagram of the lichnik

The control unit controls the function of giving a signal and controlling triggers.

Block rahunka appointments for change I will become a lichnik and save that I will become.

Block of indication to display information for the zonal reception.

Folding the functional scheme of the lichilnik

The functional scheme is the internal structure of the lichnik.

Significantly optimal is the number of triggers for a non-binary lichnik with a coefficient of account Kc=10.

M = log 2 (Kc) = 4.

M = 4 means 4 triggers are needed to implement the BCD tag.

The simplest single-shot flashers of impulses

The simplest one-shot flasher can be a JK-trigger and a D-trigger, which works in the rachunk mode. Vіn vvazhaє vhіdn_ impulsi modulo 2-skin impuls peremikaє triger at prolezhny mill. One trigger fires up to two, two consecutive triggers fire up to four, n triggers - up to 2n pulses. The result of the analysis is formed in the given code, which can be saved in the memory of the lichnik or if it is processed by another device with a digital decoder of the technology.

The small picture shows a diagram of a three-digit double-double flasher, inspired by a JK-trigger ax K155TB1. Mount such a lamp on the breadboard panel until direct output of the trigger and connect light (or transistor - with a heating lamp) indicators, as they did before. Feed a series of impulses from the test generator to the input of the first trigger of the lichnik with a frequency of 1 ...

If at the first moment all triggers of the lighter were reset to zero (you can set it with a push-button switch SB1 "Set.0", applying a low voltage to the input R of the trigger), then by the fall of the first pulse (Fig. 45.6), the DD1 trigger will switch to single a high level of tension will appear on yoga direct output (Fig. 45, c). Another impulse is to switch the trigger DD1 at the zero mill, and the trigger DD2-B is single (Fig. 45, d). By the decay of the third impulse, the triggers DD1 and DD2 will appear in a single station, and the trigger DD3 will still be in zero. The fourth impulse is to switch the first two triggers to the zero state, and the third - to a single one (Fig. 45, e). Eighth impulse to switch all triggers to the zero state. According to the decline of the ninth input pulse, the onset cycle of the work of the three-digit pulse lighter will be revealed.

Vivchayuchi charts, it doesn’t matter to remember, the skin of the senior rank of the lichnik is shaken by the youngest by the second number of impulses of the rahunka. So, the period of impulses at the exit of the first trigger is 2 times longer for the period of the entrance impulses, at the exit of another trigger - by 4 times, at the exit of the third trigger - by 8 times. Speaking to my digital technology, such a lichnik works with the code 1-2-4. Here, under the term "vaga", it is based on the observance of the information adopted by the lichnik after the installation of yoga triggers at the zero camp. At the outbuildings and accessories of the digital technology of the largest width, there were chotyri-sized pulses, which are used in the code 1-2-4-8. The frequency controllers take into account the input pulses until the next set by the coefficient of the fluctuation I will become, and then we will form the signal of the remembrance of the trigger in the zero camp, start again the fluctuation of the input impulses to the coefficient of the fluctuation, which is set, and so on.

Here you already know the three-digit two-fold add-on logical element 2nd-NOT DD4.1, which sets the coefficient 5. It seems so. At the first few input pulses (after setting the triggers at the zero camp using the SB1 "Set. 0" button), the attachment works as a primary two-way counter of the pulses. If one or both inputs of the DD4.1 element have a low voltage level, then the element is in a single station.

According to the fall of the fifth impulse on the direct output of the first and third triggers, and therefore, at both inputs of the DD4.1 element, there is a high voltage level, which switches the logical element and the zero state. At this moment, a short pulse of low level is formed on the output, which is transmitted through the diode VD1 to the input R of all triggers and is switched over to the output zero state.

From this moment, the onset cycle of the worker begins. Resistor R1 and diode VD1, introduced into the whole lichnik, are necessary in order to prevent the output of the DD4.1 element from entering the wire.

You can change the frequency of such a timer by applying impulses to the input of the first th trigger, which go with a frequency of 1 ... 2 Hz, and connecting a light indicator to the output of the DD3 trigger.

In practice, the functions of the lichilnikіv іpulsіv and dіlnіvіv frequency vikonuyut specially razroblenі microcircuits of the advanced stage of integration. In the K155 series, for example, the healers K155IE1, K155IE2, K155IE4 and in.

In radio amateurs, the most widely used microcircuits are K155IE1 and K155IE2. The clever graphic designation of these microcircuits-listeners from the numbering of their numbers is shown in fig. 47.

The K155ІЕ1 microcircuit (Fig. 47, a) is called the ten-day impulsive lichnik, that is, the lichnik with a coefficient of 10. Exit (view 5) of the microcircuit - exit of the fourth flip-flop. Install all triggers in the zero camp by applying a high voltage at the same time to the input R (wires 1 and 2), united by the element scheme (smart symbol "&"). Rakhunkovі impulsi, yakі due to the mother a low rіven, can be served at the same time enter (vysnovki 8 and 9), also combined by І. otherwise, on one of them, as if at the same time on the other, there will be a high voltage level. With the skin tenth input impulse at the exit, the latch is formed equal to the trivality of the input impulse of a low equal. Microcircuit K155IE2 (Fig. 48, b)

Dviykovo-ten chotirirazryadny lichilnik. The new one also has chotiri triggeri, and the first one is okremі vkhіd С1 (vysnovok 14) and okremiy direct vikhіd (vynovok 12). The three other triggers are connected to each other in such a way that they establish a timer for 5. When the first trigger (flap 12) is connected to the C2 input (flap 1) of the lancet of the other triggers, the microcircuit becomes a timer for 10 (Fig. 48 a), Pratsyuє in code 1 -2-4-8, which symbolize the numbers of the outputs of the graphic designation of the microcircuit. To install the triggers of the lighter in the zero camp, apply a high voltage to the input R0 (flaps 2 and 3).

Two combined inputs R0 and several split outputs of the K155ІE2 microcircuit allow, without additional elements, to be frequency dilators with coefficients divided by 2 to 10. Fig. 48, 6), then the coefficient of the rahunka will be 6, and with the z'ednanny visnovkiv 12 and 1, 11,. 2 and 3 (Fig. 48, c) coefficient of fluctuation of the mill 8. This feature of the K155ІE2 microcircuit allows you to vicorate as a double lichnik impulsiv, and as a frequency dilnik.

Digital lichnik impulsiv - tse digital vuzol, a kind of zdijsnyu rahunok impulsiv, which should be on yoga entrance. The result of the rahunka is formed by the client at the given code and the required hour can be saved. The number of triggers will be on triggers, and the number of impulses, if you can boost the number of triggers, is determined by the frequency N = 2 n - 1, where n is the number of triggers, and minus one, because in digital technology for the cob it is accepted, the number of banknotes go zbіlshennya, and vіdnіmayut - rahunok change. Yakshcho lichilnik can remerge at the process of robotic s pіdsumovuvannya vіdnіmannya і navpaki, vіn is called reversible.

© 2022 androidas.ru - All about Android