4

What is the basic concept of transmit binary data wirelessly or from radio?

Here are so far my knowledge about it.

  • Any digital data (image, sound, video) is represented by binary digit (bit).

  • Binary digit only have two possible state, it's zero only or one only.

  • To transmit binary data via radio (wireless), we should encode binary series to the wave form. In this case we can encode with manipulating amplitudo of wave (AM) or frequency of wave (FM), anyway I feel FM choice is better.

  • For encode binary state to the frequency, it depends on convention. Here is my convention, if bit to send is currently one, then the frequency is higher, otherwise lower. Therefore maybe I should set threshold value so the receiver know what is higher frequency and what is lower frequency to help receiver decode binary.

I expect I can simply send and receive data like how Universal Serial Asyncronous Receive Transmit (USART) work. But USART work with wire not wireless which using voltage to encode/decode binary instead of radio frequency.

Suppose I have USART with standard baudrate 9600, how do I convert logical voltage to the frequency? So basically if voltage higher, then frequency is higher, otherwise lower.

I also expect I can transmit with distance more than 10 Kilometer.

Another question, what tools and module that I should prepare for this project? Here are my hypothesa:

  • Microcontroller
  • Antenna for receiver
  • Antenna for transmitter

Maybe this project is simply done by using loraWAN.

Edit: my purpose is forwarding data from/to internet. Because one of node is internet active while one of node is not coveraged by internet.

  • 1
    There's way more options than just encoding data in the amplitude or the frequency. As a matter of fact, the abbreviations you use typically describe *analog*, not *digital* modulations. – Marcus Müller Oct 30 '22 at 15:10
  • 1
    You're probably not realizing the breadth of the subject you're trying to cover. If you're going to build _everything_, then even basic digital transmission from point A to point B requires a digital transmitter and a digital receiver. Each one of _those_ has the digital part and the radio part. The _long_ answer is to excerpt about half of the _ARRL Handbook_ and maybe their book on digital communications. The _short_ answer is to get yourself a copy of the _ARRL Handbook_ and start studying up. – TimWescott Oct 30 '22 at 17:47

2 Answers2

6

The component that you're looking for is called a Voltage Controlled Oscillator, or VCO. It's an electronic oscillator whose frequency is controlled by an external voltage signal. You can either build the VCO from scratch or simply buy one.

Keep in mind that you have to comply with your country's regulations on radio frequency transmitters if you decide to build your own transmitters. There are likely limits on the transmit power and the frequency bands that you may use without a license.

10 kilometer usable range might not be legally possible without a license. A few tens of meters is more realistic with a low-power (legal) DIY transmitter. You might be better off using the internet as the communication medium for your project.

If you still want to go the DIY route, the most important thing is to make sure that you don't have any unwanted sidebands (i.e. from distortion), which might interfere with other signals outside of the band that you're actually transmitting on.

