• 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.

Connect FSK modulator with fm transmitter circuit?

nwar1994

Member
Hello,

I am wondering how to superimpose a square wave input signal onto a fm carrier signal?

Using this circuit as an fm transmitter

and then this is the modulator
https://www.elprocus.com/wp-content/uploads/2016/10/FSK-Modulation-Circuit-Using-555-Timer.png

I've given a lot of thought and research for this project. It is for school. One thing I have noticed is, the fm transmitter uses a microphone as a varying resistor which modifies the base current to the transistor. There is some parasitic capacitance, so this varies the fm carrier signal.

My issue is two things.
1. You are varying the input base current of a transistor with a voltage divider. Replacing the input base current with an oscillatory signal and much larger peak to peak will change this a lot. Is it possible to replace the voltage divider with an oscillatory input for it to perform the same function?
2. The modulator outputs square waves from 0V to +5V. This is an issue because this causes the transistor to be effectively "ON" or "OFF". Will this affect the overall functionality of the circuit?
 

unclejed613

Well-Known Member
Most Helpful Member
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]
 

nwar1994

Member
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
 

Attachments

RadioRon

Well-Known Member
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.
 

RadioRon

Well-Known Member
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.
 

RadioRon

Well-Known Member
View attachment 117750

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:

nwar1994

Member
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) The frequency of the 555 timer switches between 1070 or 1270 Hz. This base-band signal is then fed into Q2, a high frequency transistor in common emitter amplifier configuration. Q2 functions as the carrier signal modulator and amplifier for the tank circuit. In a sense, the transmitter circuit is not a true FM transmitter, but a combination of both AM and FM. The reason being that since the baseband signal leads into the base, it will invariably modify the amplitude of the signal coming from the tank circuit. The tank circuit oscillates at a range between 50-100 MHz tunable. The frequency of the oscillator is given by f0 = 1/2π √ L1C1 (2) The signal is modulated by the parasitic capacitance of the BJT which occurs at high frequencies. This modifies C1 modulating the carrier wave.

In the FM receiver circuit, the tank circuit oscillates at a frequency matching the transmitter. When the incoming radio frequency signal deviates from the resonant frequency, the output wave is DC. When the incoming radio frequency matches the resonance, the tank circuit acts as a resistor which then allows the AC current to be amplified. Q1 and Q2 form a regenerative circuit. Near resonance the gain of the two BJT’s are high, and when deviated very low. This is then fed into an U1 an audio amplifier. This output then is input into pin 2 of the phase locked loop. This phase locked loop has a phase detector, VCO, and amplifier. If the frequency is within the lock-in range given by fh = ±8 · f0/Vc (3) It will then self correct to match the input frequency. The phase detector detects the phase from the reference frequency defined by f = 0.3/C10R2 (4) The phase detector generates an error voltage which is fed into the amplifier that then modifies the VCO. That modified voltage is output in pin 7. If the incoming frequency is within the lock range and above the base frequency, the pin 7 DC voltage will rise, and similarly lower when the frequency is lower. Since the input will be frequency modulated, the output of pin 7 will be a square wave essentially demodulating the signal. A three stage low pass filter will remove noise, but destroy the signal. A single-supply comparator is used, U3, to convert analog signals into logic. It compares the VCO voltage to the reference voltage which is static. This will give 0 or 1 on the output. This is then given to an Arduino to parse.
 

Attachments

RadioRon

Well-Known Member
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:

nwar1994

Member
Sure I want to make sure I understand everything properly.

I modified the receiver comparator to be a single supply. Does this look better?
 

RadioRon

Well-Known Member
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.
 

nwar1994

Member
I am currently building the transmitter right now and i'm not sure how to diagnose the resonant frequency of the tank circuit. I put an output between c1 and c5 but the output is just a DC 5V. I'm using a 2N904 transistor instead of the ss9018 for now until i get it.

Also my aircore inductor is acting kind of funky. I'm using an 18 AWG copper wire. All the equations I see online don't take into account the wire diameter. Although from my specifications I should get an inductance of about 0.13 uH
 

RadioRon

Well-Known Member
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.
 

nwar1994

Member
I measured the capacitance of the trimmer and it sat it was at about 37 pF. Assuming my aircore is about 0.13u. It should have a res freq of about 87 MHz max.

Does the inductor need to be aircore? I thought it was aircore because it also sort of served as an antenna itself? Am I wrong to think this? It has 5 turns, diameter 4/16", length 7/16", 18 AWG copper

I've also noticed there aren't many devices that measure picofarad and microhenry to the units of the circuit so I'm kind of shooting in the dark.
 

RadioRon

Well-Known Member
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.
 

unclejed613

Well-Known Member
Most Helpful Member
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.
 

nwar1994

Member
Interestingly enough, I managed to pick up the frequency on a small FM radio I had. I noticed that I only picked it up while on square wave mode. This must mean I was picking up other harmonics. On the sinewave I only get a long drone and no sound.

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.

In short, there's a lot of noise on the signal and I want to remove it. I put a bypass capacitor from + to ground, and it helped somewhat.

*Edit I'm finding it hard to pick up the signal again.
 

nwar1994

Member
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
 

RadioRon

Well-Known Member
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.
 

Latest threads

EE World Online Articles

Loading

 
Top