- No category
advertisement
A N 7 2 6
U
T I L I T Y
C
L A S S
- D T
O O L
S
T I C K
U
S E R
’
S
G
U I D E
1. Introduction
Class-D is a switching power amplifier architecture that uses high-frequency Pulse-Width Modulation (PWM) to generate the output waveform. The transistors are fully on or fully off, which means this architecture can reach very high efficiency levels, resulting in significant power savings. However, the translation from the input signal to PWM
very basic Class-D signal diagram.
Figure 1. Class-D Power Amplifier Signal Diagram
Because the Class-D amplifier transistors are fully on or fully off, the transistors lose less energy in the form of heat. This architecture, therefore, lends itself to small, cheap MOSFETs. The Class-D amplifier can be implemented in either analog or digital form.
An analog Class-D amplifier is non-trivial and typically consists of a comparator, triangle waveform generator, and several blocks to condition the input signal before transferring to the output MOSFETs.
A digital Class-D amplifier requires the following:
PWM output (switching) frequency 10x+ faster than the highest input frequency to adequately reconstruct the input signal
High-resolution control of the PWM pulse width to reduce output quantization distortion
Method for sampling or receiving the input waveform
Fast core for digital processing and manipulation of data
Pins capable of driving the amplified signal
Since the Silicon Labs Precision32™ SiM3U1xx/SiM3C1xx 32-bit MCUs have peripherals and features capable of meeting all of these requirements, these MCUs are uniquely suited to a utility Class-D power amplifier application without using many external components by directly driving the speaker using the high drive I/O.
In addition to providing a development platform for Class-D applications, the Class-D ToolStick board serves as a lower-cost, general-purpose development platform for the SiM3U1xx USB MCUs.
2. Relevant Documents
This document provides a hardware and software overview for the Class-D ToolStick. Additional documentation on the Precision32 tools and MCUs can be found on the Silicon Labs website: www.silabs.com/32bit-appnotes , www.silabs.com/32bit-software , and www.silabs.com/32bit-mcu .
Rev. 0.1 11/12 Copyright © 2012 by Silicon Laboratories AN726
A N 7 2 6
3. Using the Demo
The speaker in the kit connects to the JP1 1x2 header next to the green terminal block (J4). Two alternate connection methods are available to support a variety of speakers: the J4 terminal block, and an output audio jack
(J5). A screwdriver can be used to attach the speaker(s) of choice to J4, and each speaker should have two leads: positive (red) and negative (black). The audio jack output connects both channels of the speaker to R+ and R–, so it is not true mono. The Class-D ToolStick board is intended for use with stereo systems.
The Class-D ToolStick can be powered from either the Debug (J3) or Device (J2) USB mini connectors as shown in
Sensing slider during power-on, as this is when the board calibrates the slider. Once the board is ready for use, the blue LED (DS1) will turn on.
Figure 2. Powering the Board
Change the volume of the output at any time by pressing firmly and sliding on the Capacitive Sensing slider (CS1).
The blue LEDs above the slider indicate the volume level.
The MODE button on the slider can be used to change the mode of the board:
Mode 1 (blue LED DS1): Stereo Jack Input Mode
Mode 2 (blue LED DS2): USB Input/Output Mode
Mode 3 (blue LED DS3): Play Prerecorded Flash Mode
Mode 4 (blue LED DS4): Play/Record Flash Mode
2 Rev. 0.1
AN726
3.1. Stereo Jack Input Mode
The default mode of the Class-D ToolStick is stereo jack input mode, indicated by blue LED DS1. To play sound in this mode, connect any input source (MP3 player, phone, etc.) to the J1 stereo jack. The volume level of the input device should be as high as possible without causing saturation, which the red LED (DS8) indicates.
3.2. USB Input/Output Mode
In USB mode, the board plays sound from the USB host PC or records sound from the board microphone (MK1) and sends it up to the PC. To use the board in this mode, connect the Device USB connector (J2) to the host PC and press the MODE button until blue LED DS2 turns on. The board should appear as the Utility Class-D
ToolStick in Device Manager once it’s properly enumerated as a USB Audio device.
To select the Class-D Audio device as the Playback or Recording source in Windows 7, right-click on the Volume
Mixer icon in the System Tray and select either Playback devices or Recording devices. In the Playback tab of
settings for the device can be selected using the Properties button in this tab.
Figure 3. Configuring the USB Utility Class-D ToolStick as the Playback or Recording Device
In the Recording tab of the dialog, select the Utility Class-D ToolStick microphone and press the Set Default button. This will open an interface to the microphone and will display the recorded input volume to the right of the device name. If this volume is not registering sounds, press the Properties button to configure the microphone volume.
Once configured, any program on the PC should output to the Class-D ToolStick device. Ensure that the volume levels in the program and Volume Mixer are set to appropriate levels. If the device volume settings are not affecting the Class-D board, click the expansion button below the Speakers icon and select the Speakers (Utility Class-D
ToolStick) as shown in Figure 4.
When recording, the red LED (DS8) indicates when the microphone input saturates.
Note: As long as a recording interface is open (i.e. Volume Mixer Recording devices dialog or a recording program open), the
Class-D ToolStick prevents the user from switching the operation mode. This is due to potential synchronization issues when switching between different modes and sending data up to the host PC. To switch the mode, close the Volume
Mixer or the recording program.
Rev. 0.1
3
4
A N 7 2 6
Figure 4. Selecting the USB Utility Class-D ToolStick in Volume Mixer
3.3. Play Prerecorded Flash Mode
In prerecorded flash mode, the Class-D ToolStick will output ~7 seconds of sound from an array saved to flash.
Enter the mode by pressing the MODE button until blue LED DS3 turns on.
Press the PLAY slider button on the board to start the waveform, and press the PLAY slider button again to stop it before it completes. The blue LED (DS6) will indicate when a play operation is in progress. This mode provides an alternative sound input source when no sources are available and provides an indication of what sound effects would sound like.
3.4. Play/Record Flash Mode
The play/record flash mode records compressed sound to the flash of the MCU. Enter the mode by pressing the
MODE button until blue LED DS4 turns on.
Press the REC slider button to start recording, and press the REC slider button again to stop recording. The blue
LED (DS5) will indicate when a record operation is in progress. Multiple recordings will append to the full recording in flash. Once the flash is full, the MCU will indicate no additional recordings can be made by turning on and immediately turning off the blue record LED. To record additional sound, press the ERASE slider button to erase the flash. The blue DS5 LED will turn on while the erase operation is in progress. When recording, the red LED
(DS8) indicates when the microphone input saturates.
Press the PLAY slider button on the board to start the waveform, and press the PLAY slider button again to stop it before it completes. The blue LED (DS6) will indicate when a play operation is in progress.
Rev. 0.1
AN726
4. Class-D ToolStick Hardware Overview
The Class-D ToolStick board enables Class-D application development on the SiM3U164 MCU. In addition to providing a development platform for Class-D applications, the Class-D ToolStick board serves as a low-cost, general-purpose development platform for the SiM3U1xx USB MCUs.
ToolStick Debug
Adapter
Testpoint Pin Access for General-Purpose
Development
Optional High
Power Components
Audio Inputs
Class-D Output
Filters and
Speaker Header
Stereo Jack and
Microphone Gain/Bias
Capacitive Sensing
Slider and LED User
Interface
Figure 5. Utility Class-D ToolStick Board Features
4.1. Push-Button Switches and LEDs (S1-2, DS1-DS8)
connect to PB0.6 (S1) and PB0.7 (S2) and are currently unused in the Class-D firmware. The switches are normally open and pull the pin voltage to ground when pressed.
Port pins PB0.1, PB0.2, PB0.4, PB0.5, PB0.10, and PB0.11 connect to six blue LEDs (DS1-DS6). Pin PB3.3
connects to the red LED (DS8). The green LED, POWER (DS7), turns on when USB power is applied to the board from either USB connector. The LEDs connect to VIO through a current limiting resistor.
Table 1. Class-D ToolStick Switches and LEDs
GPIO Pin
PB0.6
PB0.7
PB0.1
PB0.2
PB0.4
Switch or LED
Push-Button Switch (S1)
Push-Button Switch (S2)
Blue LED (DS1)
Blue LED (DS2)
Blue LED (DS3)
Rev. 0.1
5
6
A N 7 2 6
Table 1. Class-D ToolStick Switches and LEDs (Continued)
GPIO Pin
PB0.5
PB0.10
PB0.11
PB3.3
—
Switch or LED
Blue LED (DS4)
Blue LED (DS5)
Blue LED (DS6)
Red LED (DS8)
Green POWER LED (DS7)
4.2. Class-D Output Network, Terminal (J4), Header (JP1), and Jack (J5)
The four high drive I/O pins on the SiM3U164 40-pin QFN package connect to the J4 terminals after going through the Class-D output network, allowing these pins to directly drive the speaker(s). The JP1 1x2 header connects to
R+ and R– to interface with the kit speaker. The output jack (J5) connects R+ and R– to both channels and does not provide true mono sound. To create a mono output, connect the L_IN and R_IN test points together in the stereo jack and microphone gain/bias section of the board.
The output network consists of a ferrite bead, LC, and grounding caps for each pair of channels, R+/R– and L+/L–.
Table 2. Terminal Block Pin Descriptions (J4)
Pin
1
2
3
4
I/O
PB4.0 / R+
PB4.1 / R–
PB4.2 / L+
PB4.3 / L–
4.3. ToolStick Debug Adapter (U3)
The Class-D ToolStick board features a debug adapter via the mini-B USB connector (J3) labeled DEBUG. This debug adapter can be used with the Precision32 (1.0.2 and higher) and ARM uVision IDEs (4.54 and higher).
When using an older version of the IDEs, the debug adapter DLLs in the IDE directories must be replaced to support the ToolStick Debug Adapter. Contact technical support (“Contact Information” section) for more information.
4.4. USB Connection Options (J2)
The Class-D ToolStick board features a USB connection via the mini-B USB connector (J2) labeled DEVICE. This
USB connector provides the USB Audio features of the board and facilitates general-purpose USB development on the AN726 device.
Rev. 0.1
AN726
4.5. Capacitive Sensing Buttons and Slider (CS1)
Four capacitive sensing buttons and one slider comprised of six segments are included on the board to provide the
slider in descending order from the location labeled MODE to the location labeled PLAY on the board.
The test points above the slider facilitate adding grounded or shrouded connectors to measure the capacitive sensing pins.
Table 3. Capacitive Sensing GPIO Connections
Location
MODE
—
ERASE
—
REC
PLAY
Pin
PB1.1
PB1.0
PB0.15
PB0.14
PB0.13
PB0.12
4.6. Analog Audio Inputs (J1 and MK1)
The stereo jack on the board (J1) allows the board to measure stereo inputs from an input source. The microphone
(MK1) enables the device to measure voice data directly. These signals are conditioned by a bias and gain circuit provided by a quad op-amp IC (U1), resistors, and capacitors to a range appropriate for the SiM3U164 SARADC modules.
Rev. 0.1
7
8
A N 7 2 6
5. Class-D ToolStick Firmware Overview
5.1. System Overview
The system is configured for 48 MHz AHB and APB to maximize the output resolution of the EPCA.
In all modes, the EPCA0 operates continuously and outputs the PWM signal to the speaker. This waveform generation is never interrupted. The SARADC modules operate in 12-bit mode at the maximum SAR clock frequency in order to complete conversions as quickly as possible. The USB internal oscillator provides the
48 MHz system clock, which in conjunction with the PLL0 module, provides the precise timing required in the different modes to recreate the audio waveforms.
5.1.1. SiM3U164 Module Usage
The modules used by the Class-D ToolStick firmware are:
SARADC0: Measures the right stereo jack channel and the microphone input
SARADC1: Measures the left stereo jack channel
VREF0: Provides the 2.4 V reference for the ADCs
FLASHCTRL0: Writes recorded microphone data to flash
EPCA0: Generates Class-D PWM waveforms (four channels)
CAPSENSE0: Provides button and slider user interface
TIMER0: Generates ~20 ms capacitive sensing scan timer
TIMER1: Generates mode timing (e.g. 48 kHz in USB) and handles LED PWM updates
PCA0 and Crossbar: Generates LED PWM waveforms for the six blue LEDs (one channel)
USB0: Provides the USB Audio input/output interface
PLL0: Provides the precise timing for the system and spectrum spreading to reduce emissions
AppBuilder generates the initialization code for all modules except for the USB0 module. This AppBuilder project is included in the Utility Class-D ToolStick software package.
Note: Exporting code from version 1.1.1 of AppBuilder will overwrite the project file associated with the Class-D ToolStick firmware. This project file includes manual changes to include the si32Library that will be removed when AppBuilder exports the code. A saved version of the project file (save.project) is available in the Class-D ToolStick firmware package in case this project file is overwritten. To restore the project file, simply copy the contents of save.project to the .project file.
5.1.2. Firmware Organization
The Class-D ToolStick code follows the AppBuilder code organization scheme. The application-specific code for each peripheral is in the src folder in the my- files, and the generated files from AppBuilder are in a generated folder below the src folder. Additional application-specific files are in the src folder with names associated with the functions in the file, like mulaw or LED_control.
class_d: includes the main Class-D loop and any control not handled by the TIMER1L interrupt handler.
LED_control: blue and red LED update functions; handles the shifting of the PCA channel on the crossbar.
mulaw: implements the µLaw companding algorithms.
myApplication: implements the system initialization code before passing control to class_d.
myBuildOptions: required for si32Library.
myDataPlaneIn: si32Library callback functions for the USB IN transactions (recording).
myDataPlaneOut: si32Library callback functions for the USB OUT transactions (playing).
myUsbAudioDevice: USB Audio descriptors and audio-specific si32Library function calls.
myUSB0: non-audio USB si32Library functions calls for the application.
pre_recorded_array: µLaw compressed prerecorded flash data.
volume: handles the volume decoding and control from either the USB interface or the Capacitive Sensing slider.
my- files: implement application code associated with the particular peripheral.
g- files: AppBuilder generated initialization code associated with the particular peripheral.
Rev. 0.1
AN726
5.2. Algorithms
The Class-D ToolStick uses two algorithms to manipulate data: Exponentially Weighted Moving Average (EWMA) and µLaw. This section also describes Remainder-Weighted Dithering as an optional algorithm.
5.2.1. Exponentially Weighted Moving Average (EWMA)
The EWMA is a form of Exponential Averaging that creates a low-pass filter. This filter performs noise shaping to help move the quantization noise out of the audible range. The Class-D ToolStick firmware uses this form of averaging to filter the ADC results.
The EWMA takes the form:
=
–
1
–
--------------------
2 m
+
2 m
In this equation, y(n) is the current output, y(n-1) is the previous output, x(n) is the current input sample, and m is the weight of the average.
The weight determines how heavy the average of the EWMA is. The smaller weights (m = 1, 2) use more of the new sample and react more quickly to dramatic changes in the input. Larger weights (m = 4, 5) use more of the previous output and provide more smoothing.
The EWMA has several advantages over other forms of averaging:
Quick to calculate (two shifts, an addition, and a subtraction)
Only saving the previous value
Contains history from every sample in time, which would take lots of memory in a traditional average
The weight can be dynamically adjusted easily in firmware depending on the circumstances without dramatically changing the computational time
The EWMA is a form of IIR filter, which means it can become unstable if the cumulative error becomes too large.
5.2.2. Remainder-Weighted Dithering
The firmware quantizes the 12-bit ADC results or 16-bit signed USB data to a 9-bit EPCA PWM value. Remainderweighted dithering is an optional algorithm that allows the Class-D ToolStick firmware to recover some of the energy lost in the LSBs during this conversion in a random, inaudible way.
This algorithm captures the LSBs of the original 12- or 16-bit data, shifts the data to the final 9-bit size, and compares against a random value of the same magnitude as the LSBs shifted away. If the original data was positive and the LSBs are greater than the random value, then the LSB of the 9-bit data is incremented by 1.
Similarly, if the original data was negative and the LSBs are less than the random value, the LSB is decremented by 1. Otherwise, the data remains unchanged.
242
12-bit to 9-bit (3 bits):
output_value = 1931 = 0x078B output_lsb = 0x78B & 0x7 = 3 output_value = 1931 >> 3 = 241 random_lsb = 1 random_lsb = 6 random_lsb = 4 random_lsb = 0 random_lsb = 3
241
EPCA overflows
Figure 6. Remainder-Weighted Dithering Example
Rev. 0.1
9
A N 7 2 6
increases. In this particular example, the data remains the same for each EPCA overflow for simplicity, but this will not necessarily be the case in the operation of the algorithm.
5.2.3. µLaw (or muLaw)
The µLaw companding algorithm has long been used in telephony and other voice applications. This algorithm takes advantage of the behavior of the human ear by reserving most of the compression bins for low volume levels where the ear is most sensitive. Using this algorithm, the Class-D firmware can store more data in flash with no noticeable degradation in audio quality.
This algorithm takes a 14-bit signed number and adds 32 to the magnitude, which ensures that a 1 occurs in bits 5–
12 of the value. This means the valid input range is –8160 to 8159. This value is then converted to an 8-bit
S
S
S
S
S
S
S
S
14-bit Signed Input Data
0 0 0 0 0 0 0 1
A B C D
X
0 0 0 0 0 0 1
A B C D
X X
0 0 0 0 0 1
A B C D
X X X
0 0 0 0 1
A B C D
X X X X
0 0 0 1
A B C D
X X X X X
0 0 1
A B C D
X X X X X X
0 1
A B C D
X X X X X X X
1
A B C D
X X X X X X X X
S
S
S
S
S
S
S
S
8-bit µLaw Encoded Data
0 0 0
A B C D
0 0 1
A B C D
0 1 0
A B C D
0 1 1
A B C D
1 0 0
A B C D
1 0 1
A B C D
1 1 0
A B C D
1 1 1
A B C D
Figure 7. µLaw Algorithm Table
Figure 8 shows the plot of the 14-bit signed inputs versus the 8-bit compressed output.
100
50
10
-8000 -6000 -4000 -2000 2000 4000 6000 8000
Input Data
-50
-100
Compressed
Output
Figure 8. µLaw Algorithm Plot
Rev. 0.1
AN726
5.3. EPCA0 Class-D Output
In all modes, the EPCA0 module runs in center-aligned PWM mode with an upper limit of 256. This means that the channels operate in the range of 0–511, since the channels count in half clocks. When the positive channel is on longer than the negative channel, the resulting equivalent energy is positive (above zero). When the negative channel is on longer than the positive channel, the resulting equivalent energy is negative (below zero). Combined with the components on the output, this PWM scheme generates the output waveform on the speaker as shown in
PB4.0 (R+)
FB L
C g
C
PB4.1 (R-)
FB L
C g
CH0 (R+)
CH1 (R-)
Differential
Figure 9. Class-D Output Example
configuration.
5.4. Volume Control
The volume control on the Class-D ToolStick board uses the current-limiting feature of the high drive I/O to adjust the output power. This has the additional benefit of allowing the PWM to always operate at full range, even at lower volumes, which reduces firmware size and improves sound quality.
Rev. 0.1
11
A N 7 2 6
5.5. Stereo Jack Input Mode
In stereo jack input mode, the goal is to sample at an even division of the EPCA0 update frequency to provide the lowest distortion attainable. The data from the ADCs is 12-bit unsigned.
Class-D RD Board
SiM3U1xx
SARADC0
SARADC1
EPCA
R
L
Figure 10. Stereo Jack Input Mode Block Diagram
This mode measures the input source from the stereo jack (J1) using both SARADC modules, performs the EWMA
the data flow for the stereo input jack mode.
The Class-D ToolStick board automatically biases the input waveform to VREF/2. On hardware that does not do this, an additional dc offset adjustment algorithm may be required.
12
R hardware gain stage hardware gain stage
SARADC0
SARADC1
SiM3U1xx adjusting
DC offset algorithm remainderweighted dither
EWMA
9-bit quantization
EPCA
L
Figure 11. Stereo Jack Input Mode Flow Diagram
Rev. 0.1
AN726
5.6. USB Input/Output Mode
In USB input/output mode, the system samples and outputs data at 48 kHz. The USB data is 16-bit signed data.
Host PC sound software
MIC
Class-D RD Board
SiM3U1xx
USB
SARADC0
EPCA
R
L
Figure 12. USB Input/Output Mode Block Diagram
For playing (from PC to the board), the board receives data from the USB interface using the si32Library USB
Audio Component and outputs the PWM waveform on the EPCA0 module.
For recording (from board to the PC), the firmware measures the microphone (MK1) using one SARADC module and sends the data to the PC using the si32Library USB Audio Component.
Figure 13 shows the data flow for the USB input/output mode.
SiM3U1xx
Host PC sound software
USB0
9-bit quantization
MIC hardware gain stage
SARADC0 shift from 12 bits unsigned to 16 signed remainderweighted dither
EPCA
R
L
Figure 13. USB Input/Output Mode Flow Diagram
Rev. 0.1
13
A N 7 2 6
5.7. Play Prerecorded Flash Mode
In play prerecorded flash mode, the system outputs data from the flash at 9.6 kHz.
R
Class-D RD Board
SiM3U1xx
Flash
EPCA
L
Figure 14. Play Prerecorded Flash Mode Block Diagram
The firmware reads the compressed data from the flash, decompresses the data using µLaw, performs the EWMA algorithm, quantizes the data to 9 bits, and outputs the PWM waveform on the EPCA0 module. The remainderweighted dithering algorithm is not used at all in this mode since the data LSBs will often be 0s from the compression algorithm.
Figure 15 shows the data flow for the play prerecorded flash mode.
14
Flash
R
SiM3U1xx
µLaw decompression 8 bits to 14 (signed)
9-bit quantization
12-bit quantization
EWMA
EPCA
Figure 15. Play Prerecorded Flash Mode Flow Diagram
Rev. 0.1
L
AN726
5.8. Play/Record Flash Mode
In play/record flash mode, the system samples and outputs data at 9.6 kHz.
Class-D RD Board
R
MIC
SiM3U1xx
Flash
SARADC0
EPCA
L
Figure 16. Play/Record Flash Mode Block Diagram
For playing, the firmware reads the compressed data from the flash, decompresses the data using µLaw, performs the EWMA algorithm, quantizes the data to 9 bits, and outputs the PWM waveform on the EPCA0 module. The remainder-weighted dithering algorithm is not used at all in this mode since the data LSBs will often be 0’s from the compression algorithm.
For recording, the firmware measures the microphone (MK1) using one SARADC module, compresses the data using µLaw, and stores the data in flash.
Figure 17 shows the data flow for the play/record flash mode.
R
µLaw compression
14 bits to 8 (signed)
MIC hardware gain stage
SARADC0 convert from 12 bits unsigned to
14 signed
Flash
SiM3U1xx
µLaw decompression 8 bits to 14 (signed)
9-bit quantization
12-bit quantization
EWMA
EPCA
L
Figure 17. Play/Record Flash Mode Flow Diagram
Rev. 0.1
15
A N 7 2 6
5.9. Build Configurations
The Precision32 and uVision projects include two build configurations each: Release and Debug. These configurations change the code optimization settings. In addition, each configuration sets a flag to allow the firmware to automatically detect the current build configuration and IDE. This enables the firmware to modify the play/record flash mode array size to appropriate settings based on the code size. The approximate sizes for each
build configuration are shown in Table 4.
Table 4. Build Code Size Comparisons
IDE
Precision32 uVision4
Build
Debug
Release
Debug
Release
Code Size (bytes)
68200
47200
40200
34700
To change the active build configuration in the Precision32 IDE, right-click on the project name in the Project view and select Build Configurations
Set Active
Debug or Release.
16
Figure 18. Setting the Active Precision32 IDE Build Configuration
Rev. 0.1
AN726
To change the active build configuration in uVision4, select the configuration from the drop-down menu shown in
Figure 19. Setting the Active uVision4 IDE Build Configuration
5.10. si32 HAL Version
The Class-D ToolStick firmware was originally developed for v1.1.1 of the HAL or later. Compiling against previous versions of the HAL will generate errors.
Rev. 0.1
17
A N 7 2 6
6. Tuning the Class-D Output Network
6.1. Revision 1.0 Configuration
Class-D is an extension of a single-ended, single-pin speaker drive, where one side of the speaker is driven directly (perhaps with a ferrite bead) and one side is grounded. This output method works very well with SiM3U1xx devices.
The full Class-D output network consists of ferrite beads, inductor-capacitor (LC) filters, and grounding capacitors
(C g
network shown in Figure 21 may provide better performance than the original configuration.
PB4.0 (R+)
FB L
C g
C
PB4.1 (R-)
FB L
C g
Figure 20. Revision 1.0 Hardware Class-D Output Network—Direct Drive
The ferrite beads dissipate pad switching noise as heat for EMI purposes, the LC components filter the PWM noise, and the grounding capacitors provide additional filtering in conjunction with the speaker reactance.
In almost all applications, the ferrite beads should be populated on the board. However, the other components may or may not be populated, depending on the speaker used and the cost requirements of the application. If either the
L or the C are installed, both should be populated to ensure lower power consumption. In most cases, the easiest method of determining whether to install the components and the values for these components is through physical experimentation. The perceived quality can be determined by the following characteristics:
loudness
changes in loudness across bandwidth
bandwidth
noise harmonics across bandwidth
hiss at low and high volumes
Other factors to consider are the application’s sound source (i.e. USB data versus sampled ADC data) and the maximum power consumption of the board in the application, which will determine how much data processing can occur and if external MOSFETs are appropriate. The Class-D board provides 0
resistor pads to bypass the series components, if desired.
18 Rev. 0.1
AN726
6.2. Alternate Configuration
shown in Figure 21 may provide better performance than the original configuration.
placed as close to the device as possible
PB4.0 (R+)
L
C
placed as close to the speaker connectors as possible
FB
C g
C
B
PB4.1 (R-)
L
C
FB
C g
Figure 21. Alternate Class-D Output Network—Direct Drive
For the alternate configuration, the recommended components for the board are shown in Table 5.
Table 5. Class-D ToolStick Alternate Output Network Recommended Components
Reference
L
C
C g
C
B
Value
~3.3 µH, 1.5 A
~2.2 µF
~20 pF
~0.47 µF
Rev. 0.1
19
A N 7 2 6
6.3. Revision 1.0 High Power Configuration
Instead of directly driving the speaker, the high-drive I/O can interface with external MOSFETs as shown in
enable development with this configuration. The pull-up and pull-down resistors (~100 k
) ensure that the tristate reset state of the high drive I/O does not cause the FETs to accidentally conduct current. When using these external MOSFETs, uninstall the R32, R35, R38, and R41 0
resistors.
gates ensure that the two devices will not both be conducting simultaneously.
FB L
PB4.0 (R+)
C g
C
VIOHD
PB4.1 (R-)
FB L
C g
Figure 22. Half-Bridge Class-D Output Network–External MOSFETs
The Revision 1.0 hardware provides footprints to a 9 V dc adapter connector and high power LDO. These components can be populated to provide a higher current source to the external MOSFET transistors and VIOHD.
Alternatively, an external supply can connect to the transistors alone by removing the R48 0
resistor and placing the positive terminal on the P_PWR test point.
20 Rev. 0.1
AN726
6.4. Alternate High Power Configuration
on the MOSFET gates ensure that the two devices will not both be conducting simultaneously. The value of these components should be tuned for the gate capacitance of the FETs.
VIOHD
placed as close to the drivers as possible placed as close to the speaker connectors as possible
PB4.0 (R+)
L
C
FB
C g
C
B
VIOHD
PB4.1 (R-)
L
C
FB
C g
Figure 23. Full-Bridge Class-D Output Network—External MOSFETs
Rev. 0.1
21
A N 7 2 6
7. Schematics
22
4 11
Rev. 0.1
D-
D+
VBUS
RESET
PB0.1
PB0.2
PB0.3
VDD
PB0.0
37
36
35
34
39
38
40
33
32
31
VREGIN
PB0.13
PB0.14
PB0.12
VSS
VIO
PB1.1
PB1.2
PB1.3
PB1.0
PB0.15
17
16
15
14
12
11
13
19
18
20
3
2
1
5
4
6 nSRST
S/SWDIO
TDI/TX
26
25
24
23
22
28
27
K/SWCLK
GPIO/RTS
GPIO/CTS
O/SWO/RX
TC
TM
TD
RSTb/C2CK
LED_STOP
SUSPEND
EPAD
VBUS
C2D
NC
NC
11
10
9
8
12
13
14
29
AN726
SH SH SH SH
Rev. 0.1
4
SH SH SH SH
23
A N 7 2 6
C26 0.022uF
C28 0.022uF
C29 0.022uF
C31 0.022uF
24 Rev. 0.1
AN726
8. Bill of Materials
J1, J5
J2, J3
J4
JP1
L1
L2, L3, L4, L5
LS1
MK1
R1
R11, R18
R12, R19
R13
R14
R2, R7, R15
R20, R29, R44,
R49
R28, R42
Reference
C1, C3
C2, C6, C8
C24
C26, C28, C29,
C31
C4, C10, C12,
C13, C15, C17,
C19, C20, C23,
C25
C5, C7
C9, C11, C14,
C16, C18, C21,
C22
D1, D3
D4
DS1, DS2,
DS3, DS4,
DS5, DS6
DS7
DS8
FB1, FB2, FB3,
FB4
Table 6. Utility Class-D ToolStick Board Bill of Materials
Part Number
C0603X5R6R3-106M
C0603X7R250-474K
C0603X7R100-105K
C1608X7R1H223M
Source
Venkel
Venkel
Venkel
TDK Corporation
Description
10 µF, 6.3 V ±r% X5R 0603
0.47 µF, 25 V ±10% X7R 0603
1 µF, 10 V ±10% X7R 0603
0.022 µF, 50 V ±20% X7R 0603
C0603X7R100-104K
C0603X7R100-225K
C0603X5R6R3-475K
SP0503BAHTG
RB550EATR
LB Q39G-L2N2-35-1
SML-LX0603SUGW
SML-LX0603IW
MPZ1608S601A
SJ1-3543N
UX60-MB-5ST
1729144
TSW-102-07-T-S
NLV25T-R68J-PF
84332C
GA0571H
CMA-4544PF-W
CR0603-10W-2001F
CR0603-10W-1003F
CR0603-16W-2803F
CR0603-10W-1002F
CR0603-8W-5111F
CR0603-16W-21R0F
CR0603-10W-1001F
CR0603-16W-7500F
Venkel
Venkel
Venkel
Littlefuse
0.1 µF, 10 V ±10% X7R 0603
2.2 µF, 10 V ±10% X7R 0603
4.7 µF, 6.3 V ±10% X5R 0603
USB Diodes 300 mW, 20 V TVS SOT143
Rohm Semiconductor Diode
700 mA
,
30 V
Dual Schottky
SOT5N
OSRAM Opto
Semiconductors Inc
LUMEX INC
LUMEX INC
TDK Corporation
CUI Inc
HIROSE
Phoenix Contact
Samtec
TDK
Murata
ALC
CUI Inc
Venkel
Venkel
Venkel
Venkel
Venkel
Venkel
Venkel
Venkel
Blue 15 mA, 2.85 V SMT, ChipLED 0603
GREEN 25 mA 0603
RED 30 mA 0603
600
, 1 A SMT 0603
Stereo Audio Jack
USB mini connector B
1x4 Terminal Block
1x2 Jumper Header
0.68 µH, 300 mA ±5% GP
3.3 µH, 1.5 A ±20% Unshielded
Speaker 1 W Max
MICROPHONE MIC-2.5X9.7MM-RAD
2 k
, 1/10 W ±1% ThickFilm 0603
100 k
, 1/10 W ±1% ThickFilm 0603
280 k
, 1/16 W ±1% ThickFilm 0603
10 k
, 1/10 W ±1% ThickFilm 0603
5.11 k
, 1/8 W ±1% ThickFilm 0603
21
, 1/16 W ±1% ThickFilm 0603
1 k
, 1/10 W ±1% ThickFilm 0603
750
, 1/10 W ±1% ThickFilm 0603
Rev. 0.1
25
A N 7 2 6
Table 6. Utility Class-D ToolStick Board Bill of Materials (Continued)
Reference
R3, R10, R17
R31, R32, R34,
R35, R37, R38,
R40, R41, R48
R4
R5
R6
R8
R9, R16, R21,
R22, R23, R24,
R25, R26
S1, S2
SC1, SC2,
SC3, SC4
Part Number
CR0603-10W-4703F
CR0603-16W-000
CR0603-16W-2741F
CR0603-10W-2003F
CR0603-10W-2492F
CR0603-16W-4991F
CR0603-10W-1000F
EVQ-PAD04M
NSS-4-4-01
SO1, SO2,
SO3, SO4
U1
U2
2397
MC33204DR2
SiM3U164-B-GM
U3 CF326-SX0261GM
Components Not Installed
C27, C30 C0603X7R100-225K
Source
Venkel
Venkel
Venkel
Venkel
Venkel
Venkel
Venkel
Panasonic Corp
Richco Plastic Co
SPC Technology
Description
470 k
, 1/10 W ±1% ThickFilm 0603
0
, 1 A ThickFilm 0603
2.74 k
, 1/16 W ±1% ThickFilm 0603
200 k
, 1/10 W ±1% ThickFilm 0603
24.9 k
, 1/10 W ±1% ThickFilm 0603
4.99 k
, 1/16 W ±1% ThickFilm 0603
100
, 1/10 W ±1% ThickFilm 0603
Momentary Tactile Switch 6.5x4.5
4-40 HDW
STANDOFF HDW
ON Semiconductor Quad Op-Amp
Silicon Laboratories SiM3U164-B-GQ MCU QFN40 M6x6 P0.5
Silicon Laboratories ToolStick Debug Adapter MCU
C32
C33
J6
M1, M2
Q1, Q2
R27, R45, R50
R46, R47
U4
C0603X7R100-334K
C0603X5R6R3-475K
RAPC722X
NTR4171PT1G
NTR4170NT1G
CR0603-16W-000
CR0603-16W-4702F
MC7805ABD2TG
Venkel
Venkel
Venkel
Switchcraft Inc.
2.2 µF, 10 V ±10% X7R 0603 Not Installed
(NI)
0.33 µF, 10 V ±10% X7R 0603 Not Installed
(NI)
4.7 µF, 6.3 V ±10% X7R 0603 Not Installed
(NI)
3-pin Power Jack 5A BARREL Not Installed
(NI)
ON Semiconductor –3.5 A, –30 V Pchan SOT23 Not Installed
(NI)
ON Semiconductor 3.2 A, 30 V Nchan SOT23 Not Installed (NI)
Venkel 0
,1 A ThickFilm 0603 Not Installed (NI)
Venkel 47 k
, 1/16 W ±1% ThickFilm 0603 Not
Installed (NI)
ON Semiconductor 1 A max LDO D2PAK Not Installed (NI)
26 Rev. 0.1
Simplicity Studio
One-click access to MCU and wireless tools, documentation, software, source code libraries & more. Available for Windows,
Mac and Linux!
IoT Portfolio
www.silabs.com/IoT
SW/HW
www.silabs.com/simplicity
Quality
www.silabs.com/quality
Support and Community
community.silabs.com
Disclaimer
Silicon Labs intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Labs products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Labs reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Labs shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of
Silicon Labs. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Labs products are not designed or authorized for military applications. Silicon Labs products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons.
Trademark Information
Silicon Laboratories Inc.® , Silicon Laboratories®, Silicon Labs®, SiLabs® and the Silicon Labs logo®, Bluegiga®, Bluegiga Logo®, Clockbuilder®, CMEMS®, DSPLL®, EFM®, EFM32®,
EFR, Ember®, Energy Micro, Energy Micro logo and combinations thereof, "the world’s most energy friendly microcontrollers", Ember®, EZLink®, EZRadio®, EZRadioPRO®,
Gecko®, ISOmodem®, Precision32®, ProSLIC®, Simplicity Studio®, SiPHY®, Telegesis, the Telegesis Logo®, USBXpress® and others are trademarks or registered trademarks of Silicon
Labs. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders.
Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701
USA
http://www.silabs.com
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement