An easy to build clock divider or binary counter with 5 outputs. A simple project and one that was missing from my collection of projects so here it is. For Eurorack or Kosmo.
This is a design from Barton Musical Circuits. With all the projects I have built so far I never built a Clock Divider. So I thought it was time to build one. This is a very easy to build design and I had it up and running within 2 hours not counting designing the layout.
I kept the layout quite thin and long so it can fit behind a small faceplate like a 4hp Eurorack panel.
Below is the schematic for this design, pretty straight forward. You have a TL072 dual opamp comparator with a fixed 110 mVolt signal on the inverting inputs and the clock comes in on the non inverting input. Any signal on the non inverting input higher than +110 mV will flip the comparator to high creating a pulse of +12V on pin 1, the output. That is then brought down to +5V by the voltage divider made up of the 120K and 100K resistors. That's why, if you want to run this project on +/-15V you need to change the 120K resistors to 150K resistors to keep that voltage the same.
The CD4024 binary counter/divider chip is then fed with that pulse on pin 1. It divides the input and presents it on the 5 outputs with every negative going pulse slope. The same happens with the second opamp when it is fed a Reset pulse. As long as the Reset input is high the divider will stop working. It will only start running again when the reset input goes low.
Because the input signal goes through an opamp comparator it doesn't matter what type of signal you use on the input. The comparator will change it in to a useable pulse wave.
You can actually clock this module with an audio rate signal, like any wave from a VCO and so use the divider as a sort of sub oscillator. (It will output a pulse wave). Each output will be an octave below the previous one.
Make sure you get your CD4024 from a reputable source. I couldn't get this circuit running at first but it turned out my CD4024 was a cheap fake from AliExpress or some such website. So be warned!
Here is a link to a FALSTAD SIMMULATION of this circuit.
LAYOUTS:
Here are the layouts I made for this circuit. As always the are verified:
Wiring diagram:
You can add up to two more steps to the clock divider because the CD4024 has 7 output pins. So you can add a /64 step (to pin 4) and a /128 step (to pin 3) if you wish. To do this all you have to do is run wires from those pins to two more sockets an LEDs making sure to solder in the 1K resistors. You can connect those resistors straight to the sockets and the LEDs. Make sure each connection has it's own 1K resistor otherwise you're going to pull down the voltage. For instance if you tap the LED off straight from the socket you're going to pull the output voltage down considerably. Look at how it's done on the layout and copy that.
The voltage regulator is there to feed the CD4024 with power. The CD4024 can be fed with anything from +3V to +15V and the voltage it is fed with also determines the voltage of the pulses it outputs. In my case I wanted my pulses to be a bit higher in voltage than +5V so I put in a 7808 voltage regulator that outputs +8V. You can also leave it out and feed the CD4024 with +12V but then your output pulses will also be +12V.
You don't have to include that ground strip at the bottom right. You can connect the ground lugs of all the sockets together with one long copperwire and then connect that to a ground point on the stripboard with one wire. That way you can keep the bottom strips free for mounting the board behind a faceplate, like I did (see further down).
Mark the cuts with a Sharpie or Edding marker and then stick a pin through the marked holes and mark them again on the copper side. Now cut the copper strips at the marked positions with a sharp hand held 6- or 7mm drill bit.
And finally the Bill of Materials:
OSCILLOSCOPE SCREENSHOTS:
Here's a look at the signal coming out of the TL072 comparator (pin1). A nice big bi-polar squarewave. (Btw, I'm feeding the input with a triangle wave of +/5Vpp):
After this signal has gone through the diode it's been rectified into a positive squarewave:
The picture below shows the amplitude of one of the outputs:
BIGGER VERSION:
I made a second layout for a clock divider with more outputs re-using the old layout but I put in a CD4040 chip. The chip is mounted upside down from what we normally see. Pin 1 is situated at the bottom right. This will give you divisions upto 1024 times (12 outputs) but the layout is not verified!!
I had confirmation that the layout does work, but it's not perfect.
You have to mount the 1K resistors straight to the sockets and LEDs otherwise the stripboard would get too big. I've had feedback that the output voltage is much lower with this design so use a 7808 voltage regulator. The CD4040 needs an inverted clock pulse so you need to put a transistor before the clock input. See schematic below. Make sure you use IC's from a reputable source, not from AliExpress.
Below is the schematic of a 12 step clock divider. I tested this setup on a breadboard and it works fine.
This is a different schematic than the one used for the stripboard layout in the picture above and that caused some confusion so I have now made a stripboard layout for this schematic too.
Here's the layout for the schematic above:
The manual switch progresses the clock one step per push. You can leave it out if you wish. I don't see the use of it but it only needs a switch and a diode.
I have put in one output stage as an example. Repeat those 11 more times for all the other outputs. The diodes in series with the 1K output resistors are BAT43 Schottky diodes. I don't know why they are Schottky's and I think 1N4148 would work just as well. I'm not sure why they're in there at all come to think of it. I think it's to protect the chip from reverse voltage.
This layout is NOT verified because I didn't build it using this layout. Only on a breadboard so the circuit does work, I know that. Please let me know if you built this layout, if it works so I can verify it.
PICTURES:
Here are some pictures I took during building. The stripboard in the pictures may differ a little from the layouts because I later tidied up the layouts and put the components a bit closer together.
(My stripboard has one strip more than is shown on the layouts.)
I mounted the stripboard behind the faceplate by soldering the stripboard to the switch lugs of the sockets I used. The bottom 2 strips are not connected to anything. Make sure when you do this to break the contacts between the different sockets otherwise you will get in trouble. With this method my module came out at a depth of exactly 5 Centimeters.
(The soldering in this corner looks a bit 'how yer doin' but that's because things were soldered, de-soldered and re-soldered again. Believe me, overall the soldering is very neat. I've been soldering since the early 1980's. I know how to do it ^_____^ )
Here's a look at the finished module. I built mine in the Kosmo size because I already have one for my Eurorack setup.
As you can see I bent the regulator over so it won't stick out at the side.
VIDEO DEMO:
Here's a little video I did while testing the module.
Okay, that's it for this one. A small project but one that was lacking from my website until now. This is a module that every synthesizer needs especially for drum related patches. If you have any questions or remarks please put them in the comments below or post on the special facebook group for this website.













Most Excellent stylings Eddy and Mr. Barton(very cool musical circuits) to boot. You make this stuff look easy my friend, happy new years to ya!
ReplyDeleteThank you very much! Happy new year to you too!
DeleteHi Eddy, a question about the clock divider: are the capacitors used ceramic or smd?I'm new on this and I m just learning :D Thank you
ReplyDeleteThe only capacitors in the module are the ones used with the voltage regulator and they can be ceramic ones, no problem. And there's one 10µF electrolythic capacitor of course.
DeleteThank you Eddy for the answer, one more question: about the electrolythic capacitor of 10µF, since is polarized, the negative leg should be on the 4th row (counting from the bottom)?
ReplyDeleteThank you again Eddy
Yes well noted. I seem to have put it in the wrong way around.
DeleteI have updated the layouts with the correct orientation for the 10µF cap.
DeleteOk, nice! so the negative leg goes on the 5th row from the bottom if I understand correct. Thank you!!!I'm trying to build it (but very slow)
ReplyDeleteYes that is correct. the negative leg always goes to the lowest potential. In this case that is ground, also the middle leg of the voltage regulator. If you have a negative powersupply for instance, then the negative leg of the capacitor would go to the negative voltage and the positive leg would go to ground because ground has a higher potential than negative voltage.
DeleteHere i am again :) for an error I used the 2 resistor 120K instead 1/4W, I used the ones with 1Watt, do you think will it no problem or best to change it?
ReplyDeleteAnother question, with the output you don't connect the resistor 1K, I assume are those connected on stripboard that make the resistence is it correct? and the led (sorry for the question) should I connect first with the negative leg and then positive to ground?
Thank you again
Simone
The watt value of the resistor isn't that important so if you used 1 Watt resistors you can leave them in. They are just a bot bigger than the 1/4 Wat versions. The other question I don't quite understand what you mean. Each output of the clock divider is split into two, with two 1K resistors. One is for the LED and the other one is for the output. Just connect the LED with + (positive) to the stripboard and - (negative) to ground.
DeleteOh nice, yes you answer all my questions, thank you again for your support Eddy!!
ReplyDeleteHi Eddy, Thank you for your site - It's inspired me to make some modules. This is the first module I have made and I have really enjoyed making it, it's taken me quite some time but I've learned a lot. I have used the CD4040 and I used the stripboard layout posted above with a 7808 but I missed the point about inverting the clock with a transistor. Currently I do not have any output on Q1 (pin9) but I do have output on all other outputs - the outputs flip flop on falling edge but I think that's expected. Oddly, although there is no output on Q1 I am getting clock/2 on Q2 (I was expecting that to be on Q1). I've gone over the module time and time testing it and I can't see anything else that could be wrong. I wonder what your thoughts are - Do you think the transistor would solve this issue? Could you advise me how I might insert a transistor into my currently made module (as per stripboard layout for cd4040)? I could always keep it as is and just consider it a design feature on this one if it's going to be tricky now.
ReplyDeleteHi Tom, sorry you're having a bit of trouble with this one. I actually posted that KiCad schematic much later after I made the 4040 layout. I understand the combination of the schematic with the layout can be misleading. I might make a stripboard layout for the KiCad version soon. I think that would be helpful to many.
DeleteTo introduce a transistor into this layout you would need to copy the connections from the KiCad schematic. It's a bit messy this 4040 version. Maybe I shouldn't have added it. Sorry I can't help you with your problem but it's been so long since I built this that I can't really think of a solution for your issue.
I made a layout for you for the 12 stage clock divider. I posted it underneath the KiCad schematic. It's not verified but it's a very simple circuit so not much that can go wrong. I hope it helps you out Tom.
DeleteI should have read it through properly. But I also think I could invert the clock if I were to put a transistor in between the opamp (TL072) and the cock jack (in). As you say, perhaps a bit messy but I think that should have the same result (I'll base the transistor circuit based on your schematic, but instead of the +12v going to the clock in on the CD4040 I'll route it to the TL072.
DeleteOk I hope it works out.
DeleteTom, I think that all you have to do to reverse or invert the clock pulse coming out of pin 1 of the TL072 is to put the top left diode in the other way around. It functions as a rectifier. If you switch the polarity of that diode if will only let through a negative pulse.
Delete