Electronic music DIY - some simple ADCs and DACs
Audio in and out
ADCs
- MCP3008, SPI, 8-channel, 10-bit (fewer-channel variants: MCP3004, MCP3002, MCP3001) (EUR1.5)
- MCP3208, SPI, 8-channel, 12-bit (fewer-channel variants: MCP3204, MCP3202, MCP3201), (EUR2.5)
- ADS1015, I2C, 4-channel 12-Bit ADC (EUR1.0)
- ADS1115, I2C, 4-channel 16-Bit ADC (EUR1.5)
- (...4 and ...3 variants just have fewer channels)
- AD5593, I2C (EUR8)
- 8 channel, each usable as a 12-bit DAC, 12-bit ADC, or GPIO
The above tends to choose the most-channel variant Note that some of these can be used in differential mode, halving the effective number of channels.
DACs
- TLC5620, SPI, 4-channel 8-bit (~EUR3)
- MCP4728, I2C, 4-channel 12-bit (EUR0.5)
- MCP4725, I2C, 1-channel 12-bit (EUR0.5)
- MCP4921, SPI, 1-channel 12-bit (EUR0.5)
- MCP4922, SPI, 2-channel 12-bit (EUR1.5)
- TDA1543, I2S, 2-channel 16-bit (EUR0.5)
- PCM1710, I2S, 2-channel 16-bit (EUR1.5)
- DAC8551, , 1-channel 16-bit EUR5 (e.g. in Braids)
- DAC08, 8pin, 1-channel 8-bit (EUR0.5)
- DAC0800 same idea
- TLC5940, 16-channel 12-bit PWM (not DAC) (EUR1.5)
- PCM5102, I2S, 2-channel 32-bit
Earphones / small speakers amps
There's a bunch of ICs that you can use on a line out that can also deal with headphones (not all op amps are happy driving them directly) and tiny speakers.
Many of these are effectively op amps with larger power stages
- which is why you can one of these amplifiers as an audio op amp (the specs aren't so useful beyond audio)
- and why you can build your own from an op amp and a transistor pair
- ...essentially a simple Class A amplifier.
- choice of op amp (e.g. TL072) may imply bipolar power, which is impractical unless you happened to have that already.
In-ears headphones only need a few milliwatts(verify), while chunkier headphones up to maybe a few hundred milliWatts (depends on their sensitivity, which is sort of their efficiency: dbSPL @ 1mW)
Some options:
- LM386
- an audio amplifier IC -- basically an op amp with a larger output stage
- Ouput power varies with package, lowest is ~100mW and highest is ~800mW.
- 4~12V supply, or 5~18V, depending on package
- gain is 20 (default) up to 200
- and bypass
- LM380
- similar to LM386, but up to 2.5W
- 10~22V supply
- TDA7052
- ...or others from that family, like TDA7050
- 4.5~18V supply
- differential output
- higher output (~1W)
- apparently a little lower noise
- from 3V?
- TDA2822
- 1.8~15V supply
- 2* 110mW
- gain: 39dB (~90), fixed
- two channel
- PAM8403
- Class D (most of the above is class AB)
- 3~5V supply
- 3W output
Microphone (pre)amp
This article/section is a stub — probably a pile of half-sorted notes and is probably a first version, is not well-checked, so may have incorrect bits. (Feel free to ignore, or tell me) |
Main jobs:
- increase signal level
- not introducing noise
A lot of op amps qualify for that.
In practice you have further constraints from
- a specific mic's impedance (things are harder if it's higher, like piezos)
- a specific mic's sensitivity, typical mic placement
- 40dB of gain covers a lot of uses
- some amount of padding (attenuation) is sometimes also useful
- voltage level of what you're driving into expects
- use of phantom power
- not pick up mains hum (or other EM noise) because increasing any 40dB is probably audible. Probably meaning shielding.
There are a few specific helpful ICs, e.g. with externally tweakable gain, like
- MAX9814
- autogain threshold and attack/release configured via external components
- designed somewhat towards electets
- and you may not want automatic gain control in various cases.
https://www.homemade-circuits.com/small-amplifier-circuit/
Depending on what you're driving into, some BJTs, or FETs,
Most op-amps (or headphone amps, LM386 seems common in examples) with at least moderate gain, and moderately low noise.
This is more about circuit design.
- If electret, you want an offset (resistor to high rail) and then probably isolate that from the input with a capacitor
- switch-mode power is likely to introduce noise, so instead want battery power, or linear regulation,
When you can, put this closer to the mic, though in practice this matters for very quiet mics.
Sensor pre-amps in general can be classified as
- current sensitive
- charge sensitive
- parasitic capacitance
I've seen circuits with LM386, LM358,
https://www.homemade-circuits.com/small-amplifier-circuit/
http://www.thatcorp.com/datashts/AES129_Designing_Mic_Preamps.pdf
Combinations
DAC and amp
- MAX98357 - I2S, 1-channel, 3W amp
CODEC - ADC, DAC, and sometimes more
- SGTL5000 - I2S
- AK4556 - I2S
- PCM3060 - I2S
ADC, DAC, and amp
- WM8731 - I2S