Good day comrade!
Today we'll talk about the audio hardware of my robot. Generally speaking, my sound system will consist of two parts:
- melody generator;
- speech generator.
The latter will be discussed in a future article, but today (and next week), our attention will be focused on the melody generator. So here's what I came up with:
The circuit operates as follows:
- digital code of note comes from the MCU to the DAC;
- DAC converts the note into an analog signal U = 0..5V;
- analog signal U is fed to VCO, which converts it into frequency f = 0.5..10kHz;
- frequency signal f from VCO is supplied with the power amplifier;
- signal from the power amplifier enters the loudspeaker from which the sound is coming.
Pretty simple!
Circuitry of our "sound card" is very simple and clear:
Let's look at the purpose of each part:
- IC2 - microcontroller generating digital codes;
- R1-R10 and IC3A - improvised DAC;
- IC1, R10-R13 and C1 - a simple VCO, built on classic 555 timer;
- R14-R15 - frequency control (for fine tuning);
- IC3B - power amplifier (U = const, I - enhanced);
- SG1 - piezo speaker.
I’d like to explain one thing: DAC in this scheme is performed on the base of voltage divider, but you may have noticed that the scheme additionally uses Op-Amp IC3A. Why is it needed? Everything is very simple! In this case IC3A is used as a buffer stage to avoid the influence of signals from outside on the DAC.
Well, we’ve got the scheme, it's time to put it into practice! To begin with, I had to walk to the store and buy all the necessary electronic components:
Then came the hour of manufacturing PCB. The board is very simple, and I decided to draw it in not less simple program Sprint Layout:
Finally, I made the PCB. Traditionally, for this purpose, I used an iron and a laser printer:
And now it's time to test! The scheme worked at once, but an important drawback of piezo speaker was detected: these speakers have their own oscillation frequency (in my case 3.3kHz) and in case of applying to the speaker of a less frequency (e.g. 490Hz), the frequencies are summed:
In general, this does not prevent the system to work, but if I get a chance, I will get a normal speaker capable of reproducing clear sound.
Finally, I offer you a short video showing the work of my "sound card":
Next week, we will create music for our "sound card" using Matlab. See you soon!






Top Comments