Showing posts with label Boolian & Binary Logic. Show all posts
Showing posts with label Boolian & Binary Logic. Show all posts

Friday, 16 February 2024

NLC - This 2 shall pass - passive analogue XOR - build notes


These are my build notes for the Nonlinear Circuits "This 2 shall pass" module
It's a eurorack format 2HP module.


Should be a simple build ... It's a passive analogue XOR circuit

No CMOS ... which is different & nice to see.
How to build a logic gate with transistors is a basic circuit which is a handy piece of knowledge.



There are 2 ways to use this:
1. If you want to get close to XOR behaviour, use the top and bottom inputs, leave the middle one empty. 
2. if you want a voltage controlled “XOR”  feed your signals to the top and bottom
     inputs and a CV signal to the middle input.



Feed it anything: CV, audio rate, gates, mix them up. Generally with audio signals it sounds like a Ring Modulator, adding CV to the middle input (but feel free to experiment) it sounds like a VC Ring Modulator.

Links
+ BOM

XOR Gate (Exclusive OR gate)
Will only output a high signal when one input is high and the other is low.
It allows the signals to pass Except when they happen simultaneously.
It's like when 2 people try to squeeze through a narrow door at the same time.
(use this for your two snare drums - to prevent them triggering simultaneously)




 In1 In2 Out
 0         0 0
01 1
 1 0 1
 1 1 0


......
Parts:
1k 2 0805
4k7 6 aka 4.7k 0805
22k 2 0805
BC847 6 sot23-3
3.5MM SOCKET 8 Tayda: A-2563



The red tape is to prevent any shorts



----------------------------------------------------------------------------------
You can find more NLC builds here.
--------------------------------------------------------------------------------------

Friday, 3 July 2020

Synthesizer Logic Modules - The 7 gates

Logic gates are great ways to create interesting rhythms or combine triggers from various sequencers.
Recently I've been using them to trigger drum modules.
Some logic gates also work at audio ranges.
There are 7 basic gates: OR, XOR, AND, NOT (inverter), NOR, XNOR, & NAND.

To make things even simplier, the 3 basic fundamental gates are OR, XOR, AND.
They use the inverter (NOT) to make NOR, XNOR, & NAND.
 
One final grouping of gates is what is known as Universal Gates
A universal gate is a gate which can implement any Boolean function without need
to use any other gate type.  
The NAND and NOR gates are universal gates.
These 2 gates are the basic gates used in all IC digital logic families. 

--------------------


OR gates
Output a high signal whenever one or more of its inputs are high.
Useful if you wish to combine several gate signals into one.

You can use this instead of a mixer or multiple.




 In1 In2 Out
 0         0 0
 1 0 1
 0 1 1
 1 1 1


XOR Gate (Exclusive OR gate)
Will only output a high signal when one input is high and the other is low.
It allows the signals to pass Except when they happen simultaneously.
It's like when 2 people try to squeeze through a narrow door at the same time.
(use this for your two snare drums - to prevent them triggering simultaneously)




 In1 In2 Out
 0         0 0
01 1
 1 0 1
 1 1 0

AND gate
Outs a high signal when all its inputs are high.
(If only one input is high it will output a low signal)




 In1 In2 Out
 0         0 0
 1 0 0
 0 1 0
 1 1 1


NOT gate
The above 3 gates are available as inverted versions (N = not):




 In Out
 1 0
 0 1


OR -----> NOR
XOR -----> XNOR
AND-------> NAND

NOR Gate
This is a OR gate followed by and inverter.
This is quite a useful gate to have, as it's possible to build the other basic logic gates
using only NOR gates.




 In1 In2 Out
 0         01
 0 1 0
 1 0 0
 1 1 0

Its output is "true" if both inputs are "false." Otherwise, the output is "false."

XNOR
This is a XOR gate followed by an inverter




 In1 In2 Out
 0         01
 0 1 0
 1 0 0
 1 1 1


NAND Gate
This is a AND gate followed by an inverter




 In1 In2 Out
 0         0 1
 0 1 1
 1 0 1
 1 1 0

