This is an old revision of the document!


Sound Output Devices

Speaker

Speakers are electroacoustic devices that convert the electrical signal into sound waves. A speaker uses a permanent magnet and a coil attached to the membrane. Sound signal, flowing through the coil, creates the electromagnetic field with variable strength, coil attracts to magnet according to the strength of the field, thus making a membrane to vibrate and creating a sound wave. Other widely used speaker technology, called Piezo speaker, uses piezoelectric materials instead of magnets. Speakers are used to creating an audible sound for human perception and ultrasonic sound for sensors and measurement equipment.

 title
Figure 1: Speaker 8 Ω 0.5 W.
 title
Figure 2: Arduino Uno and piezzo buzzer schematics.
const int speakerPin = 9; //Define the buzzer pin
 
void setup()
{
  pinMode(speakerPin, OUTPUT); //Set buzzer as an output
}
 
void loop()
{ 
  tone(speakerrPin, 1000); //Send 1 kHz sound signal
  delay(1000);        //For 1 s
  noTone(speakerPin);     //Stop sound
  delay(1000);        //For 1 s
}
en/iot-open/hardware2/actuators_sound.1692346081.txt.gz · Last modified: 2023/08/18 05:08 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0