Jonathan S.
  • 14,865
  • 28
  • 50
  • 2
    So don't even attempt to transmit 10 km before you are certain that you can transmit properly in the lab. Apart from the legality, you stand to cause annoyance or even harmful disruption (say to emergency services). – Weather Vane Oct 30 '22 at 13:51
  • Using internet while my purpose of this project is forward data from/to internet from one node to another node because one of node is not coveraged by internet while one node else is internet on. – Muhammad Ikhwan Perwira Oct 30 '22 at 13:56
  • 1
    @MuhammadIkhwanPerwira In that case, your best (and safest) option is to go with a commercial RF transceiver system. LoRaWAN sounds like a good start. – Jonathan S. Oct 30 '22 at 13:58
  • Is VCO a sender component only which not applied to the receiver? I read a bit about it, basically the input is control voltage, the output is frequency, but the frequency is still in voltage form not radio. How about frequency as an input for receiver component? – Muhammad Ikhwan Perwira Oct 30 '22 at 14:06
  • 1
    The VCO is one of the main parts of the transmitter, not the receiver. That's correct. Once you have an appropriate high-frequency signal from the VCO, you can convert it into a radio wave with a simple antenna. Depending on the range you want, you might also need to amplify the signal before applying it to the antenna. – Jonathan S. Oct 30 '22 at 14:27
  • 2
    "while my purpose of this project is forward data from/to internet" then you should _edit your question_ with that very important information. An internet-to-rf bridge is far more complicated than just a digital radio system, and because there are so many wireless internet devices out there, _just buying a compatible pair of them_ is usually the cheapest way to go. If you want to _learn_ how wireless radio works, then your question makes sense -- otherwise, buy stuff, and maybe modify it. – TimWescott Oct 30 '22 at 15:45
  • @TimWescott yes I understand what you mean, it's about OSI layer right? Where the data from sender is sending application layer go to the physicial layer then the receiver construct the data again from physical layer into application layer. It's okay, I know how compicated about it, I will use my own protocol. For example, an image is sent through my custom protocol where normal protocol using many overhead like source and destination, ack, syn, fin, while I simply directly send the binary form of an image. I know this looks not reliable, but I will make it reliable by using my custom protocol – Muhammad Ikhwan Perwira Oct 30 '22 at 17:41
  • 1
    @MuhammadIkhwanPerwira Know that you would be trying to duplicate the work of hundreds if not thousands of people all by yourself. – DKNguyen Oct 30 '22 at 17:53
  • @DKNguyen What I mean "*from scratch*" is actually how I custom my own protocol from the radio form to the voltage form then binary form. But about another stuff, I will buy VCO and another work of hundreds of people. – Muhammad Ikhwan Perwira Oct 30 '22 at 18:10
  • As this seems like an educational endeavour, perhaps look into GNU Radio as a tool to learn. There are many layers to transmitting and receiving data, and this may be the simplest way to start. – GCon Nov 01 '22 at 12:56
1

Wireless transmission of digital data is ubiquitous nowadays. And there are many, many ways to do that.

As you stated, AM and FM are the most straight forward ones. A famous example for a digital AM signal is DCF77. It transmitts 1 bit per second by lowering the Amplitude of the output signal at the start of every second for either 100ms or 200ms except at the start of a new minute. So it can theoretically transmit 59 bits of data every minute which includes date, time and some "housekeeping data".

FM transmission of digital data is done as FSK (Frequency shoft keying). It's what was used in the earlies modem with audio frequencies but can be done with radio frequencies as well. one frequency means "1" and another frequency means "0". There is not much preventing you from using four (or 8, 16...) different frequencies to encode more than one bit per step (that's where the difference between baud and bit/s comes from).

There are single chip solutions that do this (I'm not up to data anymore but at the start of the century Nordic Semiconductor were basically the first that came out with the nRF433, a single chip tranceiver IC that you could basically feed TTL serial data which was than transmitted via FSK on 433MHz and converted back to TTL on the receiver end. They did all the nasty stuff for you (like finding out which frequency was 1 and wich one 0 after the first level change). There are more sophisticated solutions for this now.

Sure, you can build something like that for yourself. The transmitter is basically a VCO and an FM demodulator on the other side but it's the details like frequency drift that will trip you up.

Now you have a simple solution to transmit your data over the air. Those simple solutions really are "bits in, bits out". But radio transmissions are supecible to interference. Either you don't receive anything or somethings it's garbage. So you'll need a way to detect and maybe even correct errors. If you're using a simple radio chip, you'll have to do this in the software in you MCU. That's called a protocol. There are many protocols around that already adress many of the issues but you can also spin your own one.

You normally want:

  • Preamble (that is a bit pattern that tells your receiver taht you're about to send something and helps it to sync up)
  • Header that contains some information that you'd have on your usual serial protocol too
  • Data
  • Checksum or other kind of datum that helps you detect or even correct garbled data

Getting your receiver robust agains any kind of interference and error won't be an easy task (handling cut off data, broken header data and so on) but it's possible.

You can also take for example a bluetooth tranceiver that does most of the error handling for you which will make life much easier for you.

kruemi
  • 2,994
  • 16
  • 29