Showing posts with label Computer. Show all posts
Showing posts with label Computer. Show all posts

Saturday, 2 March 2024

AVR Programming -- AVRDude etc

 Some notes on how to upload a hex file using AVRdude.
AVRdude is a program to upload or download to on-chip memories of Microchips AVR suit of Microcontrollers.
 
 

Links
 
You can also use something like this:
 
or this:
https://core-electronics.com.au/tiny-avr-programmer.html

 
Here we are using a 6-pin TPI
The interface is typically used for programming tinyAVR.
 

The 6 pins are MISO, +5V, MOSI, GND, RST, SCK  
It only requires power, ground, data, clock, and a reset pin
MISO = Pin 1 




-------------------------------------------------------------
 
Background to AVR microcontroller pogramming
When AVR microcontrollers were first introduced in 1995, Programming was simple.
There was just one programming method (Serial Programming Interface or SPI).
This used 5 x 2 10-pin target  .
 
There are a few alternative type of  pin targets that I sometimes see.
Common are:


6-pin PDI
The 6-pin PDI is used for programming AVR XMEGA.
This is the programming interface available on all ATxmega microcontrollers,  
It is functionally the same as ATtiny TPI interface and uses the same two pins – RESET for clock and a dedicated pin for programming data.
 

 
6-pin TPI
The interface is typically used for programming tinyAVR.
It stands for tiny programming interface
The devices that use this are ATtiny10, ATtiny102, ATtiny104, ATtiny20, ATtiny4, ATtiny40, ATtiny5 and ATtiny9.
 
 
 

The module below is a Duskwork self-tuning VCO
 tHE red stripe goes to the top --- MISO
 
Links
+ Microcontroller... What you need to program a MCU

Thursday, 12 May 2022

Comdyna GP-6 - introduction to the patch bay

The Comdyna GP-6 is an old analog computer from 1968.
It's great for solving differential equations.
This particular machine is being repaired. When it's running I'll do some demos
hopefully with some synths.

I've ordered a THAT computer which I'll compare with this.

This post is mainly a exploration of analog computer components 
but using the GP-6 as an example.
They all look pretty intimidating at first.
but the components belonging to most analog computers are fairly common...
Potentiometers, comparators, integrators, inverters, summers, multipliers, etc.
Many of these circuits use op-amps.


According to the Comdyna site, "Each GP-6 is a self-contained unit capable of simulating linear and non-linear systems of up to four state variables. Over 2000 GP-6 analog computers have been installed in over 400 university, government and commercial research laboratories."
 

Of course there is no keyboard or memory.
All programming is done with banana patch cables.
 
Virtually all analog computers have 3 basic elements:
1. Potentiometers (coefficient potentiometer).
2. Inverter / Summers
3. Integrators
 
 
-----------------------------------------------------------------------------------------
 
Below are  the COEFFICIENT POTENTIOMETERS . . . 
There are 8 of them.
Its the best place to start .... its how you input data.
These are ten turn pots, which  are used to input values (or coefficients) of the problem to calculate.  
The 8 coefficient potentiometer knobs dial in analog voltages.
 
Settings are displayed by the digital voltmeter in the POT SET mode.....

The coefficient potentiometer (pot) is a variable resistor (in effect a voltage divider )
It outputs a voltage which is some fraction of the input voltage. 
The output (the wiper arm) is usually connected to the input of one of the computing components  
 

The left two pots: Y/POT ADDRESS & X ADDRESS
These two rotary switches enable amplifier outputs and potentiometer wipers to be selected for digital voltmeter readout or output to an X-Y monitor such as an X-Y oscilloscope or X-Y plotter.
 
The MODE SELECTOR switch is positioned to POT SET for potentiometer setting and other check-out operations. Otherwise the switch is set to OPR.
 
POWER & COMPUTE TIME
(extreme right pot)
In addition to power on/off the COMPUTE TIME switch serves also to adjust the compute time or integrate period in a range of 10 to 100 scaled seconds. The time base ramp may be selected the X ADDRESS switch, TIME position, to be the XY plotter or oscilloscope horizontal axis.
 

On the patch panel the Pots connect to these central yellow bananas. Numbered 1-8
 

 
Notice that 6 of these are connected to ground. (1-6)
These only have two connections.

Notice that Pots 7 & 8 have 3 connections.
The lower jack is free floating.
So you can connect a different voltage (other than ground)
to the lower jack.
So the output can even be a -ve voltage
 
--------------------------------------------------------------
In total there are 8 op-amps.
 
These make up the Inverters / Summers & Integrators
 

Integrators 


There are 4 integrating amplifiers on the top of the patch bay.
They are numbered 1,2.3.4. 
Integration is probably the most important operation available on the analog computer.
 
