Electrical – Sending a radio wave from one micro-controller to another

radio

I have two ATMEGA328P's. I would like to be able to send a radio wave (no data/sound/modulation, nothing, just the carrier wave) from one micro-controller and get the other micro-controller to pick it up using ADC.

So far I've been able to pick up random EMP emission with my receiver ATMEGA328P (by connecting a long wire into the ADC input). I can clearly see a unique ~6sec pattern being generated by one of the devices at my home, then it goes silent for ~5seconds and then the pattern repeats again. Seems like it's coming from the fridge or maybe neighbors, because pattern disappears as I move further away from the kitchen. So my 'antenna' is picking 'something' up.

Now I want to be able to simply generate some kind of EMP emission, that could be picked up with my receiver, but this is where I'm stuck.

I don't seem to understand how can I 'send' the wave out from the transmitter. If I simply connect the crystal (16mhz) to the ground and VCC and connect another wire (antenna) to the crystals GND pin, but nothing happens as my setup is wrong. I see that other crystals used in radio tutorials have 4 pins, one of them is antenna, so I believe I need to wire 2 pinned crystal differently?

As far as I understood, this is how the transmitter should work:

Crystal is used to generate sine wave, which in return causes the polarity on the wire/antenna to toggle, which in return produces EMP emission in the frequency of 16Mhz (in my case), this signal then get amplified. Is this correct?

My questions are:

-Crystal value/pin count – Can I use a two pinned 16Mhz crystal to generate a 16Mhz SIN wave and will I be able to pick it up with the other ATMEGA's ADC? ( I don't want to read/process the signal, I just want to be able to read it with ADC and detect it's presence )

-Antenna – I have a WIFI antenna, as far as I understood, I won't be able to use it to pick up 16Mhz frequency since it works in Ghz range, correct? How would I find out the requirements to make an antenna that would pick up this frequency (16Mhz)?

-Signal – If I'm sending a 16Mhz sin wave and my micro-controller is running at 8Mhz, it means that I won't be able to see the 'detailed sine wave', but it would appear as solid 'high' in the listener, correct?

PS: Is there a different term for 'radio wave transmission'? because all the tutorials I come across are AM/FM radio related, while I simply want to generate a 'carrier wave' that can be picked up by another controller.

Thank you for your time!

Best Answer

  1. Can I use a two pinned 16Mhz crystal to generate a 16Mhz SIN wave? No. A "two-pin" crystal is a passive device and cannot generate anything. But a crystal can be used in an oscillator circuit to generate an RF (Radio-Frequency) signal. You can also use a "4-pin" crystal OSCLLATOR which has the crystal AND the oscillator built into the same package. Note also that generating an RF transmission at 16 MHz is illegal in most of the planet, so you will be breaking the law and quite possibly interfering with important communication channels officially assigned to others. You cannot transmit RF signals anywhere you please
  2. Will I be able to pick it up with the other ATMEGA's ADC? Probably not. As yu have already demonstrated, there is lots of RF junk floating around in the air and without some way of discriminating WHICH RF signal your want to listen to, whatever you are sending will be buried in noise and interference. This is why you need a RECEIVER. A receiver will discriminate ("tune") between all the RF that is floating around out there. All receivers must have the ability to tune which signal they want to receive and reject everything else. RF communication would be impossible without this most critical part.
  3. Can I use a WiFi antenna for 16 MHz? No. Antennas are also "tuned" for different frequencies (wavelengths). A WiFi antenna is practially useless at 16MHz.
  4. How would I find out the requirements to make an antenna that would pick up this frequency (16Mhz)? There are many resources on the internet how to construct antennas for any given frequency. Especially Radio Amateurs ("Hams") who make their own transmitters, receives, antennas, etc. But, as already mentioned, you cannot legally transmit on 16 MHz. So you should select a legal frequency before worrying about antennas.
  5. If I'm sending a 16Mhz sin wave and my micro-controller is running at 8Mhz, it means that I won't be able to see the 'detailed sine wave', but it would appear as solid 'high' in the listener, correct? Correct. That is why nobody uses that method. Detecting the direct carrier wave with a microcontroller is completely impractical and unnecessary. As already mentioned, you need a RECEIVER to properly detect the carrier wave and produce a signal that can be used by your microcontroller.
  6. Is there a different term for 'radio wave transmission'? Yes, it is "RF" which stands for Radio Frequency. If you use the term "radio" by itself, you will find the more popular meaning of entertainment broadcasting.

It is admirable that you are experimenting with transmitting and receiving RF. However you should study more about it before trying this experiment. Especially you should research which frequencies are legal and safe for you to use in your country.

In most parts of the world there are certain frequency bands that are legal to experiment with or use without any licensing, etc. Read about the "ISM Bands" ISM is Industrial Scientific and Medical. Depending on which country you are in there are several of these bands which you can safely and legally use for experiments like yours. Ref: https://en.wikipedia.org/wiki/ISM_band

Your experiment is essentially impossible until you start using a RECEIVER circuit to properly discriminate ("tune") the signal of interest, and reject all others. Designing and building RF circuits is rather an advanced technique that requires special skills, knowledge and equipment. Many people who do already have these special skills, knowledge and equipment chose to simply buy ready-made (and tuned and tested) transmitter and receiver modules so that they can make use of RF communication without messing around with RF.

There are very inexpensive products that will do exactly what your experiment is trying to do. And on legal frequencies. For example there are matched transmitter and receiver circuit boards which sell for less than US$5 already assembled and tested, and in many cases even with free shipping to wherever you are. It is very hard to make a case for "rolling your own" transmitter and receiver when you can buy them for less than the cost of the parts.

For example, currently, there are several vendors of this matched pair of 433MHz transmitter and receiver for US$ 0.74 with free shipping.

RF transmitter and receiver kit