Timer_or_Counter_Programming
Timer_or_Counter_Programming. Download Free
Programming_of_8051
Programming_of_8051. Download Free
IO_Port_Programming
IO_Port_Programming. Download Free
8051_Programming_in_C
8051_Programming_in_C. Download Free
7_segment
7_segment. Download Free
Project 4 U
All Project are available electrical, electronics, Microcntroller based... and many more books, and paper..
Thursday, 22 December 2011
Wednesday, 21 December 2011
PIC Controlled Relay Driver
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.
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
On-off Infrared Remote Control
Most homes today have at least a few infrared remote controls, whether they be for the television, the video recorder, the stereo, etc. Despite that fact, who among us has not cursed the light that remained lit after we just sat down in a comfortable chair to watch a good film? This project proposes to solve that problem thanks to its original approach. In fact, it is for a common on/off switch for infrared remote controls, but what differentiates it from the commercial products is the fact that it is capable of working with any remote control.
Therefore, the first one you find allows you to turn off the light and enjoy your movie in the best possible conditions. The infrared receiver part of our project is entrusted to an integrated receiver (Sony SBX 1620-52) which has the advantage of costing less than the components required to make the same function. After being inverted by T1, the pulses delivered by this receiver trigger IC2a, which is nothing other than a D flip-flop configured in monostable mode by feeding back its output Q on its reset input via R4 and C3. The pulse that is produced on the output Q of IC.2A makes IC.2B change state, which has the effect of turning on or turning off the LED contained in IC3.
This circuit is an opto triac with zero-crossing detection which allows our setup to accomplish switching without noise. It actually triggers the triac T2 in the anode where the load to be controlled is found. The selected model allows us to switch up to 3 amperes but nothing should stop you from using a more powerful triac if this model turns out to be insufficient for your use. In order to reduce its size and total cost, the circuit is powered directly from the mains using capacitor C5 which must be a class X or X2 model rated at 230 volts AC.
This type of capacitor, called ‘self-healing’, is the only type we should use today for power supplies that are connected to ground. ‘Traditional’ capacitors, rated at 400 volts, do not really have sufficient safety guarantees in this area. Considering the fact that the setup is connected directly to the mains, it must be mounted in a completely insulated housing. A power outlet model works very well and can easily be used to inter-space between the grounded wall outlet and that of the remote control device.
Based on this principle, this setup reacts to any infrared signal and, as we said before, this makes it compatible with any remote control. On the other hand, it has a small disadvantage which is that sometimes it might react to the ‘normal’ utilization of one of these, which could be undesirable. To avoid that, we advise you to mask the infrared receiver window as much as possible so that it is necessary to point the remote control in its direction in order to activate it.
Therefore, the first one you find allows you to turn off the light and enjoy your movie in the best possible conditions. The infrared receiver part of our project is entrusted to an integrated receiver (Sony SBX 1620-52) which has the advantage of costing less than the components required to make the same function. After being inverted by T1, the pulses delivered by this receiver trigger IC2a, which is nothing other than a D flip-flop configured in monostable mode by feeding back its output Q on its reset input via R4 and C3. The pulse that is produced on the output Q of IC.2A makes IC.2B change state, which has the effect of turning on or turning off the LED contained in IC3.
This circuit is an opto triac with zero-crossing detection which allows our setup to accomplish switching without noise. It actually triggers the triac T2 in the anode where the load to be controlled is found. The selected model allows us to switch up to 3 amperes but nothing should stop you from using a more powerful triac if this model turns out to be insufficient for your use. In order to reduce its size and total cost, the circuit is powered directly from the mains using capacitor C5 which must be a class X or X2 model rated at 230 volts AC.
This type of capacitor, called ‘self-healing’, is the only type we should use today for power supplies that are connected to ground. ‘Traditional’ capacitors, rated at 400 volts, do not really have sufficient safety guarantees in this area. Considering the fact that the setup is connected directly to the mains, it must be mounted in a completely insulated housing. A power outlet model works very well and can easily be used to inter-space between the grounded wall outlet and that of the remote control device.
Based on this principle, this setup reacts to any infrared signal and, as we said before, this makes it compatible with any remote control. On the other hand, it has a small disadvantage which is that sometimes it might react to the ‘normal’ utilization of one of these, which could be undesirable. To avoid that, we advise you to mask the infrared receiver window as much as possible so that it is necessary to point the remote control in its direction in order to activate it.
How to measure dc current with a microcontroller?
Microcontrollers usually don’t have specific ports for measuring currents, but they do have ADC channels through which you can measure analog voltages of a certain range. This means a dc current can be indirectly measured by a microcontroller’s ADC channel by first converting the current into voltage. The simplest way of doing this is to place a resistance in series with the current path and measure the voltage drop across it. But hold on, if you place an additional resistance in the circuit, it will affect the original current. Therefore, we need to use a very small value resistance so that it’s effect in the circuit current won’t be significant.
Resistors with values less than 1 Ω are available in electronics stores. Depending upon the amount of current in the circuit, you need to choose proper power rating for the resistor. Suppose, if you pick 0.47 Ω, and the maximum current in the circuit is about 2 A, then the resistor should have the capacity of dissipating 4 x 0.47 ≈ 2 Watts of heat.
You can also make a small value resistance by yourself. Yes, by simply winding a copper wire into coil. I have made one from a 5 ft long solid copper wire (22 AWG) with plastic insulation on outer side, as shown below.
Now lets measure its resistance. The resistance can be measured directly with a digital multimeter. My digital meter shows its value equal to 0.3 Ω. This measurement may have higher uncertainty as it is very small and most multimeter does not show values beyond 1 decimal digit. The resistance can also be measured using Ohm’s law. Connect a 47 Ω resistor in series with the coil resistance (Rs) and supply a 5V power as shown below. Next, measure the voltage across Rs and current through it separately using the multimeter. In my case, I found the measured voltage and current values to be 24.1 mV and 84.3 mA, respectively. This gives the resistance of the coil is about 0.286 Ω.
Now, suppose that the range of current to be measured using this coil resistance is from 0-2 A. Then the voltage drop across the coil resistance will be somewhere from 0 – 0.57 V. Because of its low dynamic range, this voltage signal may not be accurately measured with a microcontroller’s ADC module. So this requires some sort of voltage scaling.
Rs is the low value current sensing resistor (our coil resistor) which is connected in series with the load resistor. Our objective is to derive the load current (I). The low voltage drop across Rs is amplified by the non-inverting amplifier. The gain of the amplifier is set by Rf and Ri resistors. For Rf = 10 K, and Ri = 1.3 K, the gain of the amplifier would be about 8.7. This is enough to linearly scale Vs (0-0.57 V) to Vo (0- ≈5 V). Now you have 0-5 V voltage signal that corresponds to 0-2 A current through Rs. This voltage signal is now more appropriate for ADC conversion with Vref = 5 V.
Vo = 8.7 x I x Rs = 2.49I (Rs = 0.286 Ω)
=> I = Vo/2.49.
For 10-bit ADC with Vref = 5 V, resolution = 5/1024 = 0.0049 V. For input signal Vo, the ADC O/P will be Vo x 0.0049. Thus,
I = ADC O/P x 0.0049/2.49 = 0.00197 x ADC O/P
The current resolution would be therefore 0.00197 A (≈ 2 mA).
1.5 - 35 Volt DC Regulated Power Supply
Here is the circuit diagram of regulated power supply. It is a small power supply that provides a regulated voltage, adjustable between 1.5 and 35 volts at 1 ampere. This circuit is ready to use, you just need to add a suitable transformer. This circuit is thermal overload protected because the current limiter and thermal overload protection are included in the IC.
Technical Specifications
- Input Voltage = 40Vdc max Transformer
- Output Voltage = 1.5V to 35Vdc
- Output Current = 1.5 Amps max.
- Power Dissipation = 15W max (cooled)
Parts:
IC = LM317
P1 = 4.7K
R1 = 120R
C1 = 100nF - 63V
C2 = 1uF - 35V
C3 = 10uF - 35V
C4 = 2200uF - 35V
D1-D4 = 1N4007
IC = LM317
P1 = 4.7K
R1 = 120R
C1 = 100nF - 63V
C2 = 1uF - 35V
C3 = 10uF - 35V
C4 = 2200uF - 35V
D1-D4 = 1N4007
Features:
- Just add a suitable transformer (see table)
- Great to power your projects and save money on batteries
- Suitable as an adjustable power supply for experiments
- Control DC motors, low voltage light bulbs, …
Specifications :
- Preset any voltage between 1.5 and 35V
- Very low ripple (80dB rejection)
- Short-circuit, thermal and overload protection
- Max input voltage : 28VAC or 40VDC
- Max dissipation : 15W (with heatsink)
- Dimensions : 52x52mm (2.1” x 2.1”)
Note:
- It has not to be cooled if used for small powers. 28 Volt AC max is allowed for the input voltage.
Subscribe to:
Posts (Atom)


