How to boost/limit a signal to TTL levels

frequency-measurementsignalsignal processingttlvoltage divider

I am researching a data acquisition system to measure the amplitude and frequency of a 4,100Hz 5v-25v AC square wave signal. Actually this is version 2 for me, in the previous version I analyzed the captured data points and counted the rising edges to determine the frequency, this worked pretty good. On version 2 of my system I would like to use the 32bit counter that is present on the data acquisition card. This counter accepts a TTL level signal. The card has a maximum of 10v analog input for the amplitude measurement, I will use a voltage divider to divide down the signal to within acceptable ranges. R1 = 806Ω, R2 = 196Ω which will result in a vOut range of .98V – 4.89v

All this is fine, but now I run into the problem of the divided signal not be within the valid TTL input range of 2.0v – 5.0v. I had planned on using the divided signal as an input to the counter. I'm not an electronics engineer and this is a problem I know nothing about.

How can I condition the signal so that small positive voltages are boosted to TTL HIGH levels (i.e. 2V) and high positive voltages are limited to TTL HIGH voltages (i.e. 5v)? All of this with minimal effect on the signal being measured.

Any help or guidance greatly will be greatly appreciated.

Best Answer

You may wish to try an open collector for the TTL input. Get some cheap high gain npn transistor:

  • connect its emitter to ground;
  • connect its collector to the TTL input;
  • add 1k resistor between the collector and +5V rail;
  • add (if needed, check the transistor's cpecs) a diode between base and emitter in the direction reverse to "base-emitter" junction to save the junction on negative half-periods of your AC;
  • connect the AC output to the base of the transistor through, say, 100k resistor;

So, at 5V AC the peak of base current will be approx 0.05ma - more than enough to handle 1k resistor on the collector and TTL input (for high gain transistor). At 50V AC the peak of base current will be approx 1ma, quite within the specs for most transistors.