What is an integrator?
It's an element whose output signal is the time integral of its input signal. 
In other words tt accumulates the input quantity over a defined time to produce a representative output. 

The op amp produces the integral conversion of the initial input voltage.
Integration is time dependent.
The important bit to remember is that the negative feedback loop uses a capacitor. 

Intergators can be found in the modular synth world.
I understand that the Make Noise Maths and the Serge slope generators uses integrators
as well as in some state variable, LP & BP  filters eg Polivoks and WASP .

Summers

There are also 2 summing amplifiers in the centre of the patch bay
These are numbered 5 & 6.
These can't do integration
 
 
Summing amplifiers are also known a voltage adders.
These circuits use op-amps to add.
Summers can be either inverting or non-inverting.

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.

Inverters

There are also 2 inverting only amplifiers at the very bottom.
They are numbered 7 & 8.
 
You can also see two multipliers above the inverting amps. They aren't numbered.

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


 

Sunday, 1 May 2022

THAT - That Analog Thing

The Anabrid THAT computer.
 
 Links
 
Just purchased one of these.
 
 Its a Open Source Analog Computer
 By connecting the wires in different ways I can use it to solve all sorts of differential equations.
 
 

 
Analog computers have been around for thousands of years but over the last 70 years
they have been almost completely replaced with digital machines.
We must remember that the world itself is analog, not digital.

In the world of music, synths and electronics there is a constant battle between the two.
Do vinyl records sound better than CD's? 
Are vintage analog synths superior to digital keyboards?
Today, there is a resurgence in analog things and esp in analog computing.
The future, I'm sure, involves the utilization of both technologies.
 
The THAT computer is a great open source project and you don't have to spend a ton of money.
It looks like an easy introduction to analog technology.
 
So whats the difference between an analog and a digital computer?
The word analog comes from the word analogous or analogy.
An analogy is a comparison between one thing and another.
In a analog computer the comparison might be between the motion of a wheel and the
the rise and fall of a tide or changes in voltages and a weather model.
Digital computers, in comparison, use digits ... 
typically 0 or 1, on/off, true/false. 
 
Remember that analog and digital computers can be either mechanical or electrical.
For example, an abacus is digital.
A slide rule is analog.
 
Analog computers are relatively simple, use little power and are excellent at solving 
complex problems & differential equations. 
I doubt the THAT computer on its own, will be able to make music, but you should
certainly be able to interface it with a Serge or eurorack modular. 
Though I haven't tried this .....so a disclaimer if you do:
Do so at your own risk.

Anyway, I think this is an incredibly useful educational tool.
Moore's Law is reaching its limits. Quantum computing is only just beginning.
Maybe the near future of computing will involve hybrid analog/digital machines. 
Remember:
"There are more ways to solve a problem than the algorithmic approach". (Bernd Ulmann).

The THAT computer uses bananas. So I hope I'll find a use for this in some modular synths.
 
I'm not sure what size bananas it uses. Serge use 4mm diameter.
This might be 2mm ? 

Anabrid also make the Model-1 analog computer
and are working on building a analog computer that will fit on a chip.
 

Links

Wednesday, 20 October 2021

Teenage Engineering PC - Computer 1- Mini-ITX

 This looks very cool.
 
 
The Mini-ITX platform is very new.
It has a very small footprint and can be perfect for BYOPC events
Not really sure if these parts will fit into the case but its a rough idea of 
the total cost of the build 
 
 
The case -                                                     $195USD 
 
CPU - AMD Ryzen 5     5600X                     $350
 
Motherboard  - ASUS ROG STRIX B550-i  $229
I think the best motherboards are gamer ones
 

 
 
Corsair Hydro iCUE H100i elete                     $120
This is the Liquid CPU cooler 

Western Digital WD Black SN850 -                 $379
This is the SSD - 1TB
 
CORSAIR Vengenance RGB Pro SL 32GB     $160 USD
This is your RAM
 
Power - Cooler Master V850 SFX                   $250 
Corsair

ASUS Phoenix GeForce GTX 1650 OC, 4GB        $400 USD
graphics card - graphics processing unit -  gpu
I think any graphics card with 2GB of vram should be more
 than enough for Ableton.


Saturday, 7 August 2021

ARP 2500 - 1047 Multimode Filter / Resonator

The ARP2500 filter/resonator 1047 module


It's a lovely sounding filter whos design evolved from analog computing.
 
 This module is a combined Low Pass, Bandpass, Highpass and Notch (band reject) filter.
All the filter outputs are available simultaneously in the lower section of the module.
This is why it's called a multimode filter.
 
