Electric Signals

  1. Hello

    Could I use a microprocessor (or anything else for that matter) to send a signal to a DAC that converts the signal to audio. For example, when I close a circuit the microchip sends a signal to the DAC to emit a certain sound.

    Thanks in advance for any responses and please inform me if the question is unclear.
    Last edited: Feb 20, 2014
  2. jcsd
  3. berkeman

    Staff: Mentor

    Welcome to the PF.

    Sure. That is a very common thing to use a microcontroller (uC) for. Do you have a uC in mind? Do you have a uC Evaluation Board?
  4. No I don't have any particular micro controller in mind but what I basically want to send an electric signal to an audio device allowing to emit a certain sound (eg. hello). I presumed that using a micro controller and a DAC is the only way to possibly achieve this but if you have anything else in mind that would be great.
    Thank you
  5. Speech synthesis is common, and many IC's are available to tackle different aspects or appliactions.
    Do a google search on "speech synthesis". Come back with questions. There are many answers based on exactly what you really want to do (quality, quantity, flexibility, difficulty, etc).
  6. Thank you for your reply but I searched up speech synthesis but that is not exactly what I was looking for. Actually, I am just 14 years old so I am quite new to this stuff. What I want is that when I close a particular circuit (by a switch for example) it will send a signal to any audio DAC to emit a certain sound (eg. hello). What I do not know how to do is to send an electric signal which the audio DAC will understand and I presumed the best way to do this was to use a micro controller but I do not know how to use it.
  7. I am glad to see you are taking an interest in this at your age. You have a lot to learn yet. You need to learn about binary, byte, bits, words, how they are stored, what a register is and etc. I am afraid you will get discouraged if you jump into this without doing some simpler things first. Other members on this board are probably better suited to guide you with getting started with programming and controllers. Are you familiar with arduino or basic stamp? I have never used them but I have an idea what they can do.
    1 person likes this.
  8. berkeman

    Staff: Mentor

    Here is a basic intro to digital audio: http://en.wikipedia.org/wiki/Digital_audio

    And the simplest format for digital audio files is *.WAV: http://en.wikipedia.org/wiki/WAV

    1 person likes this.
  9. Thank you all so much for your help


    What I want to do is to be able to send a signal to the DAC to emit a certain sound but I want the sound to vary. For example, when I send a particular signal is will emit "hello" and when I send another signal it will emit "goodbye". Is there a way to be able to send these varying signals using a processor. And how do I "inform" the processor what signals to send to the DAC
  10. This is all part of learning some things I mentioned in my previous post. I get the feeling you know what a DAC is and that an audio signal going to a speaker is analog but I suspect you don't grasp what is all involved in getting it all to come together. I suppose that is a rather obvious statement right? LOL
    1 person likes this.
  11. berkeman

    Staff: Mentor

    You can save various *.WAV files with the sounds/words you want to be able to play. Then when you type a word or number into the microcontroller's (uC's) console your program on the uC selects the *.WAV file in its memory and sends the bytes to the DAC at the correct pace (how many bytes per second). The DAC converts the digital information into the analog waveform that you send through an amplifier to your speakers.

    I'll post a link later if I have time...
    1 person likes this.
  12. jim hardy

    jim hardy 5,460
    Science Advisor
    Gold Member
    2014 Award

    The DAC is little more than an electronic guitar pick , it can make sound if something manipulates it and it has a speaker attached to move the air....

    You'll need something, probably a small computer, to sense when the switch has closed and then send to the DAC a series of commands to make it produce the series of sounds that'll result in "Hello".

    The vocabulary will reside in the small computer, or in the 'speech synthesizer'.

    Electronics is a fun hobby. Google on "electronic hobbyist kits". Check out Ramsey...

    Berkeman is way more advanced than i am on digital sound....
    1 person likes this.
  13. In order to cause a simple DAC to emit a sound, you need to send it a sequence of digital words at a sample rate (say 8000 14 bit words per second for telephone quality speech). Those digital words represent the voltage of the speech waveform at rapid instants in time (the sample rate).

    This would be one method of speech synthesis. You need to store 8000 digital words per second of speech and sequence them to the DAC. There are other algorithms for storage and synthesis.

    There are a variety of speech synthesis chips that have storage and deal with the sequencing.
    FOr example https://www.rutronik.com/news+M574b67028a3.html

    Google "Speech Playback IC"
    1 person likes this.
  14. @berkeman What exactly is the micro controller's console. Basically, where should I type the number?

    @jim hardy How can I make the computer to recognise when the switch has closed and prompt it to send the signal to the DAC
  15. berkeman

    Staff: Mentor

    Take a look at the typical uC evaluation boards, and each will have some way to connect with a keyboard and display (or Ethernet). You would use that human interface to interract with the uC, including writing programs to run on the uC (in C or Basic or Python or some other language), and you can use that interface to interact with your programs when they are running (to type commands, etc.).

    Check out Microchip's website for PIC eval boards, and take a look at the Rapsberry Pi and Beagle Bone eval boards. Check out the Make Magazine website as well, as they talk about uC eval boards a lot.

    Have fun! :smile:
    1 person likes this.
  16. @meBigGuy How exactly do we "tell" the chip what words to sequence to the DAC
  17. analogdesign

    analogdesign 834
    Science Advisor

    That is what software is for. You need to set up a channel where you can send arbitrary words to the DAC. To decide what words to send and in what order is a job for software.

    Building this from the ground up is quite complex. You are better off leveraging existing systems and adapting them to your needs. Even then it's over your head for a beginner.

    If electronics sound fun to you, I would strongly suggest going MUCH simpler to start. Instead of it saying "hello" or "goodbye" why don't you have two different tones that correspond to this (like the chime when you turn on a Mac)? For example low-pitch = Hello, high-pitch = goodbye.

    The first step is to figure out how to drive a little piezoelectric speaker to make a tone when you push a switch. Baby steps, Rodney, baby steps.
    1 person likes this.
  18. My recommendation would be to buy an Arduino and a shield (IO board) for audio playback. But, root around on the net for a project that you feel comfortable with before buying anything. For example
    http://www.instructables.com/id/Arduino-Audio-Output/ (but this one may be too advanced for a first project)
Know someone interested in this topic? Share this thead via email, Google+, Twitter, or Facebook

Have something to add?

Draft saved Draft deleted