Circuit Description
The HA-1 is made up of three blocks they consist of the audio block, the microcontroller block,
and the battery charger block.

The audio path consists of a preamplifier circuit with digital volume
control and audio headphone amplifier. The preamplifier uses a
digital linear taper potentiometer and op-amp buffer. The input is AC
coupled to the input connector and biased to VCC/2 with a Wheatstone
bridge circuit, with the center resistor being the digital
potentiometer. The digital potentiometer is adjusted with software to
emulate an audio taper. Each button press sends an I2C command with a
byte corresponding to one of the 256 potentiometer resistor values.
Each of these values corresponds to a value in the logarithmic
resistor table values. The table is stored in the microcontroller
EEPROM and has 42 values ranging from -70dB to 0dB. The following
table contains the actual lookup table hex values and their
corresponding resistance and gain values.

The output of the potentiometer is buffered through an op-amp and DC
coupled to the audio amplifier. The audio amplifier is set with a
fixed maximum gain of 14 dB. The gain is calculated with the
following equation.


The audio amplifier IC is biased to the same voltage VCC/2 as the
preamplifier circuit. The output is AC coupled to the headphone output jack.
The input impedance to the Wheatstone bridge circuit is 14.4k ohm. The
input impedance is calculated with the following equation.

An approximate simulation of frequency response of the audio path was performed
using the LT spice simulator.
The simulation schematic below is one of two identical HA-1 audio channels.
The purpose of this simulation is find the overall frequency response.
By changing the input and output capacitor values it can seen that the
frequency response changes. The HA-1 could use smaller capacitors but
the largest capacitors that would fit in the enclosure were used to give
the absolute best performance. The silmulation file is also included below.

The frequency response results can be seen in the following plot.

LTSpice Simulation File (ha1_audio_circuit.asc)
The power supply consists of a Lithium Ion battery pack constructed from
a single Lithium Ion cell, protection circuit and cable assembly. The
Lithium Ion cell is charged with an integrated battery charger IC.
The power source used to charge the battery is the +5V from the USB
connector on any PC capable of supplying 100mA @ 5V on its USB port.
The PIC microcontroller controls the volume level, and low power standby
mode. All of the amplifier circuitry is put in standby mode when the
standby button is pressed when the unit is powered, and powered when
the unit is in standby. The audio amplifier, and op-amp used in the
preamplifier have a standby pin. The digital potentiometer is put in
standby by programming a standby bit in one of its registers. When
the unit is put in standby mode the microcontroller puts the standby
pin on the amplifier low via one of its GPIO pins. One of the digital
potentiometer GPIO pins is used to control the op-amp standby pin, so
the op-amp and digital potentiometer are standby is controlled via
I2C. Having a separate standby control on each device allows for
flexibility in power up/down sequencing.
Schematics
Parts List
PCB Layout
|