Adjusting Period of Square Wave Pulse

Discussion in 'General Electronics Chat' started by mikalcarbine, Dec 27, 2012.

Thread Status:
Not open for further replies.
  1. mikalcarbine

    Thread Starter New Member

    Dec 27, 2012
    Hey all,

    I'm looking for an IC that will take a square wave input and output a square wave with an adjusted period, does anyone know of one off hand?

    thanks much
  2. WBahn


    Mar 31, 2012
    What do you mean by an "adjusted period". Give a specific example or two of what you want to put in and what you want to have come out.
  3. crutschow


    Mar 14, 2008
    Do you mean variable frequency or variable duty-cycle of the square-wave?
  4. vk6zgo

    Active Member

    Jul 21, 2012
    Of course,strictly speaking,if you change the mark/space ratio,it is now a "rectangular pulse".:D
  5. eblc1388

    Senior Member

    Nov 28, 2008
    As others have already commented, what you want is a rectangular wave with the period of the input square wave but an adjustable period of either the HIGH or LOW time, in effect its duty cycle.

    You can do that with a monostable multivibrator IC.

    The input square wave signal is used to trigger the monostable and the duty cycle can then be adjusted via the RC time delay of the monostable. The time delay however, can not be longer than the period of the Square wave input signal.

    Try look up the data sheet of CD4538B or 74HC123...
  6. mikalcarbine

    Thread Starter New Member

    Dec 27, 2012
    Let me add some more detail to what I'm trying to achieve. I have a hall effect sensor that is providing a square wave signal for a speedometer. Certain outside parameters (tire size, gear ratios, etc) can change the number of pulses produced from the hall sensor to the PCM. I'd like to find an IC that I can set up to adjust the frequency of the pulses up or down an adjustable percentage (likely some variable RC circuit). The duty cycle (although related to frequency) would still be 50% due to the nature of the hall effect sensor

    Here is a small example (I have an excel sheet with the math if anyone wants it)

    Tire size 30" gear ratio 3.73
    At 30 MPH the sensor would give off 1253 pulses/sec
    At 65 MPH the sensor would give off 2716 pulses/sec

    Tire size 30" gear ratio 3.73
    At 30 MPH the sensor would give off 1139 pulses/sec
    At 65 MPH the sensor would give off 2469 pulses/sec

    Tire size 33" gear ratio 4.88
    At 30 MPH the sensor would give off 1491 pulses/sec
    At 65 MPH the sensor would give off 3230 pulses/sec

    Depending on the parameters that change, the frequency (pulses/sec) can either increase or decrease. However, regardless of speed, the change is a constant percentage. I'd like to be able to adjust this frequency as desired
  7. Dodgydave

    AAC Fanatic!

    Jun 22, 2012
    A 555 timer will do it.
  8. P-MONKE


    Mar 14, 2012
    Voltage and time are not measured in the same units, so the distinction is meaningless... :p

    To the OP (mikalcarbine), it is still as clear as a 1950's London pea-souper as to exactly what you are trying to achieve.

    Are you trying to introduce a "fudge factor" into your circuit to calibrate a speedometer around variations in wheel and gear variables? Is your original sensor on part of the tachometer circuit by any chance? If so, you might well find yourself falling foul of the Terms of service for the website that prohibits discussion on automotive issues.

    Apologies in advance if I'm barking up the wrong tree!
  9. WBahn


    Mar 31, 2012

    And just how is a 555 timer circuit going to take an input signal that is, say, 2000 pulses per second and produce an output signal that is, say, 5% higher, or 2100 pps? Keep in mind that at 1000 pps, it would have to produce a 1050 pps signal.
  10. WBahn


    Mar 31, 2012
    Taking a signal at one frequency and changing it to a different frequency is not a trivial thing if trying to do it without software/firmware in the loop. You can't even use RF techniques/concepts to shift the frequency because those shift it by a constant amount, not a proportional amount. Perhaps(?) the most elegant way would be to use a PLL or DLL in order to achieve the goal, but I don't know that you can get the necessary performance all the way down to the very low speed range that you probably need.

    How I would probably approach it is to use a simple MCU that listens to the input and produces pulses on the output according to a stored calibration constant. A simple way to do it would be to add the calibration constant to an accumulator and output a pulse every time an overflow occurs. The smaller the constant, the less frequently this will happen. The tricky part (not too tricky) is that you probably want to detect both rising and falling edges on the input signal. I can walk you through what needs to be done if this approach is of interest to you.
    Last edited: Dec 28, 2012
    Gilbert Velez likes this.
  11. Georacer


    Nov 25, 2009
Thread Status:
Not open for further replies.