Hi, I'm trying to generate low frequencies (30 kHz - 300 Khz ) signals that I can feed into inductive loop, for vehicle detection.
Assuming it is possible can any one help me ? I need generation till 48kHz only.
Right now I am using scope, can any one suggest a better sound card oscilloscope software that can be used to analyze higher frequencies ?
I have arduino leonardo board ....
Hi
30kHz to 300kHz are in fact super high frequencies in the "audio domain". Not audible by humans. (Thats for the audio part :))
You range from 30k to 300k cycles per second. It seems Arduinos can output a max frequency of 64KHz on two of the PWM pins.
See http://arduino-info.wikispaces.com/Arduino-PWM-Frequency , it also tells you how to change those from the default.
Using the on off max rate (duty cycle?) from other pins won't allow you to get any higher frequencies then those PWM unless you'd use other components, but I can't give you any advice on what to use, I'm only learning electronics...
The problem you will have with most sound cards is that the audio input is filtered above twice the sampling frequency, ie if sampling at 44.1KHz your signal is filtered at 88.2kHz (that is to avoid aliasing or recomposition of above frequencies in a lower range which produces nasty high pitch sounds). The highest sampling rates i know of for sound cards is 192kHz, so input filtered, at 384kHz. Which is in your range, just make sure of that.
Those PWM pins output a square wave, which also needs to be filtered if you want other wave shapes. google fourier, harmonics...
Obviously if you want to generate 30Hz to 300Hz frequencies, you are totally fine with any pin of the arduino, timing your loop with milliseconds will give you 1kHz max frequency (set pin to high, wait 1 millisecond,set pin to low, wait 1 millisecond). I think thats the easiest way to output a square wave in this range, other than the PWM pins. Again, audio signal "line" levels on pro devices are at 1.23V max, be careful not to saturate your devices receiving this signal. Also look for energy loss off sound wave if the impulse is meant to bounce back.