0
Share:

[Solved] Speaker  

  RSS

Schuemi
(@schuemi)
Joined: 3 months ago
Posts: 16
8. April 2019 9:37 AM  

Hello,

I have a problem to get the speaker work. In the PocketStar.cpp I can read that the speaker should be on PIN14 (PA02), but I cannot get any noise out of it. I tried to use it as an analog port, a digital port and send to it pwms in several frequensis, but nothing. Not a single crackling.

Maybe my speaker's broken, I don't know. Do you have any test program to check the speaker?

 

Thank you!

 

 


Quote
Gürkan Dogan
(@gd175)
Administrator
Joined: 4 months ago
Posts: 22
8. April 2019 11:25 AM  

We had forgotten to mention that on Kickstater but we had to leave out the speaker for safety reasons. Due to a error in the PCB design, the amplifier became very hot when sound was played. But the amplifier itself is still on the board and in the code are still parts for sound.

Unfortunately we couldn't change the design because we were already too late. If we would build another prototype, the shipment would be delayed for at least another 2-3 months. :/

We are designing a second improved version of the PocketStar, but it runs with the same software. We may then exchange a few PocketStars for those who want the improved PocketStar.

We are very sorry for that!

175


ReplyQuote
Schuemi
(@schuemi)
Joined: 3 months ago
Posts: 16
8. April 2019 11:44 AM  

Okay, I noticed the hot amplifier 😉

That can happen, so I won't include the sound, good to know. 

Please keep in mind that if it is repaired, the software must know if it is a version with a working speaker or a version without in order not to overheat the amplifier. Or you can use a different PIN, of course 😉

 


ReplyQuote
Gürkan Dogan
(@gd175)
Administrator
Joined: 4 months ago
Posts: 22
8. April 2019 4:24 PM  

When there are new games with sound for the next version of the PocketStar, it simply won't play on the current PocketStar version.

But don't worry, the amplifier can't overheat since the speaker doesn't close the circuit. 🙂

175


ReplyQuote
mifritscher
(@mifritscher)
Joined: 2 months ago
Posts: 7
19. April 2019 11:39 AM  

Hi,

what is the error in the design? I would like to have a speaker 😉 Is there a way to fix the PCB by hand? An additional resistor to limit the current (and the loudness) would count as well 😉


ReplyQuote
Gürkan Dogan
(@gd175)
Administrator
Joined: 4 months ago
Posts: 22
19. April 2019 1:19 PM  

When we tested the speaker, the sound was played but there was a noise louder than the sound itself.

It is very difficult to amplify the sound of the PocketStar, because the output current is just 7mA. If you amplify that, the background noise will also increase. We tried to filter it with a capacitor, but it didn't make a big difference.

It would have been better if we had implemented the example of Arduino.

In the next version we will definitely install a speaker and some other features. Then we will exchange some PocketStars as I have already said. 🙂

175


ReplyQuote
mifritscher
(@mifritscher)
Joined: 2 months ago
Posts: 7
19. April 2019 2:57 PM  

hmm, 7mA is rather much current in my opinion... At 3,3V, this is a impedance of about 500 Ohm - much less than the normal aux signals. Even a simple transistor should be able to convert this to a impedance of about 8-32 Ohm... Did you try a digital or analog signal? The D/A converter has a much higher impedance - the datasheet only guarantees "< 5 kOhm). At least for me, the possibility to drive the speaker with a simple digital square signal would be enough. Just to be sure: DRVSTR was 1 ?

Is there a circuit plan for the pocketstar?


ReplyQuote
Gürkan Dogan
(@gd175)
Administrator
Joined: 4 months ago
Posts: 22
19. April 2019 4:19 PM  

We used a single transistor amplifier to save space. It would have been better to take the example of Arduino and use a 4-layer PCB. We will do that in the next version.

We used several different resistors & capacitors but nothing changed it.

The sound was very quiet and the noise was very loud. With a darlington transistor it could amplify the sound again but I really do not know what causes the noise.

Here is the schematic of the amplifier circuit:

1555683586-Amp.png
This post was modified 2 months ago by Gürkan Dogan

175


ReplyQuote
mifritscher
(@mifritscher)
Joined: 2 months ago
Posts: 7
19. April 2019 4:49 PM  

Hmm, this schematics remembers me about Fig-3 at https://www.hackster.io/jwzumwalt/single-transistor-audio-amp-32033a - but your R16 is 10 times higher, and I don't understand why. I think that this explains your problems as well...

I think I had rather used something like http://homediyelectronics.com/projects/simpletransistoramplifier/ - or even like Fig. 1 at https://www.hackster.io/jwzumwalt/single-transistor-audio-amp-32033a . We are lucky here needing only a current amplifier - and no voltage amplifier 😉 You certainly don't need a Darlington transistor here. I would even prefer a transistor which hasn't much gain. A gain of 100 is more than enough. I mean, even if you get only 1mA out of the microcontroller this means 100 mA at the speaker. Even at 8 ohm this means 800 mV and thus  80 mW - which is already a lot... But I would use a 32 ohm one - which  means 3,2V and 300 mW! This is way too _much_ for this device... But additionally, this would fit the voltage situation quite nice.

Btw, which speaker had you tried? I think I'll need to play a bit 😀


ReplyQuote
mifritscher
(@mifritscher)
Joined: 2 months ago
Posts: 7
19. April 2019 4:56 PM  

Additional note: You have already a very current-intense device on the pocketstar - the vibrator! I think I'll try to drive this with a square signal and hear what happens 😀 I wouldn't use this for playing  real audio files, but it should be more than sufficient for the typical sound 30 years ago...

You might lough, but some motors are rather good speakers - https://www.researchgate.net/post/Can_a_DC_motor_behave_like_a_speaker


ReplyQuote
mifritscher
(@mifritscher)
Joined: 2 months ago
Posts: 7
21. April 2019 7:00 PM  

Ok, the vibrator is not suitable as speaker^^ But the library is quite nice 🙂


ReplyQuote
Gürkan Dogan
(@gd175)
Administrator
Joined: 4 months ago
Posts: 22
21. April 2019 9:37 PM  

I think the vibration motor mages a better gaming experience. Even if the PocketStar currently has no speaker, I hope that you still have fun with it! 🙂

175


ReplyQuote
Share:
  
Working

Please Login or Register