Frequency divider

Discussion in 'The Projects Forum' started by inwo, Dec 15, 2015.

  1. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    I'm back.
    Going thru some health issues.
    I'm wondering if someone would help me with a small project.
    Looking for the simplest divide by "N" in the range of divide by 7/8.
    I've been playing with cd4070 to double frequency. Idea, was X8 then divide by 10.
    However it does not seem to be cascadable without inter-stage pulse conditioning.

    Even then over a narrow band. Only need 1hz to 1khz.

    This seems like a perfect job for a small pic.

    My last pic experience started with basic stamp and then over to pic on my old dos computer.

    Rather than the long learning curve for an old brain, I'm wondering if someone would do the work for me.
    It would be a paid gig if needed. I will certainly pay for parts and shipping.

    I know it seemed so simple back then, when all the sw was installed and I was doing it everyday.

    It's a lot to ask, but if someone who has the needed skills, could program a couple pics for me, it would save me a week of work.

    There will then be some tweeks needed. Some of the skills may come back to me by then, or I will ask for further assistance.



    Thank you in advance. :)
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,515
    2,369
    Welcome back!
    What part of the project do you need, writing the program? Just programming the Pic and/or Gerber files etc?
    Max.
     
  3. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,978
    744
    Do you want to divide the input frequency by 7 or 8, you can use a cd4017, set it to reset on 7 or 8.
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,137
    1,786
    Using a 2:1 multiplexer you can choose two different reload values and alternate the choice of reload value to produce other division results between 7 and 8.
     
  5. hp1729

    Well-Known Member

    Nov 23, 2015
    1,948
    219
    How about a CD4018 Divide-by-N counter?
     
    inwo likes this.
  6. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    Sorry, I didn't know the circuit board attached. Thought I deleted it. That was just an example of an earlier part of the same project. A couple pulse conditioners and divide by 1 thru 10.

    Now I need to divide by 7/8 or 8/10ths. Yes, multiply by 8 then divide by 10.
    That proves difficult with simple logic chips.

    Input is near square wave from hall counter on a gear. 1-1khz.

    Output can be square or as low as .1ms. Can change with frequency. Not an issue. Just goes to tachometer input.

    What I would like is a few pics programmed and mailed to me. Source file would be nice, but I can only work with basic. :(

    If it' a one chip solution, I won't even need a board. 12vdc is available from the sensor connections.
    This will just be an in-line device to reduce frequency ~20% across the board.

    If I get help I will add a few things to my wish list.
    Lets see were this goes.

    And thanks for all the replies.
    I forgot how nice this place was.
     
  7. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    I could possibly dig out my programmer and activity boards and see if it works on new computer. If not I can get a new version. I'll need it anyhow.

    Just need to get jump started.
    As I recall each pic family has it's own little things to get set up.
    I have a bunch of larger than needed pics, but I want to keep it small and simple.
     
  8. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    Some other thoughts for those suggesting cmos counters.
    Output need not be symmetrical.

    A logic counter that would count to 4 then inhibit one count. ie. 4-inhibit-4-inhibit-4inhibit
    Same with the pic if symmetrical square wave output is difficult.
     
  9. wayneh

    Expert

    Sep 9, 2010
    12,100
    3,034
    Untested speculation: I think you could use two 4017s in parallel - instead of the usual serial cascade - to accomplish this. The second one would be disabled on "4" by the first one and both would reset on 5. I think a small capacitor on the clock signal to the second one would ensure that the first timer reacts a tiny bit sooner, in time to effect the second one.
     
  10. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    I'll give that some thought. Years ago I used a common "color burst" divider to divide by a near number. Corrected it by an inhibit signal.
    Even though I found my schematic, too many brain cells have died since then.

    ps.
    Just got some 4018s in today.
    May work similar.
     
  11. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    I have the 4018 dividing by 5. Used a couple diodes rather than gate.
    Pretty
     
  12. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,006
    3,763
    It sounds like you are looking for an approximation or do you need exactly 7x and 8x before dividing by 10?

    have you considered using a frequency to voltage converter, a precision op amp to convert the output voltage to a new value (70% or 80%) and then convert back to frequency with a voltage to frequency converter. Some VCF chips can be used in either direction (FV or VF).

    I have a whole box full of BurrBrown precision VFC32 if you need a few to experiment.
     
  13. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    Exact division may not be needed. However it must be consistent.
    Must be simple, with low part count. Do to laziness, I only do easy. :)

    Maybe if I use a ripple counter. Q-outs each = 1 clock width. Use with a gate to inhibit one clock pulse out of 5 from reaching output.

    Then output = input divided by 4/5?

    Then I don't even use a divider.
    ps.
    Will try that when I get back from the gym.
     
  14. crutschow

    Expert

    Mar 14, 2008
    13,000
    3,229
    I think a rate multiplier such as the CD4089 will do what you want.
     
    inwo likes this.
  15. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    Perfect!

    Way to easy. What do I do now? :)
     
  16. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    You think I'm made outta money?
    Close to $.50 apiece.:D
     
    GopherT likes this.
  17. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,006
    3,763
    The chip is only $0.50 but typing out the purchase order with triplicate carbon copies will cost you about 2 hours of admin labor. Then there is the postage and handling...
     
    inwo likes this.
  18. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    Works perfectly on bench. Output = 13/16 of input frequency. Lots of jitter on low end. I'll have to see if it's a problem.

    What do you think of connecting clock input direct to motor hall effect sensor? Only 4PPR. 0-6k rpm.

    Automotive environment.
    As I type it seems, no!
    Ive been using a 555 to buffer input. have another 555 slot, on boards that I'm making to buffer output also.
    Just wonder if it's needed.
    A simpler input clamp or snubber just as good if It's a clean pulse?
     
  19. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    Gem-555.png

    Here is partial schematic.
    I'm triggering 555 from output of hall sensor. Then processing it and routing back to input of controller.
    There isn't access to see what the hall circuit consists of, or the nature of controller input.
    I do know that the hall pulls 9v input down to near zero.10k pulls the same input to 1/2. Giving an idea of the input impedance.

    This circuit works fine when inserted in line between original hall sensor and controller. Logic after 555 not shown. That part works fine.

    The problem I have is, connecting anything additional to hall effect output, stops the 555 from triggering.
    There is a tachometer that needs to be connected to hall for setup.

    R3 pull up is needed. I don't understand why, as hall out put makes full swing either way.

    Tach has high impedance input. Even added a 47k right at hall output to keep from loading it. If I even connect 10' of 2C wire, the 555 following connection fails to trigger.

    Tach is self powered and isolated. 9v battery
     
  20. inwo

    Thread Starter Well-Known Member

    Nov 7, 2013
    2,433
    315
    Can't figure it out.
    Going to add parallel 555 for now.
    Same trigger.
    Use pin 3 for 2nd output to aux. tach.

    Going forward, I may use hex schmitt trigger for ins and outs.
    Like the robust 555s though.
     
Loading...