Atari Punx…

Preamble

A friend of mine, Pavel, from the group Bang Sue Electrix, told me about the Atari Punk Sound generator. I’d never heard of it before, and I initially thought that he wanted to re-create either an old Atari VCS games console, or Atari 800 PC. When he showed me the Wikipedia – Atari Punk Console page, I realised that he was actually referring to a Stepped Tone Generator, formed from an astable square wave oscillator driving a monostable oscillator, (or – if you prefer – an astable multivibrator circuit triggering a monostable multivibrator circuit) which uses two 555 timers (or a single 556 timer IC)…

fyna0qmgm7e8xnx-medium

Reminiscent of vintage Atari video games, the synthesizer’s output is a characteristic Forrest Mims, a popular electronics author, published the original Atari Punk Console schematic for a “Sound Synthesizer” in Engineer’s Notebook: Integrated Circuit Applications   and then a “Stepped Tone Generator” in Engineer’s Mini-Notebook: 555 Circuits.  Kaustic Machines took the circuit and popularized their version as the “Atari Punk Console”.

This article looks at a the basic Atari Punk Console design, and then some variations, and improvements, upon the original design. Finally, it takes a look at replacing the 555 timers with some other multivibrators based around Schmitt triggers, BJT relaxation oscillator, and the oscillator taken from a Stylophone.

This article also takes a look at some unrelated 4069 musical projects…  and some random projects including an Auduino and a theramin.

See also Banging noises… and Sequence Dancing.

See also

Links

How does it work?

From Atari Punk Console – the DIY synth classic

atari-punk-console-operation-scheme-1024x723

Speaking briefly and most clearly as I can: by turning the potentiometer [1], we increase the pitch linearly (timbre remains unchanged), wherein from time to time a step change in the pitch and timbre occures. By turning the potentiometer [2], we change the sound timbre (pulse width of the square waveform) linearly – the pitch remains unchanged, but similar as for [1] at some time a step change in the pitch and timbre happens. All this adds up to create an interesting sound effect.

Also, from 555 IC Tutorial & Circuits, by Terence Thomas, regarding the first 555, the astable

OSCILLATOR

Wave generating is another function that the 555 can perform with ease. In the oscillator schematic we see resistor R1 and potentiometer R2 provide an adjustable charging voltage to capacitor C1. When the voltage rises to 2/3 of the supply voltage, pin 6 is triggered and enables pin seven to ground the capacitor and pin two, starting the charge all over again. The output at pin 3 is a short duration pulse fed to jack J1. This shape is not particularly useful as a test shape or a musical shape.

555-oscillator-circuit-550x327

A ramp wave, jack J2, is an ideal shape for both test purposes and music production because it contains a full complement of harmonics and can be converted to any other wave shape. The high input impedance of the FET also eliminates any circuit loading problems. Resistor R3 isolates a sensitive FET from the heavy 10-volt wave differential while resistor R4 limits the current through the transistor. Volume of both outputs is controlled by potentiometers R5 and R6, while R7 limits current through capacitor C3 and on to output jack J1.

Sourcing 556 timers

10 x 556 Timer ICs for just $1: 10pcs NE556N NE556 556 Dual Bipolar Timer IC NEW

Pinouts

555 pinout

555 Pinout
555 Pinout

556 pinout

556 pinout
556 pinout

Notes

Inputs

Any variable resistive device could be used to provide the two inputs (thus replacing the potentiometers), such as LDRs (so you could control the console using your hand as a shade, or using a light source, such as a torch), or linear SoftPot Membrane sensors , or FlexiForce Pressure Sensor, or a variable voltage device such as a IR reflective sensor (using a reflective gradient sheet as a control), Hall effect sensor (using a metallic wand as a control), etc.

From Atari Punk Console – How It Works!:

Rate control

Most notably, the resistors are often substituted for potentiometers. This gives the circuit more swing. Photoresistors are also popular, but I find their substitution to be a bit chaotic. However, combine photoresistors together with a controlled environment such as a vactrol and you will have an excellent means of buffering + control.

Output

Capacitor

The output is via a d.c. blocking 10 µF capacitor, to remove any d.c. offset voltage.

Line out

The output can then be a Line out via a 10 kΩ (to 100 kΩ?) and 4.7 kΩ (or 1 kΩ?) potential divider, or directly to a speaker via a 5 kΩ (to 100 kΩ) potentiometer. Note that the line out impedance should be between 100 Ω – 300 Ω, according to Doug’s circuits – Line Out, or up to 600 Ω (see Wikipedia – Impedances).

From Connecting speaker signals to line level inputs

Speaker to Line
Speaker to Line

From Doug’s circuits – Line Out

The simple way to do add a Line Out is with two resistors and a output jack:

R1 and R2 need to be high enough values to not change the overall load on the speaker. R1 and R2 in serial connection form a voltage divider at their junction (the line-out jack), thus attenuating the output signal down to a voltage that is acceptable to use as an input to another amp, a recording console, or a PA.