I think the 1047 was one of the first multimode filters ever produced.
 
Resonance or Q, controls filter shape.  
Low Q settings give wider and smoother filter shapes.
They result in a gentle effect on the sound.
 
As you increase Q, the filter shapes become narrower & sharper. THis helps in focusing on narrower frequency bands.
As Q goes even higher "pinging" may occur, esp if you trigger the filter with a gate.
This is good for percussive sounds.
 The filters start to peak boosting some frequencies into overload territory.
 
 
 
 
 
 
 
 
 
 
These are the outputs and inputs
 
There are two audio inputs, two filter cutoff frequency control voltage inputs and two 
resonance inputs for CV control. The 6 pots are attenuators for these inputs .
 

What's really interesting about this filter is the bandpass section.
The 1047's band pass filter mimics that of a natural acoustic resonator.
Typical examples of natural resonators include strings, pipes, horns, drums.
The bandpass is a single pole 6 dB slope.
This gentle 6dB slop which lies on either side of the frequency cutoff point makes it
ideally suited for replicating things like drums, violins, etc


The filter can self oscillate as the resonance (Q) is turned up.
 

So you can patch a trigger into the filter and make it "ring" at very high resonance levels.
The input for your trigger is in the top right corner of the module.
 
The decay time of the ring is set by the resonance control. 
 
This filter design is how many analog drum machines
emulate sounds like Kicks and Toms.
You use the frequency knob to set the pitch.
I like to use a sequencer to automate varying the pitch while pinging the filter with a trigger/gate signal.

This ringing occurs as it's design is similar to mechanical resonators which ring when struck by an impulse of energy.
 
 
 
 
Turning the "Keyboard Percussion" switch to "on"  will connect the trigger output of your keyboard (or whatever other module is producing the trigger) to the audio input of the filter.

 
The Algorythm by Grayscale is excellent for this task.
 
 

 
Unlike earlier bandpass filters which simply combined LP & HP filters, 
The 1047 filter is an analog computing circuit consisting of summers and integrators.
 
If I'm reading the schematic correctly it looks like a State Variable filter.
 
 The state variable filter is a type of multiple-feedback filter circuit that can produce all filter responses simultaneously from the same single active filter design.
 
In programming a state variable filter/resonator on an analog computer, we'll need two integrators and one inverter connected into a loop.
 
You can see 3 op-amps (A1,A2,A3)
The last two use capacitors in a negative feedback loop -- they are RC integrators.
The first opamp is a summing amp.


Tapping the output of the first amp gives you the HP output.
Tapping the second gives you the BP output.
This BP out is fed back into the 1st op-amp, (non-inverting input).



Tapping the output from the third OP amp gives you the LP output.
This is fed back into the 1st opamp (the Summing amp)... the non-inverting input.
 

Filter frequency can be set both manually & with control voltages. 
The center frequency Fc of the band-pass output is the
cutoff frequency of the high-pass and low-pass outputs.
F c may be set by the coarse and fine frequency knobs
over the range of 16 Hz to 16 kHz.

There is also CV control over resonance.
With the resonance (Q) knob at minimum and the resonance switch set to "norm," the band-pass output has a gain of 0.5, and attenuates 6 dB per octave above and below Fc

 
 
 
 
 
 
 
When triggering, watch the overload light.
It indicates excessive input
 
Note that there is a resonance limit switch.
Setting it to "LIM" prevents signal overload when high levels of resonance are used.
 
 
 
 
Or the INPUT attenuator knob can be turned down
if the input source is the cause of the overload.
 
The switch effectively limits the height of a filter’s resonant peak. 
The LIM setting is preferred for signals which possess a strong harmonic or fundamental frequency.
 
----------------------------------------------------


The Notch Filter

This notch Fc knob is used to offset the notch filter’s center frequency (“fc”) set by the COARSE and FINE frequency controls. 
 
 The filter passes lows and highs, cuts out frequencies somewhere in the middle
 
 
The default setting for the notch filter is 1. 
 
In the pic above, the dial is fully counter clockwise. 
Thus the Notch frequency is shifted significantly below the filter's frequency cutoff (fc).
In effect, the notch filter is a copy of the high-pass filter. 

The reverse occurs if the dial is fully clockwise (ie past 4). 
The Notch frequency is shifted significantly above the filter's frequency cutoff (fc).
In effect, the notch filter is a copy of the low-pass filter. 

Notch filters can be used to create a faux phasing effect by modulating the cutoff with an LFO.
The notch filter is kind of like a high pass & low pass filter in parallel. 
The sound is quite cool, esp when sweeping noise


----------------------------
Links
 
For more info google:
 
stand-alone Analog Computation equipment used for Electronic Music

