Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Class D Switching Power Amplifiers and Power D/A conversion

TPA3136D2 based amp
TPA3136D2 based amp
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 5th January 2019, 12:27 AM   #1
imbra is offline imbra  Hungary
diyAudio Member
 
Join Date: May 2015
Location: Budapest
Default TPA3136D2 based amp

This thread will be a build log of a TPA3136D2 based 20W PBTL mono amplifier with onboard bluetooth and a few other goodies.

I need a small camping/party amp that will play music at moderate volume, powered from a battery that should be enough for a 3 day camping trip.
I've been a software developer for 25 years and I am thinking about switching industries and finding a job in the embedded world. I don't have much profesional experience in that industry, so I want to use this project in job interviews as a demo of what I can do. Which is why I decided to do a little over-engineering. These are things I want to have on the PCB:

- CSR8635 bluetooth module
- TPA3136D2 amp in mono PBTL mode
- Battery over-discharge protection with a MAX6457
- Battery voltage and power consumption monitoring with an INA219
- An Atmel AVR microncotroller which comunicates with INA219 and outputs the values to a 7 sedment LED display

I am not interested in building a nice enclosure. I will just put the PCB in a hard transparent plasic tool box and drill holes for the battery input and speaker outputs. The least amount of work for a functional box.
I have finished the first version of the schematic and the PCB. The PCB is a very rough prototype with crude layout, it will need more work. I should receive the boards in the next week or so. Can't wait...
I plan to assemble and test the prototype and maybe make a final PCB version with the bigger problems ironed out. I am sure I will have a few problems because I rushed the PCB layout a little.

This will be the first white PCB I ordered, so decided to call it White boy

I will post more details in the next few days while I wait for the PCB. Meanwhile, you can check the project out on GitHub and open it with KiCAD v5: NovaBox and WhiteBoy

The schematic PDF: https://github.com/nodep/NovaBox/raw...s/WhiteBoy.pdf

Thanks for reading, any comments are welcome!
Attached Images
File Type: png WhiteBoy.png (493.9 KB, 416 views)
File Type: png 2018-12-10.png (226.4 KB, 417 views)

Last edited by imbra; 16th February 2019 at 04:22 PM.
  Reply With Quote
Old 8th January 2019, 02:54 PM   #2
imbra is offline imbra  Hungary
diyAudio Member
 
Join Date: May 2015
Location: Budapest
I plan to use a sealed lead-acid battery to power the circuit. I've found a cyclic duty gel battery rated at 35 Amp/hour, which I guess is about 440 Watt/hour. Should be enough to run the amp and also charge my phone.

I don't want to build a speaker, so I will borrow one from a friend. He bought a cheapo powered speaker pair where one of the speakers contains the electronics and the other is just a box with the drivers and a handle. I tested that box with a TPA3116 board I got on ebay and it sounds amazing considering how cheap those speakers were. Much better than I expected. It has an 8 inch driver and two tweeters.

This is the speaker set (Fenton SPB-8):
Click the image to open in full size.

The main driver has no markings. I've measured the total resistance at the input port and it showed 3.5ohm. I would have been happier with an 8 ohm speaker, but hey, beggars & choosers...

I will also have a DS18S20 digital thermometer on the PCB controlled by the microcontroller. Just another gimmick

Still waiting for the PCBs...

And just in case this is not obvious, I am a noob and I am mostly figuring this out as I do it, so comments are welcome.
  Reply With Quote
Old 8th January 2019, 04:19 PM   #3
voltwide is offline voltwide  Ireland
diyAudio Member
 
Join Date: Jan 2010
I am going that road for some time, i.e. TPA3118 and 12V/1.4Ah SLA. It is amazing how much power you can produce over many hours with an average power consumption of 0.1~0.2 amps. So I would expect 12V/6.5Ah would do over the weekend trip as well.
Meanwhile I swapped the SLA and use a pack of 4x18650 LiIon accus, giving 14.4V/2.2Ah: More power, less bulky!
Perhaps you have some accupack from a cordless drill or similar? In that case the appropriate charger is already at hand...
__________________
tuby or not tuby, that is here the question!

