开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: Circuits


Dave Karr
 

Since you ask a pretty general question and no two (brand/model) radios are
alike I'll answer with a general overview of what needs to be considered
and addressed when attempting to capture the signal of interest and present
it for conversion at an A/D converter.

To solve the problem I think it helps to understand the factors that need
to be considered in each of these cases.


Deviation, to be able to get a readout of the amount of deviation into
the repeater RX
Assuming you are working with a good receiver with a real discriminator
you'll want to use the discriminator output as a starting point. Usually a
discriminator metering point is available but is a high impedance. You
need to make certain that the circuit you connect is also high impedance or
that you provide a voltage follower (see references below) as a buffer to
this signal. It is generally not a good idea to take the discriminator
output and start dragging it around the inside of your repeater cabinet,
even with sheilded cable. If you feel compelled to do so, at least use a
voltage follower.

That said, I'll let someone else jump in here with their preferred time
constants for this, but you'll have to decide as to excactly what it is
that you want to measure. Peak or average, if average, what time constant
do you apply to the reading (yes peak will also need a decay time constant
but something for arguments sake I'm assuming an order of magnatude here).

Either way I'd suggest a peak detector with a somewhat long decay time
constant.

Essentially you'll want an AC coupled peak detector/rectifier with somewhat
long time constant decay to it (500ms to 1s) to be useful.

See my discussion below on presenting that signal to the A/D converter.

This circuit could/should be connected to the buffered/level shifted output
of the first stage of your next question.


Freq. offset, I understand there is a way to get a reading so that one
can tell how far off freq. the incoming transmission is.
The discussion above about the discriminator output applies.

Depending on the radio, you will find that an on frequency signal might be
zero volts, or some positive (or negative) voltage.

You will also need to know what voltages correspond to a given magnatude of
frequency error. With this information you should be able to calculate how
much gain and offset need to be provided in order to scale it to the
desired voltage range and offset in order to present it to the A/D
converter.

As an example lets assume that your radio exhibits the following:

0 frequency error = 4.5 volts
+5 KHz error = 3 volts
-5 KHz error = 6 volts

At the A/D converter you want:

0V = -7KHz error
2.5V = 0 KHz error
5V = +7KHz error


Therefore the input span is 4 volts for 10KHz and the desired output span
is 5 volts for 14KHz. In other words the input is 400mv/KHz and the output
is 357mv/KHz. Thus you need a gain of -0.8925. Note the negative sign
because an inversion is desired.

Next figure out how much offset needs to be introduced to center the
measurement for the A/D converter:

If we introduce 4.5 volts into the amplifier with a gain of -0.8925 we
would get -4.02 volts from it. So in order to correct this -7.3 volts
((2.5/-0.8925) - 4.5) needs to be summed with the original signal to
introduce the appropriate amount of offset with the signal in order to have
it properly centered at 2.5 volts output.

This all presumes that you are making an error measurement on an
unmodulated (undeviated) carrier. Any deviation on the signal (CTCSS,
voice, etc) will immediately appear at the output of the amplifier/level
shifter. A cheap and dirty way to filter the resultant signal is to
provide a low pass filter before the signal is mesured. The filter's
corner frequency should be low enough that the A/D converter is not
sampling an instantaneous voltage reading that would correspond to someones
voice or to the instanteanous value of a subaudible tone. Assuming the A/D
converter is only going to make one instantanous reading, I would suggest a
corner frequency in the 10 to 20Hz range. (assumes a single pole simple RC
filter). The drawback here is that several time constants of signal are
needed to take a reasonably accurate reading. The shorter the signal, the
less accurate the reading.

Be aware that different transmitters will exhibit varying degrees of
assemetry in their modulated signal (i.e. a sine wave might deviate +5KHz
and -4.98KHz). This isn't uncommon and in this case would add 0.01KHz of
error to a measurement taken as described above.




Current, I have a circuit that is a shunt, so to read the amount of
current there is, but how do I get to tranform it to a DC voltage so the
controller can read it.
The following presumes a negative ground....

This is a fun one.... the easy way is to measure the voltage drop across a
know resistor in the return/ground lead. While there are several factors
to consider when doing this that will impact the resulting accuracy lets
use an example of 1 amp full scale across a 1 ohm resistor giving us 1 volt
of measured drop. If the desired measurement range of the target A/D
converter is 0 to 5 volts then you'd obviously need a circuit with a gain
of 5. Use your favorite op-amp here in a non-inverting configuration with
the appropriate gain resistors to yield this.

Most of the older/cheaper op-amps you will find have limitiations in the
output stage that will limit the outputs ability to swing within a volt or
two of the supply rail. So you will of course be tempted to connect the
op-amps supply to something a bit greater than the desired output. The
drawback now is what happens if something beyond the anticpated input range
occurs. The output will swing beyond the input voltage capability of the
A/D's input and, depending on the input type, could latch up. Minimally
you will forward bias protection diodes within the A/D converter.

The easy way around this is to use a rail-to-rail output op-amp which uses
the same supply voltage as the A/D converters input reference or supply
(whatever is appropriate).

That's the easy one.

Unfortunately you will most likely want to measure current on the supply
(+) side of things. Here you can use the same techniques described above,
but you need an op-amp which has a common mode input voltage range that
includes the positive rail of the op-amp (assumes that the op-amp will run
from the same supply as that being measured and that no higher voltage is
convienently available). Most of the ones that you will find capable of
this are CMOS though there are a few FET input types. Look at product
offerings by maxim (www.maxim-ic.com) or Analog Devices (www.analog.com)
for these devices. Maxim has a few geared specifically towards high side
current measurement.

When working near/in/around/close to/in the presence of RF avoid op-amps
with bipolar inputs. Its not likely you will need the performance
advantages that a bipolar has to offer and many good CMOS or FET type input
op-amps exist today to generally make this a non-issue.

For general familiarization with op-amp circuits a good cheat sheet/cook
book is National's infamous AN-31
(). This shows many common circuit
configurations. Both National Semi and Linear Technology's app notes
(especially those by Bob Pease and Jim Williams [of their respective
companies]) are good resources for ideas and common circuit configurations.



If you'd like to be a bit more specific with the actual voltages and or
current ranges you'd like to convert we can start reducing this to actual
circuits with specific values of components to get you going in the right
direction.


I hope thats a good start of an answer to your question.



--Dave

Join [email protected] to automatically receive all group messages.