Internal Speaker

This section is for discussing everything about Next hardware and latest updates.
mitchelln
Posts: 7
Joined: Wed Jun 07, 2017 10:18 am

Re: Internal Speaker

Postby mitchelln » Thu Oct 08, 2020 2:05 pm

Okay, so the LM386 will drive low impedance speakers.
Maxes out at 0.2W at 5V. A bit more if you drive it directly off the 9V supply, although you may get some noise then.
Should be loud enough. You'll need more than the reference design x20 gain, but it can be achieved with an additional cap and resistor. That little board in the pic posted may have this.
Just depends how much gain you can usefully achieve out of it with the tiny input level available.
I guess there's only one way to find out!

I'll also measure the overall gain of my setup to see what you need to target.

User avatar
Centurion
Posts: 29
Joined: Thu Jun 15, 2017 7:23 am

Re: Internal Speaker

Postby Centurion » Thu Oct 08, 2020 7:01 pm

mitchelln wrote:
Thu Oct 08, 2020 2:05 pm
Okay, so the LM386 will drive low impedance speakers.
Maxes out at 0.2W at 5V. A bit more if you drive it directly off the 9V supply, although you may get some noise then.
Should be loud enough. You'll need more than the reference design x20 gain, but it can be achieved with an additional cap and resistor. That little board in the pic posted may have this.
Just depends how much gain you can usefully achieve out of it with the tiny input level available.
I guess there's only one way to find out!

I'll also measure the overall gain of my setup to see what you need to target.
Hey, thanks for checking that out.

I wonder why the Next didn't like the LM386 amp I got. I need to look it over and try to figure it out. It does have an LED which lit up, but I'm not experienced enough to know if that could draw too much current or not.

The power light on the Next didn't turn on and I didn't get any video when I had it connected, which makes me wonder if that particular amp is stealing too much power from the lines.
ZX Spectrum Next Backer №1,104 / ZX Spectrum Harlequin Rev. G owner / USA ZX Spectrum enthusiast

mitchelln
Posts: 7
Joined: Wed Jun 07, 2017 10:18 am

Re: Internal Speaker

Postby mitchelln » Fri Oct 09, 2020 9:17 am

I noticed in your picture that you've got a grey wire connected to the 1st pin of the speaker header.
That's connected to the 3.3V line on the Next. Are you sure your grey wire isn't connected to ground on the amplifier? That will short out the 3.3V rail. The Next will not be happy about that!

User avatar
Centurion
Posts: 29
Joined: Thu Jun 15, 2017 7:23 am

Re: Internal Speaker

Postby Centurion » Fri Oct 09, 2020 3:41 pm

mitchelln wrote:
Fri Oct 09, 2020 9:17 am
I noticed in your picture that you've got a grey wire connected to the 1st pin of the speaker header.
That's connected to the 3.3V line on the Next. Are you sure your grey wire isn't connected to ground on the amplifier? That will short out the 3.3V rail. The Next will not be happy about that!
Yikes!!! Yes it was. I was going off this image that had been posted here:
spkr-pin.jpeg.jpg
spkr-pin.jpeg.jpg (143.63 KiB) Viewed 2972 times
ZX Spectrum Next Backer №1,104 / ZX Spectrum Harlequin Rev. G owner / USA ZX Spectrum enthusiast

User avatar
Centurion
Posts: 29
Joined: Thu Jun 15, 2017 7:23 am

Re: Internal Speaker

Postby Centurion » Sun Oct 11, 2020 3:31 am

Ok, new update here.

I got the LM386 amp working tonight thanks to mitchelln spotting my evil doings on the wiring! So glad I didn't destroy my Next! :shock:

My thanks mitchelln 8-)

I disconnected the speaker negative and ran only the positive output into the amp input. Once that was worked out, the Next fired up just fine and I got some volume finally! :D

The noise that has been discussed here from the WiFi module is noticeable, but so far on my initial testing might be bearable for myself. Time will tell on that.

