Poll
Question: Hi. I just want to know if it is possible to output 25 kHz sine wave using arudino Duemilanove? I will use it to drive my ultrasonic sensor. Thanks! smiley-grin
Do I still need to use Digital-to-Analog converter? - 0 (0%)
Is there other options? maybe the simplest way to generate 25 kHz sine wave using arduino? - 1 (100%)
Total Voters: 1

Pages: [1] 2 3   Go Down
Author Topic: sine wave generator  (Read 4286 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. I just want to know if it is possible to output 25 kHz sine wave using arudino Duemilanove? I will use it to drive my ultrasonic sensor. Thanks! smiley-grin
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26525
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does it really need a sine wave?
How clean does it need to be?
Do you have a spec for the transducers?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 224
Posts: 13917
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What voltage? + - ?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using Murata MA40E7r/s transducers. I'm really not sure if it will work on square waves, because i need the + and -
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26525
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm really not sure if it will work on square waves, because i need the + and -
Lots of designs use RS232 drivers for this purpose.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26525
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

NB 40kHz (25us cycle time)
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so what's the simplest way to do?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26525
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, depends what you're trying to do. (you haven't said)
The spec says 85V full-whack, but only with a 10Hz repetition rate.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what I'm trying to do is just to use arduino as replacement for function generator. so I just need to output sine wave using arduino with frequency of 25 kHz.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26525
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

These devices tend to be very resonant, and 25kHz is a long way off the spec of 40kHz, so it won't be very efficient at 25kHz.
Can you tell us what you want to do with this transducer/sensor pair?

The spec says you can drive it up to 85V, but only with 16 cycles of 40kHz (0.4ms) every 100ms. It will probably ring for at least as long (up to maybe a millisecond) again.
« Last Edit: June 22, 2011, 07:02:23 am by AWOL » Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Honestly, I just thought I would use 25 kHz because I need ultrasound to penetrate wood. Do you know someone who's done something like this before? I mean, I really need help. and what I'm trying to do is a hand-held device and so the first thing that I'm trying to do is make arduino act as a function generator.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I just thought I would use 25 kHz because I need ultrasound to penetrate wood
Ultra sound doesn't  penetrate wood.
Hit it with a square wave at 40KHz, it is going to go off at that rate anyway no matter what you hit it with.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26525
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Honestly, I just thought I would use 25 kHz because I need ultrasound to penetrate wood
So why pick a 40kHz transducer?

These things are not like loudspeakers with a roughly flat response across part of the audio spectrum - they peak massively at their resonant frequency; that's what they're designed for.

Generating 40kHz is relatively simple (a simple for loop with some padding will need a little tuning and experimentation), it just depends what else you need to be doing at the same time, but you seem to be avoiding the question.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ULTRASOUND PENETRATES WOOD.

why are you saying that i'm avoiding your question? i mean what question anyway?
what i am doing may be too simple for you so I just need to know how to generate sine wave using arduino? that's all. thank you
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26525
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you saying that the Arduino (which doesn't need to generate a sine wave; you can prove this by switching your sig-gen to square) just needs to generate 40kHz?
You could do that with a 555 and save yourself money.
Do you need continuous 40kHz (in which case you won't be able to use full power), or do you want bursts of maximum power at a PRR of 10Hz?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1] 2 3   Go Up
Jump to: