Maker Pro
Maker Pro

help designing simple 4022 circuit

Hi,

I am just trying to design a very simple CV sequencer using a 4022 chip, but would like some advice on how to proceed.

What i want to make is a very simple 8 step sequencer that outputs a voltage between 0 and 5 VDC, controlled by a pot for each pin, with a switch to disable each step.

I have an external clock source already, so i dont need to worry about that, just need to work out the best way of taking the output from the 4022 and turning it into a +5V-0 CV signal (doesnt have to be super accurate)

My understanding of the way the 4022 works (and correct me if i am wrong) is that with every clock pulse, each of the output pins goes to 5V+ sequentially, returning to 0 once pin 7 has gone high.

With that in mind, here is the first design i had:

Zq9Eczw.jpg


I have only shown the parts coming from pin 1, the LED, switch and pot will be repeated for all the other pins, but this is just for illustrations sake..

will this work? my idea is that the pot acts as a voltage divider, and outputs between 0 and +5V to the CV out. Will it work in that position, or should it be between the LED and the 4022 pin so that when the rest of the pins are connected in the same way, their pots aren't connected?

My second idea is if the signal from the 4022 is not appropriate to use directly as CV:

jFhn29D.jpg


here i just use the signal from the 4022 to trigger an NPN transistor, which lets the 5V+ through and then the pot is once again used as a voltage divider to give a 0-5V+ CV signal..

would it work like this? should i have the switch where it is, or would it be better before or after the transistor on the +5V line?

Also, for both of them, is it okay to connect the wiper from all of the pots to the same CV out jack? or should there be a diode somewhere stopping the current going back through?

sorry for all these, probably very basic, questions. I have a very basic knowledge of electronics and am just trying to piece things together myself..

If anyone has any advice i would be greatly appreciative, or any ideas as to how to do it better...

thanks
 

hevans1944

Hop - AC8NS
The 4022 counter/decoder is a CMOS device with very limited output current capability. It should not be used to directly drive an LED. The resistance of the potentiometer in your first circuit is in series with the LED and if of sufficiently high value to limit the current through it to 1.5 mA (maxium output current rating) will result in a very dimly illuminated LED.

Your second version is only somewhat better, but you are still trying to drive the LED with a 4022 CMOS output. Also, with the base of the NPN floating when the switch is open, the NPN may not go fully into cutoff. I think I would substitute an N-channel MOSFET and move the switch and LED into the drain of the MOSFET, connecting them between +Vcc and the drain. Connect the 4022 output directly to the gate. Connect the potentiometer between the source terminal and logic common. The potentiometer will need to be low enough in resistance to allow illumination of the LED, probably something less than 1000 ohms.

Do not tie all the potentiometer output wipers together, even though only one output will be active at any given time. You can try isolating each wiper with a small signal diode, but this will introduce a one diode forward voltage drop, an offset, in their output voltages.

It would be better if you describe what you are trying to do, rather than propose your "solution" of how to do it. You have provided no information about how you will supply clock pulses to the 4022 or how fast the clock pulses will occur.
 
Hi, and thanks for your quick reply!

What i am trying to do is make a simple 8 step sequencer that can output 8 different control voltages in the range 0-5VDC.

The clock signal input is a square wave (0-5V) taken from the modulation generator of a korg MS20 mini synthesiser and will be in the range of around 1Hz to about 20Hz or so.

The aim is, with each step, to send a control voltage which is regulated by a potentiometer to a single output jack. I would also like to be able to disable each step with a switch.

The output is going to be used to drive either a VCO or VCF on the ms20 mini, which take a control voltage of 0-5VDC.

All 5VDC is coming from a 7805 circuit.

Is that enough information? Sorry for not giving better details before.

My (evidently very flawed) ideas were based on this circuit for a light chaser circuit using the 4022:

590-1269978501-86c43865787c09c61a51ac3973318273.gif


But like i said, my knowledge of electonics is not very deep so i was just trying to hobble together something based on what i already knew.

If you have any ideas i would be very happy to hear them..
 

