2 Power-related questions Teensy 3.1 + audio shield + TFT + class D amp

Status
Not open for further replies.

kig

Active member
Hello!

I for the FilxCapacitor project, I need to power both the Teensy 3.1 + audio shield, as well as the amp with two small 4Ohm speakers. I am using this amp: Stereo 2.8W Class D Audio Amplifier - TS2012 (https://www.adafruit.com/products/1552) from Adafruit, and these 2W speakers from Polulu: http://www.pololu.com/product/1258

My circuit has two separate SPST switches: One is for turning off all power (and sits right after the 5VDC power barrel), and one is for turning off the amp specifically. The reason I want this is so that I can turn off the amp completely and have speakers be completely silent, when not in use. Plus it will drain less power.

I am attaching a very simple circuit diagram (my first eagle drawing, so please don't be mean :))) to show how it's wired.

FlixCapacitorPower.png

My first question is: did I connect them correctly, meaning – is it OK for the amp's VCC/GND and Teensy VIN/GND to be directly connected (via a switch)? Do I need to isolate them from each other in any way? Do I need to put a diode to prevent "back current"?

The real problem is that right now when I am reloading BMP images on the TFT screen, I am hearing an audible effect through the speakers, whether or not the music is playing (as long as the Amp has power).

There are two additional parts that confuse/complicate things for me:
  1. Amp has Left +/- and Right +/- for input signal, but I think that this "-" does not mean ground like it usually does. So I am NOT shorting "-" on the line input to the Amp's ground. Should I be?
  2. I have a 3V battery connected to Teensy supplying backup power for the clock. Just in case this matters

My second question is: I want the TFT display's LED not be always on. The instructions typically connect the LED to the VIN, which makes it on all the time. I want to control when I turn the display on/off programmatically, so I routed the LED connector to the digital pin #4, and setting it to HIGH. I am using a variable potentiometer (0-100Ohm), but I noticed that the brightness on the display was decreased significantly when I switch the LED from VIN to D4. Is that due to current limitation on the pins? Am I not doing this correctly? Should I drop the resistor to allow the LEDs be brighter?

Thanks so much for any help!

And Happy Thanksgiving!
 
D4 will not directly drive the LED back light, you will have to use some form of buffer to switch the back light on and off (transistor, IC led driver).

How are you driving the input to the amp, line-out or the headphone jack? If using line-out ground the "-" input on the amp. Do not use the headphone output to drive the amp, the headphone common must not be connected to ground.
 
Quick Google search on arduino high side mosfet swith. You will still need the series current limiting resistor.
 

Attachments

  • led driver.png
    led driver.png
    11.7 KB · Views: 1,320
D4 will not directly drive the LED back light, you will have to use some form of buffer to switch the back light on and off (transistor, IC led driver).

How are you driving the input to the amp, line-out or the headphone jack? If using line-out ground the "-" input on the amp. Do not use the headphone output to drive the amp, the headphone common must not be connected to ground.

Thanks so much for your reply!

I decided to switch LED for the TFT to use secondary circuit (shared with the amp) instead of using a pin. This way it can get as much current as it needs, and it's working great.

RE: Audio, I think you are right, and that I have to connect "-" to the ground. I am not doing right now and there is a terrible buzz. I am trying to figure out if it's due to a loose contact, or it's because I am not grounding something I should be (which could very well be that).

I *am* using line-out on the Audio Shield, but I am using to to split audio signal into a headphone jack AND input on the amp. Come to think of it, I probably need to route headphone jack from the audio shield to headphones, not line out.

Another question is about a capacitor: I heard that correct usage of capacitor eliminates pops and clicks. Where should the capacitor be installed in my diagram to do that? RIght now when I turn on the Amp switch I hear audible pop. I want to get rid of it..

Thanks so much!
 
Are you actually using a shorting jack for the power in? I think I would try lifting one of the leads on the 1000uF cap and see if that lessened the thump, perhaps two 47 uF caps each located as close to the teensy and amp as you can get. The "-" must go to ground on the amp. Good wiring and lead dress. Per the data sheet on the amp input signal leads should be parallel to the associated ground lead. Dress signal lines away from power and speaker lines, a class D amp generates a lot of noise on the speaker lines. The amp has shut down pins on both L and R channels perhaps remove the pull ups and replace with pull downs and enable the amp with a digital output somewhere in setup().
 
Thanks Cartere for the info!

I grounded the inputs on the amp, and added a 47uF capacitor right at the amp. Looking at their schematics they had two smaller capacitors already, so perhaps this was unnecessary but I did it just in case.

I also connected my headphones jack to the headphones output, instead of the line out.

In any case – vola! It sounds clean, and no more pops the power is turned on / off. Yay! :)
 
Can you please post the circuit - interesting project

Thanks Cartere for the info!

I grounded the inputs on the amp, and added a 47uF capacitor right at the amp. Looking at their schematics they had two smaller capacitors already, so perhaps this was unnecessary but I did it just in case.

I also connected my headphones jack to the headphones output, instead of the line out.

In any case – vola! It sounds clean, and no more pops the power is turned on / off. Yay! :)

Would be great if you could post the schematic that is currently working for you using the Audi card Line Out, TFT LCD and Adafruit Amp. Working on something similar and have some issues with noise.
Many Thank You(s)...
 
Status
Not open for further replies.
Back
Top