Speaker
The speaker module turns electrical current into sounds! This module is a bit special because it requires to be connected to a module that produce electrical “tones” rather than flat current. Typically, you’ll use a controller to do that.
Some tiny speakers can be powered directly from a micro-controller, however other ones need to have an amplifier. For simple square tones, a single transistor or MOSFET can be used.
Make
- Trim out the two cables coming out of the speaker
- Connect them to binder clip
- Secure everything with glue and add green tape to mark the module
Circuits
In this circuit, the speaker is attached to the MOSFET 0
of the micro:bit relay module.
The code on the micro:bit generates square tones on pin 0
which open and close the current flowing via the MOSFET.