-----------------------------------------------------------------------

For most Eurorack modules:
Low signal = 0V to 1V (usually)
High signal = greater than 1V to 5V (Usually)

Many logic modules respond to continuous CVs like LFOs .
They are reading the CV as a high gate when it exceeds 1V (usually) and a low gate when it is below.
So they can be used as comparators with a fixed threshold.

The logic synth modules you can buy or build will either use discrete diodes, transistors & resistors,
or use integrated circuit chips. TTL and CMOS are the most common types of ICs.
TTL IC’s may often be labeled as the 7400 series.
CMOS ICs are commonly marked as 4000 series.


Eurorack Logic Modules
+ Elby ED132 - Boolean Logic (Also a Serge Version)
+ Erica Synths - Pico Logic
+ Mystic Circuits ANA
+ Intellijel OR, Plog, Spock , uMod II
+ AniModule  LogicOgic, XX_OR
+ 2HP - Logic
+ Mutable Instruments - Kinks (OR & AND gate)
+ Doepfer A-166 (Dual Logic Module) .... AND, OR & NOR, plus two inverters.
+ NLC - Bools, Neuron, Chopper, 8 bit cypher,
+ CGS Funky Drummer
+ CGS Boolean Logic
+ EMW Logic 101, Logic 202
+Wiard /Malekko - JAG
+ Snazzy FX Ardcore
+ Synthrotek - Either-OR Eurorack OR Module
+ Pittsburgh Modular - Logic Banks
+ Analog Ordnance - Logiplex, OR gate,
+ Ladik B-010 Bool2, B-020 Bool3,
+ Circuit Abbey - ANDY, ORY, XORY, VERTY
+ Synth Cube Dual Logic
+ LZX - Castle 100, Castle 101
+ Pulp Logic (1U tiles) -Logical AND, OR, Diode-OR, XOR


Plog - Intelligel
This has AND, OR, NOR, XOR, NAND, and XNOR gates
RYO
NOT, XNOR, NOR, OR, NAND, AND


Links

Monday, 15 July 2019

The Apollo guidance computer & the NOR gate

If you are familar with modular synthesizers, you will probably be aware of logic gates.
But did you know of their connection to the Apollo mission to the moon?
It's nearly 50 years since those heady days.
Apollo changed our lives in so many ways & the technology used then, permeates our society to this day.

Above is a pic of the AGC - The Apollo guidance computer.
 (The original uploader was Grabert at German Wikipedia. [Public domain])
 
This was the computer that took those 3 men to the moon and back. In addition, it was one of the first computers to use integrated circuits (ICs). The AGC was in fact the world's first "embedded system".

Today ICs are everywhere. But back in the late 1960's they were a revolution 
NASA's goal was to use components that were low weight, had low volume & operated on low power. Coupled with this, they had to be extremely reliable.
With these goals in mind they decided to use a single simple integrated circuit for all logic functions.


Since just one chip was used, NASA could really test it under whatever extreme conditions it liked.... to make sure that it could survive everything which space travel could throw at it.
AGC dual 3-input NOR gate

  This single chip contained a three input NOR Gate. It's incredible to think that it's possible to carry out all logic functions to take men to the moon with just a NOR gate. 
  This gate gives a positive output only when both inputs are negative.


The beauty of the NOR gate, is that it is what is known as a universal gate.
In other words, it can be combined with itself to make any other  kind of logic gate

For example a NOT gate can be made by joining the inputs of the NOR gate.
 
The OR gate can be made by inverting the output of a NOR gate.

 The AND gate is made by inverting the inputs of a NOR gate.

 We can go on and on, but I think you get the idea.
The AGC dual 3-input NOR gate schematic

The above schematic shows the makeup of the NOR gates using discrete transistors.
They are just really simple NPN/resistor designs.
You could possibly build this using any NPN type transistor (for example 2N3904, BC547, BC548, BC549 etc.)
 The use of transistors for the construction of logic gates uses their ability to act as fast switches.

 NASA used about 5,600 NOR ICs in total for the later AGC versions. 

