Monday, December 22, 2014

8W Stereo Amplifier

Good morning and welcome back! This post is about a 8W stereo, 4W each channel amplifier that can be conveniently powered from a computer power supply unit or a simple 12V-15V 1.5A transformer.

Where to use?

1. With a desktop computer as a cheap speaker, you can just hook up the speaker directly with your computer power supply unit saving you the cost for making a power supply unit.

2. Where bass is not much of a concern.

3. Can be used with Sealed lead acid battery or lithium battery so portable. 

What's good about it?

1. Requires only a few component.

2. Can be operated with a wide voltage range of 5V-20V, although at 5V it will only produce about 1W which is not practical but at 12V it produces around 4W on 4ohm load so I think that's the sweet spot.

3. Circuit is pretty easy to design.

 Components needed ( For mono build, for stereo you will need twice of these )

 1. Capacitor: 0.22uF ceramic  *2
                       1000uF 25V electrolytic
                       2200uF 25V electrolytic
                       10uF 50V electrolytic
                        470uF 25V electrolytic

2. Resistor:  1ohm, 4.7ohm, 470ohm

3. Integrated Circuit : LM383 

4. Adequate Heat sink.

The Diagram

You just have to make two of these to get stereo. 

you can add a 50Kohm variable resistor at the input for controlling volume.

You might omit the 1000uF capacitor with the power rail if your power supply has it's own.

If you don't want much lower frequency output you can use a 1000uF capacitor instead of a 2200uF.

Don't skip the 1ohm resistor and 0.22uF capacitor in series with the output, these are used for making the circuit stable and suppress oscillation, solder them as close as possible to the pin 3 and 4.

Higher supply voltage will yield higher output power but don't cross 20V.

You can control the gain of this circuit by changing the values of 4.7 ohm and 470ohm resistor.
But don't just add two variable resistor as they might short out the output.

Loud speaker with lower impedance will yield higher output power and higher impedance will yield lower output power so it is better to be on the middle, 4ohm will be enough.

You can easily make a two channel speaker system with this for general purpose use.

Make sure to follow the datasheet for proper grounding of the circuit.

Other resource:

How to use a computer power supply for general purpose.
Making an AC to DC circuit.
LM383 Datasheet.
Index to my blog.

Good luck and happy Experimenting.

Thursday, December 18, 2014

Low-dropout Voltage Regulator

Good afternoon everyone, hope you guys are having a great time. This post will be about a regulator, a linear one, although I have posted about linear voltage regulators earlier, this one is a bit different, it is a low-dropout voltage regulator. Let's dive in and see what it is. In this post I will not be explaining how it works, will talk about that in a later post.


What is a Low-dropout Voltage Regulator?

A low-dropout voltage regulator is such a regulator that can work at a very small input-output differential voltage, that means this voltage regulators can regulate the output voltage even when the output voltage is very close to the input voltage. If you use a standard linear regulator(for example a 78XX), you need a minimum difference between input and output voltage of about 2V, so if you want 5V, you have to provide minimum 7V as its input. If input goes below that voltage the regulation will no longer work. This 2V margin is called dropout voltage, you can find it in the datasheet of respective element. Low-dropout voltage regulators have much lower dropout voltage about 0.5V-1.5V.

So why do we need this?

As for the linear voltage regulators, the lower the difference between input and output the higher the efficiency it will have because the power dissipation of the device is usually the difference between input and output voltage multiplied by the current its supplying, so low-dropout regulators allows you to input a much lower voltage than that of a normal regulator allowing much higher efficiency, lower heat generation and of-course lower minimum operating voltage.

What do we need?

In this post I will be writing about three different low-dropout voltage regulators. First one is a fixed 5V output regulator which has a 0.5V dropout and can provide 1A of current. This is ideal for many small projects that does not require much current. This integrated circuit can provide other voltage levels too but I will write about the 5V one right now.

Components needed for this:

1. Integrated Circuit : LM2940
2. Capacitor : 0.47uF at the input to suppress noise, 100uF electrolytic at the output to maintain stability, low ESR(Equivalent Series Resistance) capacitor preferred, 0.1ohm-1ohm capacitors.
3, Heat sink and thermal interface material for LM2940 if necessary.


Low dropout voltage regulator using LM2940

Pretty simple diagram, not much to talk about. Just for the capacitors 0.47uF one is needed if this circuit is located far from the power supply unit itself and you can put a lower rated capacitor at the output(although minimum 22uF is needed) but a 100uF will just work fine. I have used this 100uF one for better transient response.

Great thing about this integrated circuit is it has built in short circuit current protection and over-voltage and over-temperature shutdown feature.

Next I want to write about a variable voltage one which can provide an output of 5V-20V with a 1A of output current and has the similar 0.5V dropout like the LM2940.

Components needed for this:

1. Integrated circuit: LM2941.
2. SPST switch(single pole single throw).
3. Capacitor: 0.47uF(ceramic type), 100uF low ESR electrolytic(Same as above)
4. Resistor: Depending on voltage. It is good to use 1Kohm resistor as R1 to ensure bias current error from adjust pin will be negligible and none of these resistors should be shorted.
An 18Kohm resistor is needed for the ON/OFF pin.
5. Heat-sink and thermal interface material of LM2941 if necessary.


Variable Low dropout voltage regulator with LM2941

This one is also another simple diagram which can be used to build a variable voltage output. Here the R1 and R2 sets up the output voltage as shown by the formula. Here 1.275V is the typical reference voltage of this integrated circuit. For example a resistor value of R1=1kohm and R2=8.6Kohm will provide an output of 12.24V.

For the capacitor, it is same as above. 

For the On/Off switch, as this integrated circuit does not have internal pull up resistors, an external pull up resistor is needed for proper shut down. If you want to omit this function you can just connect the ON/OFF pin directly to the ground so that the circuit will always run.

Next and the last one is another very simple diagram that can provide a 5V output and very popular as SMD(Surface mount device-SOT223 package). In this diagram I will using a LM1117-5.0 which can provide 5V, although it is available at other voltages and also variable type and about packaging it is also available in TO-220 package. It can provide around 1A and has a dropout voltage of 1.2V.

Components needed: 

1. Integrated Circuit: LM1117-5.0
2. Capacitor: Two 22uF electrolytic with low equivalent series resistance. Higher capacitance will provide better transient response.
3. Diode: IN4007 as a protection diode.
4. Heat-sink and thermal interface material if needed.


Diagram Using LM1117 5.0

This one is a very simple diagram too. About the capacitors it is same as above and capacitor with higher capacitance can be used. 

About the protection diode, it is optional, in normal condition it is not needed however with large capacitor and the input and ground shorted that capacitor will be discharged through the output pin that might damage the integrated circuit, in that case a protection diode is needed.

This integrated circuit is widely used in Arduino Uno or similar development boards, In this picture of this arduino board, you can see that the 1117-5.0 (marked in red square), the input and output 47uF low ESR solid capacitor(marked in black square) and the protective diode M7(marked in white square, It is similar to 4007).

Arduino Uno

So that is pretty much about Linear Low-dropout voltage regulators, hope you have enjoyed reading.

More Resource:

1. Understand low-dropout voltage regulator.
2. LM2940 datasheet.
3. Wikipedia entry about low-dropout voltage regulator.
4. Linear voltage regulator
5. LM2941 datasheet.
6. LM1117 datasheet.
7. What is ESR.
8. Solid Capacitor.
9. Learn about Arduino.

You can read my other posts here!
Happy Experimenting!

Wednesday, December 3, 2014

5V Multi-purpose SMPS

Good afternoon everyone, been a long time since I wrote something so here I am with very handy circuit diagram, a 5V 3.0A SMPS(Switched-Mode Power Supply) that requires only a few external components.

