Hooking up a speaker

MrChips

Joined Oct 2, 2009
30,921
The voltage output from a GPIO pin will range from 0 to 3.3V.
Use a 10μF/16V capacitor in series with the input to a powered PC speaker.
 

Thread Starter

bibble235

Joined May 29, 2018
63
Thanks for reply.

Probably looking at buying rca sockets but worried about mounting them. Used to breadboard friendly. I understand I just wire up and and two gpio pins
 

Thread Starter

bibble235

Joined May 29, 2018
63
This is probably going to sound a bit OCD, apologies to people with this, but I really like to be tidy and have reuse. Is there a site to help with this where I can see the parts used.

This was the best example I could find.
https://www.dropcontroller.com/dropcontroller-diy-breadboard/

Lots of people have a flare/talent to throw this together. Terminology and accessible shops help. I am restricted to online and long lead times.

Get maybe 6 hours a weekend and buckets of theory eat this up. And in my 50s starting.

Thanks all for help
 

MrChips

Joined Oct 2, 2009
30,921
Breadboards are for, um, breadboarding. Don't be OCD about it. Just two wires will do. One for signal, the other for ground.
 

MisterBill2

Joined Jan 23, 2018
18,913
I am not familiar with the STM32, but I can offer a caution which is that to be safe, neither speaker lead should be connected to the "system ground" connection unless that is clearly defined as one of the speaker connection points.
 

Thread Starter

bibble235

Joined May 29, 2018
63
You know they say a little knowledge goes a long way, very very tiny amount frighten people.

My plan was to

Plug my STM32F3DISCOVERY in https://www.st.com/en/evaluation-tools/stm32f3discovery.html

Get a PC Speaker which has an RCA socket on the back. Power it off my PC

Plug the RCA from the speaker into my RCA Female socket

Connect STM32 Gnd to Gnd
Connect GPIO PA4 to Speaker

Anything dangerous? Any caution required?

If I use a plain old speaker should I worry


Thanks,
 

MrChips

Joined Oct 2, 2009
30,921
How is the speaker powered by the PC? (Is it a USB speaker?)
All my PC speakers are powered by an AC wall adapter.

1713401557512.png

If you really want to be careful, use two 10μF/16V capacitors, one to connect the signal and the other to connect to ground. I would just use jumper wires to connect to the capacitors which are mounted on the breadboard.
 

Thread Starter

bibble235

Joined May 29, 2018
63
Probably AC adapter, need to search garage and don't want ever risk PC :)

Gosh this is hard for a beginner - just trying to find the Pins on these, quicker to find a speaker. Two Pins, I assume GND and Signal

Looking at this
https://www.quora.com/Which-is-the-ground-wire-in-an-RCA-cable

I assume (bad word) this is how to differentiate

It is quite hard to fathom docs when new. Make the STM32 docs a piece of cake. A YouTube with a BOM would be ideal. Certainly admire real people who know what to do.

STM32 ->GPOI-> Cap 10μF/16V ->RCA Fem/GND -> RCA Male (Speaker)
STM32 ->GND -> Cap 10μF/16V->RCA Fem/SIG -> RCA Male (Speaker)

Ok?
 

MrChips

Joined Oct 2, 2009
30,921
Ignore the RED/BLACK/BRAID "RCA" cable for now.

Firstly, find a PC speaker. Then show us what you have. Show us the AC adapter. Show us the speaker cable.
Must PC speakers come with a 3.5mm stereo plug on a cable like this:


1713408735623.png

What you will need is a mating 3.5mm jack. If you are only using one channel, you need to make only two connections.
1713408824209.png
 

Thread Starter

bibble235

Joined May 29, 2018
63
Will get back to you. That annoying thing called work is getting in the way. Thanks for help. Will be Saturday NZT
 
Top