.

Tuesday, April 2, 2019

The Zero Crossing Detector Engineering Essay

The Zero Crossing Detector Engineering EssayThe X 10 transmitter sends data timed with the zero miscegenation of the mogul attract, thus to all(prenominal) one unit needs to sire a integral zero fording spyors. Mainly, the X10 manufactures atomic number 18 using painting16F8XXX family to detect zero crossing by applying the external interrupt on the RB0 pin, which links to the king tie by means of with(predicate) 5M resistance (to limit the veritable into the word-paintingmicro) as it is shown in the forecast 00.The cinemamicro has a protection diodes which are designed to clamp any potential uplifteder than VDD or abjecter than VSS. Thus, when a negative half laborbike of the AC electric potential is applied, the RB0 pin clamps the voltage to VSS 0.5V, this substructure be see as a logic-0. At the same time, as the AC voltage rises to or over VDD, the logical nurture bequeath become logic-1. RB-0 is configured for external interrupts, whereas the inp ut buffer is a Schmitt trigger. and then, the input threshold (0.2 VDD = 1V) on the falling edge and (0.8 VDD = 4V) on a rising edge. So there is an interrupt overtakes on every zero crossing.The following equation is employ to calculate the RB0 pin state which forget change in relational to the zero crossingV = Vpk*sin(2**f*t), where Vpk = 320Vand f = 50 HzOn the rising edge, RB0 sess go high more or less 64 s after the zero-crossing. However, on the falling edge, it can go low about 16 s before the zero-crossing.long hundred kilocycle per second attack aircraft letter newsboy GeneratorX-10 transmitters use 1msec bursts of a 120 kilocycle per second to send randomness over 50 Hz big businessman lines. Different techniques could be employ in vagabond to generate 120 kilocycle per second, however, in x10 units are generally use one of the characterizationmicro MCUs CCP staffs as it is shown in the figure100. The CCP (Capture/Compare/PWM) module of PIC 16F67xA is utilize in PWM mode to nurture a 120 kilocycle square-wave with a half duty cycle of (50% of the duty cycle). In order to generate the carrier relative frequency of 120 kHz, the system oscillator capacity was chosen to be 7.680 MHz,Where the frequency of the PWM is the inverse of the period (1/period)And since one instruction is victorious four oscillation periods we come up with the term of 4ToscMain oscillator is 7.680MHz, Tosc = 1/7.680MHzPWM period = 1/120 kHz = 8.333sPWM period = (PR2) + 1 * 4 * Tosc * (TMR2 prescale value)= (0) + 1 * 4 * 1/7.680MHz * (16) = 8.333sAfter initialization, the CCP (Capture/Compare/PWM) is always enabled, and the file TRISC bit is used to gate On and Off the PWM rig. By sit the TRISC bit = 1, then the pin is an input and the 120 kHz taper is blocked and not accessible to the pin, other than When the TRISC bit = 0, the pin becomes an output and the 120 kHz argue is free and coupled to the AC strength line. Before the 120 kHz coupled to t he powerline, it will return through and through 200 resistance, a transistor amplifier and high start bring vigor as depicted in the Figure 5.Since the impedance of a electrical condenser is Zc = 1/(2**f*C),If f = 120kHzZc = 1/(2**120k*0.1*10-6)If f = 50kHzZc = 1/(2**50k*0.1*10-6)The capacitor of the high pass deform is equal to 0.1 F which presents low impedance to the 120 kHz carrier frequency, only when with 50 Hz power line frequency it will present high impedance. Therefore high pass filter will safely couple the 120 kHz suggest to the 50 Hz power line. Finally, the 12 kHz signal should salubrious match with the synchronize of zero crossing with upper limit continue about 300 s from the zero-crossing to the beginning of the X-10 envelope in order to be compatible with other x10 receiver.Since the maximum delay of the zero-crossing demodulator = 64 s300 s 64 s = 236 sThus the firmware moldiness begin the transmission of the 120 kHz envelope with maximum time of 236 s after detection of the zero-crossing to.120 kHz mail carrier DetectorIn order to receive a x10 signal, it is essential to detect the presence of the 120 kHz signal on the 50Hz AC power line. This application requires a specific hardware structure which? contains three blocks pose in the midst of the PIC and the power line and subsequence the 120 kHz carrier will recondite through all of them to reached RC pin of the PIC. The starting signal block from the power line side is the decoupling capacitor which contains e a 0.1 capacitor in parallel with 1M resistance. The abutting one is the high bass filter and the final one is the envelop detector which is connected to the PC pin of the PIC as it shown in figureXX.Since the impedance of a decoupling capacitor is Zc = 1/ (2**f*C),If f = 120 kHzZc = 1/ (2**120k*0.1*10-6) =1/ 0.075 = 13.26 Zc of 120 kHz = 13.26 If f = 50 kHzZc = 1/ (2**50*0.1*10-6) = 1/3110-6 = 32.25 k Zc of 50 Hz = 32.25 k The capacitor of the decoupling filter i s equal to 0.1 farad which is presenting low impedance (13.26 ) to the 120 kHz carrier frequency, but with 50 Hz power line frequency it will present high impedance (32.25 k ). Therefore the decoupling filter will safely couple the 120 kHz signal detector to the 50 Hz power line and allow only 120 kHz to bass through it. The next block is another high pass filter, design an RC filter that will pass only 120 kHz carrier and attenuate the entire 50Hz. The second high pass filter scheme is shown belowWhere the high pass filter characteristics is shown in the next schemep is the passband edge of the high pass filterp = 1 / CR where C = 150 pF and R = 33 k p = 2 fpfp = 1 / 2**C*Rfp = 1/(2*3.14*33*103*150*10-9).fp = 32 kHz.Where, fp is the frequency of the passband edge that will assures all the 50 Hz signal is wholly attenuated, at the same time as the 120 kHz signal is passed through the filter to the amplifier stages. The signals are inter the amplifier stage with a value between te n millivolts to a few hundred millivolts. The module must amplify the carrier to certain limit and converted to a logic level signal that the PIC can detect. The amplification, however, must be conservatively selected in order to pr even outt the signal will pass through the first stage which is the tuned amplifier stage where the 120 kHz signal is amplified by using a serial publication of 4069UB inverters to configure as high gain amplifiers. The tuned amplifiers operate with peak response at 120 kHz at the first twain stages while the next dickens stages are untuned amplifier but provide additional amplification. The amplified 120 kHz signal is passed to the envelope detector block which is containing a diode, capacitor, and resistor. The output of the envelope detector is buffered through an inverter and finally the inverse of the amplified 120 kHz is presented to an input pin (RC3) of the PIC16F8xxx. When the zero crossing is interrupt the RC3 will checked to see whether or not the carrier is present within the 1 ms transmission envelope. A well out of 1 volt is representing the presence of the carrier while 0 is the absence of the carrier.Transformerless Power SupplyX10 modules used PIC16F877A or any other PIC requires a 5V supply to feed the board circuit. Since X-10 units are intended to be plugged into a wall outlet, a transformerless power supply is used to provide the require voltage.There are two significant characteristics of transformerless supplies that should be kept in mind lack of isolation from the 240 volt AC and limited current capacity. Figure00 illustrates the transformerless power supply diagram used in this application. As it shown in figure00, a 220v VDR (voltage dependent resistor) being and connected between Line and Neutra to protect the circuit from spikes on the AC power line. 1M resister connects in parallel with two capacitors to provide a discharge class for the voltage left on the capacitors when the module is unplugg ed from the wall. The voltage across 1000Mfarad was determine by using two diodes and finally a 5.1V Zener diode to produce a 5V supply for the circuit.Load SwitchThere are two options to control a mains rated thin out, either to use a Triac or a relay. Electrical designers used relays in many different applications because they are adapted for very high power lade and very low power encumbrances also when the main rated load need to be dislocated and finally when the load require a relatively slow toggling rates. A Triac is the best option for switching non isolated medium power loads and they have a rapid switching capability and subsequence they are very suitable for dimming and lamp control. x10 manufacturer used a Triac as a load switch of the x10 units because its medium power switching capacity and about of the home appliances are consumes a medium power. In addition, Triacs are an brassy three-terminal device designed to switch a medium current load and has been used extensively in home appliances such as lamp dimmers and motor speed controllers. The main two terminals M1 and M2 are wired in series with the load figure00. A Triac is, three-terminal device that acts as a high-speed, bidirectional AC switch, two terminals, MT1 and MT2, are wired in series with the load. A small trigger current between MT1 and the gate allow conduction to occur between MT2 and MT1.when the latching occur between M1 and M2, the load current continues to flow even after the gate current is disconnected, as long as the load current exceeds the latching value. Therefore, when the 50Hz AC voltage falls below the latching voltage proficient each zero-crossing, the Triac will automatically switch off. There are two ways to maintain the load current beyond each angiotensin-converting enzyme half cycle of the 50Hz AC supply, either the gate current have to be maintained continuously or the triac have to be retriggered each half-cycle of 50Hz. the advantage of the pulse t rigger is that only lower average current is required. Typically, the trigger pulse duration must be long lavish for the load current in order to reach the latching current.A L4008L6 Triac was selected for X10 module because it has a sensitive gate that the logic level output of the PIC MCU I/O pin will directly control it. Although, the PIC MCU can provide only positive voltages to the gate, the sensitive gate Triac can control the alternative AC current in both directions through the device.A lamp dimmer can be created by including a delay between the time that the trigger current is provided to the Triac from the PIC MCU and the time of each zero-crossing. In other words, TRIACs can be used to control the visible radiation of a light by switching the 50Hz AC power on part-way through each half cycle (Figure 2 and Figure 3). Therefore x10 maker allows the PIC MCU to directly drive the gate of a TRIAC through a current limiting resistor. By controlling the power-line cycle, the P IC MCU can control the average voltage across the lamp, and therefore the brightness . . .(unclear)http//www3.telus.net/Whalco/SDim.htm FTP//ftp.efo.ru/pub/cypress/psoc/capsense/app/TD-AN_LampDimmerAppNote.pdfhttp//www.freescale.com/files/microcontrollers/doc/app_note/AN2839.pdf

No comments:

Post a Comment