
Wednesday, 15 March 2017
Adjustable Voltage Current Power Supply Circuit Using IC L200
IC2 is connected as a differential amplifier and compares the signals at its two inputs.
Referring to the circuit diagram: the input comprises a mains switch, fuse, transformer, bridge rectifier and smoothing capacitor (C2).
The difference between the inputs is the voltage drop across 'current’ sensor R4. This IC feeds the current sensing input (pin 2) of the L200.
P1 in the feedback loop of the 741 is used to vary the output current of the circuit. IC1 must be mounted on a suitable heat sink as it dissipates nearly all the power of the circuit.
The reference level output from I pin 4 of IC1 goes to the voltage divider made up of R5 and P2 (this pot sets the value of the output voltage).
The power supply can quite easily be built into a case and a voltmeter and ammeter mounted on the front panel. ln view of the accuracy of the circuit these should ideally be digital meters, but virtually any type will do.
If you compare the expense and the rating of this power supply you will get a surprise, because the output voltage and current are fully adjustable between O. . . 18 V and 0 . . . 1.8 A respectively and costs have still been kept very reasonable.
Diode D5 and capacitor C1 produce a negative auxiliary voltage, which is stabilized by zener diode D6 and capacitor C4.
All this is necessary to enable the output voltage to be adjusted down to zero volts. During the construction of this part of the circuit bear in mind that the positive lead of electrolytic capacitor C4 is connected to earth! Regulation is provided by IC1 and IC2. Capacitor C3 suppresses any residual transients at the input of lC1 and it should therefore be connected as closely as possible to IC1 similarly C4 and IC2).
The negative voltage provides the negative supply for the two ICs.

Saturday, 11 March 2017
Thursday, 9 March 2017
Solar Lamp using the PR4403
Friday, 24 February 2017
Using IFR Voltage Regulator Circuit Diagram
Using IFR Voltage Regulator Circuit Diagram

