Send Electric Signals to DACs w/ Microprocessors

  • Thread starter Thread starter Rodneyshibu
  • Start date Start date
  • Tags Tags
    Electric Signals
Click For Summary

Discussion Overview

The discussion revolves around the use of microprocessors to send signals to Digital-to-Analog Converters (DACs) for audio output. Participants explore various methods and components involved in achieving sound synthesis, particularly in response to circuit closures, and the challenges faced by beginners in this area.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Homework-related

Main Points Raised

  • Some participants suggest that using a microcontroller (uC) is a common approach for sending signals to a DAC to produce audio.
  • Others propose that speech synthesis ICs are available for different applications, and participants are encouraged to research specific solutions based on their needs.
  • A participant expresses uncertainty about how to send an electric signal that the DAC will understand, indicating a reliance on microcontrollers for this task.
  • There are discussions about the need to learn foundational concepts such as binary, bytes, and registers before tackling more complex projects.
  • Some participants mention the possibility of storing audio files (e.g., *.WAV) in the microcontroller's memory and sending them to the DAC for playback.
  • One participant describes the process of sending a sequence of digital words to the DAC at a specific sample rate to produce sound.
  • Questions arise about how to program the microcontroller to recognize circuit closures and send appropriate signals to the DAC.
  • There are suggestions to explore existing microcontroller evaluation boards and programming environments to facilitate learning and implementation.
  • Some participants caution that building a system from scratch may be complex for beginners and recommend leveraging existing systems.

Areas of Agreement / Disagreement

Participants generally agree that using a microcontroller is a viable method for sending signals to a DAC, but there are multiple competing views on the best approach to achieve sound synthesis and the complexity involved. The discussion remains unresolved regarding the specific steps and programming needed to implement the desired functionality.

Contextual Notes

Participants express varying levels of familiarity with microcontrollers and programming, indicating a range of knowledge and experience that may affect their understanding of the concepts discussed. There are also references to specific technical details that may require further exploration for clarity.

Rodneyshibu
Messages
11
Reaction score
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
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?
 
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
 
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).
 
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.
 
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   Reactions: 1 person
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   Reactions: 1 person
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
 
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   Reactions: 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   Reactions: 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   Reactions: 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   Reactions: 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   Reactions: 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   Reactions: 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)
 

Similar threads

Replies
20
Views
3K
Replies
17
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
35
Views
11K
  • · Replies 4 ·
Replies
4
Views
19K