Cool Cap Engineer

Engineering by an anime nerd

Leave a comment

Mini Projects: 15 Watt Audio Amp Experiment

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!

Leave a comment

Mini Projects: Messing Around With Sparkfun’s Problematic Audio Amp


Sparkfun’s audio amp kit fully assembled

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.


25 watt speakers from Do It Yourself Electronics

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.


DC Bus voltage during 5hz thumping.

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.


Modified Sparkfun’s circuit usig my knowledge from testing


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!

Leave a comment

Mini Projects: Boost Converter Experimentation

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.


12V TO 24V Boost Converter Schematic

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.


Boost converter circuit soldered onto a perfboard

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.


The boost converter load

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.


Blue waveform is the output at the load, while yellow is the square pulse going into the the Q1.


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!


Mini Projects: 160×128 Serial LCD and RFID Fun

download  So lately I’ve been messing around with alot of electronic components lately. One of these beauties is a 160×120 LCD screen. I will admit, they seemed a little daunting at first, but I was fairly surprised how easy it is using these LCD screens.  From what I’ve seen thus far, special commands are executed by sending the hex value 0x7C followed by the proper command. For example, to reset the display, I just need to send 0x7C then 0x00. Of course, to add text to the display, just send an ASCII message to the display. I did not do anything with boxes or lines yet, but will be part of my agenda.

598439_4372418500902_1096039390_nThe last new item I used this week was a RFID ID-120 reader. Like the 160×120 display, it’s controlled via serial. Apparently, this item beauty was shown in Blidr, and the pseudo code for reading the RFID tag was very simple.  In fact, I re-wrote the code to be used with the PIC18F4553, which I will post a tutorial on how to use it before I go back to RPI.

181806_4372421540978_720517165_nThe picture above shows the tag of one of the RFID’s after I ran my RFID reader code on the PIC18F4553. It’s a little slow reading the tag at times, but I find it very reliable.  Well, that’s it for me this week! See you guys on Monday….o wait. The world is gonna end today. Well, it’s nice knowing you guys!