Getting back to synths, the 4001 IC is  a useful chip to have in your bag.
It's a CMOS IC containing four NOR gates

So in theory, you can build any logic module with just CD4001s

Below is a Serge module... one of my favorite Synth logic modules.
At first glance, there doesn't seem to be a NOR gate.
 AND: Output goes "high" when all inputs are "high".
 OR: Output goes "high" when at least one input is "high".
 XOR: Output goes "high" when a odd number of inputs is "high" and the rest is "low".

The logic inverters can change the functions into NAND, NOR and NEXOR.
 Note: a logic inverter turns a "0" into a "1" or a 1 into a zero
 It inverts the logic state, not the voltage value (i.e. +10V will not turn into -10V).

Links.
+ Schematics of the AGC
+ Ljunggren Audio
+ The Boolean Serge
+ CGS 39 - Ken Stone's Quad logic gate
+ Talking electronics - about the CD 4001
+ About CMOS
+ Pittsburghmodular logic banks
+ Transistors - basic info
+ Making logic gates from transistors

Sunday, 14 July 2019

Mahamudra 14

New Sound Waves are hosting a night of Modular Electronic Music this coming Wednesday.


Location: The Hideaway Bar.
                 156 Enmore Road, Enmore (Sydney)
Starts at 7.00 pm

Facebook link:
https://www.facebook.com/events/2349710731937070/

Performers:
7:15 Hunter 
7:45 Vitals 
8:20 ECHO.8OT
9:00 Virus Installer 
9:40 Allinaire 
10:15 Slit Sensilla 
10: 45 Post Global Disorder

Friday, 28 June 2019

Waveshapers

This is a bit of basic Synthesis... I'm writing this for a friend who is starting his journey.
All about wavefolders, wave multipliers, transfer functions etc etc.
You will see wave shapers in a lot of "west Coast" synths. Serge & Don Buchla used them extensively.

