# Frequency divider

#### inwo

Joined Nov 7, 2013
2,419
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.

#### Attachments

• 46.2 KB Views: 19

Joined Jul 18, 2013
23,111
Welcome back!
What part of the project do you need, writing the program? Just programming the Pic and/or Gerber files etc?
Max.

#### Dodgydave

Joined Jun 22, 2012
9,953
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.

#### Papabravo

Joined Feb 24, 2006
16,145
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.
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.

#### hp1729

Joined Nov 23, 2015
2,304
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.

How about a CD4018 Divide-by-N counter?

#### inwo

Joined Nov 7, 2013
2,419
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.

#### inwo

Joined Nov 7, 2013
2,419
Welcome back!
What part of the project do you need, writing the program? Just programming the Pic and/or Gerber files etc?
Max.
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.

#### inwo

Joined Nov 7, 2013
2,419
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.

#### wayneh

Joined Sep 9, 2010
17,152
A logic counter that would count to 4 then inhibit one count. ie. 4-inhibit-4-inhibit-4inhibit
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.

#### inwo

Joined Nov 7, 2013
2,419
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.

#### inwo

Joined Nov 7, 2013
2,419
I have the 4018 dividing by 5. Used a couple diodes rather than gate.
Pretty

#### GopherT

Joined Nov 23, 2012
8,012
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.
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.

#### inwo

Joined Nov 7, 2013
2,419
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.

#### crutschow

Joined Mar 14, 2008
27,212
I think a rate multiplier such as the CD4089 will do what you want.

#### inwo

Joined Nov 7, 2013
2,419
Perfect!

Way to easy. What do I do now?

#### inwo

Joined Nov 7, 2013
2,419
You think I'm made outta money?
Close to $.50 apiece. #### GopherT Joined Nov 23, 2012 8,012 You think I'm made outta money? Close to$.50 apiece.
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

Joined Nov 7, 2013
2,419
I think a rate multiplier such as the CD4089 will do what you want.
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?

#### inwo

Joined Nov 7, 2013
2,419

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

#### inwo

Joined Nov 7, 2013
2,419
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.