Pages: [1]   Go Down
Author Topic: Arduino Sine wave Generator  (Read 5550 times)
0 Members and 2 Guests are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 30
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We now published an article how to generate sine waves with an arduino board using the DDS method.
The article can be found here:
playground:audio:Synthesizers and sound generation:Arduino Sinewave DDS Generator
http://interface.khm.de/index.php/lab/experiments/arduino-dds-sinewave-generator/
regards
martin
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks pretty cool, I must play with it
Logged


The Big Smoke
Offline Offline
Sr. Member
****
Karma: 0
Posts: 260
Hacking and Slashing
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's very interesting!

That could be useful for testing circuits when you need to generate a sinewave...

I wonder if I could use this for a DC-AC inverter? I'm using a 555 timer at the moment but I'm struggling finding the perfect frequency
Logged

Central Indiana, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 202
So many projects, so little time...and money!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think this could be useful in a capacitor/inductor measuring tool.  See the following link:  http://www.thekeeser.com/Electronics%20info/measure_an_unknown_inductor.htm

With your design, is it possible to generate a sine wave and then take a measurement while the sine wave is still working?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The quality of this kind of sine wave is limited by the 8-bit table and the analog reconstruction filter you need on the output of the pwm.

I would be careful about building measuring tools with this approach,

My  implementation of the DDS  algorithm for Arduino has a parameterization of the algorithm that could be adapted for different resolutions and table sizes and comes with some examples of how to smoothly interpolate frequecy and amplitude for <a href="http://www.adrianfreed.com/content/arduino-sketch-high-frequency-precision-sine-wave-tone-sound-synthesis">Arduino music and sound applications</a>
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 30
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

measurement while sine is generated can be done. have a look at my "arduino realtime audio" article where where sound is sampled, processed an given out simultaneously.
martin
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is an excellent article. Thanks for posting it.

(* jcl *)
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

I'm new to the forum, fairly new to arduino, and ridiculously new to actually using custom built things like that first link's sinewave generator. I was wondering if anyone could list the parts that were used in that project? I took the picture and schematic to radioshack, but they were only able to define half of the components used.  :-/

Please be as specific as possible, so I don't manage to get confused.

Thanks in advance!
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you say which parts Radio Shack were able to identify? That way, we could concentrate on those that they could not identify!

The three capacitors should be easy to find (two 47nF and one 100nF). The resistors, also should be no problem (two 270 Ohm and a 100k Ohm log pot). The inductors (coils) may be the problem items (two 4.7mH). The units 'mH' are milli-Henries, where a 'Henry' is the SI unit for inductance.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh wow thank you very much!

the problems were the inductors and the long pot. also. is the long pot the only one where orientation matters?

*EDIT*
1. is there any difference between axial and radial capacitors that would affect this project?

2. if you would please, tell me where i could get one of those long pots and the inductors? because i cant seem to find them on the net.

3. do i need a specific potentiometer or will any ohm-rating suffice.

4. does the site say that i can just run this through active speakers without building the side apparatus? because right now i'm running the arduino tone() tutorial through a 1/4" jack into an amplifier. could i just run this code with that setup and an added potentiometer?
« Last Edit: March 22, 2010, 06:54:46 pm by ichi1984 » Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
is the long pot the only one where orientation matters?

It's a log pot (short for logarithmic), and yes, it's the only one where orientation matters. The logarithmic track must be wired up to that minimum volume (wiper at ground end) is anti-clockwise.

Quote
1. is there any difference between axial and radial capacitors that would affect this project?

No, either type will work.

Quote
2. if you would please, tell me where i could get one of those long pots and the inductors? because i cant seem to find them on the net.

Just about any good component supplier will have them. In the US, Jameco, Digi-Key, Mouser. In the UK, Maplin's, Rapid, Farnell, RS.

Quote
3. do i need a specific potentiometer or will any ohm-rating suffice.

You do not need an exact Ohm-rating, but you will need one that is approximately the right value. Anything from 47k Ohms to 500k Ohms should work OK.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh excellent! thank you for explaining. now just to be sure(and i'm sorry for all the questions but..) i can use two 100k ohm pots, one for the pitch and one for the volume?

and any two inductors measured at 4.7mH? or are there specifics that i need to mind with the inductors also?
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
use two 100k ohm pots, one for the pitch and one for the volume?

Yes, but one must be linear (for the Analog Pin 0 input, frequency) and one must be log (for volume). You may find that a 10k linear or 50k linear pot works better for the frequency control.

Quote
any two inductors measured at 4.7mH?

Yes, any 4.7mH inductors will work OK. No special requirements on those.


Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well thank you very much sir for your patience and help! i really appreciate it!
Logged

Pages: [1]   Go Up
Jump to: