The block diagram above outlines how the hearing aid works. A signal picked up by the microphone first goes through a pre-amp stage which culls frequencies above 3kHz (outside hearing spectrum) and then amplifies the remaining signal for future stages. The signal then progresses to the filter stage where it goes through four parallel filters that divide the signal into four frequency ranges. This filtered signal is read by the level estimator and provided to the Arduino. The filtered signal is also passed to the gain-controlled stage where the signals are amplified based on tuning settings provided by the Arduino. The signal finally enters the output stage where it passes through a summer and the modified signal can be heard with a pair of earphones.
Step 1: Design
This project requires about $60 worth of parts. See cost table above. Please refer to the parts list attached for a full list.
Step 2: Power Supply
The next most important voltage in the system is virtual ground. This is set to be half of 3.3V (1.65V) and is generated using an op-amp follower hooked up to a voltage divider. This signal is the reference point for all analog signals. Care must be taken to minimize any noise on this line because otherwise that noise will propagate through the entire system. Finally, all of the power inputs of the ICs are bypassed to minimize power supply noise.
Step 3: Preamplifier
Along with the preamplifier, there is also an attenuator for the tuning signal sent from the Arduino. This lowers the signal to a comparable level from the microphone through a voltage divider and an inverting op amp with a gain of 1/10. The outputs of these amplifiers are fed into a toggle switch which is used to switch between the tuning signal and the microphone signal for when you enter tuning mode.
Step 4: Filters
The signal for this design is split into four channels, corresponding to four different bands important to hearing. The first band consists of signals below 300Hz, so we use a standard low pass filter. This band corresponds to low frequencies that can be heard. The second band starts at 300Hz and continues to 3kHz. This band is selected to correspond to the voice range. The third band begins at 3kHz and extends to 8kHz. This corresponds to high frequencies that can still be heard. Finally, the fourth band extends beyond 8kHz.
The filter specifications in the schematic above are recommended for operation. If you would like to change the bands for your own needs, component values will have to be changed. If you are unfamiliar with the Sallen-Key topology, please read through this as it will guide you through the calculation. If you wish to change the bandpass filters, this is a useful tool to guide you through the process. Please note that the Q-factor for a Bessel filter is 1/sqrt(3). Please refer to this for Q-factors of other recommended filters.
Step 5: Level Estimator
To estimate the level of each band, we rectify the signal using a Schottky diode and then charge a capacitor to save the level information. The capacitor is in parallel with a resistor which is used to slowly discharge it, creating an averaging effect. This signal is then fed into an analog input of the Arduino which can use it to detect the level of the band.
Note: Image courtesy of Bucknell University
Step 6: Arduino
The first function the Arduino provides is tuning. On startup or reset, the Arduino polls both pushbuttons for one second waiting for a hit. If a button is pushed, the Arduino moves into the tuning state. It then proceeds to play four tones, one tone for each band. If the user presses pushbutton one, the gain is doubled. If the user presses pushbutton two, the next band is tested. Once the tuning is complete, the gains are recorded to EEPROM. Please note that during tuning, the digital op amps that are not being tuned have their gains set at zero so only the specific band passes. If you choose to alter the code, ensure that you always remember to read in the EEPROM values after tuning.
The second function of the Arduino is a conversational mode. Once pushbutton two is pressed, the Arduino enters the conversational mode where voices are amplified and background noise is attenuated. The Arduino uses a time averaged reading of the low-mid passband to determine whether a voice is present. If this time averaged value is greater than background noise, it will increase the gain of the low-mid band and decrease the gain of the other bands to a minimum of unity gain. The LED at pin 13 will also light up when this boosted gain mode is entered. Note that the Arduino has a five second relaxation time so it will stay in the boosted gain mode for five seconds until it switches back to normal when no voices are present. Hysteresis is also present to prevent jittering. Pressing button two again transitions out of this mode and locks the gain values to tuned values until button two is pressed again.
Please note that the Arduino begins by reading a test byte from EEPROM to determine if the data in the EEPROM is valid. If it is, it reads the values into the cache. Otherwise, all op amps are set to unity gain. Therefore, when you first load the code, it is recommended that you tune the device right away as the unity gains are not conducive to people with hearing loss.
Step 7: Amplification and Output
Step 8: Results
If you would like to make your hearing aid even more intelligent, we recommend rewriting the gain boosting code for the Arduino. A smarter approach is to take the total power of the signal as read by the Arduino and redistribute it across the bands with a higher weighting on the speech band and lower weightings as you increase in frequency. The MATLAB model attached is a great starting place to experiment with. This will result in more realistic “focusing” on a person’s speech. Good luck!