A couple weeks ago, I mentioned that I was learning how to build audio amps and I tried building one using Sparkfun’s STA540 audio amp kit. Well, I tried to design the PCB for my modified version of Sparkfun’s audio amp kit, but I ran into a very….large problem. In order for me to make sure the STA540 properly drives two speakers at 25 Watts, I needed a multiwatt heatsink. However, the heatsink takes up 1/3 of the PCB! Not to mention it will be a pain fitting it inside a box since the heatsink is also very tall! In otherwords, I needed to find something else.
Then I heard about the TPA3122, a 15 watt stereo audio amp. Although it can only drive 10 watts less than the STA540, the space it saves more than makes up for it. After building the circuit, I ran into latching issues, or when the ic stops working due to voltage spikes on the dc bus. At first, I thought adding more bulk capacitance would help, but it had no effect. After asking around, one person suggested to rewire the circuit to be much more orgainized. Not only did I rebuild my circuit on the breadboard, but I place .1uF decoupling capacitors as close to the IC as possible. Afterwards, the amplifier worked marvelously! I even recorded a video of the amplifier in action.
Suffice to say, I will consider using the TPA3122 for my next audio project. Well, that’s all from me today! If you have any suggestions, comments, or concerns, please feel free to use the comments below. See you guys again next week!
I never thought I will post another lab update so quickly. Not only did I reorganized my lab, but I recently got a plethora of new parts and one new test equipment that I would like to talk about today.
So first, I would like to talk about some more discrete parts I obtained from one of my co-workers. Of course I got a bag filled with resistors, npn transistors, and pnp transistors, but I never expected to get two bags of 10uF wet-tantulum through-hole capacitors. Keep in mind, through hole wet-tantalum capacitors are bloody expensive, and I got them for free! I also received two 3M connectors, which are ideal for debugging through-hole ics without breaking a connection to do so.
A couple weeks ago, I had a discussion with one of my co-workers about electronic equipment. I complained that alot of the equipment that I want is very expensive. I told him some of the requirements that I’m looking for. After a couple minutes talking, he said to me “Why not build it yourself? The requirements are not that stiff.” “Crap, he’s right”, I said. After couple weeks researching the topic and brushing up on Mosfets, I built a very simple one. There is a alot of refinement that could be done on the circuit, but it demonstrates the topic nevertheless.Today’s post will talk about how this electronic load circuit works and how to build one yourself.
What is an electronic load?
An electronic load is a device design so a power supply can draw a certain amount of current without desipating tons of heat. Electronic loads are useful for testing a power supply’s efficiency, current limit, etc.To understand how the circuit works, I’ll talk about two crucial things involving mosfets and op amps. Let’s talk about the mosfet aspect first.
Although the picture above looks like a bunch of lines for hobbyists, this VDS vs Id characteristics shows how the mosfet will behave depending on the voltage applied at the gate and source (VGS for short) Mosfets have 3 modes of operations: cutoff, active, and saturation. When the mosfet is in cutoff operation, it does not turn on. This is due to the voltage applied to the gate and source not high enough to turn it on. Active is a state in which the mosfet’s gate has enough voltage to allow the mosfet to behave as a variable resistor. Finally, saturation is when the mosfet behaves like a switch. For this load to work, we need it to enter active mode since we can set the mosfet to draw a certain amount of current.
Now let’s talk about one common configuration using an op amp: a unity amplifier. The sole purpose of a unity amplifier is to make sure that the voltage seen at the non inverting pin of the op amp (+ pin) appears at the output. Although it sounds simple, these amplifiers are useful to prevent the input source from getting affected from output impedance. However, we will be using this configuration for another reason.
Now let me explain how the circuit works. First the user sets the voltage using a potiemeter (R2 in the schematic) and gets set at the inverting pin (- pin). Although the op amp looks like its configured as a comparator, it’s actually set as unity amplifier due to the mosfet. To make sure the voltage at the non inverting pin appears at the inverting pin, the op amp must set a certain voltage to the mosfet gate. Depending on the gate voltage, the mosfet will draw a certain current until the voltage at R1 is equal to the voltage at the non-inverting pin.
How to select your mosfet?
Unlike my other tutorials, there’s a high possibility you’ll damage the mosfet in this tutorial, if you’re not careful. When looking at the datasheet for a mosfet, remember to pay attention to the drain current (ID) and drain to source (VDS) ratings. ID determines how much current the mosfet can handle before exploding and VDS determines the maximum voltage that can be applied for safe operation.
Now for the little known parameter you should REALLY look at when reading mosfets datasheets: the safe operating range (SOA). Keep in mind, mosfets liked to be switched on and off. Rarely do you want the mosfet to work with analog voltages. The SOA tells you the recommended voltage and current that the mosfet can handle before exploding.
Build Your Own!
The following circuit is designed to handle 20V from 0A-5A. You’ll need the following to build this circuit
1x 10k Poteimeter
1x Buz11 Mosfet
1x 10Watt TO-220 Resistor
1x 741 Op Amp
2x .1uF Capacitors
1x Cooling Fan (optional)
Consequentially, you’ll need the following tools for this circuit
1x +15V/-15V power supply
1x +32V/5A Power Supply
Now assemble the circuit as shown in the picture below. Remember to attach the heatsinks to the resistor and mosfets! THEY WILL GET DAMAGED WITHOUT THE HEATSINKS! If you have a cooling fan lying around, turn it on and direct it towards the resistor and mosfet. The colder these components run, the less likely they will get damaged.
Before Turning The Circuit On.
Do not apply 20V to the mosfet just yet.You want to make sure the voltage at the poteimeter is 0V, otherwise your power supply will go into current limit. Apply power to the op amp/poteimeter. Make sure the voltage at the poteitmeter is 0V. Now apply power to the mosfet and start turning the knob. You should start seeing the circuit consuming a certain amount of current will keeping the voltage of the power supply the same.
Well that’s it for today! Thank you guys for reading this post and if you have any questions, comments or concerns, please post a comment. Also, be free to follow me on twitter. Have a wonderful week!
So lately I’ve been messing around with op amps. Why? Because I want to learn more about oscillators and wanted to build one from scratch. One of the simplest oscillator to build using an Op Amp is a relaxation oscillator. Today, I’ll talk about how it works and a small experiment using the oscillator.
What is an oscillator?
An oscillator is a circuit designed to output a repetitive signal over and over again based on a certain frequency. Oscillators are often use for devices such as switching regulators and making sure your PC’s CPU operates correctly. Some of the waveforms an oscillator can output includes square waves, sine waves, sawtooth waves, triangle waves, etc. Today’s relaxation oscillator will output a square pulse with a 50% duty cycle.
How does A Relaxation Oscillator work?
An Op-Amp relaxation oscillator is comprised of two parts: a schmitt trigger and a RC circuit (R3 and C1). When the circuit is powered, it charges the capacitor in the RC network. Keep in mind that whatever voltage appears at the capacitor will appear at the non-inverting pin of the op-amp (pin 3). The schmitt trigger (R1 and R2) determines when the output will swing from high to low or low to high. In other words, the schmitt trigger determines when the capacitor will start charging or discharging.
The figure above was taken from an relaxation oscillator with 15V peak to peak voltage. Although it shows 30V peak to peak, the DC offset of the waveform was set around 15V. Nevertheless, you can see that when the capacitor is charging, the relaxation oscillator output goes high, and goes low while the capacitor is discharging.
Keep in mind, these equations work under the assumption that the voltage on pin 8 and 4 of the op amp are symmetrical. For example, if you apply 9V to pin 8, then -9V should be applied to pin 4. Also, if you apply 15V to pin 8, then -15V should be applied to pin 4.
Build Your Own!
Although I now have an oscilloscope – a crappy one, but still an oscilloscope- I realized some of you guys probably do not have one. So, I devised a small circuit that will turn on flash two LEDs on and off every 250ms. You will need the following materials:
1x DC Power Supply (Able to supply +15V and -15V)
1x LM741 Op Amp
3x 1K Ohm Resistors
2x .1uF Capacitors
1x 10K Resistors
1x 1uF Capacitors
Now wire the circuit like in this picture.
Now power up your DC power supply! You should see the LEDs flash on and off. The purpose of the LEDs is to show that the oscillator is outputting a square pulse with a positive and negative amplitude.
Well that’s it for today’s post! If you have any questions, comments, or concerns about today’s post, let me know. Thanks for reading, and see you guys next week.
Despite the fact I’m learning more about power electronic circuits, I’m also trying to branch out my analog circuit knowledge. I figured a good place to start is by building an audio amplifier. But, I did not want to start with a simple 1 watt audio amp. I wanted to go up to 25 Watts. Since I had no prior knowledge of audio amps before this post, I figured I started with something that exists. So I brought Sparkfun’s Audio amp kit as a starting point.
To make sure I’m getting the most out of my amp, I drove down to Do It Yourself Electronics in Needham,MA and brought a pair of 25 watt speakers. These speakers were ironically $25 dollars and it wasn’t until later I found out that Sparkfun were selling 25 Watt speakers as well. Could of saved me the trip!
To power my speakers, I used my trusty 150W DC power supply. The audio was provided by my usually Jpop music video. When I powered the amp and played the video, I was surprised by how loud the amp was! However, I noticed occasionally 5Hz thumping that the speakers were producing.
So I carefully attached one of my oscilloscope probes to the DC power of the audio amp. I noticed that when the 5hz thumping occurred, the DC bus dropped close to 0V. I suspected that there was not enough capacitance on the audio amp’s power supply rail. So I added 2000uF to the audio power supply rail, and it was not enough.
It wasn’t until a week later that I realized the cause of the thumping. The first thing I realized was that I failed to add DC blocking caps to the speakers since they are AC only components. Another issue that I failed to realize was that the thumping occurred when the volume of my computer was set to max. Therefore, there was a chance that the pre-amp section of the amplifier was getting saturated.
Thus far, I modified Sparkfun’s audio amp circuit with more bulk capacitance on the power supply rail as well as DC blocking capacitors on the outputs of the audio amp. Of course, I’m still trying to figure out how to solve the clipping issue, but for now, I will not set my input volume to its max.
Thank you guys for reading today’s post and if you have any suggestions on how I can make this audio amp better, then please leave a comment below!
Since I started working in the power electronics industry, I figured I should spend a little more time building power electronic circuits. I remembered that I understood how non-isolated boost converters worked during my school work and decided to build one for myself. For those who do not know, a boost converter is a power electronic circuit that converts incoming voltage to a higher voltage. I decided for starting purposes, I would build a 12V to 24V boost converter. Although I plan to write a tutorial which shows how boost converters work, this post is to talk about what I did in my free time.
After a week relearning important boost converter design parameters, I managed to draw out the basic schematic. Although there are 3 components missing from my schematic, those parts functioned as a way to implement a controller for the boost converter. There are alot of major improvements that could be made, such as protecting Q2 from high voltages, solving the logic inversion caused by Q1, and prevent L1 from causing my power supply to current limit. However, I just want to see the boost converter work.
After buying my parts from Digi-key, I soldered my parts to a perfboard. Why not assemble the circuit on a breadboard? In order for this boost converter to properly work, I needed to switch the main transistor (Q2 in the schematic) at a high frequency (I based my calculations around a 62.5KHZ switching frequency). Since I’m switching at a high frequency, building the circuit on a breadboard will screw up the signal due to the breadboard’s nature of acting as a capacitor at high switching frequencies.
Finally, to make sure the boost converter functions correctly, I needed to connect a load. I decided to go with a 25 ohm/50W resistor. If the boost converter was not connected to a load, then there’s a high chance the boost converter will go unstable. A high value resistor can be connected at the output to function as a dummy load to prevent the boost converter from going unstable. Also, I was dissipating a lot of heat through this resistor. The resistor got so hot that it melted one of my oscilloscope clips.
So I was ready to power up my converter. Since I was using my multimeter as a current meter, I had to setup my crappy Hantek oscilloscope to measure the voltage by measuring the DC level. One thing that surprised me was the actual duty cycle needed to set the voltage to 24V. To get 24V, instead of setting my frequency generator to 62.5KHZ with a 50% duty cycle, I got a 24V output using the same frequency, but a 25% duty cycle. This usually happens when your boost converter is incredibly inefficient. Brother, my boost converter was the definition of it. According to my calculations, my boost converter efficiency was around 70%.Well…it was a good attempt, but converter needs a lot more work. I will need to investigate the causes of the low efficiency, and rectify it. My first suspicion involves the big bulky inductor. The bigger the inductor, the higher the parasitic resistance.
Thank you guys for reading this post, and if you have any suggestions on how I can improve the efficiency, then leave a comment below!