하드웨어 > Ridiculously Simple AVR AM Radio Transmitte

TODAY890 TOTAL4,686,965
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 하드웨어 | RF | Ridiculously Simple AVR AM Radio Transmitte

페이지 정보

작성자 키트 작성일2017-08-25 13:09 조회2,407회 댓글0건

본문

Ridiculously Simple AVR AM Radio Transmitter

I was brainstorming some RF circuits today and I had the desire to create a rapid transmitter/receiver pair that anyone would have around their house. I decided that AM or FM radio would be good since everyone can receive that, and pondered how best to generate the necessary radio signal and modulate it appropriately. After a few LC oscillator designs, I thought about the RC oscillators built into most micro-controllers. I grabbed an ATMEL AVR I had on hand (an ATTiny44A) and checked the datasheet. It had an 8MHz RC oscillator, which could be divided-down to 1MHz, and output on a CKOUT pin – all configurable with a few hardware fuses! Note that commercial AM radio stations are between 0.52 and 1.61 MHz, so a 1MHz signal would be smack-dab in the middle of our radio dial! I had to build a prototype to see how well it would work. Once concern was that the RC oscillator wouldn’t be stable enough to produce reliable audio – boy was I wrong!
schem

The circuitry is textbook simple. Appropriately configured, the AVR generates 5V square waves from its CKOUT pin. Although a pretty shape, they’re not powerful enough on their own to be heard across a room, so I needed an amplifier stage. A class C amplifier provided by a 2n7000 is commonly done in the low power amateur radio (QRP) community, so I went with it. A 2n7000 N-channel MOSFET with a 220-ohm resistor on the drain and the CKOUT directly into the gate did a fine job (I’ve used this design for 10MHz QRSS transmitters before), and I was able to modulate its amplitude by feeding the voltage from a MCU pin (turned on/off rapidly) through a decoupling capacitor into the drain of the MOSFET. I couldn’t have asked for a simpler result!

This code sends a message in Morse code. It seems too easy! Applications are endless, as this is one heck of an easy way to send audio from a micro-controller to a radio, and possibly to a computer. Morse code is easy, and since we have the ability to dynamically generate different audio frequencies and tones, data exchange is easy too! Nothing’s stopping you from adding the code to turn this into a RTTY (or Hellschreiber?) transmitter.
DSCN1670

Again, this transmitter can be heard on a standard AM radio tuned to about 1000 kHz. This is the setup I used with great success:
schem2

Here’s the code on the chip! Nothing complicated:

// designed for and tested with ATTiny44A
#include
#define F_CPU 1000000UL
#include
#include

void beep(){
       
for(char i=50;i;i--){
                DDRA
|=_BV(PA7);_delay_ms(1);
                DDRA
&=~_BV(PA7);_delay_ms(1);
       
}
}

void rest(){_delay_ms(100);}

void dot(){beep();rest();}
void dash(){beep();beep();beep();rest();}
void space(){rest();rest();}
void space2(){space();space();}

int main(){
        DDRA
|=_BV(PA7);
       
for(;;){
                dot
();dot();dot();space();                      // S
                dash
();dot();dash();dot();space();      // C
                dash
();dash();dash();space();           // O
                dash
();space();                                         // T
                dash
();space();                                         // T
                space2
();
                dot
();dash();dot();space();                     // R
                dash
();dash();dash();space();           // O
                dash
();dot();dash();dot();space();      // C
                dash
();dot();dash();space();            // K
                dot
();dot();dot();space();                      // S
                _delay_ms
(1000); // silence
       
}
       
return 0;
}

THIS IS ILLEGAL to do if you exceed a certain amount of power because you’re stepping on legitimate commercial broadcasters and will have to deal with the FCC. Additionally, you are transmitting on more frequencies than the primary frequency because the signal is heavy in odd harmonics. This means a 1 MHz transmitter, producing square waves, will generate tones on 1, 3, 5, 7 MHz, etc. Don’t do this with much power! Heck, you probably shouldn’t do it at all ;-)

About the author

3660040649_gJ2WN6bA_a731282832157cd63b262de7166bba963Fs3D10026amp3Bd3Didenticon26amp3Br3DPG

Scott W Harden

Scott Harden has had a lifelong passion for computer programming and electrical engineering, and recently has become interested in its relationship with biomolecular sciences. He has run a personal website since he was 15, which has changed names from HardenTechnologies.com, to KnightHacker.com, to ScottIsHot.com, to its current SWHarden.com. Scott has been in college for 10 years, with 3 more years to go. He has an AA in Biology (Valencia College), BS in Cell Biology (Union University), MS in Molecular Biology and Microbiology (University of Central Florida), and is currently in a combined DMD (doctor of dental medicine) / PhD (neuroscience) program through the collaboration of the College of Dentistry and College of Medicine (Interdisciplinary Program in Biomedical Science, IDP) at the University of Florida in Gainesville, Florida. In his spare time Scott builds small electrical devices (with an emphasis on radio frequency) and enjoys writing cross-platform open-source software.


댓글 0

조회수 2,407

등록된 댓글이 없습니다.

하드웨어HOME > 하드웨어 > 전체 목록

하드웨어 목록
제목 작성자 작성일 조회
404 RF RF Module External Antenna Design 이미지 키트 17-08-25 2863
403 RF H-2NR 광석라디오 키트 키트 17-08-25 2877
402 RF RF 회로개념 잡기 - PART 3 ▶ PLL (Phase Locked Loop) 이미지 키트 17-08-25 2379
401 RF TEA5767 (+ ATmega8) FM radio 이미지 키트 17-08-25 2693
현재글 RF Ridiculously Simple AVR AM Radio Transmitte 이미지 키트 17-08-25 2408
399 RF Vhf-tone-transmitter 이미지 키트 17-08-25 2249
398 RF LF or HF field strength meter 이미지 키트 17-08-25 2216
397 RF LED RF Signal Meter 이미지 키트 17-08-25 2990
396 RF Low Cost Wireless Network How-To 이미지 키트 17-08-25 1989
395 RF Homebrew RF Test Equipment and Software 키트 17-08-25 3369
394 RF RADIO PROJECTS & KITS 이미지 키트 17-08-25 4568
393 RF AVR FM Stereo Transmitter 이미지 키트 17-08-25 1947
392 RF Ridiculously Simple AVR AM Radio Transmitter 이미지 키트 17-08-25 1998
391 RF mobile phone (2) 이미지 키트 17-08-25 2029
390 RF rf-radio-frequency (70) 이미지 키트 17-08-25 3524
게시물 검색

2022년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2021년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2020년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2020
모바일버전으로보기