Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Audio / Teaser: polyphonic DCO synth with analog filters for about 100$ on: July 27, 2014, 04:29:34 pm
My new "baby" is a polyphonic wavetable synth with analog filters. Costs for the project: about 100USD!
It´s an early phase of invention, so no code snippets (mostly of copyright and cleaning up reasons) and schematics so far. But when the project is finished, I promise you to feed you with all informations!

Key facts:
Polyphonic “true” 8-bit synth with analog filters each voice. I’ll start the project with 4 voices.
Cheap hardware with only two kind of “special IC”: V2164 and TLC7528. (the first you get from smallbear and the DAC from ebay/aliexpress)

The synthesizer is splitted into several modules:

Master module: (my choice is a Texas instruments  Tiva™ C Series TM4C123G LaunchPad)
responsable for:
Hardware and user interface:
Display (TFT or/and 20x4 LED), Midi, physical Inputs (Potis, tact switches, encoder), LED’s
patch organization, generating ADSR (2-3 each voice) and LFO’s (2-5), communication with voice modules (via I2C), digital/analog conversation with ssm2164 VCA/VCF chips (via PWM).

Voice modules (driven by ATmegas328)
Pro mini (hey, 2$ a piece!)
8bit DAC TLC7528 (2 channels are hardware mixed into filter section!)
V2164 4-channel VCA IC (3 channels used for the analog multimode (LP,BP,HP) filter and one channel for VCA)
CD4053 for digital choosing type of filter
TL074 as standard OP.
Software (...until now: early beta!):
2 independent oscillators with 256 step wavetables (sin,tri,saw-up,saw-down,pulse, PWM)
1 LFO (for tone modulation and/or PWM)
unique protocol for communication with master module (commands implemented o far: pitch, tune and type for both OSC’s, LFO type and speed, LFO->OSC1+2 modulation)

state of affairs:
one voice module tested with filter and driven by the TIVA launchpad. Works like a charme!
the first thing was choosing the right protocol for all modules:
Serial: not possible: need the whole port for the DAC
SPI: pin conflicts, didn’t managed a error-free communication (the ATmega is on top of CPU load with sample rate of 62,8kHz, 2 OSC’s and 1 LFO!)
so I tried I2C and I was amazed, because it worked without any problems. One benefit is, that you can add easily more voice modules without additional hardware (pins) and maybe I will implement a I2C eeprom with additional wavetables.

adapted software (libraries):
Core routine for wavetabes:
Ideas how to manage the DAC:
V2164 as multimode filter: various sources, especially the shruti-synth schematics and “unusual synthesizer circuits”


progmem (reading wavetables direct from flash) is MUCH to slow, so I’ve to use the RAM and each time a the type of wave is changing I need to load it again into RAM. So 768kB (2 OSC + LFO) are permanently needed with all other variables the RAM is about 70% (safe limit) and the CPU load (within the interrupt) is HARD on limit. So don’t thing about adding more voices each module.

