Frequency output = sum of 2 frequency inputs (Digital)

Click For Summary

Discussion Overview

The discussion revolves around the challenge of combining the frequency outputs of two sensors into a single frequency signal that can be read by a computer. The sensors output variable frequencies, and the goal is to have the computer perceive the sum of these frequencies without altering its operation.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant suggests summing the outputs before converting them from voltage to frequency, questioning whether the sensors can handle more than 5 volts.
  • Another participant emphasizes that frequencies cannot be added directly and that only the time domain voltage waveforms can be summed, which does not change the frequency content.
  • A different approach is proposed involving modulation of the sensor outputs with different carrier waveforms, allowing for a combined signal to be sent to the microcontroller, although this would require additional detection capabilities.
  • One participant mentions the possibility of using a frequency mixer to obtain the sum and difference frequencies, but notes the practical difficulties in filtering the desired output from closely spaced frequencies.
  • Another participant expresses uncertainty about how to implement the suggested solutions, indicating a need for further assistance or collaboration.

Areas of Agreement / Disagreement

Participants generally disagree on the feasibility of directly adding frequencies, with some proposing alternative methods while others maintain that such an addition is not practical. The discussion remains unresolved with multiple competing views on how to approach the problem.

Contextual Notes

There are limitations regarding the assumptions about the sensors' capabilities and the specific requirements of the embedded device. The discussion also highlights the complexity of the circuitry involved and the potential need for additional components to achieve the desired outcome.

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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
2
Views
3K
Replies
5
Views
3K
Replies
7
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 68 ·
3
Replies
68
Views
6K
  • · Replies 46 ·
2
Replies
46
Views
6K
  • · Replies 34 ·
2
Replies
34
Views
5K