Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:45 29 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite: driving a small speaker

     Page 7 of 14    
Author Message
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 713
Posted: 01:16am 01 Apr 2023
Copy link to clipboard 
Print this post

27 mm .... no enclosure ?
my site
 
mozzie
Regular Member

Joined: 15/06/2020
Location: Australia
Posts: 68
Posted: 01:39am 01 Apr 2023
Copy link to clipboard 
Print this post

@Thwill
Apologies for the cranial detonation   I hope you've recovered  
Analog electronics takes years to learn, I'm at 40+ and still learning  
If it's any consolation, my programs cause regular cranial detonation  

For driving A small 8R speaker from a Pico:

@Volhout
As suggested, the DRV8838 H bridge module is now hooked up and makes an excellent PWM buffer amp. Output is almost (-200mV) rail to rail into a 8R voicecoil (8R + 37uH) and is virtually silent at no signal and equivalent to the 3W PAM at full output.

Current draw is 50mA with a 100uH inductor in series with the speaker.

Circuit is Module + Supply decoupling + Speaker + (optional) Inductor
If designing anything with simple audio output this will be my choice.

Output is better than the emitter follower design but you are reliant on the supply of the module or getting the tiny package soldered, I like discrete solutions sometimes due to an oversupply of transistors etc here  

Regards,
Lyle.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 05:01am 01 Apr 2023
Copy link to clipboard 
Print this post

Volhout, some questions about your latest clipping and filter circuit if I may please?

- The capacitor C3 converts the PWM signal to an AC one. Does the AC signal need a high value resistor to refer it to zero volts or does the clipping action of the diodes do that?

- Tom’s music does not use frequencies as high as 5kHz. Unless he does change to a triangle wave, do you really need a filter set to over 7kHz?

- Just for me. Would you please temporarily remove one of the capacitors in the filter(s) and tell me if you can tell the difference?

Thanks

Bill

Keep safe. Live long and prosper.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4256
Posted: 06:50am 01 Apr 2023
Copy link to clipboard 
Print this post

  Turbo46 said  Volhout, some questions about your latest clipping and filter circuit if I may please?

- The capacitor C3 converts the PWM signal to an AC one. Does the AC signal need a high value resistor to refer it to zero volts or does the clipping action of the diodes do that?

- Tom’s music does not use frequencies as high as 5kHz. Unless he does change to a triangle wave, do you really need a filter set to over 7kHz?

- Just for me. Would you please temporarily remove one of the capacitors in the filter(s) and tell me if you can tell the difference?

Thanks

Bill


The 44kHz is always ON at 3.3Vpp levels, so the diode clipper turns it into a +0.6V/-0,6V 44kHz signal. Each Si diodes get 5mA current, so they present roughly 25/5=5 ohm dynamic resistance. With 330ohm drive resistor this attenuates the noise on the pico power rails with a factor 33. Not perfect, but significantly better.

There is a DC path through the potmeter of the PAM8403, but that is not dominant. The DC output voltage is determined more by the imbalance of the diodes.

Removing a capacitor makes no difference on the ears when using the small speakers and PLAY TONE with game frequencies. With music, it sounds a little brighter (which is logical, removing 1 stage brings -6dB to -3 dB). So you could use a single stage with 2.2k and 22nF

The 7 kHz cut off makes a difference when using square waves, and triangle waves. Not with sine waves and 2kHz tones...

I am excited about mozzie's findings. Simply replacimng the analog audio circuit with a digital one. A volume potmeter (100ohm in series with the speaker) and you are done. With a cheap aliexpress module.

Volhout
Edited 2023-04-01 16:52 by Volhout
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 07:07am 01 Apr 2023
Copy link to clipboard 
Print this post

This is getting quite circular.

"Simply replacimng the analog audio circuit with a digital one. A volume potmeter (100ohm in series with the speaker) and you are done."

Something like that was proposed near the beginning, yet here we are turning PWM into analogue (and inheriting the noise) so it can be turned back to PWM to drive the speaker.

Was this all planned to culminate on April 1?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6814
Posted: 07:17am 01 Apr 2023
Copy link to clipboard 
Print this post

If there isn't a lot of current draw on the 3V3 line, does OPTION POWER PWM help at all?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 07:54am 01 Apr 2023
Copy link to clipboard 
Print this post

Now totally confused  

Do we have a proposed solution that will provide reasonable non-clipped output into a 8 ohm speaker? i.e. sine wave that looks like a sine wave?
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 07:57am 01 Apr 2023
Copy link to clipboard 
Print this post

@Volhout, sorry I missed the resistance to 0v via the filter resistors and the volume control pot. Your results tell me that a single stage filter will do the job as long as Tom continues to use a sign wave.

@Phil, I think I was the first to suggest an H-bridge chip after seeing mozzie's push-pull circuit. He says that it needs a 100mH in series with the speaker to reduce the current to 50mA, one of those rated at (say) 100mA to be on the safe side may be a little large. Without it mozzie said it would take 80mA. Is that too much current? Will that be OK for the voice coil? Will the 44.1kHz at full power overheat the voice coil?

Bill
Keep safe. Live long and prosper.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 08:08am 01 Apr 2023
Copy link to clipboard 
Print this post

Using those measurements RMS power is unlikely to be more than 80mA x 3.3V = 260mW. Not an issue, but an inductor wouldn't hurt
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4256
Posted: 08:15am 01 Apr 2023
Copy link to clipboard 
Print this post

  phil99 said  This is getting quite circular.

"Simply replacimng the analog audio circuit with a digital one. A volume potmeter (100ohm in series with the speaker) and you are done."