Choose the values of R1 and R2 such that the sum total is 2K or higher, and that the voltage divider attenuates the signal down to a voltage that is acceptable to send to a mic input, or another amp. A 5W amp’s speaker voltage is much lower than what you’d have with a 100W amp. If the desired Line Out voltage is 1V for either 5W or 100W amps, you’ll need different voltage dividers for either one. If you aren’t sure, to can always make it variable (see below).

The output impedance of the Line Out will more or less be set by the value of R2. 100ohm is a good versatile lower bounds of impedance, but up to 300ohm should be okay for recording devices or PA’s.

Later examples from this page use 22 kΩ and 5.6 kΩ resistors (for R1 and R2 respectively), thus negating the statement about using 100 Ω -300 Ω resistors.

From the Vibrati Punk Console (see below) 10 kΩ and 1 kΩ are used.

Line-Out Modification

Difficulty rating: Moderate

The VPC circuit is very open to mods and bends. I’ll add more here as people suggest them. To start with I’ve had a request by @GuerillaBass to add a line-out.

To add the line-out you will need two more resistors (10kΩ and 1kΩ) and a suitable jack socket. Connect them as shown below. In the circuit below connecting line-out jack won’t disconnect the speaker. Most jack sockets have a built-in switch that you can use to automatically disconnect the speaker if you want.

NOTE: As with connecting any new device to a mixer take great care. Before connecting turn everything off and set the levels right down. Once connected turn power on and very cautiously raise the levels. I very strongly recommend you use a battery to power the Vibrati Punk Console if you connect to a mixer. If you do use a mains adapter then ensure the “ring” connection on the jack socket is connected to the left-hand “speaker” output on the circuit board (above the letter “p” in the label). This is the 0V output. With a battery this isn’t critical.

Some users have reported that the line out level is a bit high with this circuit. If you find this problem try reducing the value of the 1kΩ resistor. 680Ω or 470Ω would be reasonable values to try.

VPC Lineout Mod
For line level: Add the 100K and 4.7K resistor and connect the rightmost pad and the centre pad of the potentiometer.
 The “original” Kaustic uses 10 kΩ and 4.7 kΩ
Schematic with Line out
Schematic with Line out

These two Veroboard designs (1 and 2) make use of 10 kΩ and 4.7 kΩ

TL;DR

Commonly used pairs of resistors for the potential divider

  • 10 kΩ and 1 kΩ
  • 100 kΩ and 4.7 kΩ
  • 10 kΩ and 4.7 kΩ
  • 22 kΩ and 5.6 kΩ

Important note

From Stack Exchange – Kaustic Machine’s Atari Punk Console: Line Output or Log Pot?

The 556 will drive an 8ohm speaker, which is exactly how the original circuit is designed:

Stepped tone generator - original schematic
Stepped tone generator – original schematic

Volume Potentiometer

A logarithmic potentiometer should be used

  • 100 k, type A

Potentiometers

Volume Potentiometer

See above, Output – Volume Potentiometer

Input Potentiometers

Linear, rather than logarithmic, potentiometers should be used, in order to get a better range of frequencies… otherwise you may find that the top end frequencies are “bunched together” towards the end of the turn of the potentiometer’s arc, with an overly wide spread of unchanging base frequencies covering the majority of the initial part of the potentiometer’s arc. [Ed- Is this correct???]. However, Instructables – Voltage Controlable Atari Punk Console uses logarithmic potentiometers. I am sure that one of the other links mentions issues with one of the types of VR (potentiometers) used, and that they specified a preference for one type over the other – however, I am currently unable to recall in which article it was mentioned.
X2 50K (or 500K but I will use 50K because it seems to me the correct stepped tone sound)
Logarithmic potentiometers (type A), should be used for volume control. From http://lushprojects.com/apc/lushprojects-atari-punk-console.pdf:
Log types are used as volume controls as this matches the characteristics of the human ear
Logarithmic (AKA Audio) potentiometers are marked with an “A”, linear potentiometers are marked with a “B”, A500k or B100k. See how do you tell the difference between a log and linear pot? for these tips:

Once upon a time, there was a code for pots. I think it went like this:
Linear – A
Audio/Log taper: C
Reverse Log: F

Then, a great evil descended on civilization. Wars were fought, and the forces of good prevailed, but at a great cost. Villages were in ashes, heroes had fallen, and the potentiometer codes had changed to the modern ones:
(Sorry, I’ve been up for way too long :shock:)

Linear – B
Audio/Log: A

So it’s not too much of a problem, until you find a pot that’s marked with an “A.” Is it a new log taper, or is it an old linear taper? If you’re using newly-made pots, just go with “A=Audio, B=Linear” and you should be fine. If you’re cannibalizing old stuff, use the meter. There might be a trick someone knows to identifying them, but I usually just check.

and to check manually,

