Saturday, 27 July 2019

Basic op-amp circuits

Just refreshing my rusty memory.
This might help newbies to electronics as well.
I'll add to this page over time.....

Op-amps are used a lot in electronics so I decided to list some of the most common op-amp circuits that I've seen again and again while building & repairing synthesizers.
If I have made any mistakes or omissions please let me know.

The name op-amp uses the word "operational" .... because they were first developed to do mathematical operations in early analog computers.

 1.Voltage comparator

 This circuit compares two input voltages and lets you know which is greater.
 V2>V1 if Vout = +V
 V2<V1 if Vout = -V

The output voltages are driven by supply voltages (+V or -V).
So if the op-amp comparator is driven by the positive supply voltage, then V2 will be greater than V1.
and
if the op-amp comparator is driven by the negative supply voltage, then V2 will be less than V1.

2. Voltage follower
This is also called a unity-gain amplifier, a buffer amplifier, an impedance buffer, and an isolation amplifier.
It's is a great way to stop one circuit from affecting another.
is a great way to stop one circuit from affecting another

Reference https://www.physicsforums.com/threads/whats-the-advantage-of-using-a-voltage-buffer-amplifier.954034/
is a great way to stop one circuit from affecting another

Reference https://www.physicsforums.com/threads/whats-the-advantage-of-using-a-voltage-buffer-amplifier.954034/
is a great way to stop one circuit from affecting another

Reference https://www.physicsforums.com/threads/whats-the-advantage-of-using-a-voltage-buffer-amplifier.954034/
It has a voltage gain of 1.
Basically, the inverting input is connected to the output.


Vin = V out

3. Inverting op-amp
Here the output signal will be 180 degrees out of phase to input signal.


Notice the non-inverting (+ve) input is grounded and the feedback resistor connects to the inverting input.
Vout  = Vin* (R2)/R1

4. Non-inverting op-amp
Here the output is in phase with the input. (eg if the input is  a positive voltage, then the output will also be positive.)

Notice that the inverting input is grounded.
Vout = (1 + R1/R2)Vin


5. Non-inverting summing op-amp
Summing amplifiers are also known a voltage adders.
This is pretty much the identical circuit to the inverting summer (see below), except that the summing input is the op-amp's positive terminal.
In any non-inverting summing amplifier, the output voltage is in phase with the input voltage.
This is a great circuit for adding two or more voltages without amplification.
The output voltage, ( Vout ) is proportional to the sum of the input voltages, V1, V2, V3.
For this to occur R1, R2 & R3, etc must have identical resistances.
ie: R1=R2=R3, etc. If we call this resistance "Rin", then

Vout = (R4/Rin) * (V1 + V2 + V3 ....etc)

A Scaling Summing Amplifier can be made if the individual input resistors are “NOT” equal.

6. Inverting summing op-amp.
 Summing amplifiers are also known a voltage adders.
With the inverting summing op-amp, summing input is the op-amp's negative terminal.
The output voltage is also out of phase with the input voltage.
Ie  the circuit will produce the negative sum of any number of input voltages.

The output voltage, ( Vout ) is proportional to the sum of the input voltages, V1, V2, V3
 -Vout = (R4/Rin) * (V1 + V2 + V3 ....etc)
If the inputs resistors, R1, R2, R3 etc, are all equal a “unity gain inverting adder is made".
If the input resistors are of different values a “scaling summing amplifier” is made.

You will find this type of circuit in many CV processors.

7. Differential Amplifier.
This is also known as the Voltage Subtractor.
 We basically have an upper and a lower voltage divider.

If all resistances are equal, Vout = V2-V1
By adjusting the resistances within the two voltage dividers we can get differential voltage gains.

8. Op-amp Integrator

The output is proportional to the input integrated over time.The feedback loop uses a capacitor instead of a resistor.
For more on the integrator click here.

9. Converter - current  to voltage.
Here, the input current is converted into a proportional voltage.
It's also known as a transimpedance amplifier (TIA).


The very basic version of this circuit consists of an op-amp and a resistor.
"i" = input current.
This type of circuit is useful in measuring small currents.... eg from photodiodes.
The sensitivity of the above circuit can be increased by increasing the feedback resistance.


10. Differentiator Amplifier.
This is not to be confused with the Differential Amplifier.
This is a variation of the Integrator circuit in that the position of the capacitor and resistor have been reversed. In fact, Integration is the opposite of Differentiation.
We can see a capacitor in series at the input. The resistor forms the feedback loop.
The basic differentiator circuit performs the maths operation of Differention.
It measures rate of change.
It produces an output voltage amplitude that is proportional to the rate of change of the input voltage.

