

This circuit is a relay driver that is based on a PIC16F84A microcontroller. The board includes four relays so this lets us to control four distinct electrical devices. The controlled device may be a heater, a lamp, a computer or a motor. To use this board in the industrial area, the supply part is designed more attentively. To minimize the effects of the ac line noises, a 1:1 line filter transformer is used.
![]()
The transformer is a 220V to 12V, 50Hz and 3.6VA PCB type transformer. The model seen in the photo is HRDiemen E3814056. Since it is encapsulated, the transformer is isolated from the external effects. A 250V 400mA glass fuse is used to protect the circuit from damage due to excessive current. A high power device which is connected to the same line may form unwanted high amplitude signals while turning on and off. To bypass this signal effects, a variable resistor (varistor) which has a 20mm diameter is paralelly connected to the input.
Another protective component on the AC line is the line filter. It minimizes the noise of the line too. The connection type determines the common or differential mode filtering. The last components in the filtering part are the unpolarized 100nF 630V capacitors. When the frequency increases, the capacitive reactance (Xc) of the capacitor decreases so it has a important role in reducing the high frequency noise effects. To increase the performance, one is connected to the input and the other one is connected to the output of the filtering part.
After the filtering part, a 1A bridge diode is connected to make a full wave rectification. A 2200 uF capacitor then stabilizes the rectified signal. The PIC controller schematic is given in the project file. It contains PIC16F84A microcontroller, NPN transistors, and SPDT type relays. When a relay is energised, it draws about 40mA. As it is seen on the schematic, the relays are connected to the RB0-RB3 pins of the PIC via BC141 transistors. When the transistor gets cut off, a reverse EMF may occur and the transistor may be defected. To overcome this unwanted situation, 1N4007 diodes are connected between the supply and the transistor collectors. There are a few number of resistors in the circuit. They are all radially mounted. Example C and HEX code files are included in the project file. It energizes the next relay after every five seconds.
The components are listed below.
1 x PIC16F84A Microcontroller
1 x 220V/12V 3.6VA (or 3.2VA) PCB Type Transformer (EI 38/13.6)
1 x Line Filter (2x10mH 1:1 Transformer)
4 x 12V Relay (SPDT Type)
4 x BC141 NPN Transistor
5 x 2 Terminal PCB Terminal Block
4 x 1N4007 Diode
1 x 250V Varistor (20mm Diameter)
1 x PCB Fuse Holder
1 x 400mA Fuse
2 x 100nF/630V Unpolarized Capacitor
1 x 220uF/25V Electrolytic Capacitor
1 x 47uF/16V Electrolytic Capacitor
1 x 10uF/16V Electrolytic Capacitor
2 x 330nF/63V Unpolarized Capacitor
1 x 100nF/63V Unpolarized Capacitor
1 x 4MHz Crystal Oscillator
2 x 22pF Capacitor
1 x 18 Pin 2 Way IC Socket
4 x 820 Ohm 1/4W Resistor
1 x 1K 1/4W Resistor
1 x 4.7K 1/4W Resistor
1 x 7805 Voltage Regulator (TO220)
1 x 7812 Voltage Regulator (TO220)
1 x 1A Bridge Diode
Click here to download the schematics, PCB layouts and the code files
Source : www.extremecircuits.net
The adjustment control for the contrast of an LC-Display is typically a 10-k potentiometer. This works fine, provided that the power supply voltage is constant. If this is not the case (for example, with a battery power supply) then the potentiometer has to be repeatedly adjusted. Very awkward, in other words. The circuit described here offers a solution for this problem. The aforementioned potentiometer is intended to maintain a constant current from the contrast connection (usually pin 3 or Vo) to ground. A popular green display with 2x16 characters ‘supplies’ about 200 µA. At a power supply voltage of 5 V there is also an additional current of 500 µA in the potentiometer itself. Not very energy efficient either. Now there is an IC, the LM334, which, with the aid of one resistor, can be made into a constant current source. The circuit presented here ensures that there is a current of 200 µA to ground, independent of the power supply voltage. By substituting a 2.2-k? potentiometer for R1, the current can be adjusted as desired.
Circuit diagram:The value of R1 can be calculated as follows: R1 = 227x10-6 x T / I. Where T is the temperature in Kelvin and I is the current in ampères. In our case this results in:
R1 = 227x10-6 x 293 /
(200x10-6)
R1 = 333R
Note that the current supplied by the LM334 depends on the temperature. This is also true for the current from the display, but it is not strictly necessary to have a linear relationship between these two. Temperature variations of up to 10° will not be a problem however. This circuit results in a power saving of over 25% with an LCD that itself draws a current of 1.2 mA. In a battery powered application this is definitely worth the effort! In addition, the contrast does not need to be adjusted as the battery voltage reduces. When used with LCDs with new technologies such as OLED and PLED it is advisable to carefully test the circuit first to determine if it can be used to adjust the brightness.
Circuit diagram:
Contrast Controller Circuit Diagram For LCDs
The value of R1 can be calculated as follows: R1 = 227x10-6 x T / I. Where T is the temperature in Kelvin and I is the current in ampères. In our case this results in:
Author: Heino Peters - Copyright: Elektor Electronics
Parallax, well known for its successful Basic Stamp IC, has recently introduced the Propeller: a new microcontroller with a certain difference. It packs no less than eight 32-bit processors (referred to as COGs in Propeller jargon) into a single package with only 40 pins. That design takes genuine simultaneous multiprocessing possible, and the sophisticated internal structure of the device makes it relatively easy to implement video and signal-processing applications. The Propeller can be programmed in assembly language or the high-level Spin language. The processor and the programming tools were developed entirely in-house by Parallax, with the hardware being designed from scratch starting at the transistor level.
Circuit diagram:
Programming The Propeller IC Circuit Diagram
The basic idea behind that was to avoid becoming involved in all sorts of patent disputes with other manufacturers. The result is astounding, and for software developers it certainly requires a change in mental gears. As is customary with modern microprocessors, the Propeller has a simple serial programming interface. The developer’s toolkit from Parallax has a modern USB port for that purpose, but a reasonably simple alternative (illustrated here) is also possible for anyone who prefers to work with the familiar RS232 port. Don’t forget that the Propeller works with a 3.3-V supply voltage.
Copyright: Elektor Electronics
It’s entirely logical that low-cost miniature microcontrollers have fewer ‘legs’ than their bigger brothers and sisters – some-times too few. The author has given some consideration to how to economise on pins, making them do the work of several. It occurred that one could exploit the high-impedance feature of a tri-state output. In this way the signal produced by the high-impedance state could be used for example as a CS signal of two ICs or else as a RD/WR signal. All we need are two op-amps or comparators sharing a single operating voltage of 5 V and outputs capable of reaching full Low and High levels in 5-V operation (preferably types with rail-to-rail outputs).
Circuit diagram:
Multitasking Pins Circuit Diagram
Suitable examples to use are the LM393 or LM311. The resistances in the voltage dividers in this circuit are uniformly 10k. Consequently input A lies at half the operating voltage (2.5V), assuming nothing is connected to the input - or the microcontroller pin connected is at high impedance. The non-inverting input of IC1A lies at two-thirds and the inverting input of IC1B at one third of the operating voltage, so that in both cases the outputs are set at High state. If the microcontroller pin at input A becomes Low, the output of IC1B becomes Low and that of IC1A goes High. If A is High, everything is reversed.
Author : Roland Plisch - Copyright: Elektor Electronics 2008
Consumer appliances these days hardly ever have a proper mains switch. Instead, appliances are turned on and off at the touch of a button on the remote control, just like any other function. This circuit shows how a device (as long as it does not draw too high a current) can be switched on and off using a pushbutton. The approach requires that a microcontroller is already available in the circuit, and a spare input port pin and a spare output port pin are required, along with a little software. When power is applied T1 initially remains turned off. When the button is pressed the gate of T1 is taken to ground and the p-channel power MOSFET conducts. The microcontroller circuit is now supplied with power. Within a short period the microcontroller must take output PB1 high. This turns on n-channel MOSFET T1 which in turn keeps T1 turned on after the push-button is released.
Now the microcontroller must poll the state of the push-button on its input port (PB0) at regular intervals. Immediately after switch-on it will detect that the button is pressed (a low level on the input port pin), and it must wait for the button to be released. When the button is next pressed the device must switch itself of f: to do this the firmware running in the microcontroller must set the output port pin to a low level. When the button is subsequently released T1 will now turn off and the supply voltage will be removed from the circuit.
The circuit itself draws no current in the off state, and for (rechargeable) battery-powered appliances it is therefore best to put the switch before the voltage regulator. For mains-powered devices the switch can also be fitted before the voltage regulator (after the rectifier and smoothing capacitor). Since there is no mains switch there will still be a small standby current draw in this case due to the transformer. Be careful not to exceed the maximum gate-source voltage specification for T1: the IRFD9024 device suggested can withstand up to 20 V. At lower voltages R2 can be replaced by a wire link; otherwise suitable values for the voltage divider formed by R1 and R2 must be selected.
Circuit diagram:
The Gentle Touch Circuit Diagram
The author has set up a small website for this project at http://reweb.fh-weingarten.de/elektor, which gives source code examples (which include dealing with pushbutton contact bounce) for AVR microcontrollers suitable for use with AVR Studio and GNU C. Downloads are also available at http://www.elektor.com.
Rainer Reusch - Elektor Electronics 2008
It’s entirely logical that low-cost miniature microcontrollers have fewer ‘legs’ than their bigger brothers and sisters – sometimes too few. The author has given some consideration to how to economise on pins, making them do the work of several. It occurred that one could exploit the high impedance feature of a tri-state output. In this way the signal produced by the high impedance state could be used for example as a CS signal of two ICs or else as a RD/ WR signal.
Circuit diagram:
Multitasking Pins Circuit Diagram
All we need are two op-amps or comparators sharing a single operating voltage of 5 V and outputs capable of reaching full Low and High levels in 5-V operation (preferably types with rail-to-rail outputs). Suitable examples to use are the LM393 or LM311.The resistances in the voltage dividers in this circuit are uniformly 10 kilo ohms. Consequently input A lies at half the operating voltage (2.5 V), assuming nothing is connected to the input – or the microcontroller pin connected is at high impedance. The non-inverting input of IC1A lies at two thirds and the inverting input of IC1B at one third of the operating voltage, so that in both cases the outputs are set at High state. If the microcontroller pin at input A becomes Low, the output of IC1B becomes Low and that of IC1A goes High. If A is High, everything is reversed.
Author : Roland Plisch Copyright: Elektor Electronics 2008
This simple programmer will accept any device that's supported by software (eg, IC-Prog 1.05 by Bonny Gijzen at www.ic-prog.com). The circuit is based in part on the ISP header described in the SILICON CHIP "PIC Testbed" project but also features an external programming voltage supply for laptops and for other situations where the voltage present on the RS232 port is insufficient. This is done using 3-terminal regulators REG1 & REG2. The PIC to be programmed can be mounted on a protoboard. This makes complex socket wiring to support multiple devices unnecessary. 16F84A, 12C509, 16C765 and other devices have all been used successfully with this device.
Circuit diagram:
Simple Universal PIC Programmer Circuit Diagram
Author: Luke Weston - Copyright: Silicon Chip