Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Frequency output = sum of 2 frequency inputs (Digital)

  1. Nov 7, 2006 #1

    MrK

    User Avatar

    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
     
  2. jcsd
  3. Nov 7, 2006 #2
    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?
     
  4. Nov 7, 2006 #3

    MrK

    User Avatar

    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.
     
  5. Nov 8, 2006 #4

    berkeman

    User Avatar

    Staff: Mentor

    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?
     
  6. Nov 8, 2006 #5

    MrK

    User Avatar

    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

    Bugger.
     
  7. Nov 8, 2006 #6

    berkeman

    User Avatar

    Staff: Mentor

    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.
     
  8. Nov 8, 2006 #7

    MrK

    User Avatar

    I think I understand what you are saying, but I wouldn't have a clue on how to implement it.
     
  9. Nov 8, 2006 #8
    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..
     
  10. Nov 8, 2006 #9

    berkeman

    User Avatar

    Staff: Mentor

    Do you have any EE friends who owe you a favor? It would be a pretty easy circuit to design and build.
     
  11. Nov 8, 2006 #10

    berkeman

    User Avatar

    Staff: Mentor

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Frequency output = sum of 2 frequency inputs (Digital)
Loading...