Tiny audio amplifier and battery controller PCB layout critique - Page 1
Forum section: electronics / projects

author: afourtrackmind
author_rank: Contributor
timestamp: March 06, 2016, 10:52:20 pm
content: Hola all and hello to everyone.I'm working on a board and was wondering what experience and education might think of it.Im not trained in this stuff so I don't know what would be wrong with this. What is on display is a collection of what I've read, watched and general observations. This layout is me learning so please rip the arsehole out of it.It's a pretty basic layout.Thoughts? Suggestions? Have I made any stupid mistakes? Should I protect the USB input?The input is a simple high pass RC filter, set around 100hz. I'd like a sharper knee without adding an op amp, any suggestions that might fit this type of project?I've set this up so I can etch it at home, single sided. No jumpers!No noise from the battery controller and the battery charges from a USB source.The popcorn parts are 0805 footprint.The data sheet says the mute and standby are internally pulled up so I've left them floating.The amplifier module is the Diodes brand chip 'PAM8406' and the charge controller is the Microchip 'MCP73833'I'm driving two little 4ohm speakers and my LiPo is a single cell with 850mah capacity.I am putting a switch in between the battery and the PAM8406 as my next revision.http://www.diodes.com/_files/datasheets/PAM8406.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/22005a.pdfThanks for having a look and for your opinion, if applicable.Cheers,aftm

author: Audioguru
author_rank: Super Contributor
timestamp: March 07, 2016, 12:55:38 am
content: 1) Why don't you like bass sounds below 100Hz?2) Why did you pick this system that produces only 1W for each speaker?3) Will you be able to hear and to hate its distortion?

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: March 07, 2016, 01:24:10 am
content: Schematic please? My instinct tells me maybe you've got the decoupling caps wrong...?

author: ajb
author_rank: Super Contributor
timestamp: March 07, 2016, 01:55:09 am
content: Doesn't look like USB+ is actually connected to the charge controller at first glance. . .you really should have the decoupling cap connected as close to the power input to the IC as you can. That nice chunky trace from USB+ to C1 is completely negated by the daisy chain of skinny tracks that hop from there to LED3, to LED2, and finally to the IC.It looks like the battery terminals are opposite polarity from what the label implies.The track from the charge IC to R5 is asking for a short to the adjacent pad.

author: afourtrackmind
author_rank: Contributor
timestamp: March 07, 2016, 01:55:25 am
content: Thanks gentlemen.alexanderbrevig:I'll did't do a schematic, just winged it. I'll post one when I get some free time. I've basically just connected up the example circuits from each of the data sheets, added connectors and a HPF.Audioguru:I do like bass, but as you stated, I don't have a lot of power. You'll note this thing is super tiny which is my main design requirement. I chose this amp IC because it'll run on a single lipo cell to keep the overall design small. The cabinet that this unit is coupled with, is very efficient. If I shelf the bass at around 100hz my SPL increase is enough to make this little thing sound pretty darned decent and loud enough to bust a boogie. Its not dub step worthy, but I'm ok with that.I don't know where you got 1watt per channel. At 4ohms, this should produce 3wpc, shouldn't it? 3 watts per channel is a ton, IMHO. So if it get the gain structure sett up correctly, there isn't any perceivable distortion. Obviously, I'd love a 10w IC but couldn't find one that didn't require piling batteries. Any suggestions?Cheers,aftm

author: afourtrackmind
author_rank: Contributor
timestamp: March 07, 2016, 02:05:30 am
content: Quote from: ajb on March 07, 2016, 01:55:09 amYeah, I'm looking at it with new eyes and that trace does look pretty silly. I'm doing some housekeeping as we speak and have been thinking about it. It's pretty obvious to me now that I need to re-run the trace straight in and tuck the LED feeds from under the IC and not this way I have it now. Thanks for the feed back. Your other notes have been sorted since or slightly after.I've supplied an amendment for the time being.Cheers,aftm

author: afourtrackmind
author_rank: Contributor
timestamp: March 07, 2016, 02:18:39 am
content: Ok, re-ran the USB power input.aftm

author: afourtrackmind
author_rank: Contributor
timestamp: March 07, 2016, 02:43:20 am
content: Quote from: blueskull on March 07, 2016, 02:34:52 amOk, what exactly is wrong with it? What is horrible? What's wrong with the grounding? Shouldn't it all come back to one point as I've tried to do to C1.It terms of EMI, how will this produce a bunch of interference? It's class AB, no high speed switching so I'd expect not much in the way of emitting anything that will disrupt anything else. Am I wrong?Cheers,aftm

