8 Nov 2012: STM32F103 Audio and Camera

Looking at Camera ICs such as the GL860A, it was discovered that these ICs are typically 8-bit micros with DMA. The initial decision to not use the STM32F was therefore reversed, more thoroughly investigated, and found to be workable. Several circuits were tracked down which contain PWM audio volume control, and PCM audio output. These will be added later but for now here is a screenshot of the STM32F showing plenty of pins available to cover all three functions, camera, mic and speakers. It looks like there may also be room (and spare pins) to cover a separate Headphone audio output circuit as well. Sparkfun have a suitable camera (TCM8230MD) which has been proven and demonstrated to work with an STM32F: even the software is already available thanks to the "Following Robot" project by Adam Greg.

Here is the two audio circuits, one uses a Transconductance Amplifier which can basically be used as a voltage-regulated amplifier. By using a PWM input (through a capacitor) the microphone's volume can be amplified just by using a single pin (in PWM mode) from the STM32F. The second circuit is a straightforward H-Bridge MOSFET amplifier, which again will receive PCM-encoded volume. A low-pass filter turns the amplified PCM output into reasonable audio. By running the PCM at very high frequency (1Mhz) the quality can be greatly improved, however this is only for 1W speakers.