Go Down

Topic: Transmitting to a nearby AM radio (Read 2573 times) previous topic - next topic

smeezekitty

Feb 21, 2011, 07:57 am Last Edit: Feb 23, 2011, 11:22 pm by smeezekitty Reason: 1
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.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

retrolefty

Take a bow, you have invented the Arduino Marconi   ;)

smeezekitty

Now if I only knew how to read sheet music or how to send morse code.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

retrolefty


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


smeezekitty



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
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

martin_bg

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

this is some useful work on AM morse code with radio

smeezekitty


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 ;)
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Ran Talbott


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

Follow the link in this thread: not only does he do Morse quite cleverly, but, with a name like "Kontrapunkte", he's gotta know something about music, too  ;)

cr0sh


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

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Onions

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.
My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) :D

smeezekitty



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.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Simpson_Jr

I'm waiting for the first DX-contest  :)

Go Up