hevans1944

Hop - AC8NS
@guskenny83 your circuits are substantially different from the one you show in post #3. However, I consulted with my son, who is also an electrical engineer, and he said that your circuit will work if high-efficiency LEDs are used. That is, even at low currents, the LEDs should still be visibly illuminated. Note that in your light chaser circuit the LED cathodes are all connected together to a constant-current load (LM317T) that provides about 1 mA of LED current. Depending on the LED forward voltage drop and the supply voltage (nominally 5 V) this represents a low-value effective series current-limiting resistor. For example, if the LED forward voltage is one volt at one milliampere with a five volt supply, then the effective series resistance presented by the LM317T is 4/0.001 = 4 kΩ.

Replacing the LM317T with eight 4 kΩ (or larger value) potentiometers would be okay, but connecting the wipers together would be a disaster because the settings would interact. Use eight small-signal diodes (such as 1N4148 or 1N914) to isolate the individual wiper CV outputs to your synth. Connect diode anode to the wiper and take CV output from the cathodes, which you can connect together. If you are driving a fairly high impedance VCO or VCF input, there should be negligible voltage drop across the diode. If the potentiometer resistance is too high, the LEDs will not be as bright.

The location of your switches is okay. The transistor "driver" is not necessary at the low currents used by your circuit.

Bottom line: your original circuit is fine if you (1) limit the minimum potentiometer resistance to about 4 kΩ and (2) isolate each wiper with a small-signal diode. I think 5 kΩ pots are more readily available than 4 kΩ pots, but going up to very common 10 kΩ pots may result in unacceptably low intensity from the LEDs.

I am sorry I made this appear more complicated than necessary. Your instincts were correct, except for connecting the pot wipers together.

Instead of using a counter/decoder, you might instead consider using eight Arduino Uno digital outputs. A small program can cycle through each of the eight outputs at a rate that you can select or program, enabling or disabling them as required. That will allow you to eliminate the "disabling" switches, unless you want to re-purpose them as program inputs to eight (or more) digital input ports. Then you can play with things in software by reading in the switch states (on or off) without having to re-wire hardware if your needs change. You could, for example, connect a pot to an Arduino analog-to-digital input and read the voltage from its wiper to programmatically set the "scan speed" or some other parameter. The possibilities are virtually endless for combining a traditional analog synth with modern digital controls. And Arduinos are inexpensive and run off of five volts.

Have fun and let us know how your project turns out!

Hop
 
Last edited:
Thanks everyone for all your help and advice.

Further digging has given me this circuit, which i think is exactly what i am after:

schematic.jpg


it seems to be pretty consistent with all the advice you have given me. It uses 1N914 signal diodes after the wipers as well. I will just remove the individual pulse outs as i have no use for them.

Vcc for this circuit is 15V, and i have access to a good, regulated 14.5VDC rail from the synth, so that should be fine i think.

Where i put the switches will depend on whether i want the LED to be on when the step is disabled wont it? So if i put the switch in before the split to the potentiometer, nothing will work when it is open, but if i put it after the split the LED will still light even tho no signal will come from CV? Will this make the LED brighter though as the current is only going through the LED circuit? Or will the LED only draw what it needs?

The reason i dont want to use an arduino is that i want to put this inside the synth and i have limited space. Also it is a learning exercise to try and understand the electronics a bit better.

Thanks again for all of your help and advice!
 
Put a 5.1V zener to ground on the analogue output as a safety measure

There is a single output jack, so you mean just put the diode across the jack? Is that to limit the CV out to 5v?

Which direction? So that the flow direction is ground to out and then will go the other way over 5V?
 

hevans1944

Hop - AC8NS
1.25V/120Ω ~= 10mA Not told what Vcc is but it would have to be ~ 10V
2mA leds are available.
Damn. I knew I should have used a calculator for this! Good catch, @dorke. The OP is going to use +15 VDC for Vcc, so plenty of head-room available for the LM317, but 10 mA still exceeds the 4022 maximum source/sink spec of ±1.5 mA. Oh, well, it may still work since we don't really care if logic-level outputs are preserved.