Turn the pot to the geographical mid-point, measure from mid lug to each outer lug (separately). If the values are equal your pot is linear. If they are nowhere close, its logarithmic.

It can be quite difficult to locate the Audio logarithmic (A) type potentiometers, the linear (B) type are much more common.

Minimum resistance/maximum current

Some minimal resistance should be added in series with the potentiometers, in order to limit the maximum current when the potentiometers are turned to 0 Ω. From Stack Exchange – Problems with Atari Punk Console circuit

The absolute maximum current through pin 7 for the TLC555 is 150mA. To ensure this isn’t exceeded, you could try connecting 220 ohm resistors (I’m assuming a 9V supply) in series with both potentiometers, and also between pins 6 and 7 of the rightmost 555.

Capacitors

Having made an awful lot of circuits like the one here I’ll add that I always thought it sounded best if I used polystyrene capacitors with it.
I initially purchased the dark green polyester (AKA Mylar) capacitors (2 baht each),
Mylar
and then some WIMA clones (6 and 7 baht), again made from polyester film
WIMA clone
From the very reasonable EPS 2, located just off Ban Mo, in the covered link soi between Atsadang and Ban Mo.
For an extensive range of high quality capacitors, visit First Popular, again for Ban Mo, again in the covered link soi between Atsadang and Ban Mo. Example prices are:
  • Polystyrene 65 and 300 baht for 10 and 100 nF respectively
  • Polyester 12 baht for 100 nF
  • Polycarbonate 10 baht for 10 nF
  • Polypropylene14 baht for 10 nF
  • EPCOS
For more information see Types of capacitor.

Schematics

Example 1

From Wikipedia – Atari Punk Console

apc_with_2_555_28pin_out29_and_bridge_added

Example 2

From Atari Punk Console – How It Works!

This is the original schematic Forrest Mims published
This is the original schematic Forrest Mims III published

Example 3

Three stage, from Vibrati Punk Console, PDF link. Schematic from Use:

Vibrati Punk Console
Vibrati Punk Console (3 stage)

Example 4

From Instructables – Voltage Controlable Atari Punk Console, comes with PCB layout

Voltage Controlable Atari Punk Console
Voltage Controllable Atari Punk Console

Jack 3 can be just a Line out if a 4.7 kΩ and a 100 kΩ fixed resistor are used.

Example 5

A simple Breadboard layout from breadboard version of atari punk console?

Schematic showing Line out potential divider (10 kΩ and 4.7 kΩ resistors)

Schematic with Line out
Schematic with Line out

Breadboard layout

Breadboard layout
Breadboard layout

Veroboard layouts

From Atari Punk Pots, featuring line out

Atari Punk Console Vero - AC06
Atari Punk Console Vero – AC06

From Atari PUNK Console, a more compact and feature laden (power switch and LED) layout

Atari Punk Console Vero - #2
Atari Punk Console Vero – #2

From Paul In The Lab – Atari Punk Console Stripboard Veroboard Layout, a 555 based layout

Atari Punk Console Stripboard layout using 555 timers
Atari Punk Console Stripboard layout using 555 timers

BOM

The simplest BOM

Apart from the 2×555, or 1×556, you will need:

  • Capacitors
    • 0.01 µF – for the astable
    • 0.1 µF – for the monostable
    • 10 µF – for the output
  • Potentiometers
    • 2 x 470 kΩ (1 MΩ)  – for both astable and monostable
  • Resistors
    • 1 kΩ – for the astable
    • 10 kΩ, 1 kΩ – for the line out
Part,Value,Quantity,Cost (B$)
Capacitor,10 nF,1,2
Capacitor,100 nF,1,3
Capacitor,10 µF,1,2
Resistor,1 kΩ,0.50
Potentiometer,500 kΩ,2,10
NE556,n/a,1,12
3.5 Inline socket,n/a,1,10
Total,,48

Basic Improvements

The most essential basic improvements to the original circuit are:

  1. Additional, smaller, potentiometers in series for finer control;
  2. Current limiting resistors;
  3. Changed capacitance on the first astable to change (lower) frequency response;
  4. Line out circuitry (See Notes – Output – Line out section above);
  5. Swapping the potentiometer to the astable to 250 kΩ;
  6. Tie the CV inputs to ground, via a capacitor.

Additional Potentiometers

Instead of having just one 500 k potentiometer, per input, have two: 500 kΩ and 100 kΩ. That way it is possible to wonder around a particular setting  at a greater resolution, with the smaller resolution working over just 20% of the total range of the larger potentiometer. Obviously, a third smaller potentiometer, say 20 kΩ., could be used to give even further finer resolution (4% of the total), and so on. These potentiometers would ideally have “center stops” in order to provide an adjustment of ±10% (and ±2% for a third potentiometer) around the previous potentiometer’s setting..

Current limiting