Last edited by voltwide; 8th January 2019 at 04:23 PM.
  Reply With Quote
Old 8th January 2019, 05:45 PM   #4
imbra is offline imbra  Hungary
diyAudio Member
 
Join Date: May 2015
Location: Budapest
That is not a bad idea. However, a fully charged LiIon is 4.2V and 4x4.2V is 16.8V which is a bit more than the chip can take. The datasheet lists max recommended supply at 14.4V. Absolute max is at 20V, but I don't want to push it above recommended.

And bulk is not really a problem for me. The problem is estimating the battery capacity I need, and I will probably overshoot. I only get one charge, so at least 15 Ah, and more like 20-25. Better safe than sorry

I've tested the TPA3116 with a 6 cell LiPo battery at 25.2V. It was nice & loud The-neighbours-will-call-the-cops loud And that was only one 50W channel outputting around 20W with the CSR8635 configured to downmix stereo to a single mono channel.

Which is why I decided on to go with the TPA3136. It should be able to do 10W-12W without audible distortion in PBTL. I think that will be enough.
  Reply With Quote
Old 8th January 2019, 06:03 PM   #5
Think is offline Think  Netherlands
diyAudio Member
 
Join Date: Nov 2017
Location: Den Haag, Holland
TPA3136D2 based amp
When 20V is max, 16.8 is ok to use.
Why not use a tpa3116 board? At lower voltage and higher ohm speakers it is just as efficient as it's low power brothers. You could use 2x12v and a simpel dpdt switch to switch from parallel to serial and back; giving you 12V eco mode which will run very long at lower volumes and a 24V power/ loud mode which will drain the battery 3 times less slow with the same volume as the in eco mode.

Last edited by Think; 8th January 2019 at 06:06 PM.
  Reply With Quote
Old 8th January 2019, 06:11 PM   #6
Think is offline Think  Netherlands
diyAudio Member
 
Join Date: Nov 2017
Location: Den Haag, Holland
TPA3136D2 based amp
About the speakers: the tweets horizontally next to each other is a comb-filtering diaster. Put them at least vertically and as close together as possible.

// edit: or use them on their sides if you leave them like this.

Last edited by Think; 8th January 2019 at 06:14 PM.
  Reply With Quote
Old 9th January 2019, 09:17 AM   #7
imbra is offline imbra  Hungary
diyAudio Member
 
Join Date: May 2015
Location: Budapest
I could use the tpa3116 board I already have, but where is the fun in that? My main reason for doing this is to learn something. The second one is that I really enjoy designing and building something from scratch. Well actually, from scratch would imply an amp with discrete components, but using a chip and designing a PCB around that is good enough for now. Another reason for tpa3136 is that I already have 9 of these chips at home. A few years ago I built a bluetooth speaker based on a pair of PAM8304, and two 10W Visaton drivers in a transparent toolbox, but that wasn't loud enough. So I thought I might make a more powerfull amp for these speakers and found tpa3136 on Farnell and ordered 10 of them. I used one on a very simple board (no bluetooth, no output filtering) which I did just to see if I can solder the heat dissipating pad. I knew I can solder 0.65mm pitched pins (even 0.5mm is not really a problem), but that pad was scary. And to my surprise, it was very straightforward. Good flux and a horseshoe soldering tip from the bottom of the PCB did the job. Actually, it was so much easier than I expected that it could be that I just got very lucky. I wonder if I will be able to pull that off again...

And then I saw the speaker at my friend's place and asked if I can borrow that for the camping trip. So I bought a tpa3116 board to see what I can expect out of that speaker. It sounded amazing (all things considered) and I decided to ditch the original plan and make a mono 20W amp out of the chips I already have.

I will probably put both the ebay tpa3116 and my tpa3136 board in a single box and then mix & match I have a 1.3Ah 25V LiPo battery that will power the tpa3116 if I need to go very loud, and the tpa3136 powered from the SLA battery for everything else. And the I could even use the SLA battery to reacharge the LiPo if needed. A little crazy, but who cares

