Output specific frequencies with digital electronics

In summary: What you *could* do is to control a Digital-to-Analog Converter (DAC) and synthesize an arbitrary waveform that you then feed to an amplifier. However, since you're more interested in playing individual notes, you may be interested in waveform generator ICs, or better yet, sinewave generators (these would produce 'pure' tones probably quite similar to what you hear from most tuners). For instance, the Fairchild ML2035 is SPI-settable: you simply tell it which frequency to produce, and it outputs that frequency!
  • #1
TOONCES
24
0
I'm trying to figure out how to build a breadboard instrument using either push buttons or logic switches as they keys that will play each note. The issue that i am having is that I don't think finding all of the perfect resistor and capacitor combinations for each note is a good idea. So, i want to use digital hardware to produce the frequencies. Any ideas how?
 
Engineering news on Phys.org
  • #2
What specific musical scale are you interested in? See

http://www.phy.mtu.edu/~suits/Physicsofmusic.html

Some scales are easier than others to generate from a single high-harmonic crystal oscillator. Are you concerned about the phase of the harmonics?

Bob S
 
  • #3
The simplest method is to use a microcontoller and program it with every note.

Another way is to start with a high frequency stable oscillator, and then have a switched frequency dividers to generate various notes.
 
  • #4
Bob S.-

I was looking to just do The basic notes A,B,C,D,E,F,and G maybe with sharps and flats if the design is simple or small enough.
I'm not sure if i should be concerns about the phase of the sound. Can you elaborate on why i would need to?

waht-

I wanted to avoid using a micro controller to program the frequencies.

I was looking at using the divider setup that you mentioned. i am just not sure on how to do so. Looking at the frequencies of musical notes I've noticed that i can produce different octaves of the notes by dividing but not different notes. I'm not positive on this but pretty sure. So what i am seeing is that i would need to use several combinations of resistors and capacitors to produce a divideable frequency to further produce different octaves of that frequency.

Is that a practical way of approaching this?
 
  • #5
TOONCES said:
Bob S.-

I was looking to just do The basic notes A,B,C,D,E,F,and G maybe with sharps and flats if the design is simple or small enough.
I'm not sure if i should be concerns about the phase of the sound. Can you elaborate on why i would need to?
What do chords sound like if you don't control the phase of all the harmonics, or are you planning on playing only one note at a time?
By the way, what musical scale are you planning on using?

Bob S
 
  • #6
Bob S said:
What do chords sound like if you don't control the phase of all the harmonics, or are you planning on playing only one note at a time?
By the way, what musical scale are you planning on using?

Bob S

I only plan on playing one note at a time. Also, I was looking at the blues scale (no reason in particular).
This is the blues scale given on the website:

Note
of Blues Scale Ratio
1 1
2 6/5
3 4/3
4 45/32
5 3/2
6 9/5
7 2

I'm looking to use one main frequency and divide it into the rest. Everything in the circuit is pretty much set. The only part I can't figure out is how to divide the main frequency accordingly. For example, there is no way of dividing a frequency by five and then multiplying it by 6 (as far as I know). I was thinking there may be some way of doing some math and getting all the fractions listed above into a form with 1 as the numerator. That way i would be able to divide by one number to get a good frequency. (thinking about it now that doesn't seem like it'll work but still, food for thought.)

This is frustrating me to no end so any help is greatly appreciated and I'll post the final circuit if anyone can give me some assistance.
 
  • #8
Apologies if I'm being patronizing, as I do not know your level of background / knowledge.

What you *could* do is to control a Digital-to-Analog Converter (DAC) and synthesize an arbitrary waveform that you then feed to an amplifier. This is (basically) the same way your PC / laptop or MP3 player generates not only 'pure tones' but also play the whole gamut of music and sounds that we play through them these days:
http://en.wikipedia.org/wiki/Digital-to-analog_converter

However, since you're more interested in playing individual notes, you may be interested in waveform generator ICs, or better yet, sinewave generators (these would produce 'pure' tones probably quite similar to what you hear from most tuners). For instance, the Fairchild ML2035 is SPI-settable: you simply tell it which frequency to produce, and it outputs that frequency!
http://media.digikey.com/pdf/Data Sheets/Fairchild PDFs/ML2035.pdf

...Unfortunately, they don't seem to make it anymore, and none of the major players seem to have it in stock (as seen at www.findchips.com) Maxim doesn't make/sell the MAX038 family anymore either, which was a far more robust IC. You may be able to find one of these if you look hard enough (or Digikey or Mouser may actually be able to quote you for some of these) Not sure if this shows the ascendancy of DACs or what, but they seem to be a dying breed these days!

