Sound!

A "new fashioned" televisor, using an Arduino to drive the motor and display.

Moderators: Dave Moll, Andrew Davie, Steve Anderson

Re: Sound!

Postby Steve Anderson » Thu Jul 06, 2017 2:12 pm

Ah! Now I'm assuming this amplifier is a standard analogue device, either Class B or BTL (Bridged TansformerLess). You're correct, 1.5W at 5V is 300mA, but that's a constant (resistive) load. An audio amplifier is nothing like a constant load. In addition you have to allow a factor for the heat generated in the output transistors (Inefficiency).

I' can't recall the formula for calculating peak supply current in this form of amp, but here I would guess somewhere in the region of over an amp. So the regulator is shutting down on audio peaks thereby resetting the Micro. Use a separate regulator for the audio amp fed direct from the 'power brick'. Is it only a 5V supply amp or has it a range of supply voltages?

Even if it were a Class D amp the above still applies (to an extent).

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Sound!

Postby Andrew Davie » Thu Jul 06, 2017 2:24 pm

Steve Anderson wrote:Ah! Now I'm assuming this amplifier is a standard analogue device, either Class B or BTL (Bridged TansformerLess). You're correct, 1.5W at 5V is 300mA, but that's a constant (resistive) load. An audio amplifier is nothing like a constant load. In addition you have to allow a factor for the heat generated in the output transistors (Inefficiency).

I' can't recall the formula for calculating peak supply current in this form of amp, but here I would guess somewhere in the region of over an amp. So the regulator is shutting down on audio peaks thereby resetting the Micro. Use a separate regulator for the audio amp fed direct from the 'power brick'. Is it only a 5V supply amp or has it a range of supply voltages?

Even if it were a Class D amp the above still applies (to an extent).

Steve A.



Thanks Steve. It's 5V supply to the amp. It's a class-D pretty much the same as this one.
I will try powering direct from the power input/brick, converting to about 5V via this little device.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Sound!

Postby Andrew Davie » Sat Jul 08, 2017 2:53 am

Purely by chance, when manipulating the circuit design in "Eagle", I stumbled across some notes about the "SD" pin on the PAM8302A amplifier board. This is a "sound disable" pin, and the notes said that it was useful to fix the "pops" on the speaker when turning on/off. I can surmise that it handles the speaker position to remove the jarring pops automatically, so you can basically send the speaker anything at startup and not worry about where it might "be". That's great, as I don't have to do it in code. So I added the "SD" pin to my circuit diagram connections, going to pin 5 on the Arduino. I now need to write a few "enable SD" and "disable SD" type switching in the software at the appropriate places. Handy.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Sound!

Postby Andrew Davie » Sun Aug 06, 2017 1:49 pm

Andrew Davie wrote:Purely by chance, when manipulating the circuit design in "Eagle", I stumbled across some notes about the "SD" pin on the PAM8302A amplifier board. This is a "sound disable" pin, and the notes said that it was useful to fix the "pops" on the speaker when turning on/off. I can surmise that it handles the speaker position to remove the jarring pops automatically, so you can basically send the speaker anything at startup and not worry about where it might "be". That's great, as I don't have to do it in code. So I added the "SD" pin to my circuit diagram connections, going to pin 5 on the Arduino. I now need to write a few "enable SD" and "disable SD" type switching in the software at the appropriate places. Handy.



Well, I did this but the results are disappointing. Yes, the SD enable/disable works, but unfortunately the amp isn't 'intelligent'. The enable/disable is just an on-off and it had no effect whatsoever upon the jarring clicks and pops. So I reverted to a software solution. I have a flag that tells me when video is running or not. The interrupt that services the sound and audio runs all the time, no matter what - so this flag is necessary to prevent the interrupt from advancing the video/audio index pointer. That all works fine. What I do is store the audio value in a variable, so we always know what the audio (=speaker position) is. When the video is NOT running, then I slowly return the audio variable to the "zero" position - over a second or so. That is, a very small movement is made each interrupt such that the movement is inaudible. This solution seems to have almost totally removed the clicks and pops and now I can random-access via the slider to any point in the video and I don't have those annoying sounds. Yay.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Previous

Return to Andrew Davie's Arduino Televisor

Who is online

Users browsing this forum: No registered users and 2 guests