Also, add a fixed resistance, in series with the potentiometers (or at least for the monostable – the second 555), say 1-10 kΩ, so that 0 Ω is not connected, thus damaging the 556 IC, due to the exceeded 150 mA current limit – From 555 IC Tutorial & Circuits, by Terence Thomas,

ABOUT PIN 7

If you have ever seen a circuit with pin seven connected to the power supplies positive terminal through a potentiometer. This is not a good idea, for if the pot is ever turned to its point of minimum resistance, the pot will be damaged or the timer. The purpose of pin seven is to ground the charging capacitor at pin 6. This completes the cycle and pin 7 will remain at ground potential until pin 2 is triggered It is therefore imperative that at least one fixed resistor put in series with any potentiometer connected to pin seven, to prevent accidental damage.

See, also, this answer to Problems with Atari Punk Console circuit.

When the rightmost potentiometer is at 0 resistance, the 555 heats up rapidly because, internally, pin 7 shorts to ground during parts of the oscillation, to discharge the 0.1uF capacitor. With the potentiometer at 0 ohms, this results in a direct short across the power rails and a very large current flowing through pin 7 (as well as a direct short discharging the capacitor). The absolute maximum current through pin 7 for the TLC555 is 150mA. To ensure this isn’t exceeded, you could try connecting 220 ohm resistors (I’m assuming a 9V supply) in series with both potentiometers, and also between pins 6 and 7 of the rightmost 555.

and

Most of the audio range of the circuit is contained within the lowest 20% or so of the resistance of the right-most potentiometer. Try reducing the value of this potentiometer, or connecting a 10k ‘fine tuning’ potentiometer in series with it, if you want more precise control.

The additional fixed resistance would also shift the workable range of the potentiometer’s range, see this post.

For a 9V supply I calculate that only 60 Ω is required: R=V/I=9/0.15=60. For a 5V supply I calculate that only 60 Ω is required: R=V/I=5/0.15=33.3

Capacitance

Adding additional capacitance, in parallel, to the astable (first timer), increases the RC time, thereby reducing the frequency (i.e. increases the bass)

Line out

See the Notes – Output – Line out section above

250kΩ potentiometer to the astable

Change the 500 k potentiometer to a 250 k potentiometer, for the first, astable, timer.

This gives a better frequency response as the higher end of the 500 kΩ potentiometer is, let’s say, not used to its full potential (excuse the pun!).

Tie CV to ground

If the CV inputs are not being used, then it is best to tie them to ground, via a capacitor. From 555 IC Tutorial & Circuits, by Terence Thomas,

ABOUT PIN 5

In all of the circuits you have seen in this article, not one of them has a use for pin five; however, pin five should not be overlooked. Access to the voltage divider high reference point is found at pin 5 and a capacitor from pin 5 to ground can stabilize a battery-operated circuit. See middle schematic, Voltage Divider Stabilization

If the CV inputs are used then again from 555 IC Tutorial & Circuits, by Terence Thomas,

Another use for pin 5 is to change the reference voltage window from 2/3 to ½ of the supply voltage. This will effectively change the operating frequency of an oscillator and serve as a modulating control. An illustration of both techniques can be seen in the diagram, Pin Treatments.

Enable control

From 555 IC Tutorial & Circuits, by Terence Thomas,

ABOUT PIN 4

In almost all circuits with the 555 timer, pin 4 is connected to positive end of the power supply. This is because it resets the internal flip-flop when an operating cycle is complete. You may choose to use pin 4 as an enable control. You can see what circuit modification is necessary to use pin 4 as an enable control in the Pin Treatment illustration.

Schematic of changes

Atari Punk - Basic Mods Highlighted
Atari Punk – Basic Mods Highlighted
These are the four main changes – the first three are the best:

1. Two 220 Ohm resistors – placed in series with the potentiometers they prevent current damage to the 555/556 timer IC

2. A change from the 500k Ohm potentiometer to 250k ohm, on the first 555 timer IC – This gives a better frequency response

3. An additional 0.1 µF capacitor – placed in parallel with the original 0.01 uF, gives a different frequency response (more bass, I think) – you can ignore the switch

4. A 0.01µF capacitor tied to the CV input on both timers – this stops the CV input (pin 5) from floating about in the air, like an antenna and picking up loads of noise and interference.

Note on output

In the circuit above it may be noted that the output is not grounded, but rather referenced to Vcc. The same in this circuit, Atari Punk Console tutorial.

Atari Punk Console schematic - with output referenced to Vcc
Atari Punk Console schematic – with output referenced to Vcc

At first glance, this seems just both rude and wrong. However, it should be noted that the original schematic also connects the speaker between +V and the output:

Stepped tone generator - original schematic
Stepped tone generator – original schematic

See Audio output referenced to Vcc.

Further Improvements

As stated here, CMOS 4017 Based 8 Step Sequencer:

While it is a great circuit that will bring a smile and encouragement to any audio electronics beginner, the novelty wears off fairly quick. You’ll find some sweet spots and maybe be able to get a cool tone every once in a while, but the output will be static and boring. To get any good sounds, you’ll find yourself tweaking the knobs for some dynamic output.