This voltage regulator circuit uses a MOSFET is
IRF4905 (Vdss =-55V, RDS (on) = 0.02ohm, Id =-74A),
but any other can be tested.
Thursday, 16 February 2017
Simple LED flasher circuit using NE555 timer IC
- R1, R2, C1 and the supply voltage determine the flash rate. Using a regulated power supply will do much to insure a stable flash rate. For a variable flash rate, replace R1 with a 1 megohm pot in series with a 22k resistor.
- The duty cycle of the circuit (the percentage of the time LED 1 is on to the time it is off during each cycle) is deterimed by the ratio of R1 to R2. If the value of R1 is low in relationship to R2, the duty cycle will be near 50 percent. If you use both LEDs, you will probably want a 50 percent duty cycle. On the other hand, if R2 is low compared to R1, the duty cycle will be less than 50 percent. This is useful to conserve battery life, or to produce a strobe type effect, when only LED1 is used.
- The NE555 timer chip can be damaged by reverse polarity voltage being applied to it. You can make the circuit goof proof by placing a diode in series with one of the supply leads.
- The purpose of R3 and R4 is to limit current through the LEDs to the maximum they can handle (usually 20 milliamps). You should select the value of these according to the supply voltage. 470 ohms works well with a supply voltage of 9-12 volts. You will need to reduce the value for lower supply voltages.
- Rainbow Kits offers several kits to build the above circuit. You can also order these kits from RadioShack.com. The Radio Shack catalog numbers (and web pages) are as follows: standard kit with two 5mm red LEDs, (990-0067), kit with two red, two green and two yellow 3mm LEDs, (990-0063), kit with jumbo green LEDs, (990-0048), kit with jumbo red LEDs, (990-0049). You can also buy all the parts to build the circuit at your local Radio Shack store, including a circuit board (276-159B).
Monday, 13 February 2017
Sine Wave Generation without ECCP Using single CCP Module of PIC16F877A
I had previously shown how to generate sinusoidal pulse width modulation (SPWM) signals using the ECCP module in a PIC for generating a sine wave output for use in DC-AC inverter. I have had requests from people asking how to generate the same SPWM signals with other microcontrollers that don't have the ECCP module, such as the super popular PIC16F877A.
So, here I talk about how to generate the same SPWM signals using just one CCP module as can be commonly found on so many microcontrollers. This allows much greater flexibility in microcontroller selection.
You should go through the other articles related to generating SPWM with the ECCP module (if you haven't already gone through them, that is) to get an idea of what I'm talking about regarding sine wave generation with the ECCP module and about sine wave generation in general, really:
- Generation and Implementation of Sine Wave Table
- Smart Sine - Software to generate sine table
- Generation of sine wave using SPWM in PIC16F684
- 600W 50Hz sine wave inverter test circuit
- Feedback in sine wave inverter (PIC16F series based)
- Demystifying The Use of Table Pointer in SPWM - Application in Sine Wave Inverter
The code I had previously used (utilizing the ECCP module) is:
//----------------------------------------------------------------------------------------
//Programmer: Syed Tahmid Mahbub
//Target Microcontroller: PIC16F684
//Compiler: mikroC PRO for PIC (Can easily port to any other compiler)
//-----------------------------------------------------------------------------------------
unsigned char sin_table[32]={0,25,49,73,96,118,137,
159,177,193,208,220,231,239,245,249,250,249,245,
239,231,220,208,193,177,159,137,118,96,73,49,25};
unsigned int TBL_POINTER_NEW, TBL_POINTER_OLD, TBL_POINTER_SHIFT, SET_FREQ;
unsigned int TBL_temp;
unsigned char DUTY_CYCLE;
void interrupt(){
if (TMR2IF_bit == 1){
TBL_POINTER_NEW = TBL_POINTER_OLD + SET_FREQ;
if (TBL_POINTER_NEW < TBL_POINTER_OLD){
CCP1CON.P1M1 = ~CCP1CON.P1M1; //Reverse direction of full-bridge
}
TBL_POINTER_SHIFT = TBL_POINTER_NEW >> 11;
DUTY_CYCLE = TBL_POINTER_SHIFT;
CCPR1L = sin_table[DUTY_CYCLE];
TBL_POINTER_OLD = TBL_POINTER_NEW;
TMR2IF_bit = 0;
}
}
void main() {
SET_FREQ = 410;
TBL_POINTER_SHIFT = 0;
TBL_POINTER_NEW = 0;
TBL_POINTER_OLD = 0;
DUTY_CYCLE = 0;
ANSEL = 0; //Disable ADC
CMCON0 = 7; //Disable Comparator
PR2 = 249;
TRISC = 0x3F;
CCP1CON = 0x4C;
TMR2IF_bit = 0;
T2CON = 4; //TMR2 on, prescaler and postscaler 1:1
while (TMR2IF_bit == 0);
TMR2IF_bit = 0;
TRISC = 0;
TMR2IE_bit = 1;
GIE_bit = 1;
PEIE_bit = 1;
while(1);
}
//-------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
//Programmer: Syed Tahmid Mahbub
//Target Microcontroller: PIC16F877A
//Compiler: mikroC PRO for PIC (Can easily port to any other compiler)
//-----------------------------------------------------------------------------------------
Now let's talk about the changes I've made in order to be able to use a single CCP module instead of the ECCP module.
When the ECCP module is used, it generates the SPWM signals and sends the modulation signals to the required "MOSFETs" (of course there's a drive circuit in between) depending on the "direction" as dictated by CCP1CON.P1M1 (bit 7 of CCP1CON register). Since this bit does not exist in the CCP module (obviously, since it's "uni-directional"), this functionality must be achieved in software. Since we don't have the ECCP module and have chosen to use a single CCP module only, the 4 drive signals come from other pins not associated to the PWM module. I've chosen PORTD bits 0 to 3. Of course, you can select any other 4 pins.
This is the circuit diagram of the SPWM signal generation portion:


The SPWM generation is done by the single CCP module and which MOSFETs to send the signals to is set by the "Direction" bit and the hardware trick employing the AND gate. When "Direction" is equal to 0, the high side MOSFET A is kept on for 10ms during which time the SPWM signals on CCP1 output (RC2) are sent to low side MOSFET D by sending a "1" to RD3, which, with the help of the AND gate "diverts" the CCP1 signal to the low side MOSFET D (see Fig. 1 above). The same thing is achieved when "Direction" is equal to 1, just with high side MOSFET C and low side MOSFET B. When MOSFETs A and D are operated, MOSFETs B and C are kept off and vice versa. The MOSFETs are first turned off before the other two are turned on, as can be seen in the code block:
To understand how the timing and the table pointer operation work, go through this:
Demystifying The Use of Table Pointer in SPWM - Application in Sine Wave Inverter
I've modified the sine table to increase the deadtime. Notice how there's a 0 at both the start and the end. This achieves the additional deadtime. See Fig. 4 below. I did this by using my software "Smart Sine" to generate a sine table with 31 values and then adding a 0 at the end.
Besides that, the other functionality are the same - the PWM initialization and setting, the table and table pointer are used the same way as before. So make sure you go through this tutorial if you aren't completely clear regarding it:
Demystifying The Use of Table Pointer in SPWM - Application in Sine Wave Inverter
For the MOSFET drivers, you require high/low side MOSFET drivers. One of the most popular such driver is the IR2110. For a thorough tutorial on using the IR2110, go through this tutorial:
http://www.blogspot.com/2016/01/using-high-low-side-driver-ir2110-with.html
Here are the simulation results:




The operation is quite simple to understand. The trick lies in a simple software modification and the use of the external AND gates. It's quite simple really! All we've needed are 5 IO pins from the PIC16F877A leaving all the other IO pins unused - for use for so many other tasks you can carry out. Observe how the main function in the code is not doing anything and all is done in the interrupt. Notice the empty endless while(1) loop where you can carry out any other required task.
I hope you've understood how to generate SPWM signals using just the single CCP module of a microcontroller and can now use it for all your applications! Keep in mind that this isn't restricted to only PICs but can be used for any microcontroller containing one PWM module. Let me know your feedback and comments.
Thursday, 9 February 2017
Contact less IR tachometer using PIC16F628A
![]() |
| Contact less IR tachometer using PIC16F628A |
![]() |
| Snapshot of IR tachometer |
Sunday, 5 February 2017
Electronic Project Wind Charger Using LTC1042
Wind Charger Circuit Diagram:

As you can see in the circuit diagram, you will need an 12 volts generator, a dc motor can be used ( the output voltage is proportional to its rpm).
As you can see in the circuit diagram, are connected two batteries: a 4.5 volts Ni-Cd and a 12 volts Lead Acid battery. If generator voltage output is below 13.8V, the control circuit is active and the NiCad battery is charging through the LM334 current source (the lead acid battery is not being charged).
If the generator voltage output is between 13.8V and 15.1V, the 12V lead acid battery is being charged at about a 1A/hour rate (limited by the power FET). If generator voltage exceeds 15.1V (a condition caused by excessive wind speed or 12V battery being fully charged) then a fixed load is connected thus limiting the generator RPM to prevent damage.
Saturday, 4 February 2017
Auto Burglar Alarm Using 555 Timer ICs
Auto Burglar Alarm Circuit Diagram:

To set the alarm, open S2 (it is normally closed ) this will give you about 5 seconds to get out and close the door. The exit delay time is set by R1 and C1. If anyone opens the doors for more than two seconds the horn will sound until power is removed from the circuit. The 2 second time is set by R2 and C2. If you open the door, you must deactivate the alarm by closing S2.
Wednesday, 18 January 2017
Automatic Night Light using LDR
3) 22 Kilo ohm resistor
5) 15 Kilo ohm Light Dependent Resistor (LDR)
6) 3904 NPN Transistor
Procedure:
- Connect the circuit as shown in the circuit diagram below.
- During day time the brightness will be more, which lowers the resistance of the LDR.
- Therefore the current is grounded, as current prefers only low resistance path.
- Hence there is no base current to forward bias the 3904 NPN transistor and the LED remains OFF.
- During night time the brightness goes down, which increases the resistance of the LDR.
- Therefore the current will not be grounded and prefers a alternate path to flow.
- Hence there is enough base current to forward bias the 3904 NPN Transistor and the LED glows.