I did a few different tests. From the 9V line, it seems to me like the noise/crackling/chirps are more noticeable than when I have it connected to the 5V line. I also tried the previous 20mm 8 ohm speaker I had purchased and it worked as well, although the audio was less defined and not as good as the ABS-231-RC, which isn't great either, but in line with an original speccy or Harlequin and probably ok for what I have been looking to achieve.

The volume level with the ALL audio setting when turned up almost all the way with the Potentiometer is pretty decent and I think will be enough for me without requiring a pre-amp. Like Z80Man had mentioned earlier in this topic, the audio quality isn't great with such a small speaker like the type I have right now and could be better with something larger I think. This amp really pushes it to the limit and it's more noticeable when playing AY audio. I might see what I have laying around.

The big clunky amp board I purchased was more of a test to find out if the LM386 chip would work for my needs and wasn't something I planned on trying to squeeze inside the Next case. It was domestic shipping, so I ordered it first.

I think I'll try one of the smaller LM386 boards with the SMD components to see if I get similar results, but that will take some time as I haven't found the type I want to try here in the states. Might be a month or so before I can get one from China.
LM386.jpg
LM386.jpg (41.08 KiB) Viewed 2937 times
Appreciate all the helpful discussion from everyone and hope this can be beneficial to the community. I will continue to keep this topic updated as I move along and welcome anyone else to participate as well.

Cheers! :ugeek:
ZX Spectrum Next Backer №1,104 / ZX Spectrum Harlequin Rev. G owner / USA ZX Spectrum enthusiast

Z80Man
Posts: 21
Joined: Wed Jul 08, 2020 5:53 am

Re: Internal Speaker

Postby Z80Man » Sun Oct 11, 2020 1:04 pm

Hi guys, I'm going to bring a few answers to your latest thoughts and experiments.

- Using the 9 V main supply is indeed better, or you'll risk draining too much current out of the 5 V regulator and get nothing left to correctly power the Next (especially at 28 MHz).

