Platform recommendation for project?

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
mikew6
 
Posts: 44
Joined: Thu Jan 09, 2014 11:51 pm

Platform recommendation for project?

Post by mikew6 »

I have a project in mind that requires 5 analog outputs (10 bits or better, 48KHz or better), 25 digital inputs (to support a bunch of rotary encoder inputs), and 8 digital outputs (to support spi or similar for communicating with displays) If required I could split the project between two boards A and B such that board A requires 3 analog outputs, 13 digital inputs, and 4 digital outputs while board B requires 2 analog outputs, 12 digital inputs, and 4 digital outputs.

I've looked at some arduinos, the Raspberry Pi, and the beaglebone overviews, and none of them quite look like they are the answer.

Is there a suitable hardware platform that might fill the bill? If now, how would I go about assembling a system that fulfills the above requirements?

Thanks!

mikew6
 
Posts: 44
Joined: Thu Jan 09, 2014 11:51 pm

Re: Platform recommendation for project?

Post by mikew6 »

No ideas from anyone? No leads at all? I'm not joking about the project scope... would appreciate some direction.

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Platform recommendation for project?

Post by zener »

Although your question fits the topic of this subforum, you would probably get a better response one forum up at General Project Help. An Arduino Due can just about do it. Only questions is on the DAC since it only has two and I am not sure the speed. But you can add DAC's on the I2C bus.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Platform recommendation for project?

Post by adafruit_support_mike »

The short answer is that I don't know of any board with that specific set of inputs and outputs.

The next shortest answer is that there are so many ways to arrange those inputs and outputs that it's hard to come up with an answer that will be useful.

Instead of focusing on one or more boards, group the IO lines into related and independent functional units. Do all the encoder inputs modify parameters that are best handled by a single block of code, or can you break them down into groups? A 10-bit 48kHz analog signal could be an audio signal, and if so, you might have two signals that should be handled in stereo. OTOH, the signal could be something else entirely, and handling it with audio techniques would do more harm than good.

The most effective way to write project requirements is to make a list of "when this event happens (input), I want this result (output)" statements. Once you have those, you can decide what kind of technology you need to connect each input to its corresponding output. When you state your requirements in terms of a given technology ("I want to use this board and/or this code") it's easy to end up with a system that a) can't possibly work, b) only works with great effort, c) works as described, but doesn't do what you want, or d) does what you want, but could be replaced with something much simpler.

mikew6
 
Posts: 44
Joined: Thu Jan 09, 2014 11:51 pm

Re: Platform recommendation for project?

Post by mikew6 »

Hi Mike, thanks for the response. I have done a functional decomposition of the system to the level described... The IO lines are grouped in my original post along those lines. Without going in to gory detail, the project contains five waveform generators, and each generator has a set of associated control inputs I want to provide.

I could break down the system differently into an HMI interface and the waveform synthesizer component, which would remove the requirement for the synthesizer component to support so many digital inputs and so many analog outputs simultaneously. The Due has only 2 output channels, but plenty of inputs. The answer may just be three Dues, but it would be nice to find another waveform synthesis solution.

There are a large number of rotary encoders planned. Is there a multiplex solution for reading, say, 4 or 8 encoders without requiring two pins per encoder? I've seen one-pin solutions but these reduce the resolution of the encoder.

If I went this route, I could use one of the ATMega chips for all of the digital inputs and then send the digested control information to a waveform synthesizer module. In that case, are there waveform synthesizers that are easily interfaced to AVRs?

Thanks for the help! :-)

Mike

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Platform recommendation for project?

Post by adafruit_support_mike »

You'll probably find more flexibility in your deisgn if you use external DACs to generate the output.

We carry the MCP4725 12-bit I2C DAC as a good general-purpose device: https://www.adafruit.com/product/935 . It can update at 200kHz, which would give you five samples per cycle at 40kHz. The next trick will be getting the microcontroller to udpate the number of chips you want at the frequency you want. The Due's microprocessor is enough faster that you shouldn't be limited by the CPU though.

WRT encoders, that could be tricky depending on how you want to write the code.

The easier way to read an encoder is with interrupts driving a state machine. As each pulse comes in, the CPU compares the pin to the current direction to decide whether you're turning the dial forward or backward. Trouble is, that consumes two interrupts and most microcontrollers only have a couple of pin-specific interrupts to use.

The harder way is to sample every pin fast enough to detect the high/low pulses fast enough to get the quadrature offset between the pin signals. The more encoders you want to read, the faster you have to move to sample all the signals in the amount of time you need. The challenge gets worse if you have to interleave the input polling with a bunch of DAC updates.

mikew6
 
Posts: 44
Joined: Thu Jan 09, 2014 11:51 pm

Re: Platform recommendation for project?

Post by mikew6 »

OK! Good food for thought, thanks. I found the AD9837 out there as well; it might be a good option, as it would require less frequent updates, but it might end up costing as much as using dues with less overall capability.

If I use a handful of trinkets to do dedicated encoder tracking, what's the best way for them to get digested direction/rate of change information to a central processor? I could see having a trinket track say, two encoders and just send the results via... I2c?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Platform recommendation for project?

Post by adafruit_support_mike »

If your'e willing to dedicate the hardware, yeah.. a bunch of small/simple microcontrollers like Trinkets would be good at managing the encoders. Two encoders per Trinket would work, and I2C would be a good way to handle the communication between several Trinkets and a central controller.

The TinyWire library supports both slave and master I2C operation.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”