Analog Modulation is the very basic form of modulation that can be produced using very basic components.
The ATmega16a is used to generate a square wave. The frequency can be generated by carefully adjusting the 8-bit PWM Timer.
Using the above method a Carrier Signal is generated.
You can hear the carrier pulses on AM Radio. The reception is full of noise and interference.
The range of such signals is not good. Since the EM wave has very low power.
The circuit is given below.
AM Transmitter circuit
/*
* AM Transmitter.c
*
* Created: 11/10/2021 9:59:04 PM
* Author : abhay
*/
#define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>
void delay1(){
_delay_ms(20);
}
int main ()
{
TCCR0 = (1 << WGM01) | (1 << COM00) | (1 << CS00);
DDRB|=(1<<PB3); /*set OC0 pin as output*/
while (1)
{
OCR0 = 4; // 1600 KHz
delay1(); //This delay will create pulse of carrier frequency
OCR0 = 12; // 615 kHz
delay1(); //This delay will create pulse of carrier frequency
}
}
PWM signal is being produced by an 8bit timer of the microcontroller.
The formula used for the value of OCR0
Where
f clk_I/O = 16000000
N = 1
OCRn = (1,2,3 … 255)
Frequency calculated using the formula
The Antenna Used for AM Transmission in this setup is of very small length. Its range and quality get improved if you touch the antenna with your bare hands.
Leave a Reply