Yes. And if you connect the leds directly to the outputs and the cathodes in parallel you will only need one current limiting resistor.
http://www.vishay.com/leds/low-current/
Or use the LM317 connected as a constant-current load, although one resistor does appear to be the simplest solution.

@guskenny83 I would place the switches in series with the outputs of the 4022, so an open switch disables both that potentiometer output and the associated LED.

Or will the LED only draw what it needs?
[begin rant] No electronic component ever "wants" or "needs" to do anything. Components are dumb pieces of plastic, silicon, or whatever that (mostly) behave according to well-known circuit theory principles (Ohm's Law, Kirchoff's Laws, Murphy's Law, etc.). It is a huge mistake to think that current "wants" to flow. It is what it is, and it does what it does. It is we humans who have "wants," not circuits. [/end rant on anthropomorphic electronics]
 
Components are dumb pieces of plastic, silicon, or whatever that (mostly) behave according to well-known circuit theory principles (Ohm's Law, Kirchoff's Laws, Murphy's Law, etc.).

Yep,
Most of all that annoying guy Murphy: "always right"/"I told you so" etc.
He sticks his nose in every damn business ,as if it was is own...o_O

Seriously,
everything ,but everything ,obeys the 4 overwhelming Maxwell's Equations.
Absolutely the 4 pillars of our trade:)
 

hevans1944

Hop - AC8NS
Years ago, when I was just starting my formal education in electrical engineering, a co-worker demonstrated to me that Maxwell's Equations applied to everything electrical and electronic... current flow in wires, electrons in vacuum tubes, current carriers in semiconductors, you name it. The Magic Equations will always provide a rigorous and correct solution if you truly understand them. They are not just for electromagnetic radiation calculations; Maxwell's Equations describe the reality of anything electric or magnetic. But most of the time I just simplify my life with Ohm's Law and Kirchoff's Laws for circuit design and analysis.

Yeah, I know there are competing "theories" out there claiming Maxwell's Equations were truncated by Oliver Heaviside to allow a simple vector calculus instead of Maxwell's original quaternion field equations, the claim being that the Heaviside's truncation threw out the baby with the bath water and we should not use "circuits" that blah, blah, blah (wave hands here) prevent us from obtaining unlimited power from the vacuum that surrounds everything. Well, I'm not from Missouri, but I say "Show me." Until that happens, I will continue to use the electrical engineering principles I was taught in school.

Thanks for reminding me, @dorke, on what we base electrical engineering. And as for Murphy... my experience over the past fifty-something years is that Murphy was an optimist.

Hop
 

hevans1944

Hop - AC8NS
There is a single output jack, so you mean just put the diode across the jack? Is that to limit the CV out to 5v?

Which direction? So that the flow direction is ground to out and then will go the other way over 5V?
Zener cathode connects to output. Zener anode connects to ground.
 
Hop,
When you ask an Electronics Engineering student:
what is the most difficult course you took ?
the answer will most probably be "electromagnetic fields"...

When dealing with "lumped circuits" we are lucky enough to use the basic circuit theory tools.

"my experience over the past fifty-something years is that Murphy was an optimist."
Maybe so,but that devil always slept with one eye open...:(
 
everything ,but everything ,obeys the 4 overwhelming Maxwell's Equations.
Absolutely the 4 pillars of our trade:)

What about his other 8 equations?

Also, all of he above schematics have at least one diode structure between the CMOS output and the CV output. This means that the maximum output voltage will be less than 4.4 V, and in one case less than 2.6 V.

ak
 
Also, all of he above schematics have at least one diode structure between the CMOS output and the CV output. This means that the maximum output voltage will be less than 4.4 V, and in one case less than 2.6 V.
ak

You are assuming VCC of 5V.
But the CD4000 series can operate between 3-18V ,so the diode drop can be cannceld out entierly(say at vcc=5.7v or about).
BTW,The last schematics is the one the OP chose to implement.
 
Top