Sine Wave to TTL / Square Wave Circuit

Discussion in 'General Electronics Chat' started by JohnIV, Apr 12, 2010.

  1. JohnIV

    Thread Starter New Member

    Apr 11, 2010
    5
    0
    Good Evening Everyone,

    I know that there are several sine to square options out there, but to be honest I really don't now which one is best for my application so I'm hoping that you can offer some suggestions. I'm trying to build an adapter to feed a digital fuel flow indicator on an experimental aircraft, the problem is that the indicator is looking for a square wave (1.0 - 10V p-p) and the flow transducer is sending out an AC sine wave (0.2 - 1.5V p-p). The flow transducer is a balanced AC source and is floating with respect to ground. Frequency ranges from about 5Hz to about 2000Hz and varies with the rate of flow. There used to be a sine to square wave converter built for this exact purpose but the company that built it is no longer in business.

    The circuit I build needs to "tap" into the existing signal from the transducer without affecting the signal from the transducer in any way as it will still be driving another system as well. The original device had an input impedance of >2MOhms for that reason.

    There will be an available source of 15VDC to power the converter circuit as needed.

    The amplitude of the output signal is not important, only that it's frequency match the frequency of the input signal.

    Any thoughts or suggestions?

    Thanks,

    John IV
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Im not touching an aircraft fuel management system with a 35 foot pole.

    But then again, I dont think I could solve the problem anyway.

    Is there no way to have the original adapter repaired?

    I would also think you would want to use some military grade components with this system. Either that or replace the fuel system with something up-to-date that you can get a warranty on.
     
  3. legac

    Well-Known Member

    May 4, 2005
    54
    0
  4. VoodooMojo

    Active Member

    Nov 28, 2009
    503
    53
    One of these help?

    http://w5jgv.com/rife/wavshap2/wavshap2.htm

    or:


    Self Powered Sine to SquareWave Converter - Converts sine to square waves without a power-source Useful as a test instrument for audio purposes (added 9/04)Self-powered Sine to Squarewave Converter - This circuit is intended to provide good square waves converting a sine wave picked-up from an existing generator. Its main feature consists in the fact that no power-source is needed: thus it can be simply connected between a sine wave generator and the device under test.….(circuit design added 08/08)SquareWave to Sine Converter - (circuit added 7/02)Time Tag Impulses with Zero Crossing Circuit - 01/24/02 EDN-Design Ideas: A "constant-fraction discriminator" usually performs the time-tagging of impulsive events, which have a peaking time of the signal amplitude. The implementation of this technique requires a delay in the input signal of approximately the same amount as the signal's rise time.... / (schematic / circuit added 11/03)Wide Band Zero Cross Detector - This circuit was designed to convert a low amplitude 40KHz signal into a clean square wave signal. It will work with inputs as small as 5mv peak-to-peak or as large as 3 volts peak to peak. The input frequency can range from a few kilohertz to about 150KHz. ….(designed by David A. Johnson)Zero Crossing Detector - Circuit Ideas for Designers Application Notes Advanced Linear Devices, Inc. (app note added 6/06)
     
  5. JohnIV

    Thread Starter New Member

    Apr 11, 2010
    5
    0
    I've looked at all of those options and while they're interesting, I'm not confident that they would meet my requirements which is why I posted here for a little more experienced guidance.

    This is a supplementary system and in no way a "flight critical" appliance. Even if the primary system failed it wouldn't affect the flight from a safety standpoint so please don't worry about "touching this with a 35 foot pole".

    Of the schematics I've seen thus far the zero crossing detectors look interesting, however I assume they would trigger the square wave on both the ascending and descending portions of the sine wave which would result in twice as many pulses on the output as I need (i.e. one output pulse per complete sine wave cycle).

    A "Schmitt Trigger" also sounds like it might do the job, but again, I'm hoping someone here can give me a definitive answer as to what the best method for tackling this issue would be.

    Thanks,

    John IV
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The board has recently stopped supporting any/all automotive discussions due to safety and legal issues, in light of recent laws passed about automotive lighting in various countries, and the problems facing the Toyota/Lexus brand.

    While this may not necessarily include experimental aircraft, it should be rather obvious that extra caution is necessary. After all, if an automotive powerplant does not run, it is not usually an emergency; just an inconvenience. If an aircraft engine runs out of fuel in flight due to incorrect fuel consumption reporting, one may quickly find themselves out of altitude, airspeed and ideas simultaneously.

    I have seen a number of experimental aircraft who's electrical systems were so awful that I would not enter them even if the battery were removed, much less go for a ride.

    It would help if we had some idea of your experience in aircraft wiring.

    Have you at least attended EAA seminars on aircraft wiring and instrumentation?

    What kind of wire did you use on your aircraft?

    What kind of insulation do you use at splice points?

    Your 15v supply - is that conditioned power, a connection to the fuse/breaker panel, direct to the battery, or other?
     
  7. JohnIV

    Thread Starter New Member

    Apr 11, 2010
    5
    0
    Good Afternoon SgtWookie,

    It sounds like you have some aviation experience in your background (I base this on your use of the altitude, airspeed and ideas comment).

    I agree that there are some horrendous experimentals flying around out there, of course having said that, I've seen my share of production aircraft which have just as bad of rat's nests behind their panel. Having said that, all of the work is being performed by myself and a good friend who is an A&P / IA and retired 30,000+ hr flight engineer. I own and operate an aircraft parts and corporate aircraft maintenance management company so everything being used is off-the-shelf certified hardware and done in accordance with AC43.13-1B,2B, etc. No corners cut here.

    The +15v supply is conditioned power from the fuel flow instrument and is the power source which would have originally driven the transducers, however since we're using a transducer from another existing system. Essentially, the system that we're adding will provide GPS interface and totalizer functionality on top of the existing system which only provides instantaneous flow rate.

    Thanks,

    John IV
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I see. I hope that you understand my hesitant nature in approaching such topics, and attempting to establish some frame of reference as to your abilities/capabilities. All too often we have people with beginning-level skill sets, with wild-eyed and grandiose ideas they wish to implement.

    My avionics skills are a tad rusty, as I haven't been directly involved in that field for a number of years. However, my experience mostly involves airborne radar/missile fire control systems for military aircraft.

    Besides, I've stayed at a number of Holiday Inn Express hotels. ;)

    You're wanting to stay with mil-spec parts, I presume? M38510/JM38510/883/etc?

    off-topic: are you familiar with TEW-Mason/Jewett?
     
  9. JohnIV

    Thread Starter New Member

    Apr 11, 2010
    5
    0
    Good Morning SgtWookie,

    Well I don't anticipate needing a radar/missile fire control system anytime soon, but I know who to call if the need ever arises! Ha ha.

    It would be nice to stay with Mil-Spec if possible.

    Sorry, I've never been to KTEW.

    John IV
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    That's OK, not everyone has been to TEW. Nice facility there. One of the fellows has an F4U-5 Corsair; it's a real beauty.

    Back to your requirements - you said in the beginning, "...square wave (1.0 - 10V p-p) and the flow transducer is sending out an AC sine wave (0.2 - 1.5V p-p)..."

    So, your flow transducer sends out a sine wave that varies in P-P amplitude from 0.2v P-P to 1.5V p-p at 5Hz to about 2000Hz?

    And your indicator instrument requires a square wave that is between 1V P-P to 10V P-P inclusive?

    I'm just attempting to verify your requirements.

    [eta]
    Note that the thread continues on page 2.
     
    Last edited: Apr 14, 2010
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I put together a "quickie" simulation using LTSpice and a mil-spec comparator from TI.
    The mil-spec part number is JM38510/10304BPA.

    I just threw in a standard Zener diode to clamp the output to 0v-5.1v, as the specs of "1v p-p to 10v p-p" were pretty loose. However, I thought you'd like to see the direction it's going.

    It's not complete yet; it's just a rough concept at the moment.

    The differential input sine waves are of such a low amplitude that they really don't show up well; you can only see the cyan trace which represents the -In input to the comparator; the +In red trace is overlaid by the -in trace.

    The green and blue traces show the current flowing through R2 and R3, which makes the input signals much easier to see.

    R2 and R3 provide a high impedance input.
    R1 and R4 form a voltage divider between Vcc (+15v) and GND.
    C3 keeps the noise at the junction of R2/R3 at a reasonable level.
    R5 and R6 keep -In and +In (respectively) biased at the same average voltage as on C1.

    At the moment, there is no hysteresis provided. Without hysteresis, the comparator may oscillate if the input signals are absent.
     
  12. JohnIV

    Thread Starter New Member

    Apr 11, 2010
    5
    0
    You've got it right... essentially the flow transducer is a small AC generator so as the rate of flow increases the frequency and amplitude of the sine wave from the transducer increase proportionally. In this case the amplitude of the sine wave is really of no concern to either system, it is the frequency of the signal which is monitored and used to calculate the rate of flow. The circuit I need would convert that sine wave into a square wave with the same frequency.

    If you want to see some neat warbirds you should come down to San Antonio. We've got a fellow who is amassing quite the private collection, including Glacier Girl which is parked in the hangar behind me and flys on a pretty regular basis. Very neat stuff!

    John IV
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Glacier Girl!?! No kidding!!

    I followed the story of her rescue and restoration pretty closely, but hadn't thought about it for awhile. What a project!

    It's been a few years since I've been around there; we have relatives living in the San Marcos area.

    Anyway, the circuit I posted is a basic concept. I don't happen to have any LM111's sitting around here to experiment with.
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Are you still with us, John?

    Here's a 2nd version.

    I've added on a couple of opamps to buffer the front end. I happened across a JM38510/10102, which is equivalent to an LM747, which is a pair of 741 opamps, but mil spec.

    [eta] I ran across a couple of LM111's, which are spec'd over the full military temp range.

    Trying to add hysteresis to the original circuit was simply ridiculous; the feedback resistor would've had to be around 110MEG.

    This seems to work pretty well in simulation, but proof o' the pudding will be to build something and test it.

    As before, bypass caps on the supply pins of the ICs are not shown to eliminate clutter.
     
    Last edited: Apr 18, 2010
  15. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    He's not test flying around the Bermuda Triange, is he? ;)
     
Loading...