Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

fm-am transmitter/receiver

Status
Not open for further replies.

nwar1994

Member
Hello,

I am wondering how to superimpose a square wave input signal onto a fm carrier signal?
 
Last edited:
if you had a PLL to generate the FM signal, you could mix your binary data into the control voltage for the VCO, and that would directly modulate the carrier. what you are proposing with the 555 timer is frequency modulating an audio tone, and feeding that audio into an FM modulator. so you are sending "FSK audio" on an FM signal. you would only need a standard FM receiver and some way of decoding the FSK audio. another way to get FSK audio to feed into an FM transmitter is to use a digital soundcard modem such as [fldigi]
 
Would this suffice as an FSK transmitter?
I'm particularly worried about the input to the arduino and 555 timer, will they be affected by the AC?
Also, the output of the 555 oscillates between 0-5V, is this ok? Or would i need a voltage divider to reduce the strength of the signal, and have a negative bias so it oscillates about 0
 
Your circuit is incomplete and has some errors, but once those are fixed, it should work ok as an FSK transmitter once it is tuned up. For starters, let's talk about the input to the oscillator circuit. By this, I mean the audio ac voltage that is presented to the base of the 2N3904 transistor. The amount of frequency swing, or frequency modulation, that you get is called the FM Deviation. This Deviation is proportional to the input audio voltage. So, as you present an audio AC voltage to the base of the 2N3904, your carrier frequency will deviate up and down following the input voltage. The amount that it deviates up and down is important as this sets the bandwidth of your broadcast signal, which in turn is important because FM receivers are designed to hear signals with a specific bandwidth. That bandwidth is roughly 150KHz. The amount of deviation we get from your transmitter divided by your ac input audio voltage is called your modulation gain, with units of KHz/Volt. Unfortunately, we don't exactly know what the modulation gain is for this transmitter circuit you have selected, and the video does not reveal this, so we have to make an educated guess. I hope other readers who have built this circuit will chime in with their experience, but I am going to guess that the right amount of audio ac input is much less than 9 volts peak to peak in order to get the right deviation for a bandwidth of 150 KHz. I will guess that the amount of audio needed is somewhere around 200mVac peak to peak, but this is just a guess. In order to make it easier to tune this later on, you should add a voltage divider circuit to feed the audio to the base of the 2N3904.

So, you will have to add two resistors to form this voltage divider. One resistor will be in series with the transmitter input capacitor and the other resistor will follow this one and be connected to ground. The output from the junction of the two resistors then connects to the coupling capacitor feeding the 2N3904 base. This coupling capacitor blocks DC and insures that the bias to the 2N3904 is not altered.

Now, let's talk about errors. First of all, when I compare your transmitter circuit to the one in the video, I notice that yours is missing a capacitor from the 2N3904 emitter to ground. Put that in. Next, you show a connection from 9V to the Q output of the LM555. This will guarantee that the LM555 won't work, so you have to remove that connection.
Next, it is necessary to develop your circuit further by adding in names for each component (replace the question marks), and assign values to them.

Now some attempts to answer your questions further:
1) In order to modulate the transmitter, it is only necessary to superimpose an AC voltage onto the bias voltage present at the base of the 2N3904. Yes, in effect you are putting a voltage divider at the input and yes you can replace this with an oscillating voltage input and expect it to work.
2) as explained above, you don't want to turn the transistor completely on and completely off and in fact you want a much lower input level than a 9V swing, and this is why we must insert a voltage divider to reduce the amplitude from the LM555.

Now, this next comment is not meant as a criticism but rather a suggestion. It is possible to eliminate the LM555 circuit completely from this and still get it to work. They way you have it designed right now, the Arduino turns the 2N3906 on and off, which in turn causes the audio oscillator to change frequency from one audio frequency to another. This is generating AFSK (frequency shift keying) where a binary 1 is one audio frequency, and a binary 0 is another. The output of the Arduino is a sequence of 1's and 0's representing your data stream. It is possible to generate the audio frequency from the Arduino instead. You would have to program the D2 output to swing up and down at one of the two audio frequencies when a 0 bit is to be sent and have it generate the other audio frequency when a 1 is to be sent. Of course, what this means is that your program has to run fast enough to toggle the D2 output up and down at the two audio rates, but I think this is well within the capabilities of the Arduino. But you can save this idea as an enhancement step for later on, if you like.

You can include a couple of additional parts as insurance to protect the Arduino and LM555 from being disturbed by the high frequency AC. What you must do is include bypass capacitors from the 9V rail to ground at each IC. These capacitors must be connected as close as practical to the actual leg of the IC on the VCC side and on the ground side to be most effective. Use ceramic capacitors of something like 10 nF or 100 nF for this. The value isn't critical as long as the reactance of this capacitor is low (as in less than 2 ohms) at the carrier frequency.

Once you have made your changes, post your circuit again (with names assigned to each part so that we refer to them more easily) so we can comment.
 
This is my schematic for the fm receiver and demodulator, I will edit the transmitter soon. I was also thinking of only having +5V...
 
Last edited:
Your transmitter is looking reasonably good with this latest schematic. I noticed that you changed Q2 to a type SS9018. That's a reasonable choice.

I was wondering whether your goal was to design an FSK transmitter or an AFSK transmitter. Can you explain? What you have here so far looks like an AFSK transmitter.

You will need to add a capacitor to ground from the junction of R3 and R5. The purpose of this capacitor is to filter the sharp edges of the square wave coming from U2. Without this capacitor, your bandwidth will be extremely wide which may cause poor reception at the other end of the link. The value of the capacitor may have to adjusted once you have it all working, but to start with, use a value around 1 to 3 nF. This value will work with R3 to form a low pass filter that rolls off at around 10KHz.

When you are ready to build this, start by building just the circuit with the U2 and Q2 stages and leave out the Arduino and Q1 to start with. This will help simplify your debug and tuning.
 
**broken link removed**

This is my schematic for the fm receiver and demodulator, I will edit the transmitter soon. I was also thinking of only having +5V...

This schematic makes no sense to me, so I had to find other examples of this circuit online along with an explanation. It seems that you have drawn a very crude type of FM receiver that is found on numerous other sites. The RF circuit comprising Q1 and Q2 form an oscillator that operates in the FM broadcast range of frequencies depending on the tuned circuit of L1 and C1. There is an error that will prevent it from functioning, however, and that is that the base of Q2 must also be connected to the left of R1 for DC bias. I understand that FM detection is achieved due to the junction capacitance of the transistors and this particular configuration. I anticipate that it is a rather poor FM demodulator, and it will have rather poor performance as a receiver, but at least the parts count is minimal. Perhaps others can chime in with more direct experience of this receiver.

I am suspicious that pins 1 and 8 of U1 should not be grounded as you have shown. Application notes don't mention grounding. Perhaps leave them open to start with, setting gain to 20 for now. I would also leave U1 pin 7, the bypass pin, open circuit for now too rather than grounded.

What prevents the output of U3 from swinging to -5V? This voltage is not tolerated at U4 pin 20. Perhaps U3 should be configured as a single voltage amplifier to prevent this problem.
 
Last edited:
In the FM transmitter circuit, a binary signal from the arduino is fed into Q1. This effectively means that the resistor for the timer is either Ra = R4 or R4 k R6, Rb = R8. The timers frequency follows f = 1.45/(Ra + 2Rb)C (1)
 
Last edited:
Your description of the theory of operation is pretty good. However, I don't think you have explained the transmitter function correctly. It is not correct to describe Q2 as simply a common emitter HF amplifier. Q2 is configured as an oscillator, I believe the configuration is called a Modified Colpitts circuit. It is the oscillation of this stage that creates the carrier, a point that you have not explained. Here is my suggested change:

In the transmitter, Q2 is configured as an oscillator whose frequency is determined by the collector load circuit, a parallel resonant tank circuit. It's frequency is modulated by audio voltage passed through C4 to the base of Q2. Frequency modulation occurs as the result of the AF voltage causing the collector base junction capacitance of Q2 to vary with the AF voltage, and in so varying, alters the resonant frequency of the tank circuit and thus the frequency of oscillation.

You can rewrite any way you like, but it would be better to describe Q2 as an oscillator.

Also wanted to mention about your receiver description. It is not exactly correct to describe that the tank circuit oscillates. It is more correct to say that the stage consisting of Q1 and Q2 forms an oscillator whose frequency is determined by the tank circuit C1 and L1. I also don't think your description of how this stages demodulates FM is exactly correct either. Perhaps simply leaving out the entire second and third sentences would be helpful.
 
Last edited:
I think this LM111 is a better choice than the previous part as this one should behave better as a comparator. You will probably actually use the LM311 as it is more readily available and in a cheaper package than LM111.

Check your pin numbers vs function on this comparator as they change depending on which package you will buy. I can't tell if you have wired up your pins correctly or not.

Now that the comparator is referenced to ground, its output will swing from ground to 5V which is good for the Arduino. However, now you have a signal at its input swinging from +5 to -5V. We need to worry about what affect this has on the comparator input. In many cases, certainely with most logic families (but this is not a logic part) , it is ok to allow this to happen as long as the current flowing into the input is limited so that the input protection diodes on the comparator don't blow out. You have actually already done this by including R6, which is a reasonable value for this current limiting function. If there is any doubt that U3 doesn't have input limiting diodes (which is not clear to me right now), you can include a schottky diode from U3 pin 3 to ground (anode to ground, cathode to pin 3). This will limit the input voltage to no lower than about -0.2 volts.

I hope you plan to build this. I am interested to know if the FM receiver consisting of Q1 and Q2 actually works.
 
Don't worry about the inductor, yours is probably close enough. The only good way to tell if your oscillator is oscillating is to bring an FM receiver nearby, set it to a quiet frequency lower in the band (around 89 MHz) and then adjust your variable capacitor in the tank circuit until you hear the FM receiver go quiet. If it never goes quiet, then perhaps you need to change your inductor a little bit. Be sure that the inductor windings don't touch each other (if you use uninsulated wire). You can adjust by spreading the coil turns to reduce inductance a little bit.
 
The inductor doesn't have to be air core, but that's the easiest type to make. Yes, the inductor also tends to radiate so that no antenna is needed if your distance is moderate, but the air core doesn't have too much to do with that. Well, having an air core allows you to make your inductor larger, which does indeed help radiation, but you would get the same result with a core made of wood or ceramic or stone too.

You've discovered that working at higher frequencies does tend to require some specialized test gear, but most of that can be avoided by simply doing your best to estimate values to get close enough.

I tried your coil values in an online inductance calculator and got closer to around 0.07 microhenries so don't be surprised if your output frequency is a bit higher than expected.
 
You've discovered that working at higher frequencies does tend to require some specialized test gear, but most of that can be avoided by simply doing your best to estimate values to get close enough.
this might be a job where a cheap SDR dongle would be useful... using an FM receiver, with the transmitter outside the limits of the FM band will be difficult to tell if the oscillator is working. a scanner radio might take a long time to scan through the whole range where the oscillator might be working. an SDR dongle would show you a 2Mhz chunk of spectrum at a time, meaning you can find the oscillator a lot faster.
 
One large issue I'm facing is, in my circuit, using the output of the waveform generator + DC powersupply causes there to be a lot of static on my waveform. This isn't even the waveform of the modified colpitts oscillator. This is pure looking at the output on a oscilloscope.
 
Last edited:
Also, I can see the tank circuit oscillation when I hook the waveform generator up to the power supply. Even when its not on. I'm not sure why hooking up the waveform generator causes the circuit to properly behave. Although, the noise is still very strong
 
I'm confused. You mention a lot of noise on the signal. I can't tell from your description what you mean by signal. Do you mean the ac from the waveform generator or the rf signal from the transmitter? Can you show me in a diagram exactly where you see this noise, and measuring how (oscilloscope, FM receiver, other?). Your explanation would be clearer with an accompanying schematic showing how you probe.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top