Quad comparator and memory cell


Quad Comparator and Memory Cell
for music synthesizers.

 

This module is the combination of a quad comparator "voting system" and memory cell (flip-flop). It can be built in many ways to suit the builder's needs. For example, if the memory cell functions are not required, they can be omitted. Alternatively, the panel presence of the comparators can be greatly reduced if the memory cell is the primary interest.

The comparator "voting" circuits can be used as OR, AND or 2 of 3, 2 of 4, 3 of 4 etc. type gates, depending on construction. Both positive responding and negative responding inputs are available.

Master AND and OR outputs monitor the four voting circuits. AND goes HIGH when the outputs of all four comparators are HIGH. OR goes HIGH when the output of at least one of the four comparators is HIGH.

The outputs of the four comparators are used to drive the flip-flop memory cell, providing SET, RESET, CLOCK and DATA inputs.

The purpose of the module is to allow the combination of various gate events and CVs to generate responses, rhythms, etc.

When the SET comparator output is HIGH, it will set the Q output (K) of the first Memory cell HIGH.

When the RESET comparator output is HIGH, it will set the Q(inv) output (L) of the first Memory cell HIGH.

Note that when both the SET and RESET comparator outputs are HIGH, both the Q and Q(inv) outputs of the first memory cell will be HIGH. When the inputs change, the memory cell will take on the state of the last of the two inputs to fall LOW.

The memory cell can also be programmed with a two-step procedure. The output state of the DATA comparator will be clocked into the first memory cell when the output of the CLOCK comparator goes from LOW to HIGH. At the same time, the previous state of the first memory cell will be loaded into the second memory cell, the result being available at outputs M and N.

A little on how it works:

The schematic for Quad Comparator and Memory Cell module.


Construction


The component overlay for the VER1.0 PCB. Click here for an enlarged, printable version. Print at 300dpi.

1/8W, 1/4W or small bodied 0.6W resistors may be used. 5% carbon resistors are sufficient, although metal film resistors can be used.

Before you start assembly, check the board for etching faults. Look for any shorts between tracks, or open circuits due to over etching. Take this opportunity to sand the edges of the board if needed, removing any splinters or rough edges.

When you are happy with the printed circuit board, construction can proceed as normal, starting with low profile components such as resistors and diodes first, followed by successively taller components.

Take particular care with the orientation of the polarized components, such as ICs, electrolytics, diodes, and transistors.

When inserting the ICs in their sockets, if used, take care not to accidentally bend any of the pins under the chip. Also, make sure the notch on the chip is aligned with the notch marked on the PCB overlay.

The value of RLED is chosen via experimentation. Take an example of your chosen LED, and connected it via a 1k resistor to your supply voltage (+12V or +15V). For a more accurate test, add a diode in series. Look at the LED. If it dazzles you, you need to increase the value of the resistor. If it is too dark, reduce the resistor. Only old, low mcd LEDs will need a low value resistor. I prefer to use high mcd/super-bright/ultra-bright LEDs with resistors in the range of 10k (for red/amber/yellow) to 33k (for green/blue). Using high mcd/super-bright/ultra-bright LEDs reduces the switching noise placed by the LED on the power rails, reduces power consumption and reduces waste heat.

The unit will run on either +/-12 volts or +/-15 volts. Different values for the RO resistors are recommended for use with the different voltages. For +/-12 volts, use 1k2. For +/-15 volts, use 1k6 or something close to that (1k65, 1k62, 1k5).

The first time you power it up, I would suggest you do so with 22 ohm resistors in series with the positive and negative power rails. This should save the chips if you have made a blunder.

Quad comparator and memory cell

On the rear of the PCB are various surface mount pads. Two under the 4013 are for emergency use, if you find the second cell does not clock properly. In that case, the two pads connected with a short track need to be separated and a resistor (e.g. 10k) needs to be soldered there. The other location is for a capacitor (e.g. 100pF). Keep the relationship between them more or less the same, e.g. 1k : 1n. Increasing either value will improve the clocking at the cost of maximum speed. In all likelihood, this issue will only arrive if you have sub-standard chips.

Other surface mount pads, marked 47k, are used by the balance pots, and only need be installed if you use them, and do not put the resistors directly on the rear of the pots themselves.

The remaining surface mount pads are expansion points for adding more inputs to the voting circuits. If you are going to be adding a lot of extra inputs, it is probably easier just to mount the resistors directly on the panel jacks, and run a single wire back to the board. The wiring guides will show the details.

PAD IDFunction
+VE+ rail for panel use. (connects to bias pot wipers)
-VE- rail for panel use.
0V0 volt rail for panel use. (LED return, sleeve connection on jacks, etc.)
SSet/comp 1 + input
TSet/comp 1 - input
DData/comp 2 + input
EData/comp 2 - input
CClock/comp 3 + input
BClock/comp 3 - input
RReset/comp 4 + input
QReset/comp 4 - input
KLMemory cell 1 Q to LED anode
KOMemory cell 1 Q to output jack
LLMemory cell 1 Q(inv) to LED anode
LOMemory cell 1 Q(inv) to output jack
MLMemory cell 2 Q to LED anode
MOMemory cell 2 Q to output jack
NLMemory cell 2 Q(inv) to LED anode
NOMemory cell 2 Q(inv) to output jack
YLAND to LED anode
YOAND to output jack
ZLOR to LED anode
ZOOR to output jack

