I want to produce Low Frequencies with arduino (30 kHz-300kHz). Is it possible ?

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 ....

Start by reading here to understand the internal timers & PWM frequency:

You could try Visual Analyzer

I don't know how high it will go, I only used it with a Sony microphone to analyze the output of a guitar tube amp.

Pretty sure you're going to need something with a much higher sampling rate tho.

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.

wow i babbled a lot. hope i helped somehow

Hey I wrote something awfully wrong,
frequency is period (full cycle) over time. SO On 1ms and Off 1ms = period of 2ms =frequency of 500Hz...

Hey I wrote something awfully wrong,

See that link above your post that says modify? Guess what it does. :slight_smile:

OP, the PWM pins can me made to output a wide range of frequencies by altering the timers. I used this to generate 128KHz for an RFID reader.

You will need a full H-bridge driver for your coil at that sort of frequency and a bigger voltage than 5V as well.