author: afourtrackmind
author_rank: Contributor
timestamp: March 07, 2016, 03:46:45 am
content: Thank mate. I appreciate the comments.I believe I understand about the angle needing to be larger than 135?. Other than it appearing tidy, is there a reason they should be 135 and not an approximation?I'm not really sure how that a ground plane is right for this sort of project. Ive attempted them before and there were a lot of problems I couldn't understand. I can't help but think that it'd make the whole PCB a capacitor. Also, since the ground is running everywhere, how would you deal with a loop should it occur? Would it? What are the benefits for all the trouble?Decouple each power pin. This comment intrigues me the most. I understand that convention and the data sheet call for it, but in all my experimentation, this doesn't seem to make a lick of difference in any way (with this circuit). Why put three caps and three traces if they aren't making a measurable difference? I've never been much for one to follow rules for the sake of it. I usually need to be burned before I listen. What is the benefit of this?I hear you on the power, already amended as much as I can for this iteration.Trace margin; see above.Sorry about the OCD symmetry, I think asymmetry is beautiful.Again, thank you for your comments.

author: afourtrackmind
author_rank: Contributor
timestamp: March 07, 2016, 05:34:39 am
content: Thanks mate. I really do appreciate it.aftm

author: Apollyon25_
author_rank: Regular Contributor
timestamp: March 08, 2016, 01:37:07 am
content: It, in all, this is not a bad first attempt.It looks like you haven't spent enough time on placement though.80% placement, 20% tracking. I don't know what schematic/PCB tools you are using, but the net-list 'rat's nest' connection lines makes this placement process easier.As has been suggested, follow manufacturer's layout recommendations, however I'd start with a double sided board. There is no real cost reason to not use one, and it improves practically everything.Your resistor, LED layout can be tidied easily, and you could route Left output channel around beside Right. The input circuitry can be shuffled and tidied so GND isn't necked. You presumably are soldering wires off the board from your big round pads, so arrange them to make layout easier. Also, try to get out of the habit of running tracks between pads, as you progress into smaller technology this isn't possible most of the time so cultivating alternate tracking techniques and thinking will help down the track (haha).Place, shuffle, shuffle, shuffle, shuffle, shuffle... etc etc. Track.Also USB + and - brings to my mind the differential pair, not VBus and GND. Learn the terminologies. When you can identify the types of signals on the tracks it allows you to make informed decisions on routing priority.Lastly, remember these two rules and your boards will always work better than those who have ignored them...1) current always flows in loops, and2) current always flows in the path of least inductance/impedance.Keep up the good work.

author: Audioguru
author_rank: Super Contributor
timestamp: March 08, 2016, 04:01:36 am
content: Quote from: afourtrackmind on March 07, 2016, 01:55:25 amThe datasheet shows an output of 3W per channel into 4 ohms when it is clipping like crazy with horrible sounding 10% distortion and it has a 5V power supply.It shows it with a 3.6V lithium battery where it begins to clip with an output of only 1W. The Lithium battery will be 4.2V when fully charged and will be 3.2V when it is dead and must have its load disconnected to avoid damage.

author: MarkF
author_rank: Super Contributor
timestamp: March 09, 2016, 11:05:38 am
content: I only did the audio amp section. But, consider something more like:The datasheet for the battery charging controller has a suggested PCB layout at the end.Edit. I had a little more time to play around with the routing.

author: afourtrackmind
author_rank: Contributor
timestamp: March 12, 2016, 09:31:29 pm
content: Quote from: Audioguru on March 08, 2016, 04:01:36 amGot it! That make perfect sense, and thank you. You don't know of any IC's that run at 3-5v that can produce higher jam without clip, do you?

author: afourtrackmind
author_rank: Contributor
timestamp: March 12, 2016, 09:33:26 pm
content: Quote from: MarkF on March 09, 2016, 11:05:38 amThis is really great. Thank you MarkF. Its really interesting seeing the way other people's brain approach this stuff. Thanks for taking the time, I'm certainly going to borrow some of your ideas here if you don't mind.Cheers,aftm

author: afourtrackmind
author_rank: Contributor
timestamp: March 12, 2016, 09:36:54 pm
content: Quote from: Apollyon25_ on March 08, 2016, 01:37:07 amThank you for your nice words of encouragement. You've provided me with a lot to think about and work with. Cheers,aftm