electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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> Twyndyllings LIve Chez Mosc
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
How much I/O can you get in and out of a microcontroller?
Post new topic   Reply to topic Moderators: State Machine
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
AlanP



Joined: Mar 11, 2014
Posts: 726
Location: New Zealand
Audio files: 41

PostPosted: Sun Sep 01, 2019 6:58 am    Post subject: How much I/O can you get in and out of a microcontroller? Reply with quote  Mark this post and the followings unread

I'm turning over two projects in my head.

One is pretty simple, relatively speaking -- a big sequencer with lots of options, like the Moon M569 or Moog 960. A few outputs, and a lot of inputs from the stages and other input knobs and jacks going through some multiplexing. Can't be too hard.

The other is dead horrible -- I want a Eurorack DIY version of the Buchla 296 Spectral Filter thing. But doing the sixteen filters takes up a lot of space in analog, not even mentioning the sixteen envelope followers and sixteen VCAs after each filter, so doing this in digital kinda makes sense to me. (I'm kinda-not-really toying with the idea of saving up to get Roman's 4U project, and starting a 4U DIY Buchla setup.)

Except, can you get forty to fifty analog outputs out of a microcontroller? And can the poor little computer-on-a-chip handle all that analysing in real time?
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5252
Location: Moon Base
Audio files: 684

PostPosted: Sun Sep 01, 2019 8:11 am    Post subject: Reply with quote  Mark this post and the followings unread

depends on a couple of things:
- type of microcontroller
- speed, in theory you can add an infinite number of in/outs by connecting them serially (a mux would be serial), but this wil take more time to process.
- coding skills, it helps if you're of Jovian descent.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Sep 01, 2019 8:34 am    Post subject: Reply with quote  Mark this post and the followings unread

What PHOBoS said...

But also, the work the CPU has to do with respect to filters is a consideration. Filters are classified in a general sense according to their pole counts. This is a factor in DSP - the more poles, the more computation.

As for 40 or 50 outputs, that's a bit difficult. If you don't care about sound quality, then PWM can work and the microprocessor will need lots of pins. If the microprocessor can do PWM without needing the CPU to bang it out, more the better. If you need quality, then you need DACs. Today's DAC chips can come in multiple DACs per chip. SPI being the most common DAC communication protocol, the microprocessor would need several SPI channels to make this practical (at all) and they need to be able to push data rather fast, say 50 million bits per second.

Microprocessors also have other issues that are not common to analog PCB fabrication and construction. The high speed signals flying around the PCB need to have special attention paid them to prevent digital clock and signal noise from leaking into your analog outputs.

I'm assuming from the mention of 16 envelope followers and 16 VCAs that there are also 16 filters?

40 to 50 outputs from a microprocessor is not something I've seen done before. Is this a true need or just a want?

What would be the minimum useful configuration?

How many poles do these filters have?

What topology are the filters?

Bottom line is this will need a very fast microprocessor.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1240
Location: Netherlands
Audio files: 30

PostPosted: Sun Sep 01, 2019 10:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

If I would go for such a project I would use a Teensy 4.0 (Teensy 4.0 is an Arduino-compatible board with an Arm Cortex-M7 running at 600 MHz.) for processing power and as analog outputs I would use AD5766 from Analog Devices.
Highlights of this DAC are:
Complete 16-channel, 16-bit DACs
8 software-programmable output ranges: −20 V to 0 V,
−16 V to 0 V, −10 V to 0 V, −10 V to +6 V, −12 V to +14 V,
−16 V to +10 V, ±5 V and ±10 V
Integrated DAC output buffers with ±20 mA output current capability.
It uses a SPI interface (max. 50 MHz) which can be used in daisy chain, which means you only need one SPI interface and one chip select line to address as much DAC's as you'd like to.
For analog inputs you can use the 10 analog inputs found on the Teensy 4.0.

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1240
Location: Netherlands
Audio files: 30

PostPosted: Mon Sep 02, 2019 1:56 am    Post subject: Reply with quote  Mark this post and the followings unread

So with 4 components (considering a Teensy as one component) you have 10 analog inputs 12 bits wide, and 48 analog outputs, 16 bits wide.
_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Mon Sep 02, 2019 6:32 am    Post subject: Reply with quote  Mark this post and the followings unread

Given SPI At 50 MHz bit rate, 48 outputs (assuming a 24 bit SPI protocol) would allow almost 44.1 kHz sample rate (43402.778) using a single SPI channel. This is assuming no dead time between DAC transfers (and there usually is some dead time). To get a true 44.1 kHz (or more) sample rate would require running at least two SPI channels, but all of the ARMs I've seen have several. If the 50 MHz SPI clock cannot be attained, slower clock with more channels works. Using DMA would be beneficial.

This is not something that is easily breadboarded or strip/vero boarded. Flywire construction will usually limit the SPI clock. A properly designed single PCB will be the best bet for both noise containment and efficiency.

Having experience with a similar DAC (AD5676), I can say that getting it working on an ARM was "interesting".

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1240
Location: Netherlands
Audio files: 30

PostPosted: Mon Sep 02, 2019 6:42 am    Post subject: Re: How much I/O can you get in and out of a microcontroller? Reply with quote  Mark this post and the followings unread

AlanP wrote:
But doing the sixteen filters takes up a lot of space in analog, not even mentioning the sixteen envelope followers and sixteen VCAs after each filter

It looks like Alan plans to build this analog and have it CV controlled by a processor, so there is no need for a 44.1kHz sample frequency.
That is, if I read Alan correctly Rolling Eyes

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
AlanP



Joined: Mar 11, 2014
Posts: 726
Location: New Zealand
Audio files: 41

PostPosted: Mon Sep 02, 2019 4:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

More like, I built the 16 filters in analog, and it was enough of an adventure that I'd rather just do it in digital. Once the first digital one is coded up, you don't need to re-write it for every subsequent processor, the same way you need to solder up another board of opamps, resistors, and capacitors for subsequent analog boards.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
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 » Microcontrollers and Programmable Logic
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