I have previously posted linear voltage regulators which are very simple in design and working but has a very big down side which is low efficiency. Switched-mode power supply can be complex but it's efficiency is much higher than linear regulator, even if the difference between input and output voltage is very high. If you recall my previous post you should know that the larger the difference is between Input and Output voltage for Linear regulator, more power it will waste. So, a simple switched-mode power supply can be very helpful mitigating that loss, production of heat and can be used in a versatile situation.

Scope of using:

This diagram can be used in many different scenarios, let me jot down a few of them.

1. If you want to run a Raspberry Pi/Banana Pi or similar products with a lot of external components like sensors and relay boards an efficient and high current supply will be very useful.

2. Want to make a portable charger that will charge your tablet or phone from battery? This will be perfect for its compact design, efficiency and cost effectiveness.

3. Your desktop computer is not putting enough current on the USB ports? You can make one of this and hook it up with the 12V rail of the computer power supply unit to get high current for charging* tablets fast or run any other external device.*****

And many more similar situations.

Components needed:

As mentioned above this diagram requires only a few external components it so the list will not be that long.

1. Integrated circuit - LM2576 5.0.
2. Capacitor - One 100uF 50V, One 1000uF 16V(Low ESR capacitor will be better) **.
3. Inductor - 100uH.
4. Diode - 1N5822 ( No, 1N4007 will not work) ***.

The LM2576 5.0

At the very heart of the diagram there is this integrated circuit LM2576 5.0. It provides all the active function for step down(Buck Conversion) switching regulation. This integrated circuit is enough for driving load up-to 3.0A and it has excellent line and load regulation.

As I was saying earlier, it requires only a few external components and it is very efficient, about 77% efficiency with an input voltage of 12V.

It also has protections like thermal shutdown and current limit protection. So in a very small package this integrated circuit is just perfect.

LM2576 Pin Out
Datasheet of LM2576.

The diagram :

Time for the diagram!

As you can see it requires only a few components it should be very easy to make. Moreover I will post about how switched-mode power supply works so not going to talk about it right now.

Final Result:

After assembling the circuit and testing the connections with continuity tester to make sure everything is in order I powered it up and all the measurements were fine. From an input of 19V it successfully put an output of 4.9V-5.0V. I had connected a DC Ammeter momentarily**** and the first reading that I had seen was about 5.5A, which is pretty high. the continuous current rating was about 3.0A which is sufficient for most works.


More Information and Caution:

       * While charging Lithium Ion bear in mind that charging this type of battery can be dangerous. High amount of charging current or voltage over the specification can lead to fire hazard. So limit the charging current to half of it's capacity. That means for a 2000mAh Lithium Ion use up-to 1000mA of charging current. Also you need to be careful while playing with the computer power supply unit, you might get shock. Learn more about computer power supply unit. Charging via USB is also a bit tricky though. Different device often negotiate with the charger to tell each other they are capable of fast charging, if this handshake doesn't occur devices won't pull much power from the USB port. To get about 1A you can simply short out the Data Lines of the USB also make sure not to connect that USB to any internal USB header of the motherboard.

     ** For the input section capacitor, the 100uF one, you can use a lower voltage one if your input voltage is low and for the output one it is better to use a low ESR capacitor, as it is a switched-mode power supply unit. Learn more about ESR.

    *** 1N5822 is a Schottky barrier diode, these type of diodes has low voltage drop and suitable for high speed operation. Learn more about Schottky diode and here is a datasheet of 1N5822. You can also use MBR350 if you want to.

 **** Don't use the ammeter directly with a power supply source, as it actually shorts out the output leads of the power supply and might be hazardous.

*****You can just bypass the motherboard to connect the USB directly with the computer power supply unit but that current will be really detrimental, If you short it out it will actually short the entire 5V rail of the power supply so it will not be that safe.


Anyway so that was all for now. Happy experimenting! If you want you can read my other posts here.