How does it work?
Headphone AMP Click as its foundation uses the LM4811, a stereo, analog input headphone amplifier with digital volume control from Texas Instruments. This headphone amplifier is designed to provide a high-quality output power using few external components and does not require bootstrap capacitors or snubber networks for stability improvement. The maximum power delivered by the LM4811 headphone amplifier is 105mW per one channel into 16Ω and 70mW with 16Ω load impedance. Other prominent features of the ML4811 also include digital volume control, “Click and Pop” suppression circuitry, and a low shutdown current of 0.3μA typical.
This Click board™ communicates with MCU using several GPIO pins. The signals from the CLK and U/D pins, routed to the PWM and INT pins of the mikroBUS™ socket, controls the LM4811’s gain. At each rising edge of the CLK signal, the gain will increase or decrease by a 3dB step depending on the logic voltage level applied to the U/D pin. A logic high voltage level applied to the U/D pin causes the gain to increase by 3dB at each rising edge of the CLK signal and vice versa. Upon devices’ Power-On features, the amplifier’s gain is set to a default value of 0dB. Sixteen discrete gain settings are available, ranging from +12dB maximum to −33dB minimum.
The unity-gain stable LM4811 also features an externally controlled, active-high, micro-power consumption Shutdown mode, available on the RST pin of the mikroBUS™ socket, to reduce power consumption while not in use. However, when coming out of Shutdown mode, the LM4811 will revert back to its previous gain setting. Alongside all these features, the LM4811 also has an internal thermal shutdown protection mechanism.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Signal Processing
Applications
Can be used for portable electronics and audio systems, representing a perfect solution for remote, headphone audio-volume control applications
On-board modules
LM4811 – stereo, analog input headphone amplifier with digital volume control from Texas Instruments
Key Features
Low power consumption, digital volume control, “Click and Pop” suppression, high-quality output power, no bootstrap capacitors, Shutdown feature, and more
Interface
GPIO,PWM
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Headphone AMP Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Headphone Amp Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Output Power (@ 16Ω load) | – | 105 | – | mW |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the Headphone AMP Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Headphone AMP Click driver.
Key functions:
headphoneamp_set_sound_volume
– Headphone AMP set sound volume function.headphoneamp_volume_up
– Headphone AMP set sound volume up function.headphoneamp_volume_down
– Headphone AMP set sound volume down function.
Example description
This library contains API for the Headphone AMP click driver. This demo application shows use of a Headphone AMP Click board™.
void application_task ( void ) { for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ ) { log_printf( &logger, " Turning volume uprn" ); headphoneamp_volume_up ( &headphoneamp ); Delay_ms( 2000 ); } log_printf( &logger, "-------------------------rn" ); Delay_ms( 5000 ); for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ ) { log_printf( &logger, " Turning volume downrn" ); headphoneamp_volume_down ( &headphoneamp ); Delay_ms( 2000 ); } log_printf( &logger, "-------------------------rn" ); Delay_ms( 5000 ); }
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.HeadphoneAMP
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.