Frequency output = sum of 2 frequency inputs (Digital)

AI Thread Summary
The discussion revolves around combining the outputs of two sensors that produce variable frequency signals, aiming for the computer to read the sum of these frequencies without altering its operation. Participants suggest that directly adding frequencies isn't feasible, but summing the voltage outputs before conversion to frequency could work, provided the voltage remains within safe limits. Other ideas include using modulation techniques or designing a circuit that counts changes in the signals, although these may complicate the setup. A frequency mixer is mentioned as a theoretical solution, but practical challenges arise due to the close frequency ranges. Ultimately, the consensus leans towards summing the voltages before conversion as the most viable approach.
MrK
Messages
4
Reaction score
0
Hi, I have a electronics problem (surprise surprise)

This is my problem

Current system consists of a sensor which outputs a variable frequency (square wave say between 0Hz and 5000Hz, 0-5V signal)

This frequency is read by a computer, which does stuff based on what the current frequency is. Nothing new here

What I want to do is introduce a second sensor.

The idea is that each sensor does half the job. However with 2 sensors my max frequency is doubled.

The problem is in sending the frequency signal to the computer (which cannot know that anything is different) which is equal to the sum of both sensor frequencies. While the sensor frequencies ideally will be fairly similar, there is no guarantee.

for example, if sensor 1 reads 10Hz and sensor 2 reads 20Hz, I want the computer to read 30Hz.

Any ideas? I am hoping there is a fairly simple solution, however I am unable to come up with one myself.

Much appreciated,
K
 
Engineering news on Phys.org
Do the summing before it is converted from a voltage to a frequency. Are your sensors able to take more than 5 volts? If not, can you scale the output in your computer program to make 5 volts look like 10 volts?
 
Averagesupernova said:
Do the summing before it is converted from a voltage to a frequency. Are your sensors able to take more than 5 volts? If not, can you scale the output in your computer program to make 5 volts look like 10 volts?

Thanks for the reply.

I simplified the terminology somewhat to make the problem easier to describe. :blushing:

Each sensor is a fairly complex (for me anyway) piece of technology with compact circuitry that I do not understand. The computer is not a PC, but an embedded device which has programming in ROM. I don't want to wreck any of them either.

So with each piece being a black box so to speak, the best solution I can see is to intercept the frequencies, add them together and send the result on. In my mind this would be a good way of doing the job without interfering with the normal operation.
 
Sorry, you cannot add frequencies. You can add the time domain voltage waveforms, but that will not change the frequency content.

It sounds like you have two voltage-to-frequency converters as your sensors, and a frequency counter input at your embedded uC. I don't know of any way to try to combine them into one digital signal that will make any sense. Besides, how would you tell the difference between the two sensors?
 
berkeman said:
Besides, how would you tell the difference between the two sensors?
This is half the point... I don't need to know which sensor said what, just what the total frequency is. Think of it like 2 sets of scales, it doesn't matter if you have 2Kg on one set of scales or 2 lots of 1Kg on 2 scales... either way you have 2Kg

berkeman said:
Sorry, you cannot add frequencies. You can add the time domain voltage waveforms, but that will not change the frequency content.
Bugger.
 
Well, let's get creative here then. You could modulate the two square wave outputs from the two sensors with two different carrier waveforms, then add them together for the combined signal trip to the uC. Then at the uC, you would need two detectors for the two different carrier frequencies, in order to recover the two different square wave signals. But that takes two counter inputs on your uC, which it doesn't sound like you have. Hmmm, what would we get if we XOR the two different square wave outputs...

Or maybe, design a simple circuit that changes its output every time either one of the inputs change -- that might give you what you want. Make it a clocked circuit with a way to pass through two edges (a rise and a fall) when both signals change at the same time (within one clock period). Yeah, that might work. Do you see what I'm saying? It's almost what you originally asked -- how to add frequencies. The output waveform will not be 50% duty cycle, but who cares. What you want to do is count cycles. Hah! That would work as long as it's just the unqualified total that you want.
 
berkeman said:
Well, let's get creative here then. You could modulate the two square wave outputs from the two sensors with two different carrier waveforms, then add them together for the combined signal trip to the uC. Then at the uC, you would need two detectors for the two different carrier frequencies, in order to recover the two different square wave signals. But that takes two counter inputs on your uC, which it doesn't sound like you have. Hmmm, what would we get if we XOR the two different square wave outputs...

Or maybe, design a simple circuit that changes its output every time either one of the inputs change -- that might give you what you want. Make it a clocked circuit with a way to pass through two edges (a rise and a fall) when both signals change at the same time (within one clock period). Yeah, that might work. Do you see what I'm saying? It's almost what you originally asked -- how to add frequencies. The output waveform will not be 50% duty cycle, but who cares. What you want to do is count cycles. Hah! That would work as long as it's just the unqualified total that you want.

I think I understand what you are saying, but I wouldn't have a clue on how to implement it.
 
berkeman said:
Sorry, you cannot add frequencies.

Actually, you can. However, I don't think it is practical for his application. Feed 2 signals into a mixer (not the audio summing amplifier that is in what is referred to as mixing consoles) and you will have 4 outputs. I am referring to a frequency mixer. The 4 outputs are: the original 2 frequencies and the sum and difference frequencies. Problem is for the OP is that all these frequencies are so close together that it is impossible to filter out what he wants. I think the thing to do is what I said in my first post. Sum the voltages before they are fed into the voltage to frequency convertors. At the output of the summing amplifier he could implement some sort of input protection to protect the voltage to frequency convertor in the event the output of the summing amplifier goes above 5 volts..
 
MrK said:
I think I understand what you are saying, but I wouldn't have a clue on how to implement it.
Do you have any EE friends who owe you a favor? It would be a pretty easy circuit to design and build.
 
  • #10
Averagesupernova said:
Actually, you can.
Hey, good point supernova. Yeah, if you could pass the sum frequency component only, that would qualify as an addition of frequencies. As you say though, with the OP's baseband signal frequency range, you wouldn't be able to separate the sum from the original signals.
 
Back
Top