'''
The Serge TWS and WM are classic waveshaping modules.

Wave shaping is one of the fundamental parts of oscillator designs as well as being one way to achieve distortion and design new waveforms from existing waveforms. When building a oscillator core, often waveshapers are used to derive additional waveforms from a single saw or triangle core.
+ Oscillator cores & Exponential Converters

The timbre circuit from the Buchla 259 is another example of the early use of waveshapers.

I understand that Don's Harmonic Oscillator from the Buchla 100 series used waveshapers to add harmonics to the core oscillator. 
 There are lots of modern manufacturers of waveshaping modules in many formats.

Basically waveshapers map the input and the output of the waveform. They then apply a mathematical equation to that waveform (commonly known as the “shaping or transfer function”) that alters it's final shape.

If the original input signal is called x and the new output signal  is called y.
This function is called the transfer function.
y = f(x)

This is a really simple function but the basic idea is the same no matter how complicated things get.
 
The transfer function can be done either the old fashioned analog way with op-amps, diodes, etc or digitally where "look up tables" are implemented.

Don Buchla used both digital & analog waveshapers.
His Touche from 1978 had digital waveshaping. It had 16 digital oscillators that could be combined into eight voices.

Grant Richter used waveshapers in his Anti-osc & the Mega wave
The Malekko/Wiard Anti-osc is a triangle-core oscillator with voltage-controllable waveshaping.


The Megawave can be used as an audio wave shaper

To be continued ............

Canberra - NGA - Monet exhibition

If you have a chance to visit Canberra over the next few weeks, don't miss the Monet exhibition
https://nga.gov.au/impressionsunrise/

In addition to seeing this master of impressionism, there are also lots of Turners and the odd Whistler.
Well worth it.

Monet's "Sunrise" is there.
This is the painting that is credited with inspiring the name of the Impressionist movement

I've only ever seen this in text books. I don't think it leaves France very often.

There are lots of his water lilies paintings


and the Japanese bridge from his garden in Giverney



For me, the highlight were the Turners.
I love that guy !






Tuesday, 18 June 2019

Build a Better Music Synthesizer - Thomas Henry

A plug for great book.
If you can find this book, it's well worth it.
I'm lucky to find a first edition is mint condition.





Links
+ Wiki

Oscillator Cores & Exponential Converters

A bit about Oscillator Cores.... they are one of the building blocks of VCOs

VCOs have 3 main parts :
1.The core/cores
2.The waveshapers
3.The exponential converter

This page is mostly about the core (though I'll touch briefly on the other two).
When I first started out, I though that the waveforms in most analog modular VCOs were produced independently. This however is very far from the truth.


Most VCOs derive their multiple waveforms from just 1 main waveform known as the oscillator core.
The other waveforms such as sine and square are usually produced using waveshapers.
Whenever you buy a VCO, most manufacturers will describe their oscillator as having one core or another.

There are 2 main waveforms used: triangle and sawtooth.
They are produced differently and both have their strengths and weaknesses.

They  both use what are called integrating capacitors.

The simpliest waveform core is the sawtooth.... and thus seems to be more common.
It works on the principle that capacitors store charge. They fill up with charge until a reset voltage is reached. The rate at which the capacitor charges up is determined by the input voltage. (ie it's voltage controlled) ... this rate of charge/discharge is the frequency of the oscillator.

The triangle waveform is a bit more difficult to make as a core.
Instead of the charging/discharging of the capacitor, we have a change in direction of the current.

Both cores have a timing mechanism that resets the waveform back to its starting point by discharging the capacitor. (Then the cycle starts again).

The timing mechanism is usually a comparator. When the waveform exceeds a reference voltage the comparator triggers and the waveform resets.
The retrigger mechanism can be something like a transistor. If it is a digital timer then the oscillator is what is referred to as a digitally controlled oscillator... DCO,  instead of a VCO (Voltage controlled oscillator)

VCOs that have two cores are very rare. The most obvious is that of the ARP 2500

The 1004 has both triangle and sawtooth cores.
Both cores use a single reset mechanism.

The later ARP 2600 used 4027 & 4027-1 VCO submodules. These had a 10 Vpp sawtooth output.

The Buchla 158 Dual Sine-Sawtooth Generator  and the 144 Dual Square Wave Generator both use a sawtooth core. 
The later Buchla 258 was a triangle core dual oscillator. The 259 is also a triangle as far as I know.
The modern Buchla 261e breaks the mold ...it has a digital sine wave core. ( but the timbre section is analog).
The Roland SH-101, Oberheim Ob-Xa and Moog Memorymoog all use a Curtis CEM3340 chip.
This is a triangular core.
The Yamaha CS series VCOs use a sawtooth core oscillator.
The very early descrete component (no ICs) RA Minimoog VCOs (of which I understand only 300 exist)
used a sawtooth core.


-----------------
The exponential converter converts a linear control voltage into a exponential current.
Why is this needed at all ??? 
It's needed because most human senses (including hearing) are logarithmic

The exponential converter helps the oscillator core create a waveform that has a frequency logarithmically proportional to the input current. These converters are very very temperature sensitive.
This is a picture of the exponential converters of the 1004 VCO. It's part of an ARP 2500.
The 4001was an encapsulated NPN based current generator. 
The 4002 was PNP based.
The circuit boards were enclosed inside a plastic case which was filled with an epoxy potting compound.
This case helped stablise the VCO tracking of the 2500 but also made any future repairs very difficult.

The most basic type of exponential converter uses a bipolar junction transistor. (BJT).
and maybe some voltage dividers and a tempco.
The NPN type seems most popular. (though you can use a PNP).
For a single transistor, there is a  exponential relationship between the Vbe and Ic
(voltage between the base/emitter & collector current).
Here is the equation:
 
 This all looks pretty straightforward except for the problem of temperature.
The collector leakage current is influenced by temperature so in order to maintain accuracy we must keep the transistor at a constant temperature.

If your VCO uses a 1V/oct tuning, then any 1V increase, must double the VCO's frequency.

Of course not all synths use logarithmic voltage control.
Korg and Yamaha use linear voltage control (often called Hz/volt).
Here, the frequency is directly proportional to the input voltage and there is less of a need for exponential converters.

Links
+ A bit about Transistors
+ Waveshapers