Arduino Forum

Community => Exhibition / Gallery => Topic started by: smeezekitty on Feb 21, 2011, 07:57 am

Title: Transmitting to a nearby AM radio
Post by: smeezekitty on Feb 21, 2011, 07:57 am
I can successfully transmit tones to an AM radio nearby with this code:
Code: [Select]

void tone(int freq, int duration){
 if(freq == 0){delay(duration); return;}
 unsigned loops = (800000 / freq);
 long wait = (1000000 / freq);
 long v = (duration / ((wait*2)/1000));
 for(long k = 0;k < v;k++){
     for(unsigned i = 0;i < loops;i++){
     PORTD ^= 0x8;
   }
   delayMicroseconds(wait);
 }
}
void setup(){
   tone(440, 500); //Play A4 for 500ms
}
void loop(){}


The circuit is a 1K resistor from pin 3 to an antenna.
It works by actually turning the pin on and off over 800000 times per second.
Received frequency is between 880 and 890 khz.
Title: Re: Transmitting to a nearby AM radio
Post by: retrolefty on Feb 21, 2011, 08:41 am
Take a bow, you have invented the Arduino Marconi   ;)
Title: Re: Transmitting to a nearby AM radio
Post by: smeezekitty on Feb 21, 2011, 08:51 am
Now if I only knew how to read sheet music or how to send morse code.
Title: Re: Transmitting to a nearby AM radio
Post by: retrolefty on Feb 21, 2011, 08:57 am

Now if I only knew how to read sheet music or how to send morse code.


Well I have to think that anyone that learns to program and read in C/C++ can learn to read sheet music, not that I've tried. And sending morse code is simple, it's learning to receive it, that's a bitch.

  ._ _   ._   _....  _  _._  _..

Lefty

Title: Re: Transmitting to a nearby AM radio
Post by: smeezekitty on Feb 21, 2011, 09:45 am


Now if I only knew how to read sheet music or how to send morse code.


Well I have to think that anyone that learns to program and read in C/C++ can learn to read sheet music, not that I've tried. And sending morse code is simple, it's learning to receive it, that's a bitch.

  ._ _   ._   _....  _  _._  _..

Lefty



http://www.qrz.com/db/wa6tkd
Title: Re: Transmitting to a nearby AM radio
Post by: martin_bg on Feb 21, 2011, 03:30 pm
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1170901754

this is some useful work on AM morse code with radio
Title: Re: Transmitting to a nearby AM radio
Post by: smeezekitty on Feb 21, 2011, 07:55 pm

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1170901754

this is some useful work on AM morse code with radio

My code is better ;)
Title: Re: Transmitting to a nearby AM radio
Post by: RanTalbott on Feb 22, 2011, 06:20 am

Now if I only knew how to read sheet music or how to send morse code.

Follow the link in this thread (http://arduino.cc/forum/index.php/topic,50443.0.html): not only does he do Morse quite cleverly, but, with a name like "Kontrapunkte", he's gotta know something about music, too  ;)
Title: Re: Transmitting to a nearby AM radio
Post by: keeper63 on Feb 23, 2011, 09:56 pm

It works by actually turning the pin on and off over 800 times per second.
Received frequency is between 880 and 890 khz.


Shouldn't that be "800,000 times per second"?

I'm also wondering if this could possibly earn one a visit from the FCC, but I am not knowledgeable enough about RF to know whether this would cause any form interference or other issues that would have such consequences (not likely a power issue - though you could easily boost it if you wanted)...

Neat, all the same...

:)
Title: Re: Transmitting to a nearby AM radio
Post by: Onions on Feb 23, 2011, 10:12 pm
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1169088394/0#0
This lets you get up to 4MHz! The code is also incredibly short, but fairly complex, unless you know lots about port manipulation and disabling interrupts.  ]:D

Onions.
Title: Re: Transmitting to a nearby AM radio
Post by: smeezekitty on Feb 23, 2011, 11:27 pm


It works by actually turning the pin on and off over 800 times per second.
Received frequency is between 880 and 890 khz.


Shouldn't that be "800,000 times per second"?

Fixed.
Quote

I'm also wondering if this could possibly earn one a visit from the FCC, but I am not knowledgeable enough about RF to know whether this would cause any form interference or other issues that would have such consequences (not likely a power issue - though you could easily boost it if you wanted)...
Unlikely since the signal doesn't leave the property. The PO is < 25mw.
Title: Re: Transmitting to a nearby AM radio
Post by: Simpson_Jr on Feb 24, 2011, 10:48 am
I'm waiting for the first DX-contest  :)