The nasty thing with the negative voltage supply:
For all “converter IC`s”: Better take a 9V line and use a negative voltage regulator (7905), much more headroom!
There are many ways you can generate it:
ICL7660S (remember the “S”!!): easy circuit, cheap, downside: you need on IC/module, because you can only get a few milliamperes out of it. Not really “clean” sounding.
555 timer: easy circuit, ultra cheap, more components, maybe conflict with the frequency, little more power than 7660
LT1054: better facts than 7660, but expensive (didn’t tried one out)

AC wallwart conversation:
One of the best and cleanest solutions! (tested with my oscilloscope). downside: much components, maybe “oversized”

the trick with the 5/9V DC/DC converter:
you can get these boxes nearly for free: look at an old network card or router with “BNC” connector you own for sure such a “black magic box”. with this you can get -9V from +5V. downside: I measured about 50-60mA at idle.
some pics: (only german, scroll a little bit down):

2  Using Arduino / Displays / Re: 2.2 TFT Serial with ILI9225 - driver needed on: April 05, 2014, 04:58:23 pm
I'm a little bit sleepy, so excuse my answer: smiley
3  Using Arduino / Displays / Re: 2.2 TFT Serial with ILI9225 - driver needed on: April 05, 2014, 08:04:04 am
you need to convert the byte/integer as a string

Here is an example:
int tempsensordata =analogRead(A1);
  String outputscreen = String(tempsensordata);

  myScreen.text(10, 10, outputscreen);
4  Using Arduino / Displays / Re: 2.2 TFT Serial with ILI9225 - driver needed on: April 04, 2014, 01:20:53 pm
Because I was asked by PM, some hints:

I dont know if I've modified my library, so I'll tell you the way how to find the pin mapping:
For some reasons they are hardcoded in the screen_4D_22_library.h file.
So my *.h file says:
#define _4DSHIELD22_LCD_RESET A0     // Arduino Pin A0
#define _4DSHIELD22_LCD_RS 8         // Arduino Pin 8 - data or command
#define _4DSHIELD22_LCD_CS 7         // Arduino Pin 7 - select
#define _4DSHIELD22_LCD_Backlight 9  // Arduino Pin 9

#define _4DSHIELD22_TOUCH_YU A3  // Arduino Pin A3 - analog
#define _4DSHIELD22_TOUCH_XR A4  // Arduino Pin A4 - analog
#define _4DSHIELD22_TOUCH_YD A1  // Arduino Pin A1 - analog or digital
#define _4DSHIELD22_TOUCH_XL A2  // Arduino Pin A2 - analog or digital

The last 4 lines you can forget for the moment, because our display has no touch screen.
So the configuration should be:
(left: display, right UNO)
CLK <—> SPI clock signal D13 (SCK)
SDI <—> Serial data input pin sda D11 (MOSI)
RS <—> D8 (Data/Command)
CS  <—> D7 (chip select (SPI command))
LCD  <—> D9 (Display backlight on/off, can be wired directly to 5v (better with 100R resistor!)
RST  <—> A0 (Reset)
The library itself is a little bit overloaded in my opinion and hard to comprehensible.
I found another library, but didn't tested it out:

5  Using Arduino / Audio / Re: Using MCP4921 DAC for wave generation... strange line on scope reading. on: March 29, 2014, 02:53:15 pm
looks like that the output is disturbed by an interrupt.
Unfortunately you didn't post any code or library you are using.
So if the library isn´t using any interrupt, you could try the noInterrupts() argument. Otherwise you have to disable any other interrupt, that you don't use by hand. (especially PWM, tone()...)
I'm interested in your project:
My attempts getting out wavetables from the 4922 (even with only 256 steps) were unsatisfactory: I was only able to get out about 1kHZ, so if you could post your code (and perhaps the used library) I'll try to help you!

6  Products / Arduino Due / Re: Arduino DUE X10 library on: March 23, 2014, 04:10:59 pm
Did you ever got a answer about this problem?
I'm struggling with the same problem with a different library, but this is not the only problem. It would be nice for a documentation how to convert libraries from avr to sam. (not only spi...)
7  Using Arduino / Displays / Re: 2.2 TFT Serial with ILI9225 - driver needed on: March 19, 2014, 06:08:44 pm
Using following library works like a charme with my display:
Using the first example sketch!
8  Using Arduino / Displays / 2.2 TFT Serial with ILI9225 - driver needed on: March 19, 2014, 03:51:47 pm
I'm struggling around with following device:
I tried out many libraries, even utft doesn't work. (Driver must be in serial mode, tried out every one in the source code)
Voltage isn´t a problem because this device has an onboard converter for all pins.

Pin description is easy:
11PIN Standard wiring used IO:
1. VCC—Power supply (5V/3.3V)
2. GND-- Power supply (GND)
3. GND-- Power supply (GND)
4. NC—No connect
5. NC—No connect
6. LED-- Pick IO control back light off or PWM brightness control
7. CLK—SPI clock signal
8. SDI—Serial data input pin sda
9. RS—Command (RS=0)/ Parameter (RS=1)
10. RST—Reset pin
11. CS-- Chip selection pin

I can connect it (as shown on the product foto) directly to VCC,GND,A0-A5
A0 is only for the brightness.
Unfortunately there is no easy research for that display ( in serial mode)
I tried to contact the (friendly) seller, he only send me the same description for the display as on the product page (but in chinese smiley )
Does anybody has a working code for this display or some hints?

Thank you
9  Using Arduino / Audio / Re: Possibility for polyphonic Wavetables (DDS) on different pinouts on: February 19, 2014, 06:23:03 am
Dear TRGT8,
4 voices without modulation sounds good for me!
I know Timer one, interrupts, progmem, but the atomic library is new for me! Mozzi is a really hugh project and a little overkill for my further project.
May you can post some code of your experiences?

Thank you
10  Using Arduino / Audio / Re: Possibility for polyphonic Wavetables (DDS) on different pinouts on: February 10, 2014, 04:24:43 pm
"Schematics and Source Code - $ 14.95 USD "
...a little bit pricey just to answer my question  smiley
seriously: It should be possible to get out 8 voices per chip.
11  International / Deutsch / Re: Arduino Uno verhindert hochfahren (Mac Mini) on: February 10, 2014, 11:49:58 am
...das mit dem nicht hochfahren wollen ist mir bei meinem 2009er MBP auch schon öfters passiert. Kann auch nicht nachvollziehen wann und wie, hängt wohl auch davon ab, welchen USB-Port ich verwende.
Hab das Problem anders gelöst:
Aktiven USB-Hub um ein paar Euro gekauft (ist beim MBP sowieso fast Pflicht) und weg sind die Probleme und du hast dadurch gleichzeitig einen kleinen Schutz für die Mac-USB Ports vor Überspannung (dann ist halt der paar Euro Hub hin).
Also bitte nicht gleich das OS neu installieren usw..

12  Using Arduino / Audio / Possibility for polyphonic Wavetables (DDS) on different pinouts on: February 10, 2014, 11:41:24 am
I'm working on an analog synthesizer project with "real" VCO´s (based an ICL8038), so my idea for the next projekt is, using DCO´s, with other words DDS, direct digital synthesis.
So the setup should be:
1 Atmega328 for controlling MIDI, ADSR, routing, switching, connected to:
Amega328(s) for DCO routed to:
SSM/V2164 (for VCA and  VCF good and cheap chip by the way!)
To make the project more interesting i´ll use polyphonic of 4-6 voices
My first attempts generating wavetables (8-bit, 256steps) with external DAC´s (MCP49xx)  brought me back to the ground of the earth. (Slow as hell). Not even more than 1.2khz was possible (without control!) in the shortest code example (and different libraries).

So I came over the "Mozzi library" which generates DDS as a charme but only for one pinout. (I want to filter the voices individually, like a "real synth").

My question is whether it would be possible, making up to 4-6 (basic)wavetable voices with on atmega and how.(8bit, 256 steps minimum)
The control of the chip should be easy as possible (Voice#, value, waveform (maybe PWM and modulation..keep on dreaming)).

My short calculation says no: 16MHZ / 256 = 60khz left for everything...

Thank you and
13  International / Deutsch / Re: Brainstorming: Arduino gesteuerter Analogsynth on: October 13, 2013, 03:23:13 am
Hab ihn leider auch noch nicht getestet, beim kurzen Durchlesen ist mir folgendes aufgefallen:
1 Poti am AnalogIn0 = Wellenformauswahl (7 Werte)
1 Poti am AnalogIn1 = Speed
Pin3 ist die Ausgabe (einfach mal ein TestLED daranhängen)
Die Timer2 Config (/*--- TIMER2 CONFIG ---*/) würde ich mal entfernen. (sehe den Sinn nicht im Sketch)
Serial.begin ist auch nicht notwendig.
Werd´s selbst mal testen

Am LCD Shield hab ich den Code schon erfolgreich getestet (selbst geschrieben):
mit Timer1.initialize(100000);  legt  man die Rate fest, Ausgabe ist 12 Bit
#include <TimerOne.h>
 #include <LiquidCrystal.h>
 LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
 byte zaehler     = 0;
 int sintable[] = {
void setup()
  // Initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards
//  pinMode(13, OUTPUT);   
   lcd.begin(16, 2);              // start the library
  Timer1.initialize(100000); // set a timer of length 100000 microseconds (or 0.1 sec - or 10Hz => the led will blink 5 times, 5 cycles of on-and-off, per second)
  Timer1.attachInterrupt( timerIsr ); // attach the service routine here
void loop()
  // Main code loop
 lcd.print("   ");
 if (zaehler ==0)
 lcd.print("         ");
/// --------------------------
/// Custom ISR Timer Routine
/// --------------------------
void timerIsr()
    // Toggle LED
14  International / Deutsch / Re: Brainstorming: Arduino gesteuerter Analogsynth on: October 12, 2013, 04:08:06 pm
hab mittlerweile auch einen einfachen, brauchbaren Code gefunden, muss natürlich modifiziert werden:
Glaube aber, dass in seinem Text ein Fehler ist:
i’m only using timer2 for output in this code. i’ve started implementing the LFO code into my 8-bit melotronium where timer 2 is dedicated for the audio output.
Ist wohl ein Tippfehler und er meint, dass Timer0 verwendet wird.
15  International / Deutsch / Re: Brainstorming: Arduino gesteuerter Analogsynth on: October 12, 2013, 12:48:24 pm
Lt. deiner Tabelle dürften die Centbereiche recht egal sein, nunmal da ein LFO nicht unbedingt die Rolle eines VCO´s übernehmen muss.
Wie gesagt, ob der 328er die "Power" besitzt, da kann ich nur eines machen: Es ausprobieren smiley Realistisch gesehen, werden mehr als 500HZ-1kHZ nicht drinnen sein.
Zu den ganzen alten analog(digital) IC´s: Die hat restlos alle Dave Smith aufgekauft und verbaut sie in seinen Neuerscheinungen smiley
Ironischerweise bin ich ja Behringer zum Dank verpflichtet, da diese CoolAudio vor x Jahren aufgekauft haben und dadurch sind zumindest noch VCA-Chips und BBD-Chips zu humanen Preisen erhältlich, wenn auch schwer zu bekommen.
Die einzige andere Firma ist THAT, die Preise sind sind halt nicht mehr im Budgetbereich anzusehen.
Sounddemos werden wohl noch länger auf sich warten lassen, da ich noch mitten in der Experimenterphase bin, wo ich alles austeste bevor ich meine Prototypplatinen löte.
Interessanterweise ist mir bei meinen ganzen Überlegungen und Experimenten ein "Abfallprodukt" eingefallen, dass - zumindest am analog Retro Synthiemarkt ein Renner wäre: Das Midi-CV Interface mit Wertetabelle (könnte man sogar als Autotune konzipieren) - die meisten alten Analogsynths sind, alterungsbedingt - vollkommen out of tune (auch in sich), DAS wäre dann die Abhilfe smiley-wink

Pages: [1] 2 3 4