Something like that was proposed near the beginning, yet here we are turning PWM into analogue (and inheriting the noise) so it can be turned back to PWM to drive the speaker.

Was this all planned to culminate on April 1?


No, this was my plan from the beginning. Just add a power buffer to the digital pwm output, powered from a clean (battery) voltage, and let it drive the speaker directly. A crude low pass filter to avoid destroying the speaker coil with 44kHz.
Volume control through series potmeter in the speaker wire. But you cannot connect to a hifi set. This is pure gameboy circuit. Only drawback is that for stereo you need 2 circuits, and 2 speakers. That is why I looked at DVR8837. It has 2 half bridges, not 1 full bridge as 8838.
2 speakers is not bad if you want some decent air movement(sound).


Started with PAM8403 since Tom had that already, and complained about the noise.

Volhout
Edited 2023-04-01 18:19 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 08:21am 01 Apr 2023
Copy link to clipboard 
Print this post

Hi folks,

For the "final" version I'm not wedded to any particular components/modules as long as they are not made of unobtanium and ideally no SMD, and if it must be SMD then "big" SMD.

If the brain trust decided it's the best option then I'm sure there will be room for an inductor and an extra filter stage even if the requirement for it is borderline.

I'm playing with the PAM because it's what I have and because it's all educational.

Thanks for your continued interest,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4256
Posted: 08:30am 01 Apr 2023
Copy link to clipboard 
Print this post

@peter

So many solutions

Headset/hifi
Pico-lowpass filter-output
Need: linear voltage regulator to limit ripple
This is the inductor filter, or your opamp active filter.


Gameboy
Pico-lowpass filter-potmeter-pam8403-speaker
Need: linear voltage regulator or pwm clipper

Pico-buffer-lowpass filter-potmeter-speaker
Need: power the buffer direct from battery. This is a full digital solution. Only at the speaker it becomes analig.

Last option I still wait for parts, but Mozzie already has them.

The gameboy options are not suited for hifi connection. These are specific for Toms handheld.

Volhout
Edited 2023-04-01 18:35 by Volhout
PicomiteVGA PETSCII ROBOTS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3816
Posted: 08:57am 01 Apr 2023
Copy link to clipboard 
Print this post

Mozzie/Volhout

Maybe a new thread for the H bridge version?

Is it this

John
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4256
Posted: 08:59am 01 Apr 2023
Copy link to clipboard 
Print this post

Yes, in essence. but the 5 transistors are replaced by a chip.
Edited 2023-04-01 19:00 by Volhout
PicomiteVGA PETSCII ROBOTS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3816
Posted: 09:03am 01 Apr 2023
Copy link to clipboard 
Print this post

  Volhout said  Yes, in essence. but the 5 transistors are replaced by a chip.

OK... I feel a schematic is about to be posted... maybe?

John
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 09:59am 01 Apr 2023
Copy link to clipboard 
Print this post

  Quote  Maybe a new thread for the H bridge version?

That's a good idea.

Maybe Tom could start a new one too:

"Using the PAM4803 with the Tomboy"

Maybe that would have less chance of being hijacked?

Bill
Edited 2023-04-01 20:00 by Turbo46
Keep safe. Live long and prosper.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6814
Posted: 11:08am 01 Apr 2023
Copy link to clipboard 
Print this post

"Everything You Ever Wanted To Know About PicoMite PWM Audio (But Were Afraid To Ask)"

To paraphrase just a little.  :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
mozzie
Regular Member

Joined: 15/06/2020
Location: Australia
Posts: 68
Posted: 11:53am 01 Apr 2023
Copy link to clipboard 
Print this post

G'day All, madly attempting to stuff the worms back in to the can, alas I think the effort is in vain..  

Fairly new here so apologies if offense has been caused or my efforts are seen as hijacking, I believe this thread is titled "PicoMite: driving a small speaker" and seeking filter and amp circuits for this purpose.

As Tom has stated he is open to options other than the PAM amplifier and the "H bridge" is just that, except amp then filter. However I am more than happy to start (or follow) a new thread on this if he thinks this is diverging too far from the original intent of the thread or causing confusion, however I still believe for the TomBoy application, it would be perfect.
Only downside is you have to buy it as a module due to the chip package  

The circuit for those interested:



Current draw from Vsys on USB  (4V8) 30mA idle - 160mA active (200HZ sine @ 100%)
Current draw from Vsys on BATT (4V2) 26mA idle - 150mA active (200HZ sine @ 100%)
Current draw with SLEEP LOW = SFA (very low)
Volume control via software in sound function (or pot on A/D)

As its class "D" the speaker coil resistance and inductance in series with the 100uH inductor at 44KHZ  means the voice coil has around 130mW idle current, nothing to worry about.
Also almost no real 44khz from the speaker using an ultrasonic transducer as a microphone (and our cats aren't bothered by it either)

Happy to help either way.

Regards,
Lyle.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3816
Posted: 11:59am 01 Apr 2023
Copy link to clipboard 
Print this post

I'm thinking the 130mW is a better measure of tweeter survival than the transducer measurement (I guess a tweeter might fail to move adequately yet overheat, with rather more than 130mW).

Er, 130mW isn't current, it's power, dunno whether you meant 130mA?

John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 12:19pm 01 Apr 2023
Copy link to clipboard 
Print this post

It's about the same either way.

130mA^2 * 8R = 135mW

at 160mA it's 205mW - barely warm.
Edited 2023-04-01 22:32 by phil99
 
     Page 7 of 14    
Print this page
© JAQ Software 2024