My tpa3136 board will display the battery voltage, so I will be able to estimate how much power I have left in the SLA.

Thanks for the tweeter suggestion, I didn't know that.
  Reply With Quote
Old 15th January 2019, 07:30 PM   #8
imbra is offline imbra  Hungary
diyAudio Member
 
Join Date: May 2015
Location: Budapest
I've got the PCBs! Yay!

I've assembled the first prototype, and of course, there are bugs a-plenty. The biggest one is that I didn't connect the amp's AVCC to power I've just connected the decoupling 1uF cap between AVCC and GND but it has nothing to decouple. A botch wire fixes this.

The second problem is that I've miscalculated the resistors for the battery protection voltage divider, so that instead of cutting the power off at 11.2V it cuts it off at 10.4V. I've selected the wrong threshold voltage for the chip I got Not too big of a problem.

Then I've messed up soldering the AVR. I've started soldering it but then noticed it is slightly misaligned, and when I tried to move it I lifted a few traces off of the PCB. But, I've managed to fix that.

And btw, white soldermask kinda sucks. It sure looks nice, but it peels off too easily if heated up. Or maybe this was just a bad batch?

I am getting sleepy, so I will continue testing in the next few days.
  Reply With Quote
Old 15th January 2019, 09:55 PM   #9
doctormord is offline doctormord  Germany
diyAudio Member
 
doctormord's Avatar
 
Join Date: Oct 2007
Black/White soldermask from the usual Chinese prototype PCB fabs sucks regarding reliability. Better stay with green/red/blue.
  Reply With Quote
Old 27th January 2019, 08:50 PM   #10
imbra is offline imbra  Hungary
diyAudio Member
 
Join Date: May 2015
Location: Budapest
After a few more cut traces, botch wires and facepal moments, things are (mostly) working. The circuit sounds decent, but it is quieter than I expected. I guess 20W is not as loud as I thought. I might try to change the power supply and increase the voltage to 16V just to see what happens. Maybe it will release the magic smoke...

The chip is barely heating up. It is lukewarm after playing a 440Hz sine for a few minutes at just below clipping. This bottom pad soldering really does wonders.

I have a 4.7 Ohm 10W resistor as a dummy load, and I am playing the 440Hz sine wave into the load. The first three measurements are created with the ground clip and probe connected across the dummy load:

440_full1.png 440_full2.png 440_full4.png

I guess this is nice, but things get a little more complicated when I connect the oscilloscope ground clip to my circuit ground, and two probes to the speaker outputs:

440_diff1.png 440_diff2.png 440_diff3.png

That 1.2V peak2peak noise is clearly the Class D switching frequency, and it is in phase which is why I didn't see it in the first batch, but this is where I need help: How can I figure out what is causing this? Is this even a problem?

I have unshielded coils and a 680nF 50V X7R capacitors at the output. Could that have something to do with this?

I have tried waves with lower frequencies (down to 55Hz) and the output looks similar to the 440Hz. I have not tried to go above 440Hz yet, I ran out of time, but I will check that too.

What else can I test? I don't have a spectrum analyzer, but I might try the FFT of my oscilloscope.


Thanks for reading and thanks for any help or comments!
Attached Images
File Type: jpg WhiteBoy_small.jpg (111.7 KB, 211 views)
  Reply With Quote

Reply


TPA3136D2 based ampHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Power supply for Audio amplifier : high-voltage based watts or high-current based wat cosmicmind Chip Amps 3 28th November 2017 12:34 PM
Another Op amp based amp xXBrunoXx Solid State 7 1st March 2017 11:26 AM
PC based fft xcicc Equipment & Tools 26 14th June 2016 06:59 PM
PC-based server versus network-based player hillbear PC Based 14 12th July 2011 12:13 AM
UCD based amp oldmaelstrom2 Class D 3 27th June 2007 10:10 AM


New To Site? Need Help?

All times are GMT. The time now is 08:30 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Copyright ©1999-2019 diyAudio
Wiki