

Hopamp
Opamp based headphone amplifier build project.
- Size
- 43.2 × 61 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 36
- Nets
- 20
- Pads
- 88
- Tracks, vias
- 123, 0
- Routed
- Yes
- KiCad
- KiCad 7 (file 20221018)
- Created
- 1 Jun 2024
- Updated
- 8 Nov 2024
Overview
Hopamp is an open-source printed circuit board by stickteo, from the stickteo/HipHopAmp repository on GitHub, published under the Unlicense licence. It is a 2-layer board of 43.2 × 61 mm with 36 parts on 20 nets, routed with 123 tracks and 0 vias.
Its parts include 16 resistors, 8 capacitors and 4 ICs. It belongs with the audio and music boards of this library.
README
README.mdHipHopAmp
Opamp based headphone amplifier build project.
Introduction
This project is divided into five parts:
- Main Amplifier circuit
- Voltage Divider circuit
- LED Music Visualizer
- Circuit Routing & Soldering
- Case Design and 3D Print
I wanted to make a headphone amplifier. The choice to use opamps was due to its simplicity and not needing to use any extra heatsinks.
Circuit Design
I was inspired by ESP's Portable Amplifier article. I really like the simplicity of using opamps to drive headphones directly. I did build the crossfeed circuit... However, I just prefer not having crossfeed. Thus the final circuit simply involves volume adjustment, using a dual opamp to buffer the input then two dual opamps to drive the output.
Main Circuit

The circuit is quite simple. The first opamp buffers and amplifies the input by 3 times. The second and third provides the necessary current to output to the headphone.
I didn't show the potentiometer in the circuit. However, R1 and R2 work together with the potentiometer to provide a more logarithmic volume adjustment. Without the resistors, the potentiometer would adjust the volume linearly. Having the resitors in parallel means having more range for quieter volumes.
I kept C1 and C2 so it can block any potential DC. I'm not entirely sure the purpose of R11 and R12.
R3, R5, R4, and R6 sets the overall gain. Without gain, the amplier would only work as a current buffer.
The arrangement of U2 and U3 is very interesting. U2 takes the feedback from the output while U3 acts as a buffer for the output from U3. To have more current, a potential U4 can also act as another buffer like U3.
Aside from the potential to add another buffer, the arrangement makes routing easier as well. This means the opamps can be lined up in a single line while the left and right channels can run on each side. This also means the power rails can be kept in a single line in the center.
Trying to get a negative rail.
I was again inspired by ESP's article explaining how to use a boost converter to generate 24V and using 12V as ground.
I tried all sorts of configurations:
- Using the MC34063A to create -12V.
- Using 5V to generate 12V and 24V using two MT3608 boost converters.
- Using 12V to generate 24V using one MT3608 boost converter.
- Using LM317 to make it less noisy.
Only the third configuration worked. Though quite disappointingly noisy.
MC34063A
So I found this IC inside a USB charger that plugs into a car's "cigarette lighter". Essentially the adapter takes in 12V and spits out 5V.
The MC34063A is a control IC that can step-up, step-down, and invert voltages.
I try to build a circuit with it but I ended up blowing up the chip. I think I didn't have the right inductor to properly use it. Building a switching supply can have all sorts of pitfalls. Though it's something I have to try again. Well, it was a bit too complicated and I just wanted a headphone amplifier.
MT3608
Since trying to build a switching regulator failed, I turned my attention to cheap Chinese boost converters. The MT3608 seemed fairly small and compact.
24V Boost
At first I simply try using the MT3608 to output 24V directly. There's always some weird noise even with a bench supply. I assume the regulator doesn't perform well when there's not much load. Seemingly the MT3608 picks up noise from its input power pin. It's also sensitive to output capacitance as well.
I was trying a range of output capacitors to try to smooth the ripples away... Generally, more output capacitance makes the ripple have a lower frequency while less capacitance (nothing) increases the frequency. Presumably it depends on the control circuit inside the IC. I would guess it's a comparator with some sort of hysteresis.
I used an earbud to check the noise with no input. (Earbuds are more sensistive to noise compared to "audiophile" headphones.) It was tolerable with a bench supply feeding the MT308 to boost to 24V. (12V from the bench supply acts as ground.) When switching to an off the shelf 12V AC-DC adapter the noise got way worse.
5V to 12V and 24V Boost
Using two MT3608 modules to get 12V and 24V from a single 5V supply doesn't work.
The 5V goes to the input of both modules. With no load, 12V and 24V outputs. However, when I connect earbuds on the output, the 12V output would slowly rise to 24V minus a diode drop.
My best guess is that the MT3608 can't sink current. Presumably if the output sees a higher voltage than what is set, then the output transistor will not turn on. I can only guess the diode drop comes from the output of the opamp. (Since the 4558 opamp is not rail-to-rail.) Thus the output pours current into the 12V line and into the capacitors. Perhaps the slow rise is due to small currents flowing through the headphone. Thus the MT3608 can't regulate any voltages higher than its set point.
There needs to be further testing. Perhaps just using a bench supply at 24V and setting the MT3608 to output 12V using 5V input. Then simply connecting a resistor from 24V to the 12V output. Overall though, the MT3608 is not a good application for generating intermediate voltages.
Using LM317 to generate 24V
As a last ditch effort, I try using the LM317 to create a 24V line while using the MT3608 set at 27V. It works okay with a bench supply providing 12V. However, using an AC adapter to provide 12V results in a lot of noise.
Opamps do reject supply noise. However, noise on ground would render it worthless since the opamp only sees 0V and 24V on its negative and positive supply pins. Thus the noise would appear on the inputs. Of course, the 12V input should be regulated as well... Perhaps with another LM317. However, this would make the project overly complicated and too bulky.
Voltage Divider Circuit

Of course, the circuit is completely taken from an ESP article.
The circuit is really simple. Two RC circuits in series to create a stable voltage divider. Using that stable voltage, the opamp would buffer the voltage creating a new stable middle voltage.
With the way the schematic is drawn, it's a little misleading that one pushes and the other pulls current. In actuality, using two opamp means doubling the amount of current available to supply to the new rail. Since the 4558 is a dual opamp, might as well as use both.
LED Music Visualizer

A certain special person wanted blinky lights, so I added blinky lights.
I wanted something simple and compact... Thus came brainstorming ideas...
A complex idea is to throw an Arduino Nano at the problem. Get the Nano to read the audio through its analog pins... Do some sort of processing... Then simply output to an LED. However, I don't think it really fits the "theme" of my project.
Thus I search online something like "Audio LED" then came across an Instructables project. It's really simple, simply let an audio signal input into an NPN BJT to control an LED. Very "basic" stuff but some details have to be correct.
So, I just start breadboarding the circuit.
Instructables BJT LED Driver

It's really straight forward... But a little too simple for comfort. It definitely works and the BJT will go into saturation. Although the base is commonly conceptualized as a switch with a small current, a more accurate view is a diode instead. The base and the emmitter is literally a diode junction. Without a base resistor, large amounts of current will flow from the base to the emmiter whenever a voltage higher than 0.7V is applied.
By tapping the input with a bench supply, I would see several hundreds of milliamps being drawn. I suppose as long as the BJT doesn't get too hot, it would release the magic smoke... But yeah, the things you only "really" learn by purely building the circuit and not from reading a textbook.
From there, I added a base resistor and tested with audio... It seemed a bit lacking and not bright enough.
Voltage Offset
In my circuit, R5 and R6 form a voltage divider to set the offset to Q2. This offset should be just below a diode drop. With those values, around 0.5V. If it's too high, the LED will just stay on. Too low and the LED will blink too briefly and not as bright.
A bad point about this is that it depends a lot on the 12V supply. ACDC adapters can have wide output... Sometimes around 13V.
Perhaps to make it more supply agnostic I would use a diode with a resistor divider to create the offset instead.
Voltage Gain Amplifier
I wanted the LEDs to blink more brightly, thus I implement a simple common-emmitter amplifier with emitter degeneration.
The gain is set by R3 and R4. I tried having max gain by ommitting R4... However, the effect becomes less subtle.
To calculate R1, R2, R3, and R4:
- V_C is VCC/2 which is 6V
- Desired gain, G, is 20
- Desired quiescent current, I_C, is 1~2mA
- R3 = VCC/2/I_C = 6V / 2mA = ~3kOhm
- R4 = R3/G = 3kOhm / 20 = ~150Ohm
- V_E = R4*I_C = 150Ohm * 2mA = ~0.3V
- V_B = V_E + 0.6V = 0.3V + 0.6V = ~0.9V
- I_B = I_C/10 = 2mA / 10 = 0.2mA
- R2 = V_B/I_B = 0.9V / 0.2mA = ~4.5kOhm
- R1 = (VCC-V_B)/I_B = 11.1V / 0.2mA = ~55.5kOhm
I try to choose convenient values for the actual circuit. Resistances can be slighly lowered to a more convenient value.
Circuit Routing

