Home

SPEAKER/SOUNDER MODELS

This help file contains documentation on the following models:

  • Analogue Loudspeaker Model

  • Digital Sounder Model

  • Simple Buzzer Model

This page last modified March 08th 2010.


Digital Sounder

DIGITAL SOUNDER MODEL

Introduction

The VSM sounder model is akin to a simple piezo transducer, as found in mobile phones, micro-wave ovens and so forth. It is intended to be driven from either a unipolar or bipolar digital source.

The loudest sound will be produced if you drive the model in bipolar mode, i.e. if both inputs change logic state on each half cycle of the drive waveform.

The SOUNDER model requires surprising little CPU power to operate, at least in comparison to the analogue SPEAKER model. This is largely because digital simulation is so much more efficient than analogue, as witnessed by VSM's ability to simulate CPUs in real time.

The SOUNDER model is also used as the basis for the simple BUZZER model, since it is a simple matter to drive it from a gated digital clock so as to produce a tone when a given current threshold is exceeded.

Properties

The SOUNDER Model supports the following properties :

Description | Property | Default | Notes
Playback Sample Rate | SAMPLERATE | 44100Hz | Specifies the sampling rate for the output to your soundcard. Using lower sampling rates will reduce the CPU load a little, at the expense of degraded sound quality. However, the main CPU load comes from the rate at which signals change in the circuit, and this is not affected by the playback sample rate.
Playback Buffer Time | BUFFERTIME | 1.0s | Determines the length of sound that is buffered to allow a smoothing of the CPU load. This time will be seen as a latency between events (such as pressing a button) in the circuit, and the resulting sound being heard. Increase this time if you get playback that drops out occasionally. Decrease it if you want a more responsive circuit, and your PC is fast enough to cope.


Loudspeaker

ANALOG LOUDSPEAKER MODEL

Introduction

he VSM loudspeaker model measures analogue signals produced by a ProSPICE simulation and feeds them to your soundcard. However, you should understand that real time simulation of analogue circuitry is right at the upper limit of what is possible with today's computing hardware. You will need at least a 600MHz processor to get satisfactory results with this model and even then, you will not get useable results with circuits that are hard to solve in terms of numerical convergence.

For example, generating a 1kHz sine wave requires ProSPICE to compute about 30,000 circuit solutions per second; square waves require circuit step times well below 1us at the switching points. If most of these steps require several iterations to achieve numerical convergence, the amount of computation exceeds power available, even with a state of the art PC.

Realistically, you should be able to simulate simple circuits involving signal-generators, AM and FM modulation and perhaps a simple active filters built with ideal-opamps, but don't expect ProSPICE to simulate designs containing dozens of transistors or real-world opamps operating into the kHz region.

If you wish to listen to the audio processed by more complex designs, you can use the Audio Graph feature of ProSPICE Professional which operates out of real time.

Note also, that the SOUNDER model works in the digital domain, and may be more appropriate for applications which generate audio under CPU control.

Properties

The SPEAKER Model supports the following properties :

Description | Property | Default | Notes
Nominal Input | VNOM | 1V | Amplitude for full scale output. By default, the speaker will produce full output for a 2V pk-pk (+/- 1V) input signal.
Load Resistance | LOAD | 8 Ohms | Specifies the electrical resistance of the speaker primitive. Note that no attempt is made to model the inductive or electro-mechanical properties of a real loudspeaker.
Playback Sample Rate | SAMPLERATE | 44100Hz | Specifies the sampling rate for the output to your soundcard. Using lower sampling rates will reduce the CPU load a little, at the expense of degraded sound quality. However, the main CPU load comes from the rate at which signals change in the circuit, and this is not affected by the playback sample rate.
Playback Buffer Time | BUFFERTIME | 500ms | Determines the length of sound that is buffered to allow a smoothing of the CPU load. This time will be seen as a latency between events (such as pressing a button) in the circuit, and the resulting sound being heard. Increase this time if you get playback that drops out occasionally. Decrease it if you want a more responsive circuit, and your PC is fast enough to cope.


Simple Buzzer

SIMPLE BUZZER MODEL

Introduction

The VSM buzzer model is based on the digital SOUNDER model, but combines it with a simple schematic model which generates a tone waveform whenever the specified threshold voltage is found at the buzzer terminals.

Properties

The BUZZER Model supports the following properties :

Description | Property | Default | Notes
Operating Voltage | VNOM | 12V | The buzzer will buzz if a voltage of 80% or higher is found at the terminals.
Load Resistance | LOAD | 12 Ohms | Specifies the electrical resistance of the buzzer. Note that no attempt is made to model the inductive or electro-mechanical properties of a real buzzer or bell.
Playback Sample Rate | SAMPLERATE | 44100Hz | Specifies the sampling rate for the output to your soundcard.
Playback Buffer Time | BUFFERTIME | 200ms | Determines the length of sound that is buffered to allow a smoothing of the CPU load. This time will be seen as a latency between events (such as pressing a button) in the circuit, and the resulting buzzer sound being heard. Increase this time if you get playback that drops out occasionally.

Implementation

The schematic model of the buzzer is shown below :

Operation is as follows :

  • The DC load resistance is implemented by R2.

  • Voltage controlled switches S1 and S2 implement the operating voltage threshold. Two switches are required since the buzzer should operate with a positive or negative voltage at its terminals.

  • The buzz tone is generated by the DSIM clock primitive, labelled TONE.

  • AND gate U1 passes this to the real time digital probe LP1 whenever either of S1 or S2 is triggered. LP1 passes the digital signal at its inputs back to the SOUNDER active model attached to the parent component.