- However, the 9 V supply is indeed noisy as it's not regulated nor filtered enough, since it's not intended to directly power the Next circuits. You can add the necessary capacitors (you'll usually use a large capacity value electrolytic capacitor to filter the lowest frequencies noise + a small ceramic or tantalum one to filter the highest ones, for instance).

- The 9 V supply voltage and current could also fluctuate depending from how the Next will draw, depending of what it's doing, so replacing the provided one with a stronger one (more Amperes output) may also help, especially of you're planning on really getting some powerful audio output. After all, the actual output has been left to the monitor or external amplified speaker for a reason. And it would still be a good idea if you intend to use the expansion port anyway.

- The suggestion to use a mic amplifier rather than a speaker amplifier is interesting, at least on the input impedance side, since the output impedance on the internal speaker is rather high. However, the output impedance and power won't fit your needs, as a so-called microphone amplifier is rather a microphone preamplifier and impedance adapter and is normally not meant to directly drive a classical low impedance (2 to 8 ohms) speaker. Alternately, such microphone amplifiers meant to drive speakers in order to turn them into megaphones or public address speakers do indeed exist, but you'll have to specifically select the relevant model.

In conclusion, a small amplifier module such as the one above, powered from the 9 V main line with additional filtering capacitors to reduce the noise should do the trick. Wiring a pair of speakers in parallel will also greatly boost the output volume by doubling the speaker emission and halving the output impedance at the same time (just match the minimum impedance allowed for amplifier module). And of course, using a more powerful, and possible better regulated and filtered 9 V external power supply will help a lot keeping the Next being correctly powered.

I also suggest you use shielded audio wire (scavenged from and old PC loom to connect the motherboard audio output to the casing front panel, for instance) and encase the amplifier inside a shielded box (use copper sticker foil like the kind used to shield electric guitars, for instance) wired to the ground line to isolate the amplifier from RF noise coming from the Wi-Fi module and maybe also the RAM chips (I don't know how the static RAM chips behave on this matter because I haven't checked, but the original Spectrum dynamic RAM chips were emitting so strongly you could receive them 50 meters away with a small transistor radio).

The Americans are quite strict regarding RF noise from domestic appliances and they're all internally shielded with metal foil, but either the original Spectrums and the Next casings are all unshielded ABS plastic, so they're do emit RF noise all around (couldn't be helped with the Wi-Fi module mounted inside, though).

Speaking of which, if you intend to shield your Next casing, don't forget to move the Wi-Fi module outside the casing with a flat wire and a male to female ICD connectors extension cable (or since they're easier to find, a male to male extension cable and solder a 8 pins IDC header to the Wi-Fi module).

Maybe just doing this alone would reduce the noise from the audio output, by the way. Or even without shielding the casing, you could move the Wi-Fi module away from the audio and video sockets using such an extension cable (for instance, to move it to the empty space on the right hand side of the casing)

mitchelln
Posts: 7
Joined: Wed Jun 07, 2017 10:18 am

Re: Internal Speaker

Postby mitchelln » Sun Oct 11, 2020 4:02 pm

I've measured the gain of my setup. It's around 120, so pretty high. The output from the Next board speaker header is only 300mv. There's also a nasty high frequency element on it. Way above audio range though.

Re. powering of the 9V. You're probably better off adding another regulator to prevent fluctuations and also lower noise.

User avatar
Centurion
Posts: 29
Joined: Thu Jun 15, 2017 7:23 am

Re: Internal Speaker

Postby Centurion » Tue Oct 13, 2020 5:53 am

Quick update:

I ordered one of the above surface mount LM386 amp's to try out, but it will be arriving from China and may take some time.

So for the meantime, I minimized the bulky amp I have on hand and stuffed it inside the Next case so I could experiment with it while encased. I have the positive speaker output from the Next's J3 connected to the positive audio input on the amp and the amp is powered from the Next's J15 5V and Ground.
20201013_002244.jpg
20201013_002244.jpg (136.87 KiB) Viewed 2852 times
Removing the pot from the amp was a bit tricky and took some time to wrap my brain around, but I measured the resistance between the pins and adjusted the resistors until I had a suitable volume output. For now, I settled on using a 100k and 4.7k in place of the potentiometer. The pot when fully cranked up was a bit too much for my speaker. I considered jumping it for max volume but decided to stick with the 4.7k resistor to bring it down a notch.

When encased I can now hear it several feet away. Quite a bit of the AY definition is easily lost with this combo, but for my personal needs it doesn't really bother me and considering before I could barely hear it at all, it's a big improvement. This is about how I had originally expected the Next to sound like if I added a small internal speaker, so I'm near mission accomplished.

Regarding the noise from the lines, while encased it's very quiet. I have to hold my ear up to the computer when there's silence to really notice. And considering the speaker can easily be disabled in the menus, this isn't a huge problem for me personally.

I also decided to add an Rpi0 while the case was open and was able to test a TZX file finally and it was nice being able to hear the 'tape' loading. :)

Further thoughts... I might try 2 of these speakers or a larger laptop speaker to improve sound quality. Might experiment with shielded wire and/or amp shielding as well.

Also, I'd like to figure out if I can power the Wifi module off/on through a software command. That could be handy if the noise becomes an issue.
ZX Spectrum Next Backer №1,104 / ZX Spectrum Harlequin Rev. G owner / USA ZX Spectrum enthusiast

mitchelln
Posts: 7
Joined: Wed Jun 07, 2017 10:18 am

Re: Internal Speaker

Postby mitchelln » Tue Oct 13, 2020 5:01 pm

You can turn off the WiFi module with the command:
REG 2,128

All the noise then stops 😊 I think the WiFi module needs it's own regulator really. I might give it a go.

thefunkygibbon
Posts: 8
Joined: Thu Feb 13, 2020 7:49 pm

Re: Internal Speaker

Postby thefunkygibbon » Tue Nov 10, 2020 11:11 am

so am i understanding then that there is no way to get an 'unamplified' speaker of any sorts in the case that will be much better than the Piezo one?
Was the original ZX Spectrum amplified via the board or something?


Who is online

Users browsing this forum: No registered users and 8 guests