Feeding in a saw tooth or triangle waveform into the input will give a square output.
If we feed a sine wave, the output is also a sine wave but it will be out of phase by 180 degrees  with respect to the input.

Differentiator  circuits are used in high pass filters, wave shaping circuits and as frequency modulators.

---------------
A few years ago I had the pleasure of visiting visit the NonLinearCircuits lab in Western Australia.


Andrew showed me an old analog computer which had many of these above circuits.


The integrator:

The adder:
These days, when someone mentions a computer, most will think digital.
But for most of human history, computers were analog.

Digital circuits can be extremely complex using  sometimes masses of ICs and transistors operating in patterns of zero's and ones.

Analog computers appear in comparison to be much simplier.
Here numbers can be represented using voltages and calculations are performed in a "fluid & continuous" fashion. One disadvantage with analog over digital seems to be less precision and possibly a greater chance of error. But in situations where precision isn't critical, analog is a very beautiful and elegant alternative.

After looking at all these op-amp circuits, one can't avoid seeing the similarities between these early computers and analog synthesizers 

Links
+ Integrator
+ A visit to NLC labs in Western Australia
+ Building an analog computer with op-amps

Wednesday, 24 July 2019

Serge Index



Serge - CGS & Driscoll
* Power Supplies
* TKB - Touch Keyboard Sequencer - build notes
* SYNTHACON VCF - CGS 35 build notes
* CGS 86 - Build notes for the Serge Touch Keyboard
* Utility LFO - CGS 58 - Build notes
* CGS 81 - Voltage Processor build notes
* CGS 22 - Master pulse divider - Build notes
* Serge Resonant EQ/Filter - Euro format (CGS 202)
* Serge Bi-Directional Quad Switch (CGS 88)

* Roland mixer - PSU replacement using Ken Stone/CGS ideas

Vintage / Paperface 
* The Morley Serge - Phaser & Reverb repairs (CGS/Ken Stone)
* The Morley Davidson Serge - Reverb Tank - Girls of Milton (KS)
* David Morley's Serge - The Sherman Chaos Bank (CGS/Ken S)
* Morley Serge - Chaos Bank pics (CGS)
* Morley Serge - Final restoration pics (Thanks to Ken Stone)

* Two panel vintage paperface - Pre restoration pics.

* Warren Burt's Driscoll/Serge synth
* Warren Burt - Serge panel 2/2
* Warren Burt - Serge Negative Slew - repairs
* Warren Burt - WAD and TKB restoration pics (NLC & CGS)
* Warren Burt - Driscoll pics 


Teensy Audio Tutorial & Workshop

This looks like a good way to start learning about Arduino & Teensy microcontrollers.
The Teensy looks great  esp fro audio... Comes from a company called PJRC.
You can create all sorts of effects .... delay, chorus, reverb etc
It can also synthesize sounds etc etc.
You can get multichannel sound out of this  chip.

The Teensy 3.2 seems to be very popular. It's used in the Faderbank, and many Eurorack mosules such as the Radio Music / chord organ and the TELEX Teletype.

The Hackaday page is here
https://hackaday.io/project/8292-microcontroller-audio-workshop-had-supercon-2015

This uses a Teensy 3.2 and the audio adapter board

The workshop PDF is here.


....

 Audio library delay line demo





The analog pins are labeled A0 to A9

Connect the buttons to pins 0, 1, and 2
The pots connect to A1, A2 & A3

Audio input I2S. .... also called I²S (Inter-IC Sound).
" is an electrical serial bus interface standard used for connecting digital audio devices together. It is used to communicate PCM audio data between integrated circuits in an electronic device."
I2S is unrelated to the bidirectional I2C (IIC) bus. (Wikipedia).
https://www.cypress.com/file/133906/download

The I2S component operates in master mode only. It also operates in two directions: as a transmitter (Tx) and a receiver (Rx). The data for Tx and Rx are independent byte streams.

The Display:
https://www.pjrc.com/store/display_ili9341.html

Adding Pushbuttons.
To read the pushbutton, you must configure the pin to work as an input. (pinMode)
Then you can use digitalRead to actually read the pin.
There is no need to add a pullup resistor since the Teensy board provides a pullup resistor on every pin. This is built inside the chip itself.
Connect the pushbutton by wiring one side to ground and the other side to a pin.
You can activate the pullup resistor by using INPUT_PULLUP with pinMode in your setup function.

Adding Potentiomers
This uses the analog input side of the teensy.
Connect one of the outside pins to ground, and the other to 5V
The middle pin goes to the analog input
------------------------------------------------------
The microphone
Digi-Key Part Number 668-1296-ND

https://www.digikey.com.au/products/en?keywords=668-1296-nd

---------------------------------
The thumbnail pot
Digi-Key Part Number 3352T-253LF-ND
https://www.digikey.com.au/products/en?keywords=3352t-253lf-nd


