{"id":232,"date":"2023-06-28T07:21:33","date_gmt":"2023-06-28T07:21:33","guid":{"rendered":"http:\/\/localhost\/embeddedwala\/?p=232"},"modified":"2023-07-27T04:14:31","modified_gmt":"2023-07-27T04:14:31","slug":"how-to-use-rf-module-am-radio","status":"publish","type":"post","link":"https:\/\/embeddedwala.com\/beta\/blogs\/radio\/how-to-use-rf-module-am-radio\/","title":{"rendered":"How to use RF Module (AM Radio) ?"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"232\" class=\"elementor elementor-232\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t\t\t\t<section data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-section elementor-top-section elementor-element elementor-element-59ae71a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"59ae71a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-cc8f64e\" data-id=\"cc8f64e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<section data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-section elementor-inner-section elementor-element elementor-element-671937a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"671937a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-a218086\" data-id=\"a218086\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a232dc8 elementor-widget elementor-widget-text-editor\" data-id=\"a232dc8\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div id=\"tab_content_list\" class=\"post-text text-style\"><p><strong>Introduction<\/strong><\/p><p><strong>Radio waves<\/strong>\u00a0refer to a form of\u00a0<strong>electromagnetic radiation<\/strong>\u00a0that have wavelengths that are longer than those of infrared light, yet shorter than those of microwaves. They are created by oscillating magnetic and electric fields, and have the capability to pass through air, space, and certain materials. Radio waves are widely used for various communication purposes, such as in\u00a0<strong>television<\/strong>\u00a0and\u00a0<strong>radio broadcasting, wireless networks, cellular phones, and satellite communication<\/strong>. Radio waves typically cover a frequency range of<strong>\u00a03 kHz to 300 GHz<\/strong>, with lower frequencies corresponding to longer wavelengths, and higher frequencies corresponding to shorter wavelengths.<\/p><p><strong>What is Modulation<\/strong><\/p><p>Modulation refers to the technique of modifying certain characteristics of a periodic waveform called the\u00a0<strong>carrier signal<\/strong>\u00a0in order to convey information. By changing the\u00a0<strong>amplitude, frequency,<\/strong>\u00a0or\u00a0<strong>phase of the carrier signal<\/strong>\u00a0in response to the modulating signal, which carries the desired information, modulation makes it possible to transmit the modulated signal over a communication channel that is optimized for the transmission of the\u00a0<strong>unmodulated carrier signal<\/strong>.<\/p><p><strong>What is AM Modulation<\/strong><\/p><p><strong>Amplitude Modulation (AM)<\/strong>\u00a0is a technique that allows information to be transmitted through radio waves by modifying the amplitude of the carrier wave. For example, in AM radio broadcasting, a\u00a0<strong>high-frequency carrier signal<\/strong>\u00a0is modified in proportion to the instantaneous amplitude of the\u00a0<strong>modulating signal (baseband signal)<\/strong>\u00a0that contains the audio information to be transmitted. As a result, the amplitude of the carrier wave varies in time with the amplitude of the\u00a0<strong>modulating signal<\/strong>, allowing the audio information to be transmitted over long distances.<\/p><p>While\u00a0<strong>AM<\/strong>\u00a0is widely used in\u00a0<strong>radio broadcasting<\/strong>\u00a0due to its simplicity and cost-effectiveness, it has some limitations in terms of signal quality and susceptibility to noise and interference. For instance, changes in the amplitude of the carrier signal can be affected by changes in the\u00a0<strong>signal-to-noise ratio<\/strong>, leading to\u00a0<strong>distortion<\/strong>\u00a0and\u00a0<strong>reduced signal quality<\/strong>. Therefore, other modulation techniques such as\u00a0<strong>frequency modulation (FM)<\/strong>\u00a0and digital modulation have largely replaced AM in modern communication systems.<\/p><p><strong>AM Radio<\/strong><\/p><p>An\u00a0<strong>AM radio<\/strong>\u00a0is a device that receives radio signals transmitted using\u00a0<strong>amplitude modulation (AM)<\/strong>\u00a0technology. It is composed of two main components: a\u00a0<strong>encoder<\/strong>\u00a0and a\u00a0<strong>demodulator<\/strong>. The tuner selects the\u00a0<strong>desired frequency<\/strong>\u00a0from the available range of frequencies, and the\u00a0<strong>demodulator<\/strong>\u00a0separates the audio signal from the carrier signal. The audio signal is then amplified and sent to a speaker for listening.<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-234 size-full\" src=\"https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/AM-Reciver.png\" alt=\"\" width=\"1920\" height=\"1080\" \/><\/p><p><strong>Tuner and demodulator<\/strong><\/p><p>The\u00a0<strong>tuner<\/strong>\u00a0is an essential element of a radio receiver that performs the task of selecting a particular radio frequency and filtering out other frequencies. Its main function is to adjust the\u00a0<strong>resonant frequency<\/strong>\u00a0of a tuned circuit to match the frequency of the desired radio station. Additionally, it may also amplify the radio signal before sending it to the demodulator.<\/p><p><strong>A demodulator<\/strong>\u00a0is a vital component of a radio receiver that retrieves the original information signal from the modulated carrier signal. In the case of AM radio, the demodulator&#8217;s role is to distinguish changes in the amplitude of the radio signal and extract the audio signal from the carrier wave. The amplified audio signal is then forwarded to the speaker or headphones. In contrast, for FM radio, the demodulator distinguishes changes in the frequency of the radio signal to extract the audio signal.<\/p><p><strong>Encoding<\/strong><\/p><p>Encoding is a crucial process in digital systems that involves converting information from one form to another, to make it easier to store, transmit, or interpret by electronic devices like computers. In the context of computing, encoding refers to representing characters, symbols, or data in a standardized format that can be read and processed by a computer. Common encoding techniques include ASCII, Unicode, and binary encoding. The importance of encoding cannot be overstated, as it plays a vital role in communication, data storage, and information processing in modern digital systems.<\/p><p><strong>Use of AM radios<\/strong><\/p><p>Tuning into a local news station on a car radio while driving is an example of AM radio.<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-236 size-full\" src=\"https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/use-of-am-radios.png\" alt=\"\" width=\"1920\" height=\"1080\" \/><\/p><p><strong>Building an AM radio using an RF module using RF 433MHz with Arduino UNO.<\/strong><\/p><p><strong>Parts Requires :<\/strong><\/p><ol><li><ol><li>2x Arduino UNO<\/li><li>RF 433MHz Receiver\/Transmitter<\/li><li>Breadboard<\/li><li>Jumper wires<\/li><\/ol><\/li><\/ol><p><strong>Library installation<\/strong><\/p><p>Before we start building the AM radio, we need to install the Radiohead Library, which is a popular library for controlling wireless radios. Here are the steps to install the Radiohead Library:<\/p><ol><li><ol><li>Go to the Radiohead Library GitHub page at\u00a0<a href=\"https:\/\/github.com\/adafruit\/RadioHead\">https:\/\/github.com\/adafruit\/RadioHead<\/a>.<\/li><li>Click on the &#8220;Clone or Download&#8221; button and select &#8220;Download ZIP&#8221;.<\/li><li>Extract the downloaded ZIP file.<\/li><li>Open the Arduino IDE and go to Sketch &gt; Include Library &gt; Add . ZIP Library.<\/li><li>Select the extracted Radiohead ZIP file and click &#8220;Open&#8221;.<\/li><li>Go to File &gt; Examples &gt; Radiohead and select any example to test the installation.<\/li><li>Once you have installed the Radiohead Library, you can proceed with building the AM radio.<\/li><\/ol><\/li><\/ol><p><strong>Transmitter Sketch<\/strong><\/p><p>You can upload the following code to an Arduino board to function as a transmitter. This code is based on one of the examples provided by the RadioHead library.<\/p><div><pre>#include  \"RH_ASK.h\" \/\/ Not actually used but needed to compile\n\nRH_ASK driver;\n\nvoid setup() { \n    Serial.begin(9600); \/\/ Debugging only \n    if (!driver.init()) \n        Serial.println(\"init failed\"); \n}\n\nvoid loop() { \n    const char msg = \"Hello World!\"; \n    driver.send((uint8_t )msg, strlen(msg)); \n    driver.waitPacketSent(); \n    delay(1000); \n} \n<\/pre><\/div><p><strong>Receiver Sketch<\/strong><\/p><p>Upload the code below to the Arduino connected to the receiver. This is based on one of the examples provided by the RadioHead library.<\/p><div><pre>#include  \"RH_ASK.h\" \/\/ Not actually used but needed to compile<\/pre><p>RH_ASK driver;<\/p><p>void setup() { <br \/>Serial.begin(9600); \/\/ Debugging only <br \/>if (!driver.init()) {<br \/>Serial.println(&#8220;init failed&#8221;); <br \/>}<br \/>}<\/p><p>void loop() { <br \/>uint8_t buf[12]; <br \/>uint8_t buflen = sizeof(buf); <br \/>if (driver.recv(buf, &amp;buflen)) \/\/ Non-blocking { <br \/><b> <\/b>Serial.print(&#8220;Message: &#8220;); Serial.println((char*)buf); <br \/>} <br \/>}<\/p><\/div><\/div><div class=\"post-tags\">\u00a0<\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Introduction Radio waves\u00a0refer to a form of\u00a0electromagnetic radiation\u00a0that have wavelengths that are longer than those&#8230;<\/p>\n","protected":false},"author":1,"featured_media":233,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[63,62],"class_list":["post-232","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-radio","tag-am-radio","tag-rf-module"],"acf":[],"views":249,"featured_image_urls":{"full":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",1920,1080,false],"thumbnail":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",150,84,false],"medium":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",300,169,false],"medium_large":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",640,360,false],"large":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",640,360,false],"1536x1536":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",1536,864,false],"2048x2048":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",1920,1080,false],"tp-image-grid":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",700,394,false],"covernews-slider-full":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",1115,627,false],"covernews-slider-center":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",800,450,false],"covernews-featured":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",1024,576,false],"covernews-medium":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",540,304,false],"covernews-medium-square":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",400,225,false],"_nx_notification_thumb":["https:\/\/embeddedwala.com\/beta\/wp-content\/uploads\/2023\/06\/rf-module.png",100,56,false]},"author_info":{"display_name":"embeddedwala","author_link":"https:\/\/embeddedwala.com\/beta\/author\/embeddedwala\/"},"category_info":"<a href=\"https:\/\/embeddedwala.com\/beta\/category\/blogs\/radio\/\" rel=\"category tag\">Radio<\/a>","tag_info":"Radio","comment_count":"0","_links":{"self":[{"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/posts\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":7,"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":6645,"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/posts\/232\/revisions\/6645"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/media\/233"}],"wp:attachment":[{"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embeddedwala.com\/beta\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}