Author |
Message |
AlanP
Joined: Mar 11, 2014 Posts: 746 Location: New Zealand
Audio files: 41
|
Posted: Sun Sep 01, 2019 6:58 am Post subject:
How much I/O can you get in and out of a microcontroller? |
|
|
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
|
|
|
PHOBoS
Joined: Jan 14, 2010 Posts: 5591 Location: Moon Base
Audio files: 705
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Sep 01, 2019 8:34 am Post subject:
|
|
|
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
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Sun Sep 01, 2019 10:58 pm Post subject:
|
|
|
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
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Mon Sep 02, 2019 1:56 am Post subject:
|
|
|
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
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Mon Sep 02, 2019 6:32 am Post subject:
|
|
|
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
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Mon Sep 02, 2019 6:42 am Post subject:
Re: How much I/O can you get in and out of a microcontroller? |
|
|
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 _________________ my synth |
|
Back to top
|
|
|
AlanP
Joined: Mar 11, 2014 Posts: 746 Location: New Zealand
Audio files: 41
|
Posted: Mon Sep 02, 2019 4:56 pm Post subject:
|
|
|
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
|
|
|
|