I want the circuit to be easily assembled by hand soldering. This meant using through-hole components. A big aspect is minimizing the amount of soldering done and using minimal amount of links.
Using KiCad to draw the schematic and route avoids making a lot of mistakes. I make sure to render in 3D to not make the mistake of flipping the IC to the wrong side. (It does happen.)
I use a perforated board to construct the circuit. This simply means setting 0.1in spacing inside KiCad and routing. As you can see in the images, everything is tightly packed together. Multiple iterations are made... Rotating resistors in one way... Rotating it in another way.
Several goals under consideration:
- Ease of construction
- Minimize traces
- Minimize area
- Minimize bridges
Having the schematic and routing up makes it easy to double-check components while soldering them in.
Capacitors are forgiving. We can always use a lower voltage capicitor that can fit. For proper production though, this would not be good for machines to assemble. Though for hand assembly, I am okay with the trade-off to achieve a more compact construction as well as decrease the amount of traces I need to create. I mockup the circuit while routing to make sure everything can fit.
Connectors are really space consuming as well as impose more design limitations. I opt to forgo connectors with direct soldering instead. Having connectors will require more traces to be routed and soldered.
For high-volume production, all parts will need to be SMD. Using a single layer can potentially lower the cost even further. Otherwise having two layers will allow easier routing. The choice of connectors will be especially important.
For DIY, we should allow ourselves the flexibility to use whatever connectors we want or what types of potentiometers we can have. Just soldering a wire is several times easier than trying to crimp custom connectors. Connectors shouldn't be used liberally as they impose a lot of constraints (and costs). Chinese engineering does really build things down to a cost. A lot of tradeoffs must be made to do so.
With the final routing, three wires must be soldered (the blue traces). I wanted to prioritize signal traces over power traces. The wiring will be longer than traces.
Resources
- ESP Portable Amplifier: https://sound-au.com/project109.htm
- Burr-Brown's AB-051 application note: https://sound-au.com/sboa031.pdf
- ESP Simple DC Adapter Power Supply: https://sound-au.com/project43.htm
- ESP Obtaining +/- Supplies From A Single Power Supply: https://sound-au.com/project192.htm
- CozzBP Audio Reactive LED Circuit: https://www.instructables.com/Creating-An-Audio-Reactive-LED-Circuit/
Parts
36| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | TestPoint | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | B-1, B+1, GIN1, GOUT1, LIN1, LOUT1, RIN1, ROUT1 |
| 4 | 10k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R5, R6, R13, R14 |
| 4 | 47 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R7, R8, R9, R10 |
| 3 | Opamp_Dual | Package_DIP:DIP-8_W7.62mm_LongPads | U1, U2, U3 |
| 2 | 100k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R11, R12 |
| 2 | 100n | Capacitor_THT:C_Disc_D7.5mm_W4.4mm_P5.00mm | C5, C6 |
| 2 | 100u | Capacitor_THT:CP_Radial_D10.0mm_P5.00mm | C7, C8 |
| 2 | 10R | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R15, R16 |
| 2 | 10u | Capacitor_THT:CP_Radial_D8.0mm_P5.00mm | C3, C4 |
| 2 | 1k5 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1, R2 |
| 2 | 1u | Capacitor_THT:CP_Radial_D8.0mm_P5.00mm | C1, C2 |
| 2 | 3k3 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R3, R4 |
| 1 | Opamp_Dual | Package_DIP:DIP-8_W7.62mm_Socket | U4 |
More from stickteo/HipHopAmp
3- 2 layers40.6 × 20.3 mm

- 2 layers48.3 × 22.9 mm
.kicad_pcb.jpg?size=s&soon)
Split supply (v1 flat compact)
stickteo/HipHopAmp
Opamp based headphone amplifier build project.
9 partsUnlicense - 2 layers35.6 × 22.9 mm
.kicad_pcb.jpg?size=s&soon)
Split supply (v2 ultra compact)
stickteo/HipHopAmp
Opamp based headphone amplifier build project.
9 partsUnlicense
Similar boards
- 2 layers65 × 30 mm

Rgb to hdmi
hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI
36 parts1kGPL-3.0 - 2 layers55 × 70 mm

Arduino v1
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
36 parts915 - 2 layers50.4 × 24.8 mm

- 2 layers45.7 × 31.8 mm

LEDx16 board
tardate/LittleArduinoProjects
a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!
36 parts803MIT - 2 layers32 × 24 mm

- 2 layers69 × 53.8 mm

TUSS4470 shield
Neumi/open_echo
Open Source echo sounder / depth sounder / SONAR for bathymetry and research. Arduino based and compatible.
36 parts530 - 2 layers99.1 × 53.3 mm

- 2 layers16.1 × 119 mm

Questions
How big is the Hopamp PCB?
It measures 43.2 × 61 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Hopamp use?
36 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Hopamp KiCad files?
From the stickteo/HipHopAmp repository on GitHub, at the commit this page was made from: the board is kicad/hopamp/hopamp.kicad_pcb and its schematic kicad/hiphopled/hiphopled.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Hopamp design in my own project?
Its repository publishes it under the Unlicense licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).