

Sometimes, an input signal needs to be electrically isolated from the microcontroller input to protect it from high voltages and electrical noise, which are often found in industrial environments. The current is calculated from the average of a half-wave rectified sinusoidal waveform, hence the required value of the current limiting resistor. supply, since it acts as a rectifier diode. The LED can just as easily be used to indicate an active a.c. The PIC output can sink or source a maximum current of about 25 mA, so LEDs can be connected directly to the outputs. Low-power or high-efficiency LEDs can use a higher value, thus saving power. So if the supply is 5V, the resistor value required is 200 Ω. We can use a simple formula to estimate the resistor value required:

A typical indicator LED requires a forward current of about 15 mA to light up and produces a forward volt drop of about 2V (depending on the LED type). The only other component required is a current limiting resistor, which is calculated according to the supply voltage. The basic LED output circuit is very simple ( Figure 1.6). Robinson and Kormilo (1984) include a more comprehensive description of this system. At Baindoang village these four loads were located within a large steel drum and provided a constant supply of hot water to two communal showers. Complicated, and therefore potentially troublesome, timing circuits are no longer necessary. A further advantage of this control system is the absence of any synchronisation between the input and output signals. An interesting feature of this system is the absence of A/D and D/A convertors. The spikes normally associated with thyristor switching are therefore nearly eliminated. Natural commutation ensures that all load switching is done near the zero crossing of the voltage waveform. The third light emitting diode is merely an indicator showing which loads are on at any particular time. The back to back thyristors are then switched on by natural commutation. Two of these diodes activate triacs in the gate circuits of the power thyristors. This is inverted by the 7416 open collector inverter causing a current to flow from the dc supply through the light-emitting diodes to earth. To switch this load on the microprocessor output must go high, i.e. An output pin of the microprocessor is connected directly to the input of this circuit. Details of a single output circuit are given in Fig.3.