About the only one of these I CAN find is the Exar ICL8038, from one vendor (though I didn't look terribly hard):
http://www.jdr.com/interact/item.asp?itemno=ICL8038CCPD

Good luck!

EDIT: This page also summarizes the three ICs I mentioned:
http://www.siliconfareast.com/waveform-gen.htm
 
Last edited by a moderator:
  • #9
MATLABdude said:
Apologies if I'm being patronizing, as I do not know your level of background / knowledge.

What you *could* do is to control a Digital-to-Analog Converter (DAC) and synthesize an arbitrary waveform that you then feed to an amplifier. This is (basically) the same way your PC / laptop or MP3 player generates not only 'pure tones' but also play the whole gamut of music and sounds that we play through them these days:

I'm trying to avoid using micro-controllers to just give me what I want. I guess I want to do it the old fashioned way. .

I'm not sure how I would control a DAC to "synthesize a waveform" like you say.

Basically what I plan on doing is getting a main frequency (some sort of oscillator), then dividing it into the 7 frequencies of a blues scale, then i will input those signals into a multiplexer which is controlled by logic switches to give a "Breadboard instrument" of sorts.

The issue that i am having is that i am not sure how to divide the main frequency into the required frequencies. I don't necessarily mean "required". What i want is the relationship between the frequencies. The relationship is in one of my earlier posts (blues scale).

I don't need to have just one main frequency, but i didn't want to settle with making multiple oscillators with the set components that i have. With a setup like this i would get multiple outputs that don't relate as well as i would like and that would take up way more space than i would like (with more problems to add to that).

I hope this explanation is more. . . explanitive? Thanks for all the help I've been receiving (especially the google search hehe). More is still needed. Also, try to excuse my grammar, I have ten million things to do and can't think very straight at the moment.
 
  • #10
TOONCES said:
I'm trying to avoid using micro-controllers to just give me what I want. I guess I want to do it the old fashioned way. .

I'm not sure how I would control a DAC to "synthesize a waveform" like you say.

Basically what I plan on doing is getting a main frequency (some sort of oscillator), then dividing it into the 7 frequencies of a blues scale, then i will input those signals into a multiplexer which is controlled by logic switches to give a "Breadboard instrument" of sorts.

The issue that i am having is that i am not sure how to divide the main frequency into the required frequencies. I don't necessarily mean "required". What i want is the relationship between the frequencies. The relationship is in one of my earlier posts (blues scale).

I don't need to have just one main frequency, but i didn't want to settle with making multiple oscillators with the set components that i have. With a setup like this i would get multiple outputs that don't relate as well as i would like and that would take up way more space than i would like (with more problems to add to that).

I hope this explanation is more. . . explanitive? Thanks for all the help I've been receiving (especially the google search hehe). More is still needed. Also, try to excuse my grammar, I have ten million things to do and can't think very straight at the moment.

Did you even read my link? I'm thinking not...

EDIT -- we tend to frown on new posters here who aren't willing to do most of the work on their questions themselves...
 
  • #11
-Berkeman

I did read your link, it directed me to a list of micro-controller links that previously stated i was avoiding.

I did not mean to be so condescending in my reply, but I use google as well. It is not always a good source of information. Which is why I came here and have been coming here for some time.

My problem will be solved one way or another. I am not using this forum to get the work done for me, just assistance to an issue I am facing. Please redirect your patronization for myself somewhere else, as i believe it is not tolerated.

---

Now, relating to my problem.

I have decided to use a 555 timer for my main frequency, because every other oscillator i have used has been very unreliable (or i have been too sleepy while working). I have a set frequency that i developed from the scale i posted earlier. I am about to start experimenting with counters to try to divide the signal's frequency to the appropriate amount. Unfortunately, i only have access to divide-by-2 +divide-by-8 counters, and the frequencies I need to divide into to won't do this so well. If i can't determine any other solution I may end up getting some weird values, which may not sound so well in the end.
 
  • #12
The links in the hit list that I skimmed appeared to be frequency synthesizer ICs that could be used stand-alone OR with a uC as the master. I understood that one of your requests was that no uC would be involved, so I was surprised that you didn't mention something about the synthesizers in the link.

Are you familiar with how frequency synthesizers work? They can give you all kinds of strange effective divide ratios. It does seem like it would be easiest for you to use an audio frequency synthesizer IC at the core of your circuit, and figure out what you want to put around it to select the multiply/divide numbers.

Are you up for using a PAL or some other logic to control the IC?
 
  • #13
berkeman said:
Are you familiar with how frequency synthesizers work? They can give you all kinds of strange effective divide ratios. It does seem like it would be easiest for you to use an audio frequency synthesizer IC at the core of your circuit, and figure out what you want to put around it to select the multiply/divide numbers.

-I feel like what I am am doing is creating a frequency synthesizer in the first place. Maybe with just more specific frequencies? I'm not too familiar with how frequency synthesizers work.

berkeman said:
Are you up for using a PAL or some other logic to control the IC?

- PLL? and I have no problem changing the circuit up at all. What did you have in mind?
 
  • #14
TOONCES said:
I'm trying to avoid using micro-controllers to just give me what I want. I guess I want to do it the old fashioned way. .

I'm not sure how I would control a DAC to "synthesize a waveform" like you say.

Basically what I plan on doing is getting a main frequency (some sort of oscillator), then dividing it into the 7 frequencies of a blues scale, then i will input those signals into a multiplexer which is controlled by logic switches to give a "Breadboard instrument" of sorts.

The issue that i am having is that i am not sure how to divide the main frequency into the required frequencies. I don't necessarily mean "required". What i want is the relationship between the frequencies. The relationship is in one of my earlier posts (blues scale).

I don't need to have just one main frequency, but i didn't want to settle with making multiple oscillators with the set components that i have. With a setup like this i would get multiple outputs that don't relate as well as i would like and that would take up way more space than i would like (with more problems to add to that).

I hope this explanation is more. . . explanitive? Thanks for all the help I've been receiving (especially the google search hehe). More is still needed. Also, try to excuse my grammar, I have ten million things to do and can't think very straight at the moment.

If you look at the Wikipedia link on Digital-to-Analog Converters I gave, you'll see two waveforms about a quarter of the way down (beside the basic ideal operation and practical operation sections). If you wanted to output a sine wave, you'd need to tell the DAC to output, say, 0V at one particular moment, and then a few microseconds later, tell it to output 0.1V.

The key idea is that the DAC will output whatever voltage value you tell it to. You need to update the value the DAC outputs every few milliseconds so that you get something that looks like a sinusoid on the oscilloscope. Usually it isn't perfect, but it'll often be good enough (you just need to choose the right DAC for your particular application!)

That said, it sounds like you just want something that connects a particular biasing network to a 555 whenever one button is pressed. That's easy enough to do with some SPST or DPST buttons, and a handful of capacitors / resistors.

EDIT: The description of the DAC above is in contrast to the frequency synthesizer that Berkeman (and to a lesser extent, myself) have been telling you about. Instead of continuously telling the DAC what voltage value it should be outputting at any particular moment, you just tell the frequency synthesizer, "Make me a sinusoid of this frequency! Engage!"
 
  • #15
TOONCES said:
-I feel like what I am am doing is creating a frequency synthesizer in the first place. Maybe with just more specific frequencies? I'm not too familiar with how frequency synthesizers work.



- PLL? and I have no problem changing the circuit up at all. What did you have in mind?

A frequency synthesizer uses a VCO as part of the PLL building block, along with a programmable divider in the feedback comparison path. That is how you are able to synthesize different frequencies of various multiply & divide ratios:

http://en.wikipedia.org/wiki/Frequency_synthesizer

wikipedia.org said:
The key to the ability of a frequency synthesizer to generate multiple frequencies is the divider placed between the output and the feedback input. This is usually in the form of a digital counter, with the output signal acting as a clock signal.
 

1. What is the purpose of outputting specific frequencies with digital electronics?

The purpose of outputting specific frequencies with digital electronics is to generate electrical signals of precise and predefined frequencies. These frequencies can then be used for various applications such as communication, data transmission, and signal processing.

2. How can specific frequencies be generated using digital electronics?

Specific frequencies can be generated using digital electronics by using electronic components such as oscillators, counters, and digital-to-analog converters. These components can be programmed to produce the desired frequency using a microcontroller or software.

3. What is the advantage of using digital electronics for outputting specific frequencies?

The advantage of using digital electronics for outputting specific frequencies is that they offer high precision and accuracy. Digital circuits can be designed to produce frequencies with minimal error, making them ideal for applications that require precise frequencies.

4. Can digital electronics output frequencies in the audio range?

Yes, digital electronics can output frequencies in the audio range. With the use of digital-to-analog converters, digital signals can be converted into analog signals that can be heard by the human ear. This is how digital audio devices such as smartphones and music players produce sound.

5. Are there any limitations to outputting specific frequencies with digital electronics?

One limitation of outputting specific frequencies with digital electronics is that they are affected by interference and noise. This can result in slight variations in the produced frequency. Additionally, the complexity of the circuit design increases as the desired frequency becomes higher, making it more challenging to generate very high frequencies.

Similar threads

Replies
7
Views
3K
  • Electrical Engineering
Replies
8
Views
897
  • Electrical Engineering
Replies
27
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Electrical Engineering
Replies
3
Views
2K
Replies
9
Views
1K
  • Electrical Engineering
Replies
10
Views
2K
  • Electrical Engineering
Replies
20
Views
3K
Replies
22
Views
2K
  • Art, Music, History, and Linguistics
2
Replies
37
Views
3K
Back
Top