Send Electric Signals to DACs w/ Microprocessors

In summary: I'm not sure what your end goal is, but there are simpler ways to make a specific sound. If you just want to play "hello" when a switch is closed, you could use a pre-recorded sound module and trigger it with the switch. No need for a microcontroller or DAC. But if you want to create and control different sounds with a microcontroller, that is possible too.In summary, the conversation is about using a microprocessor and DAC to send a signal to an audio device and emit a certain sound. The person is new to this and is seeking advice on how to achieve this using a microcontroller and how to send varying signals to the DAC. They are also considering other options such as using
  • #1
Rodneyshibu
11
0
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:
Engineering news on Phys.org
  • #2
Rodneyshibu said:
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.

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?
 
  • #3
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
 
  • #4
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).
 
  • #5
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.
 
  • #6
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.
 
  • Like
Likes 1 person
  • #7
Rodneyshibu said:
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.

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

:smile:
 
  • Like
Likes 1 person
  • #8
Thank you all so much for your help

http://en.wikipedia.org/wiki/File:A-D-A_Flow.svg

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
 
  • #9
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
 
  • Like
Likes 1 person
  • #10
Rodneyshibu said:
Thank you all so much for your help

http://en.wikipedia.org/wiki/File:A-D-A_Flow.svg

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

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...
 
  • Like
Likes 1 person
  • #11
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...
 
  • Like
Likes 1 person
  • #12
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"
 
  • Like
Likes 1 person
  • #13
@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
 
  • #14
Rodneyshibu said:
@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

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:
 
  • Like
Likes 1 person
  • #15
@meBigGuy How exactly do we "tell" the chip what words to sequence to the DAC
 
  • #16
Rodneyshibu said:
@meBigGuy How exactly do we "tell" the chip what words to sequence to the DAC

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.
 
  • Like
Likes 1 person
  • #17
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)
 

1. What is the purpose of sending electric signals to DACs with microprocessors?

The purpose of sending electric signals to DACs (digital-to-analog converters) with microprocessors is to convert digital signals into analog signals. This allows for communication between digital devices and analog devices, such as speakers or motors.

2. What types of microprocessors are commonly used for sending electric signals to DACs?

Commonly used microprocessors for sending electric signals to DACs include Arduino, Raspberry Pi, and PIC microcontrollers. These microprocessors are popular due to their low cost, accessibility, and ease of use.

3. How do microprocessors send electric signals to DACs?

Microprocessors send electric signals to DACs by utilizing digital output pins. These pins can be programmed to output a specific voltage level, which is then converted into an analog signal by the DAC. The microprocessor can also regulate the timing and frequency of the electric signals sent to the DAC.

4. What are some applications of sending electric signals to DACs with microprocessors?

Sending electric signals to DACs with microprocessors has a wide range of applications, including music production, robotics, industrial control systems, and electronic instrumentation. It can also be used in scientific experiments and research, where precise control of analog signals is required.

5. Are there any limitations to sending electric signals to DACs with microprocessors?

One limitation of sending electric signals to DACs with microprocessors is the accuracy of the analog signal produced. The quality of the analog signal is dependent on the resolution and precision of the DAC and the stability of the microprocessor's output pins. Additionally, the speed at which the microprocessor can send signals to the DAC may also be a limiting factor in certain applications.

Similar threads

Replies
20
Views
1K
Replies
9
Views
1K
Replies
6
Views
2K
Replies
21
Views
2K
  • Electrical Engineering
Replies
3
Views
759
  • Electrical Engineering
Replies
2
Views
2K
Replies
1
Views
1K
Replies
3
Views
921
  • Electrical Engineering
Replies
3
Views
1K
  • STEM Academic Advising
Replies
8
Views
1K
Back
Top