North America based companies EG&G (Edgerton, Germeshausen & Grier) and PARC (Princeton Applied Research Corporation) of New Jersey (Princeton roughly between New York and Philadelphia),


EG&G PARC model 121
 
 
 --------------------------------
------------------

Monday, 2 November 2020

Happy Birthday George Boole.






































































































 
This is a old serge module that performs Boolean logic. It's a form of algebra that is centered around 3 basic operators: OR, AND, and NOT. The core of Boolean logic is the idea that all values are either true or false. ... on or off.... 0 or 1.  From this idea, computers were born.
 
George Boole was born on this day (2 November) in 1815.
Though he only lived for 49 years he accomplished so much.
His legacy lives on to this day.
 
 
 
I came across this add , the other day reading an old copy of a Sci-fi magazine.
It's for a Geniac kit.
 

It's a very basic analog electro-mechanical "computer" that uses 6 disks.
It can do basic Boolean logic. 
 
 
You need to physically wire connections between an internal battery, the disks and some lightbulbs.
It doesn't have any form of memory, so can't perform sequential equations.
I don't think it has any latching circuits.
 
Links.
 

Friday, 20 March 2020

The algorave movement

What is this?
It's a combination of 2 words .... Algorithm & Rave.

"An algorave is an event where people dance to music generated from algorithms, often using live coding techniques.Algoraves can include a range of styles, including a complex form of minimal techno, and the movement has been described as a meeting point of hacker philosophy, geek culture, and clubbing.

Although algorave musicians have been compared with DJs, they are in fact live musicians or improvisers, creating music live, usually by writing or modifying code, rather than mixing recorded music."
 (Wikipedia)

Basically, artists code live on computers.
The code produces music and controls visuals.
The visuals usually include the code itself, so the audience can see the music as it evolves and is written.
The software is free & opensource. Much of it will run on really basic computers (eg a raspberry pi ) making this form of music easily accessible to everyone.

Their logo is a Spirangle.
It's a cross between a triangle & a spiral.


Currently, there is live performance of artists coding and performing all around the world.
It's taking place today,  March 20.
This is also known as the March Equinox ... actually it occured a 2.49pm in Australia.
This marks the arrival of Spring in the Northern Hemisphere & Autumn in the Southern.


The coding festival is called Eulerroom Equinox
http://equinox.eulerroom.com/schedule.html

They also have a facebook page

Check out my page on Sonic Pi
It's a great tool to get you stared on coding.


TidalCycles is also a great resource for music coding.
 as is Gibber


Hydra is a good place to start learning to code visuals

Saturday, 14 March 2020

Happy Pi day

Happy Pi day

3.142  ...

Pi is approximately equal to 3.14159.
Take this opportunity to download Sonic Pi.
http://sonic-pi.net/

It's free.
It's a great way to learn programming that is linked to electronic music

An example - Daft Punk

Tutorials:
http://sonic-pi.net/tutorial.html

Thanks Sam Aaron


Wednesday, 11 March 2020

Willem Twee Studios - The Netherlands

This looks like a great studio.
Well worth a booking if you're in Holland.

Official website
https://www.willem-twee.nl/studios/

Facebook
https://www.facebook.com/willemtweestudios/?pageid=120494768636017&ftentidentifier=393452684673556&padding=0

There are 2 studios


Studio 2 has the Arp 2500s etc

Studio 1 has lots of test equipment


I'm particularly interested in the old analog computer


Melodic rhythms

Wednesday, 25 December 2019

Turing Tumble

I got this for Christmas.

It's a game & it's also a mechanical computer driven by marbles. Invented by Prof. Paul Boswell, who used to teach at the University of Minnesota,.

Rather than use electronic components like most modern computers, this uses gears and levers.
It should be a fun way to teach basic programming which I can hopefully (somehow) apply to synths.

Computers in general can be either analog or digital.
This distinction also applies to mechanical computers.
They have been around for ages.
 Below is  the famous Antikythera mechanism.
It's an ancient Greek mechanical computer used to predict astronomical positions 


 They are analog when they use smooth mechanisms such as curved plates or slide rules for computations. They are digital when they use gears.

The Turing Tumble uses gears and is apparently "Turing Complete". This means it can do anything a computer can do - or at least it could if the board were big enough.



..
Basically, a Turing machine is a "finite state machine" with the ability to read and write data to a "tape".
It can also stop or halt – it may not sound important, but this ability attracts a great deal of attention.

Links
+ What is a Turing Machine
+ tURING Machines explained visually
+ Stanford Uni
+ Turing Tumble VR
+ Dr Nim
+ Hackerday
+ Digi-Comp 1
+ Nim

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