Links
+Arduino workshops for beginners
+ Teensy Tutorials
+ PJRC Audio design system for Teensy
+ Teensy Audio Library
+ Sparkfun - 4 channel audio
+ Microcontroller Index Page
+ i2c protocol 
+ Kickstarter 3.6

he1

,,,,

Wednesday, 17 July 2019

FaderBank - 16n

Some of my build notes re the fader bank.
This is a eurorack compatible module, however it does use midi and i2c so I hope it is compatible with other synths.

The official website is here:
https://16n-faderbank.github.io/

You can make your own PCBs and panels for it.
Github
https://github.com/16n-faderbank/16n/tree/master/electronics

The module uses a teensy microcontroller

The official build notes are here:
https://github.com/16n-faderbank/16n/tree/master/build



cd 4067
This is a cmos 16 channel multiplexer


MCP6004
This is a quad op-amp

diodes: D1 to D4 are four SOD-123 diodes.

 R17 and R18 are 4.7k resistors.
+ If you plan on using I2C with an ER-301,
   Ansible or TXo, (ie I2C "MASTER" mode) you should populate the 4.7K resistors.
+ If you plan on using I2C with a monome Teletype,
   do not populate these resistors - it may well cause problems.

........................ I'll leave these off for the moment... see how it goes

16n’s I2C jack is a 3.5mm stereo jack wired as follows: tip SDA, ring SCL, and sleeve GND (ground).

 the stereo jack sockets for MIDI and I2C.


the 16 mono jacks. 





tHE Teensy 3.2

 Created by Paul Stoffregen and the team from PJRC, the Teensy 3.2 is a microcontroller development board running a 32-bit ARM Cortex M4 processor, clocking in at 72MHz (overclockable to 96MHz). It also packs 1MB of flash, 4K of EEPROM, and 34 I/O pins







The switch setects different types of MIDI connectors Arturia Vs Korg
 'Arturia/Novation' (tip is current source) and 'Korg/Makenoise' (ring is current source) standards; board is labelled such.



fLASHING THE Firmware
There are two ways to flash the microcontroller


The Build guide uses the Arduino IDE/Teensyduino software.
The first step is to plug your new Teensy in using the USB cable.

All brand new Teensy boards come with the LED blink program pre-loaded. You should see the Orange LED blink slowly, 1 second on, 1 second off.

Before you can flash your Teensy you will need two pieces of software:
1. The Arduino IDE
2. Teensyduino

First install the Arduino IDE. (I'm using version 1.8.9)


Next install Teensyduino


Within the Arduino IDE software application, you need to open the Tools men.
  

be sure to set the Board to Teensy 3.2, USB type to MIDI, CPU speed to 120mhz overclock.


Open the _16n_firmware.ino file in the Arduino IDE.

Flash the board (upload the file).

I ran into a few problems using this method ... compiling errors such as:

A friend suggested I try the simple Teensy Loader Application
https://www.pjrc.com/teensy/loader.html
This is the second method.
This, only uploads hex files.

And it worked perfectly.

Links:
+ Teensy First use
+ Using Teensy with Arduino IDE 
+ Teensyduino - software
+ Microcontrollers - general info 
+ i2c protocol  

Credits

Based on original work by Brian Crabtree and Sean Hellfritsch.
Minijack MIDI, I2C circuitry and CV outputs by Tom Armitage.
Firmware by Brian Crabtree, Tom Armitage, and Brendon Cassidy.

Tuesday, 16 July 2019

Shat-Noir Phaser - Build notes

These are some un-official build notes for the Non-linear Circuits Shat-noir Phaser
It's an eurorack module.

This module uses light dependent resistors (LDRs).
You can find other phasers using a similar idea: notably the Carlin, Compact Phasing A,
Morely Phaser and ADA final Phase.

You will need to build a light-proof box to house the LDRs and the central LED.


Links:
+ NLC Blog
+ BOM
+ Wiki




First components



---
" GL5516 LDRs you may need to adjust the caps to suit. GL5516’s on resistance is approx. 5k at 10 LUx, if your LDR is higher, use a lower value cap, say 4n7. If your LDR goes lower try a higher value cap, say 15nF-22nF" (andrew F)


--- I'm using eight 10uF caps
May need to experiment with these.
-------------------------------------------------------------------------------------------------------
"The 100R is part of the LED driver circuit; it should be considered the minimum value resistor to use. Feel free to experiment dependi
ng upon your LED,"

I'll use a 100R.

---------------------------------------------------------------------------------------------------
Click here to return to the NLC Build Index: http://djjondent.blogspot.com.au/2015/03/non-linear-circuits-ncl-index.html 



waiting for some parts .....To be continued................