Divide by N

Status
Not open for further replies.

windozeuser

Member
Hello board ^^, just recently someone got me involved in a project where they are making hydrogen gas for their car with electrolysis. They got me building all the electronics for it, and they are doing the mechanical aspect. I have everything about 80% done, expect for one part:

One sub-circuit requires a divide by N where 1000 input pulses = 1 output pulse. The circuit is using a CD4059, the problem is that the schematic only shows a block diagram for that part o.o.

The chip itself is considered obsolete, I managed to order 5 of them, but I can't figure out how to get it to divide by 1000?

If anyone can help me, I will greatly appreciate it. Also, a modern or different way of doing it is welcome, but as I said I have 5 of the CD4059's.

Thanks
 

Well here is a link to a data sheet that should explain how to wire and configure the divider to your requirements...

https://www.futurlec.com/4000Series/CD4059.shtml
 
i think the "modern" way is to count the pulses using a microcontroller and dividing in firmware
 
windozeuser said:
Also, a modern or different way of doing it is welcome, but as I said I have 5 of the CD4059's.

I agree with Glyph. For every problem there is a micro controller solution A small PIC could be a modern and cheap option.
 
Last edited:
Yeah I have the datasheet myself, but I can't figure it out lol. Well, I want to avoid using a microcontroller in this design.
 
You can get divide by 1024 using a series of flip flops or a pair of 8bit ripple counters with the output being the 11th bit.
Why do you want to avoid micro controllers in your design?
 
the N will always have to be 1000. The input is the output of a 555 timer,which can vary from 10 to 90KHz, I need the CD4059 or equivalent that will divide that by 1000 for example:

input is 19000 Hz, output from CD4059 will be 19Hz.

This has to be done by Friday, and I don't currently have any micro controllers in stock. I was figuring it would easier and faster to use parts already available. How would I do that with flip flops?

1024 would probably be fine, do you have an example schematic? this has to fit on a small PCB, so the discrete components can't be much larger than the size of that CD4059, it can be a little larger, probably 2 flip flops max?

thanks
 
Last edited:
Well I actually looked it up....
The CD4059 is a programmable divide by N counter where N is between 3 and 9999..... You already have the solution to your question in your chip stock. A simple Google search will provide you with a CD4059 PDF file with all the information you need to use it..

It's customary on forums not to ask questions while stateing in the same post that you already have a chip which will do what you want without at first trying to find the most basic amount of information about what you're asking.
 
windozeuser

set ka,kb and j13 to a high all other jam inputs to lows also latch(pin2) low.

I set mine this way, I have a 17 hz freq. Now my problem is, I have a 17k hz
10v input wave 17hz spike out put.
 
I agree with Glyph. For every problem there is a micro controller solution A small PIC could be a modern and cheap option.
But for a small job a uC may be overkill, and it can be easier and cheaper to just use a discrete solution.

You can use a CD4060B 14-stage counter. Just pick off Q10, the 10th stage output, which will give you a divide by 1024 square-wave output.
 
Last edited:
i think the "modern" way is to count the pulses using a microcontroller and dividing in firmware

This is generally a bad idea if you plan on making it easy to repair once you leave the group. Use standard components whenever possible.
 
Observations

This is generally a bad idea if you plan on making it easy to repair once you leave the group. Use standard components whenever possible.

It is hard to imagine a hydrogen powered car without a custom uC control system. If they can keep the control system running they can manage a 8 pin uC in the hydrogen generator. Could be wrong.

Using a uC should be better then using obsolete parts.

Efficient use of electricity for hydrogen generation is important. The uC solution would provide some degree of flexibility.

Program a few extra uC's if you want spare parts. At about 50 cents each you can afford a few.
 
Using a uC for the simplest of jobs may be okay but it's certainly not a simple task.

1. You need an understanding of the uC operation: speed, memory, registers, commands, I/O characteristics, counters, built-in A/D, D/A, etc.

2. You need to know programming (certainly not trivial).

3. You need a programming fixture designed for the selected uC to enter the program into it.

When it is proposed that a uC be used for a task, it is implicitly implied that all the above is available. It may not be. You have to judge if the above is reasonable or available to do the desired task.
 
Carl,

You are making this out to be WAY harder then it is. As I said earlier
It is hard to imagine a hydrogen powered car without a custom uC control system. If they can keep the control system running they can manage a 8 pin uC in the hydrogen generator. Could be wrong.

This application does not require any knowledge of the uC peripherals other then how to read and toggle IO bits. If the project have a person who can program a uC it is a cakewalk. The program is simple.

This would be an excellent first project for a person who wants to learn how to program a uC. Which would require an investment in time and the up to $50 for a programmer. Both a wothwhile investment. Help on this site.

I do not recall that the OP set a time frame for getting this done.
 
This would be an excellent first project for a person who wants to learn how to program a uC. Which would require an investment in time and the up to $50 for a programmer.

Not even that much time and money, it's a VERY trivial programming task, and a PICAXE would easily do it, no programmer required (just a lead, which you can make at home), and simply programmed in BASIC.
 
Sometimes you uC guys are a little bit like a hammer. Every problem looks like a nail.

I've used uC's so it's not like I'm unfamiliar with their use, and there are certainly many applications where they are the simplest solution.

My only point was that for some simple jobs a uC is overkill (and I think a divide by 1000 is one of them). However, if you really want to use a uC and are familiar (or want to become familiar) with their use, and the effort and hardware required to program them is not daunting, then go for it.

"Make it as simple as possible, but no simpler"
 
Sometimes you uC guys are a little bit like a hammer. Every problem looks like a nail.
With 8 pin pics starting at sixty cents there are many problem in the world that are nails. If you are going to do digital logic you are far better off with the ability to program in your toolkit. SOP is to use a uC or FPGA with as little external logic to solve most problems (because it is less expensive). What is the point in using logic chips? Nails are getting hard to find.

I would like to see the schematic for the entire generator. It is possible that the little pic could replace other parts too. The clock source and logic to adjust the duty cycle come to mind.
 
I think the PIC uC is the greatest thing since mini skirts. With that said however, Sometimes someone might have a time crunch on their project, or wish to learn digital design. Ergo, obtaining the programmer, Sw tools, and not to mention the learning curve on PIC code writing would take a good deal of time, and they would also learn less about digital logic.
With a logic device, not only does the builder improve their knowledge of digital circuits, they can do so at a much faster pace. Even with PLD's, one has to learn ABLE, CUPL, or VHDL. There are times when it is just more practical to use good old fashion hardware.

If you already know how to code, then I am sure PIC's are ideal, but first learn the basics of hardware, at least I think so.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…