Posts

Showing posts with the label PIC16F877A

Smart Voltage Stabilizer Using PIC16F877A

Image
Voltage stabilizers are used for  many appliances in homes,  offices and industries. The  mains supply suffers from large voltage  drops due to losses on the distribution  lines en route. A voltage stabilizer  maintains the voltage to the appliance  at the nominal value of around 220  volts even if the input mains fluctuates  over a wide range. Here is the circuit of an automatic  voltage stabilizer that can be adapted  to any power rating. Its intelligence  lies in the program on PIC16F877A—a  low-cost microcontroller that is readily  available. The circuit, when used with  any appliance, will maintain the voltage  at around 220V even if the input  mains voltage varies between 180V  and 250V. Here the circuit is shown for a  5A stabilizer. It acts within 100ms to  produce a smoothly varying output  whenever input mains voltage changes.  (Servo stabilizers move a variable...

Zero crossing detection with PIC16F877A

Image
Zero crossing detection is very important, especially in power control circuits employing thyristors. I have come across many people struggling with zero crossing detection with PIC microcontroller and thus they cannot fire triacs or SCRs as required. So, here I have explained a simple method of detecting zero crossing with PIC16F877A, employing only two or three resistors, a bridge rectifier and an optocoupler for the hardware portion of zero cross detection.  The PIC 16F877A detects the zero crossing using the RB0/INT external interrupt function. I have explained how the zero cross is detected and how the PIC acts upon detection, below.   Fig. 1 - Schematic, zero crossing signal and RD0 signals --------------------------------------------------------------------------------------------------------- Here is the code for PIC16F877A: (You can download the source file from https://rapidshare.com/files/604474700/ZeroCrossing.c ) -------------------------------------------------...