electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
  host / artist show at your time
today> Twyndyllyngs not postponed Chez Mosc
 Forum index » DIY Hardware and Software » Arduino
General purpose arduino / synth circuit
Post new topic   Reply to topic
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Sun Nov 15, 2015 12:11 am    Post subject: General purpose arduino / synth circuit Reply with quote  Mark this post and the followings unread

I have just built a basic arduino circuit with these goals:
- using components I had to hand (arduino pro mini 5V, LM358, 6N137).
- midi in.
- midi out.
- CV in.
- CV out.
- audio in.
- audio out.
- plus a couple of knobs.

Which means with suitable software I can have a go at:
- midi processing, midi -> CV and CV -> midi.
- simple midi synth and simple audio effects.

I am hoping a few other people will build something similar and then we can swap coding ideas.

The midi in/out is the standard circuit using the UART on pins D0/D1.

The analogue in is to A0-A3. For A2/A3 I have biased the input to VCC/2 and used diodes to limit the voltage to +/-1.8V which I think makes it better suited to hooking up to analogue gear.

The analogue out is a 6 bit R-2R ladder, but attenuated by half and biased to VCC/2 to give an output of +/-1.25V. The 6 bits are on D2-D7, so if you use 8 bit PWM on D3 you can get an overall accuracy of 12 bits which is good enough for most purposes in the analogue synth world. The analogue output has a 2 pole filter and an opamp buffer.

I built it on stripboard with the arduino pro mini sitting up above the stripboard supported by resistors and a few solid copper wires between the two boards.

Nicolas
Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Sun Nov 15, 2015 12:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Schematic and layout - slight correction in the layout (22 Nov 2015).


arduino-midi-schem.jpg
 Description:
 Filesize:  255.35 KB
 Viewed:  700 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

arduino-midi-schem.jpg



Last edited by nicolas3141 on Sun Nov 22, 2015 2:09 am; edited 1 time in total
Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Sun Nov 15, 2015 12:22 am    Post subject: Reply with quote  Mark this post and the followings unread

From a software point of view I am using this library for the midi stuff:
https://github.com/FortySevenEffects/arduino_midi_library/releases/tag/4.2
Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Sun Nov 15, 2015 12:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Here are my programming experiments so far - basically trying to test everything to prove it works and see how far we can go with the little arduino and this simple circuitry. What I am finding is that as an audio effects processor it is pretty limited (perhaps ok for a learning experiment, but very lo-fi). As a midi processor and for building custom midi controllers it is great. For CV->midi and midi->CV I think it is also going to be pretty good.

Nicolas


arduino-midi-synth-tests-nicolas-woollaston.zip
 Description:

Download (listen)
 Filename:  arduino-midi-synth-tests-nicolas-woollaston.zip
 Filesize:  5.36 KB
 Downloaded:  484 Time(s)

Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Sun Nov 22, 2015 2:11 am    Post subject: Reply with quote  Mark this post and the followings unread

A few other people are in the process of building this and while helping them I noticed a minor error in the layout - now corrected in the diagram above. The resistors to ground at the bottom of the ladder was missing one in the layout. Corrected as of 22 Nov 2015.

Apologies,
Nicolas
Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Sun Nov 22, 2015 2:28 am    Post subject: Reply with quote  Mark this post and the followings unread

Some build pictures to show you how I suggest to mount the arduino off the stripboard with the resistors between.


arduino-midi-build-0.jpg
 Description:
 Filesize:  204.35 KB
 Viewed:  397 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

arduino-midi-build-0.jpg



arduino-midi-build-1.jpg
 Description:
 Filesize:  214.03 KB
 Viewed:  387 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

arduino-midi-build-1.jpg



arduino-midi-build-2.jpg
 Description:
 Filesize:  165.56 KB
 Viewed:  397 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

arduino-midi-build-2.jpg


Back to top
View user's profile Send private message
comrade_zero



Joined: Mar 05, 2009
Posts: 66
Location: arizona
Audio files: 4

PostPosted: Sun Nov 22, 2015 8:14 am    Post subject: Reply with quote  Mark this post and the followings unread

As always, great stuff Nicolas! With Arduino you generally have a limited amount of options when it comes to sound generation, but there are some decent enough examples of wavetable oscillators floating around out there. One fun project I built a few years ago was a midi-in arduino-driven monosynth using your simple saw-wave oscillator and a manually controlled sallen-key resonant low-pass filter. Using pwm out and a passive lpf I think I managed three octaves out of it.
Also, I haven't played with it personally, but the mozzi library is supposed to offer some resources for sound/midi...

cheers!
c_z
Back to top
View user's profile Send private message
nicolas3141



Joined: May 25, 2007
Posts: 185
Location: Christchurch, New Zealand

PostPosted: Wed Nov 25, 2015 2:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Cool. I am still progressing slowly with the software side. What should be feasible for those who have built VCF and VCA modules prior to building this arduino module, is that we should be able to program it for notes to come in on midi-in, put out filter CV on socket 1, gate on socket 2 and our main oscillator square wave on socket 3. The wire it:
MIDI:
keyboard -> arduino midi-in
CV:
arduino socket 1 -> VCF CV
arduino socket 2 -> adsr -> VCA CV
Audio:
arduino socket 3 -> VCF -> VCA

For a classic square wave monosynth.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Arduino
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use