BMC040 dual logic CV mod

I was recently building a dual logic module by Barton, BMC040 Dual Logic. This module offers two 2-in-1-out logic gates with a knob for adjusting the logic gate type (AND/NAND/OR/NOR/XOR/XNOR). I realised it’s adjustable logic gate type is implemented as a analog voltage being read by a PIC.

Here’s the original circuit:

(non-orthogonal lines in a schematic should be illegal, but that’s a different story…)

Notice how L1 and L2, the potentiometers setting the gate type, are just voltage dividers between GND and 5V. This got me thinking, I could add voltage control to this and make the module 100x more versatile. And while I’m at it, I’d like to add some visual feedback on the selected gate type.

So this is what I came up with:

The CV input is just a simple sum of a CV with an input attenuator and a manual setting. The ‘Mod connector’ will connect in place of potentiometers L1 and L2 (I’ll build the whole circuit twice). The indicator leds are a bit of my improvisation…

The idea is a ladder of comparators dividing the 0-5 rails in 6 equal parts (corresponding with the 6 gate types). All opamps referencd below the CV will be driven high, the ones above CV will be driven low, meaning that exactly one LED will light up.

I have googled, but I have no idea what this type of arrangement is called. Does anyone here know? Or do you maybe know a simpler way to implement this (perhaps with discrete transistors?)



This is a very interesting idea actually, a voltage controllable gate type could make some insane distortions at audio rate CV. Never seen a module do that before, not even in VCV Rack. Keeping an eye on this.


You don’t want your comparators to have 6 equal intervals.
Assuming the 6 “exact” values for setting a gate type are 0,1,2,3,4,5V.
You want to “switch” at 0.5V, 1.5V, 2.5V, 3.5V, 4.5V
The intervals are 0.5V, 1V, 1V, 1V, 1V, 0.5V.
Just replace the two extreme 10K resistors with 5K.

Now, this doesn’t ENSURE the LEDs will reflect perfectly the gate type when the CV is close to one of the switching points, as the PIC may switch on a bit lower or higher voltage than the ladder.

1 Like

Be careful with your non-inverting summer - it’s not quite as linear as the inverting version - the overall gain is going to depend on where each input is.

There are some ICs that look similar to what you want, with more steps and either linear or logarithmic response - check out LM3914 and LM3915.


1 Like

Yes, I still have to reverse-engineer what those switching points exactly are. I now assumed the 5v range is divided into 6 equal parts, but it might also be like you said, using the two extremes as switching points. Maybe I’ll just send Michael an email to ask. Thanks!

You are right, it’s not ideal. But it saved me using 2 quad opamps, and I figured it wasn’t going to be precision part anyway.

About the ICs, cool! This is the type of stuff I’ve been looking for, but couldn’t find. Now you say it, I recall Electric Druid makes something similar. Too bad it’s 10 sigments, but I guess I can adjust the supply voltage to match the desired interval.

I’d just take an Arduino and program it to also drive the LED bars…
You’ll need per channel/total:

  • 1/2 analog IN for selecting the modes
  • 2/4 digital IN for the inputs
  • 1/2 digital OUT for the outputs
  • 3/6 pins for the LEDs
    (To drive one LED among 6 you only need 3 pins ! Charlieplexing - Wikipedia)
    You’ll have pins to spare and save all the OpAmps from the ladders.

Hum, that’s 7 pins per channel, you should be able to squeeze three channels in an Arduino Nano…


Well yeah, that’s a completely viable option, but I have the Barton boards here now, so might as well use them. Using an Arduino will also require input and output buffering, so similar amounts of effort :wink:

1 Like

You won’t need any buffer for the LEDs (in fact, you CAN’T use any buffer for the LEDs as Charlieplexing relies on the three-state mode of the pins).
So you just need to buffer the 4 inputs, 2 outputs, and buffer/sum the CV and pot.
You can use inverting summers, and interpret the values as you like in the code.
That sums up to a Nano and 2x TL074.

By the way, you can use an inverting summer in your design too, who cares if AND is at 0V or 5V ?

If you already have Barton’s boards, build them as intended, and make a CV controllable one with a Nano so we can get another module :slight_smile:


I’d suggest using MCP600x for the analog inputs for input protection. And discrete transistor buffers on the outputs.

True, just seemed to make more sense to me to start with the AND vs XNOR :wink:

Aaah hahah, so that’s what this is about! :joy: I’ll add it to the list haha


For the PIC’s input protection, you mean? But the MCP600x is limited to VSS – 1.0V to VDD + 1.0V, so it needs input protection too. Add a couple Schottkys to GND and +5V (after the summing resistors).

You must have missed where @eric said

Clearly he’s volunteering! :laughing:


OK, I take the challenge :slight_smile:
I don’t have much time, but I’ll try to find enough time.
There isn’t much hardware design to do, just pick the input/output from Barton’s design, pick the CV input buffer/summer from another design, and then start coding…


Ah yes, you’re right. Hadn’t thought of that, guess it’s another downside of the noninverting summer. I’ll stick on some schottkys, thanks!

I’m wondering, though, about inverting summers. Steady state voltage on the pins is zero but if you slam it with -12 V it takes a certain amount of time to restore to zero. Too short a time to matter? Seems likely but… I don’t know for sure.

Must say I’ve never seen any input protection on them, so indeed seems unlikely. I’m unsure of the exact inner structure of the opamp and what part would be in risk of damage, but perhaps the decoupling cap will also ease that blow a bit. Still, would be interesting to find out.

This discussion Input protection, using the example of MI Rings - MOD WIGGLER seems to agree (sort of) with that, though its authoritativeness isn’t clear. Well, if you have a large enough input voltage, depending on gain, you start driving the inverting input away from 0 V. Discussion says there’s an internal diode to protect against negative overvoltage and positive overvoltage is less likely.

1 Like

OK, so I started picking schematics parts here and there to assemble a schematic…

On the pots of BMC40, there are 100nF caps, I’ve never seen this used on an Arduino, is it a PIC thing or simply good practice ?

There are also 100K resistors on the inputs to ground.
What is “better”, this or normaling the input jacks to ground, and why (pro/cons) ?

Thank you.
Because I added an OpAmp summing buffer on the analog inputs, I guess, with its low output impedance, that the caps are useless…

Without those resistors the input impedance of the module would be that of the TL074 non inverting input, very high. The resistors to ground reduce the input impedance to 100k which is the value typical of and more or less assumed for synth modules. I’m not at all an expert on this but my understanding is that higher impedance brings higher noise.