There are three of each input available. The inputs are grouped in pairs, the non inverted and inverted inputs for each function being next to each other. The inner pair of each input group (e.g., ST) have the option of adding 47k SMT resistors on the rear, for the use with a bias pot. The bias pot affects both the non inverted and inverted inputs, allowing you to raise the trigger point on one while lowering it on the other. This allows the reduction of the number of pots needed on the front panel, compared with the use of individual pots for each input type. The bias covers the range from around -5V to +15V.

Wiring Quad comparator and memory cell

This diagram shows generic wiring using only provided connection points. The 47k SMD parts MUST be installed for this wiring to work.

Using the PAN121 panel

Panel Quad comparator and memory cell

This optional panel is available. It is made of 0.1" thick fiberglass, and has a ground plane on the front. The rear includes some pads and traces to help with wiring and assembly.

Quad comparator and memory cell

This photo shows the components that are installed on the PCB when building it for use with the PAN121 panel. Note the zero ohm resistors are nothing more than nicely packaged wire links. There are no components installed on the rear of the PCB.

Quad comparator and memory cell

3mm LEDs can be mounted directly on the panel, their own leads supporting them. Form the leads as shown, so the leads are not stressed where they come out of the LED. The LED cathodes go to the pads that are linked to the silver "bezel" around each LED hole. Do not mistakenly fit LEDs to the mounting holes! Do NOT drill out the LED holes to mount larger LEDS as doing so will sever their through-hole connection to the earth plane.

A piece of large diameter heat-shrink tubing or a piece of tape is wrapped around the body of each pot to prevent wires from shorting to their body.

Clippings from component leads are used to connect each jack to their appropriate pad. I folded the tags down on the banana sockets to reduce the required board mounting height.

More wire clippings are used to connect the center (wiper) terminal of the pots to their corresponding pads, as shown. You may wish to insulate these, or use hookup wire.

Quad comparator and memory cell

Resistors are mounted as shown, between the pots, jack and nearby pads.

Quad comparator and memory cell

This is done for the three pots that are in a row.

Quad comparator and memory cell

Note that the wiring for the fourth pot is a little different. The two 47k resistors go to the left, one having to pass over the pot. Insulate the lead of this resistor.

Quad comparator and memory cell

The left image shows the first 47k resistor soldered in. The right image shows the second 47k, and its insulated lead.

Quad comparator and memory cell

Blue jacks indicate an input that responds positively to an input, adding it to the tally for that channel. A different color jack, in this case green, indicate that an input responds negatively, subtracting the input voltage from the tally for that channel. As an individual may wish to use more or less of each type, the panel allows for some variation. A 100k resistor from the jack to the pad on the left side of the jack results in a positive response, a 100k resistor from the jack to the pad on the right results in a negative response.

The bottom-most jacks only have a pad for a negative response, while the top most jacks only have one for a positive response.

Wiring Quad comparator and memory cell

This diagram shows the hook-up wire portion of the wiring for the CGS PCB panel PAN121V1.0. If you are not using PAN121V1.0, you will need to wire directly to the appropriate jacks and LEDs. You may choose to do so, even if using this panel.

Wiring Quad comparator and memory cell

For the remaining eight connections, hookup wire could be used. Alternatively a 0.1" spaced wiring strip would work. Although the wiring strip is shown connecting to the top of the CGS121 PCB, it may be easier to feed it through from the bottom and solder it on the top.

Wiring Quad comparator and memory cell

After soldering it on, the wiring strip needs to be folded away from the edge of the panel. This particular strip is a little too long.

Wiring Quad comparator and memory cell

Completed wiring.

Notes:
  • 330R refers to 330 ohms. 100n = 0.1 uF, etc.
  • The module will work on +/-12 volts or +/-15 volts.
  • PCB info: 6" x 2" with 3mm mounting holes 0.15" in from the edges.
  • Please e-mail me if you find any errors.

Parts list for PCB used without PAN121

Resistors
1k10
39k1
47k1
47k 1206 SMT8
100k Lin pot4
100k29
4M78
RO (1k2 or 1k6 see text)10
RLED (pick to suit LED)10
Capacitors
100nF (=0.1uF) Ceramic Monolithic5
10uF electrolytic2
Semi's
1N414813
BC547 or sim10
4013 (CD, HEF, MC1)1
TL0741
Misc.
Ferrite Bead2
MTA-156 connector 4Pin1
MTA-156 header 4Pin1
CGS121 VER1.0 PCB1

Parts list for full module using PAN121

Resistors
1k10
39k1
47k9
100k Lin pot4
100k31
4M78
RO (1k2 or 1k6 see text)10
RLED (pick to suit LED)10
Capacitors
100nF (=0.1uF) Ceramic Monolithic5
10uF electrolytic2
Semi's
1N414813
BC547 or sim10
4013 (CD, HEF, MC1)1
TL0741
3mm LED10
Misc.
Ferrite Bead2
Hook-up wire
8-pin ribbon cable jumper (1.5" to 2.0") (e.g.)1
Blue banana jack (Emerson)10
Red banana jack (Emerson)10
Alt color banana jack (Emerson)8
Davies 1900h knobs4
20mm long 3mm standoff4
30mm long 3mm bolt4
3mm nut8
MTA-156 connector 4Pin1
MTA-156 header 4Pin1
CGS121 VER1.0 PCB1
PAN121 VER1.0 PCB1

Parts list

This is a guide only. Parts needed will vary with individual constructor's needs.

If anyone is interested in buying these boards, please check the PCBs for Sale page to see if I have any in stock.

Can't find the parts? See the parts FAQ to see if I've already answered the question. Also see the CGS Synth discussion group.


 

Article, art & design copyright 2013 by Ken Stone

Modular Synth Home

Disclaimer