If only there was a way to make this circuit hands-free, dynamic, and capable of playing on its own, something musical…

Sequencer

One can use a sequencer (such as a 4017 based sequencer). This sequencer can either be connected:

  • to the CV input of the astable and/or monostable, or;
  • in parallel to the potentiometer of the astable.

For the second case, see the rather rudimentary Atari punk console + Baby sequencer 4017 IC and also the excellent TaintPaul’s blog(s):

Here is his schematic:

Atari Punk Sequencer (with 4017)
Atari Punk Sequencer (with 4017)

See also Baby 10 step sequencer help!

From further information see Sequence Dancing, which deals with sequencers in depth.

Dual Atari Punk Console Synthesizer

Dual Atari Punk Console Synthesizer Demo

This setup adds

  • Two voltage control (VC) inputs – for connection to the output of a sequencer, suc as a Baby 10 (CD4017 based) sequencer. Although it is unclear as to which CV pins (555 #1 or #2, or to both?) the VC inputs are connected. However, generally, if there is only one VC input, per APC, then that VC is connected to the CV input of the astable, or first, 555 in the APC, as this controls the frequency. So, it would be assumed that the two VC inputs in this device, go to the CV inputs of the astables of each respective APC circuit, and the CV inputs of the monostable, or second, 555 are left unconnected, or go to GND (via a 10 nF capacitor). See examples:
  • One audio input (unclear as to how this is connected – is it in parallel with the principal Atari Punk output);
  • One three way switch, per Atari Punk, for On/Off and switchable button or variable resistor (VR) control.
  • Two buttons per Atari punk (unclear if the VRs define/modulate the settings, or are they pre-set (with fixed value resistors)

Dual APC Synthesizer – (2 Outs, 2 CV In, 1 Audio In, 4 Trigger Buttons)

https://www.etsy.com/listing/152178788

A new sheriff is in DIY-town … welcome the Dual APC The “Dual APC” is a unique, analog synthesizer concept developed out of the original Atari Punk Console circuits. It features two identical APC’s with individual outputs, two CV (control voltage) Inputs, an audio input (play to any audio source like mp3 player, smartphone, etc.) and four trigger buttons to play up to six different notes in one machine. It runs with two AAA batteries (included).

Each APC unit on board, has a switch (top right and left) which turns it on/off, into continuous play or trigger button control.

Of course there are a tons of ways to get new sounds out of this little beast … just try connecting the out of APC 1 to the CV of APC 2 and hear what happens … and it doesn’t end there! It’s almost a small pocket modular synthesizer 😉

Every unit is fully analog, limited to 50 pieces, handcrafted and tested in Munich, Germany.

Synthrotek

  • APC
    • Control Voltage (CV) input allows step sequencers and waveform generators to expand the sonic capabilities of the Atari Punk Console from drone to arpeggio-like dynamism. Use any variable voltage source from 0-Supply Voltage for some glitchy goodness!
  • APC – Atari Punk Console BASS Modification Version – Just has different value resistor/capacitor values for lower frequencies.

5556

This video, The Ultimate 556 Timer Synthesizer: 5 Atari Punk Consoles + Modulation, demonstrates the lengths to which the APC can go. Five 556 chained together via their CV inputs. It sounds terrible but is interesting nevertheless. As the author states it was a case of “can it be done, and not should it be done”. He uses a Radio Shack Electronic Sensorlab 28- 278, on eBay for around $10, see Radio Shack Electronic Sensorlab 28- 278 with a workbook.

Repeatability

One problem that I have with the APC is that, due to its inherent natural/design, it is nigh impossible to exactly reproduce a sound, or sequence of sounds, that you played previously. This is because it is difficult to reproduce the exact rotary knob settings in sequence, again and again, in a reproducible way. Even using a linear potentiometer would not help much. Therefore the sound [sequences] created are, very much, of the moment, and not possible to score in any meaningful way. Playing the same tune (or sequence of noises) is not possible, as the notes would not be exactly right. We are not just talking about slight variations in notes, as with a guitar fingering – which obviously differ gig to gig, recital to recital – but entire octaves, due to the poor resolution of the rotary dial (unless you have non-human precision finger tips).

However, if one was to employ a digital potentiometer (such as the AD5171), controlled by a µController, such as the Arduino (see Arduino – DigitalPotentiometer), then it would be possible to produce a sound sequence that is reproducible/repeatable. Also a faster response time, tone switch time, would be achieved.

AD5171

However, the AD5171 only provides up to 100 kΩ in 64 steps, using I2C, and is SMD. Up to two AD5171 devices can be used with one Arduino, via the I2C interface, thus providing a maximum of 200 kΩ. Thus, using only a 200 kΩ range, two Arduinos would be required for one APC. Not an ideal situation, for reasons of timing and sychronisation. One Arduino could be used for one APC, if only a 100 kΩ range is used, but that rather limits the APC’s bandwidth.

MCP4151

The MCP4151-103E/P would be another option, but again only goes up to 100 kΩ but with 129/257 steps, using SPI, thereby offering a greater resolution (see Netduino/Arduino to Variable Resistor). Available as DIP and SMD.

See also How to Build a Digital Potentiometer Circuit Using a MCP4131

MCP41xxx

MCP41100, 10kΩ in 255 steps, with SPI. From Instructables – Digital Potentiometer MCP41100 and Arduino which comes with an Arduino tutorial.

See also MCP41010 Digital Potentiometer Arduino User Manual

AD5204/AD5206

From Arduino – DigitalPotControl, the AD5206 is a quad/sextet channel 10/100 kΩ variable potentiometer in 255 steps, using SPI. DIP-24

AD5207

256 step digital potentiometer, as used in the Rigol DS1054Z oscilloscopes (see Scope front ends), See EEVblog #674 – Rigol DS1054Z Teardown29:18

DS18030

The DS1803 is a Dual 100 kΩ with 256 steps DIP-14, and is addressable using 3 address inputs and a 2-Wire serial interface

DS1806

The DS1806 is a Sextet 100 kΩ with 64 steps  DIP-20, with a 3-wire serial port provides for reading and setting each potentiometer, and the devices can be cascaded for single processor multi-device control

DS1844

The DS1844 is a Quad 100 k Ωwith 64 steps  DIP-20,

Two interface control options
– 5-wire serial
– 2-wire addressable

AD5222

The AD5222 is 1 MΩ with 128 steps, SMD

AD524x

The AD524x (AD5241/AD5242), is a 1 MΩ digital potentiometer, with only 256 steps, using I2C

AD5235

The AD5235 is a dual channel 250 kΩ with 1024 steps and SPI, although it is a SMD. See Digital potentiometer AD5235 – SPI – Working example.

//GROZEA Ion
//www.grozeaion.com
//Open Source, licensed under a Creative Commons Attribution-NonCommercial 3.0 License (http://creativecommons.org/licenses/by-nc/3.0/)
//License Agreement
//
//Copyright (c) 2015 GROZEA Ion (www.grozeaion.com)
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without modification,
//are permitted provided that the following conditions are met:
//
//* Redistributions of source code must retain the above copyright notice, this
//  list of conditions and the following disclaimer.
//
//* Redistributions in binary form must reproduce the above copyright notice, this
//  list of conditions and the following disclaimer in the documentation and/or
//  other materials provided with the distribution.
//
//* The name of the copyright holder may not be used to endorse or promote
//  products derived from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR
//IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
//MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
//SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
//SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
//OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
//IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
//ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.


//Control Registers
#define CMD__NOTHING	B00000000 //0  - Do nothing
#define CMD_MEM2RDAC	B00010000 //1  - Restore EEMEM (A0) contents to RDAC (A0) register. See Table 16.
#define CMD_RDAC2MEM	B00100000 //2  - Store wiper setting. Store RDAC (A0) setting to EEMEM (A0). See Table 15. - Use a delay of 50ms!!!
#define CMD_USER2MEM	B00110000 //3  - Store contents of Serial Register Data Byte 0 and Serial Register Data Bytes 1 (total 16 bits) to EEMEM (ADDR). See Table 18.- Use a delay of 50ms!!!
#define CMD_DECRE6DB	B01000000 //4  - Decrement by 6 dB. Right-shift contents of RDAC (A0) register, stop at all 0s.
#define CMD_DEALL6DB	B01010000 //5  - Decrement all by 6 dB. Right-shift contents of all RDAC registers, stop at all 0s.
#define CMD_DECR1STP	B01100000 //6  - Decrement contents of RDAC (A0) by 1, stop at all 0s.
#define CMD_DECA1STP	B01110000 //7  - Decrement contents of all RDAC registers by 1, stop at all 0s.
#define CMD_ALL2RDAC	B10000000 //8  - Reset. Refresh all RDACs with their corresponding EEMEM previously stored values. - Use a delay of 30us!!!
#define CMD_GETEMEM	B10010000 //9  - Read contents of EEMEM (ADDR) from SDO output in the next frame. See Table 19. - Use a delay of 30us!!!
#define CMD_GET_RDAC	B10100000 //10 - Read RDAC wiper setting from SDO output in the next frame. See Table 20. - Use a delay of 30us!!!
#define CMD_SET_RDAC	B10110000 //11 - Write contents of Serial Register Data Byte 0 and Serial Register Data Byte 1 (total 10 bits) to RDAC (A0). See Table 14.
#define CMD_INCRE6DB	B11000000 //12 - Increment by 6 dB: Left-shift contents of RDAC (A0),stop at all 1s. See Table 17.
#define CMD_INALL6DB	B11010000 //13 - Increment all by 6 dB. Left-shift contents of all RDAC registers, stop at all 1s.
#define CMD_INCR1STP	B11100000 //14 - Increment contents of RDAC (A0) by 1, stop at all 1s. See Table 15.
#define CMD_IALL1STP	B11000000 //15 - Increment contents of all RDAC registers by 1, stop at all 1s.

//EEMEM No.--Address--EEMEM Content for …
//1 		0000 		RDAC1
//2 		0001 		RDAC2
//3 		0010 		USER1
//4		0011 		USER2
//… 		… 			…
//15 		1110 		USER13
//16 		1111 		RAB1 tolerance

// Macros - Toogle this pin to repeat last command
//This is PIN9 on arduino Uno/Duemilanove
#define CS_ON	PORTB |=  (1<<1)
#define CSOFF	PORTB &= ~(1<<1)
uint8_t myVal = 0;

void setup() 
{
  Serial.begin(9600);
  //Setup SPI and start it
  DDRB |= B0101110;//Set digital pin 10SS, 11MOSI and 13SCK as output
  //See https://sites.google.com/site/qeewiki/books/avr-guide/spi for setting the SPI
  SPSR = B00000000;//In my case Clock / 2 = 12Mhz is not working so i use Clock / 4
  SPCR = B01010000;
  DDRC &= ~(1<<0); //A3 Input - Read Status   PORTC |= B00000111;// Turn on 20K pullup on analog 0, 1, 2   CS_ON;   delay(15);   setWiper(0, 999);   setWiper(1, 333);   Serial.print("W1 Value : "); Serial.println(getWiper(0));    Serial.print("W2 Value : "); Serial.println(getWiper(1));   stepUpOne(0);   stepUpOne(1);   Serial.print("Increase W0 with 1 : "); Serial.println(getWiper(0));   Serial.print("Increase W1 with 1 : "); Serial.println(getWiper(1));   stepUpOne(0);   repeatCMD();   stepUpOne(1);   repeatCMD();   Serial.print("W1 after repeat : "); Serial.println(getWiper(0));   Serial.print("W2 after repeat : "); Serial.println(getWiper(1));   stepDownSix(0);   stepDownSix(1);   Serial.print("Decrease W0 with 6dB : "); Serial.println(getWiper(0));   Serial.print("Decrease W1 with 6dB : "); Serial.println(getWiper(1));   stepDownSix(0);   repeatCMD();   stepDownSix(1);   repeatCMD();   Serial.print("W1 after repeat -6dB: "); Serial.println(getWiper(0));   Serial.print("W2 after repeat -6dB: "); Serial.println(getWiper(1));     SPCR &= ~_BV(SPE);//End SPI    } void loop()  { } void setWiper(uint8_t w, uint16_t value) {   CSOFF;   myVal = transferData(CMD_SET_RDAC + w);   myVal = transferData(value >> 8);
  myVal = transferData(value & 0xFF);
  CS_ON;
}

uint16_t getWiper(uint8_t w)
{
  uint16_t ret;
  CSOFF; 
  myVal = transferData(CMD_GET_RDAC + w);
  myVal = transferData(CMD__NOTHING);
  myVal = transferData(CMD__NOTHING);
  CS_ON;
//  __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t"
//          "nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t"
//          "nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t"
//          "nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t"
//          "nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");//only 11 on this row are enought or 3.2us only for new chips at room temp
  delayMicroseconds(30);
  CSOFF;
  myVal = transferData(CMD__NOTHING); //Discard first byte
  ret = (transferData(CMD__NOTHING) << 8);
  ret += transferData(CMD__NOTHING);
  CS_ON;
  return ret;
}

void stepUpOne(uint8_t w)
{
  CSOFF;
  myVal = transferData(CMD_INCR1STP + w);
  myVal = transferData(CMD__NOTHING);
  myVal = transferData(CMD__NOTHING);
  CS_ON;
}

void stepDownSix(uint8_t w)
{
  CSOFF;
  myVal = transferData(CMD_DECRE6DB + w);
  myVal = transferData(CMD__NOTHING);
  myVal = transferData(CMD__NOTHING);
  CS_ON;
}

void repeatCMD()//See page 21 in manual Another subtle feature of the AD5235 is that a subsequent CS strobe, without clock and data, repeats a previous command
{
  CSOFF;
  CS_ON;
}

uint8_t transferData(uint8_t data)
{
    SPDR = data;// send the data
    while(!(SPSR & (1<<SPIF)))  // wait until transmission is complete
    ;
    return SPDR;
}

Limitations of Digital potentiometers

There is a lack of large value (greater than 250kΩ) digital potentiometers – Digikey have them apparently, see Arduino – 250k, 500k and 1meg digital pots.

If you live in the U.S. it looks like Digi-Key has selection.

However, even Digi-key seem to lack 500 kΩ, see 500kohm Digital Potentiometer? Do they even exist?

On DigiKey it just jumps from 250kohm to 1Mohm

A 1 MΩ potentiometer with only 128 or 256 steps would not have sufficient resolution, such as the AD5222/AD524x. Two 250 kΩ digital potentiometers would be better, such as the AD5235, which has 250 kΩ and 1024 steps, with SPI, but it is an SMD (see above), and as such is a bit of a pain w.r.t. breadboard/veroboard mounts. See also Digitally Controled 500k resistor and Putting device requiring 500k potentiometer under micro control.

One could, in theory, use a 100 kΩ or 250 kΩ and change the capacitors to 500/50 nF or 200/20 nF, respectively, in order to maintain the RC value constant. Some “tonal resolution” may be lost, however. It is good to remember that the original circuit used 1 MΩ potentiometers, with the same 100/10 nF capacitors.

MOSFET transistor

Alternatively the use of a MOSFET transistor, en lieu of the variable potentiometer, would provide the simplest solution and wider range (from open to closed circuit) resistor, with 256 steps using analogueWrite(), or a relay controlled resistive array where the resolution would be controlled by the number of relays used – not a pretty solution (see Build variable resistor controlled by Arduino). Obviously you could swap the relays for MOSFET transistors.

Again, from Arduino – 250k, 500k and 1meg digital pots

you can extend the range of existing pots by shorting or not a series resistor. For example, if you have a 500 kOhm pot, you can extend it to 1 MOhm by putting it in series with a 500 kOhm resistor, and shunt that resistor in parallel with a low-Rds(on) MOSFET transistor. Basically, you’re adding another, higher valued, bit to the input control.

Note that:

You could do that, but I’d go for a much higher Rds(on) MOSFET with as low a gate capacitance as possible to reduce switching transients that couple through to the signal.

The ultimate APC

The ideal would be a combination of the dual (Dual Atari Punk Console Synthesizer Demo) and the synth (How to Make a 555 Synthesizer Circuit (The Atari Punk Console), with switchable keyboard/rotary control. That way, you would have the best of both worlds. The modified dual APC would also have four VC inputs, two per 555 timer.

It would also be nice to have switchable capacitor types, i.e. mylar/polystrene/etc., for that certain nuanced variation in sound.

A sequencer can be added, with a switchable oscillator CV, see Sequence Dancing. The sequencer would ideally have at least two outputs, for frequency and pulse duration, and maybe a third for timbre (assuming that a timbre circuit is added).

Modular mount

From Google images: This image is actually from the hell hole of a walled garden that is pinterest:

Atari Punk module
Atari Punk module

From dual Atari punk console

177x413_6851

Substituting the 555 timers

It is possible to replace the 555 timers with other multivibrators based around:

Other unrelated circuits

Auduino

See the amazing Auduino:

Add a Light Dependent Resistor, you have an instant theremin.

and

Add a linear softpot, instant keyboard or ribbon controller.

And its sequencer based derivative, Groovesizer, see also video link.

See also SpankFun’s Build an Auduino Step Sequencer.

Theramin

Talking about theramins, here is an Arduino based theramin, Quick and easy Arduino-powered theremin

Circuit bending – Maplin drum kit

Long ago, I had a kit from Maplin, that used 4069 CMOS hex invertors, as filters/amplifiers (see logic noise:filters and drums),  in conjunction with five or six piezo-electric buzzers which were used as drum pads, as they created frequency rich signals (almost square waves) when tapped, and the required frequencies (or frequency bands) could thereafter be filtered out by the 4069 invertors. See also Circuit bending part 3.

From List of Maplin projects: Computadrum Volume 3 Number 12 Page 20. This description from Vactrol Bass Drum design, seems to match the kit that I had:

It is possible to make drums with a 4049 or 4069 hex inverters with the proper Twin T circuit, doesn’t work so well with the simpler version that I used.

There used to be a kit available from Maplin ( in the UK ) called computadrum, it had six twin tee drum circuits built around a 4069 hex inverter and an opamp to mix all the voices together. I still have a copy of the article, the actual board got chucked out years ago, sadly.

From The Microcomputer Bibliography

[ART] Penfold, Robert. “Computadrum.” Electronics: The Maplin Magazine Vol. 3, No. 12. September-November 1984. pp.20-24.
Constructional article. 6 channel drum synthesiser. A kit was sold by Maplin Electronic Supplies. Connections noted for Atari, Commodore, BBC, and MTX micros.

However, I don’t remember there being a connection for home computers, mine was a stand alone unit.

From Electronics-Today-1985, the Computadrum kit was LK52G, Book 12XA 12 N

Advertisement from Electronics Today 1985
Advertisement from Electronics Today 1985

4069 Theramin

From 4069 Theramin, and see Misc Projects:

Theremin 4069
Theremin 4069

Rock Drill 4069

This is a similar circuit to the 4069 based Computadrum (see above). From Rock Drill 4069, PDF link

Rock Drill Schematic
Rock Drill Schematic

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s