Tuesday, June 4, 2019

The Zero Crossing Detector Engineering Essay

The Zero Crossing sensor Engineering EssayThe X 10 transmitter sends data beatd with the zero crossing of the berth line, thus each unit needs to choose a built-in zero crossing detectors. Mainly, the X10 manufactures ar using celluloid16F8XXX family to detect zero crossing by applying the external interrupt on the RB0 pivot, which links to the power line by dint of 5M resistance (to limit the watercourse into the PICmicro) as it is shown in the figure 00.The PICmicro has a fortress diodes which ar designed to clamp any voltage steeper than VDD or lower than VSS. Thus, when a negative half cycle of the AC voltage is applied, the RB0 fall clamps the voltage to VSS 0.5V, this can be interpreted as a logic-0. At the same time, as the AC voltage rises to or over VDD, the logical apprize volition become logic-1. RB-0 is configured for external interrupts, whereas the input buffer is a Schmitt trigger. in that respectfore, the input threshold (0.2 VDD = 1V) on the falling edge and (0.8 VDD = 4V) on a travel edge. So there is an interrupt occurs on every zero crossing.The following equation is used to calculate the RB0 pin state which will change in relative to the zero crossingV = Vpk*sin(2**f*t), where Vpk = 320Vand f = 50 HzOn the rising edge, RB0 can go advanced about 64 s after the zero-crossing. However, on the falling edge, it can go low about 16 s before the zero-crossing. great hundred kc Carrier beginningX-10 transmitters use 1msec bursts of a 120 kHz to send information over 50 Hz power lines. Different techniques could be used in effect to generate 120 kHz, however, in x10 units are mainly use one of the PICmicro MCUs CCP facultys as it is shown in the figure100. The CCP (Capture/Compare/PWM) module of PIC 16F67xA is used in PWM trend to produce a 120 kHz square-wave with a half duty cycle of (50% of the duty cycle). In order to generate the postman frequency of 120 kHz, the system oscillator capacity was chosen to be 7.680 MHz,W here the frequency of the PWM is the inverse of the period (1/period)And since one instruction is taking four oscillation periods we come up with the destination of 4ToscMain oscillator is 7.680MHz, Tosc = 1/7.680MHzPWM period = 1/120 kHz = 8.333sPWM period = (PR2) + 1 * 4 * Tosc * (TMR2 prescale encourage)= (0) + 1 * 4 * 1/7.680MHz * (16) = 8.333sAfter initialization, the CCP (Capture/Compare/PWM) is continuously enabled, and the register TRISC bit is used to gate On and Off the PWM output. By sitting the TRISC bit = 1, then the pin is an input and the 120 kHz prognosticate is blocked and not accessible to the pin, other than When the TRISC bit = 0, the pin becomes an output and the 120 kHz betoken is free and coupled to the AC power line. in the first place the 120 kHz coupled to the powerline, it will pass through 200 resistance, a transistor amplifier and high pass filter as depicted in the Figure 5.Since the immunity of a capacitor 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 filter is fair to middling to 0.1 F which presents low impedance to the 120 kHz carrier frequency, but with 50 Hz power line frequency it will present high impedance. Therefore high pass filter will safely couple the 120 kHz signal to the 50 Hz power line. Finally, the 12 kHz signal should well match with the synchronize of zero crossing with maximum delay 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 detector = 64 s300 s 64 s = 236 sThus the microcode must begin the transmission of the 120 kHz envelope with maximum time of 236 s after detection of the zero-crossing to.120 kHz 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? con tains three blocks placed between the PIC and the power line and subsequence the 120 kHz carrier will deep through all of them to reached RC pin of the PIC. The first block from the power line side is the decoupling capacitor which contains e a 0.1 capacitor in parallel with 1M resistance. The neighboring 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 is 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 a nd 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 whole 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 completely attenuated, at the same time as the 120 kHz signal is passed through the filter to the amplifier point in times. The signals are inter the amplifier stage with a value between ten millivolts to a few hundred millivolts. The module must amplify the carrier to certain limit and converted to a logic direct signal that the PIC can detect. The amplification, however, must be carefully selected in order to prevent the signal will pass through the fi rst stage which is the tuned amplifier stage where the 120 kHz signal is amplified by using a serial of 4069UB inverters to configure as high gain amplifiers. The tuned amplifiers operate with peak reply at 120 kHz at the first two stages while the next two stages are untuned amplifier but give 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 stream 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 un its 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 path for the voltage left on the capacitors when the module is unplugged from the wall. The voltage across 1000Mfarad was rectified 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 load, either to use a Triac or a relay. Electrical designers used relays in many different applicat ions because they are suitable for very high power loads and very low power loads also when the main rated load need to be apart(p) and finally when the load require a relatively slow toggling rates. A Triac is the best option for flicking non isolated medium power loads and they have a rapid throwing 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 most of the home appliances are consumes a medium power. In addition, Triacs are an inexpensive 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 fall down 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 right each zero-crossing, the Triac will automatically switch off. There are two ways to maintain the load current beyond each single 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 neural impulse trigger is that only lower average current is required. Typically, the trigger pulse duration must be long enough 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 brightness 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 PIC MCU can control the average voltage across the lamp, and therefore the brightness . . .(unclear)http//www3.telus.net/Whalco/SDim.htmftp//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

Note: Only a member of this blog may post a comment.