Figure 1: Automatic Night Light using LDR Circuit simulation made in Multisim

Sunday, 15 January 2017
Build a Simple Home Alarm Circuit Using 555 ICs
Simple Home Alarm Circuit Diagram

The 74C14 contains 6 Schmitt Trigger gates and 4 of these gates (Schmitt Inverters) are used in this circuit.
The circuit consists of a number of "building blocks" and the first consists of two transistors in a very clever "bootstrap" arrangement. The first transistor is turned on via the 3M3 and 47k. The second transistor is not turned on and the output is HIGH.
A small signal from the electret microphone will consist of positive and negative excursions and the negative excursion will turn the first transistor OFF. This will turn the second transistor ON and the left lead of the 100n will be pulled towards the 0v rail. The 100n is uncharged and the right lead will also be pulled towards the 0v rail and the input of the 74C14 will see a LOW. This will make the output HIGH and turn on the BC547 transistor.
When the second transistor turns ON, it also pulls the 2u2 down and this removes the "turn-on" voltage to the first transistor. The two transistors remain in this state for a few seconds while the 2u2 discharges and the voltage on the base of the first transistor rises. When this happens, the two transistors change state and the 2u2 charges. When the circuit is waiting to detect audio, the 2u2 is charged via the 47k on the base of the first transistor and 47k collector resistor of the second transistor (plus the base-emitter voltage drop of the first transistor).
Simple Home Alarm Circuit Diagram A

To exit the property, the EXIT button is pressed and this puts a HIGH on pin 1 of the IC so that any signal from the electret mic is not passed to the siren. The EXIT delay is determined by the value of the 100u and 2M2. Normally-open and normally-closed switches will also send a LOW to trigger the siren.
Saturday, 7 January 2017
Using the high low side driver IR2110 explanation and plenty of example circuits



Now let's talk about the different pins.








--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
http://www.irf.com/technical-info/appnotes/an-978.pdf
Wednesday, 4 January 2017
Inverter as High Voltage Low Current Source Using by 555 timer
Inverter as High Voltage Low Current Source Circuit Diagram:

The 555 timer IC is used in its multivibrator mode, the frequency adjusted to optimize the transformer characteristics. When the output of the IC is high, current flows through the limiting resistor, the primary coil to charge C3. When the output is low, the current is reversed With a suitable choice of frequency and C3, a good symmetric output is sustained.
Tuesday, 20 December 2016
Light Level Indicator Using a Window Comparator
Light Level Indicator Circuit Diagram

The proto board picture below shows the circuit wired to measure lightlevel using a LDR and 2K potentiometer. The green (window) LED is litindicating the light level is about right to take the picture.

Sunday, 18 December 2016
Sooper Amplifier Using BEL1895 I C

BEL1895 I.C (DIP8),
C1 = 470uF/10V,
C2 = 1000uF/16V,
C3 = 220uF/10V,
C4 = 100uF/10V,
C5 = 4.7uF/10V,
C6 = 47pF,
C7,C8 = 1uF,
R1 = 47Ohm,
R2 = 470Ohm,
R3 = 100K,
R4 = 1Ohm,
R5 = 10K V/C,
speaker, etc…
Total cost is around 20-30 rupeess(INR) or 0.6USD.
Friday, 16 December 2016
Stepper Motor Controller Using by A3952S
A3952S Stepper Motor Controller Circuit diagram

As you can see in the schematic diagram , this stepper motor driver circuit require two A3952S circuits and other few additional electronic components.
Thursday, 8 December 2016
Voltage Inverter using IC NE555
The NE555 is configured as an astable multivibrator and produces a rectangular wave at its output, with variable mark-space ratio and variable frequency. This results in timing capacitor C3 (see circuit diagram) being alternately charged and discharged; the voltage at pin 2 (THR) of the NE555 swings between one-third of the supply voltage and two-thirds of the supply voltage.
Voltage Inverter Circuit Using IC NE555
The output of the NE555 is connected to two voltage inverters. The first inverter comprises C1, C2, D1 and D2. These components convert the rectangular wave signal into a nega-tive DC level at the upper pin of K2. The second inverter, comprising C4, C5, D3 and D4, is also driven from the output of IC1, but uses the negative output voltage present on diode D3 as its reference potential. The consequence is that at the lower pin of output connector K2 we obtain a negative volt-age double that on the upper pin.
Now let us look at the voltage feedback arrangement, which lets us adjust this doubled negative output voltage down to the level we want. The NE555 has a control voltage input on pin 5 (CV). Normally the voltage level on this pin is maintained at two-thirds of the supply voltage by internal circuitry. The voltage provides a reference for one of the comparators inside the device. If the reference voltage on the CV pin is raised towards the supply voltage by an external circuit, the timing capacitor C3 in the astable multivibrator will take longer to charge and to discharge. As a result the frequency of the rectangle wave output from IC1 will fall, and its mark-space ratio will also fall.
The source for the CV reference voltage in this circuit is the base-emitter junction of PNP transistor T1. If the base volt-age of T1 is approximately 500 mV lower than its emitter voltage, T1 will start to conduct and thus pull the voltage on the CV pin towards the positive supply.
In the feedback path NPN transistor T2 has the function of a voltage level shifter, being wired in common-base configuration. The threshold is set by the resistance of the feedback chain comprising resistor R3 and potentiometer P1. When the emitter voltage of transistor T2 is more than approximately 500 mV lower than its base voltage it will start to conduct. Its collector then acts as a current sink. Potentiometer P1 can be used to adjust the sensitivity of the negative feedback circuit and hence the final output voltage level.Using T1 as a voltage reference means that the circuit will adjust itself to compensate not only for changes in load at K2, but also for changes in the input supply voltage. If K2 is disconnected from the load the desired output voltage will be maintained, with the oscillation frequency falling to around 150 Hz.
A particular feature of this circuit is the somewhat unconventional way that the NE555’s discharge pin (pin 7) is connected to its output (pin 3). To understand how this trick works we need to inspect the innards of the IC. Both pins are outputs, driven by internal transistors with bases both connected (via separate base resistors) to the emitter of a further transistor. The collectors of the output transistors are thus isolated from one another [1].
The external wiring connecting pins 3 and 7 together means that the two transistors are operating in parallel: this roughly doubles the current that can be switched to ground.The two oscilloscope traces show how the output voltage behaves under different circumstances. The left-hand figure shows the behaviour of the circuit with an input voltage of 9 V and a resistive load of 470 Ω connected to the lower pin of output connector K2. The figure on the right shows the situation with an input voltage of 10 V and a load of 1 kΩ on the lower pin of output connector K2. The pulse width and frequency of the rectangle wave at the output of IC1 are automatically adjusted to compensate for the differing conditions by the feedback mechanism built around T1 and T2.
Because of the voltage drops across the Darlington out-put stage in the IC (2.5 V maximum) and the four diodes (700 mV each) the circuit achieves an efficiency at full load (470 Ω between the output and ground) of approximately 50 %; at lower loads (1 kΩ) the efficiency is about 65 %.
Saturday, 3 December 2016
Simple Six way Switch Using IC1 40106N
The 40106 is a versatile CMOS IC containing six Schmitt trigger inverters. It can be used to implement a set of alternating –action switches with hard ware contact bounce suppression.
Simple Six-way Switch Circuit Diagram :
Aside from one gate of the IC, all you need for each switch is a pushbutton, a resistor and two capacitors. It works as follows. The 1 μF capacitor at the output is charged or dis-charged via a 1 MΩ resistor, depending on the output level of the inverter.
Pressing the button causes the input level of the gate to change, which in turn causes the output level to toggle. The 10 nF capacitor determines the output state after the supply voltage is switched on. You can connect it to the supply voltage rail or the ground rail as required. If you hold the button pressed, the output signal will be a square wave with a frequency determined by the RC time constant, which is approximately 1 second.
You may experiment with the component values if you wish.
Author : Kees van het Hoff - Copyright : Elektor
Sunday, 20 November 2016
Thursday, 17 November 2016
Electronic Power Flip Flop Using A Triac Circuit Diagram



