Jump to content


Photo
- - - - -

MBHP_AINSER64


  • Please log in to reply
17 replies to this topic

#1 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,439 posts
  • LocationGermany

Posted 19 December 2011 - 20:33

As a workaround for the noisy 3.3V ADC of STM32 and LPC17, I developed a new solution with an external ADC.
I selected the MCP3208, since it's available for only 2.75 EUR at Reichelt. It offers a resolution of 12bit.

The driver development was straightforward, and I must say that I'm very satisfied with the results! :)

Posted Image

The ADC is accessed via SPI (e.g. J19 of the MBHP_CORE_LPC17 module).
A 74HC595 has been added and is accessed via SPI as well, so that no additional IO pins of the microcontroller have to be sacrificed for the MUX control.

By using a nice trick, only a single chip select line is required to access both serial devices.
This makes the solution scalable: multiple MBHP_AINSER64 modules can be accessed from a single core. The driver is prepared for 2 modules (= 128 pots), but scanning even more pots is no problem as long as dedicated uC outputs for chip selects are available.
Alternatively, a 3-to-8 MUX could be used for accessing 8 modules via 3 output pins! -> for scanning 512 pots/faders ;-)

Also the accuracy is quite nice: if directly powered from the MBHP_CORE_LPC17 module, values are jittering by only ca. +/-1..3 LSBs
For comparison: the ADCs of STM32 and LPC17 are jittering by +/- 16, which means that even if the conversion result is converted to 7bit resolution there is a risk for unstable values.

If the module is externally powered, the jitter is +/- 1 LSB!

Means: 64 pots can be sampled with ca. 11bit accuracy - with a DIY friendly design! :)

Here the first applications:
Tutorial (self-explaining): http://svnmios.midib...b_ainser_muxed/
Jitter Monitor (for testing purposes): http://svnmios.midib...ser_jitter_mon/

Driver: http://svnmios.midib...modules/ainser/


Schematic: http://www.ucapps.de...hp_ainser64.pdf

PCB: this time I will create the layout by myself, because I need some practice ;)

Update: PCB up & running -> new website http://www.ucapps.de...p_ainser64.html


Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#2 lemonhorse

lemonhorse

    MIDIbox Tweaker

  • Programmer
  • PipPipPip
  • 302 posts
  • LocationKiel (Northern Germany)

Posted 20 December 2011 - 10:21

Great news TK!
512 Pots...

Unendliche Weiten ;-)

#3 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,439 posts
  • LocationGermany

Posted 21 December 2011 - 16:46

Schematic: http://www.ucapps.de...hp_ainser64.pdf

Layout (preliminary, because headers are too close together, this has to be fixed!)
/edit: removed old layout, new snapshot below

This was my first selfmade layout after more than 5 years, but it seems that I haven't lost the skills. ;)

First I tried it with Kicad, but quickly changed back to Eagle since I don't like the schematic entry - it slows down the process too much.
Using the freeware version of Eagle forced me to limit the size to 100x80, but the circuit still fits into this area! :)

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#4 ilmenator

ilmenator

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,554 posts
  • LocationTrondheim, Norway

Posted 21 December 2011 - 19:01

Thorsten,

it looks as if spacing might be a little tight for Reichelt WSL type headers - have you checked that they fit? I would definitely prefer them over regular simple headers just because it is easier to get the cabling right again in case one ever has to remove cables.

Best, ilmenator

#5 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,439 posts
  • LocationGermany

Posted 21 December 2011 - 20:34

Thanks for the important tip! The headers are too close together, I will fix this after christmas.

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#6 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,439 posts
  • LocationGermany

Posted 28 December 2011 - 21:08

fixed! :)

Posted Image

Is anybody interested to join the prototype order?
Estimated price: due to the low quantity ca. 10 EUR per PCB

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#7 technobreath

technobreath

    MIDIbox Tweaker

  • Frequent Writer
  • PipPipPip
  • 376 posts
  • LocationVigrestad / Stavanger

Posted 14 January 2012 - 15:08

Hi TK,

I haven't read the thread twice yet, but a couple of questions. I have a lpc core and the mcu at my desk now, but I ain't gonna do much about it for the next six months though, but my plan for the lpc was to build a cs for my daw, atm cubase.

Does this design replace the regular ain?

And will this be the way to go for future projects like the one I mentioned above?

Will it be compatible for a long time like the other ain design has been?

If this is the case and the design works good in your opinion, I will be joining a bulk order ;-)

Ingebret
Posted Image

#8 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,439 posts
  • LocationGermany

Posted 15 January 2012 - 14:36

Does this design replace the regular ain?


Yes, but only for MIOS32 based cores.
The accuracy is much better, and the wiring is simpler than with the old MBHP_AIN modules (just a serial connection between J19 and the MBHP_AINSER64 module(s))

And will this be the way to go for future projects like the one I mentioned above?


yes

Will it be compatible for a long time like the other ain design has been?


yes!

If this is the case and the design works good in your opinion, I will be joining a bulk order ;-)


Meanwhile I think it would be better if I just order two cheap prototype boards at Olimex.
When all checks passed, the PCB will be available in SmashTV's Shop (I'm sure ;))

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#9 J. C. Aqfaq

J. C. Aqfaq

    MIDIbox Newbie

  • Members
  • Pip
  • 2 posts

Posted 01 February 2012 - 14:59

Is anybody interested to join the prototype order?


Count me in - I need high definition ADCs.
This looks very promising.

#10 eddiemolko

eddiemolko

    MIDIbox Newbie

  • Members
  • Pip
  • 2 posts

Posted 26 February 2012 - 12:30

Hey!
Great project!
Could you upload the eagle layout file?

Thanks!

#11 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,439 posts
  • LocationGermany

Posted 26 February 2012 - 19:55

Hi,

I will upload the eagle file once I've tested the prototype (the PCB has been shipped from the US some days ago)

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#12 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,439 posts
  • LocationGermany

Posted 04 March 2012 - 23:34

I got the prototype PCBs and successfully tested the module today!

It's officially released now: http://www.ucapps.de...p_ainser64.html

Next step is to ask SmashTV for providing the new module in his MIDIbox shop. :)

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#13 ilmenator

ilmenator

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,554 posts
  • LocationTrondheim, Norway

Posted 05 March 2012 - 22:58

Thorsten,

looks like you tried Laen's PCB service - nice color on the board :thumbsup: !

Best, ilmenator

#14 rvlt

rvlt

    MIDIbox Newbie

  • Members
  • Pip
  • 82 posts
  • LocationBerlin

Posted 06 March 2012 - 03:03

Hey,


I did a small PCB layout for a "ainser8" with only one 4051, since I only need 8 analog ins. Haven't etched it yet, but will do in the next few days...

I connected CH0 of the MCP3208 to Pin 3 of the 4051, and CH1-7 to ground.
Then I noticed in the AINSER64 schematic that CH0 is actually connected to the last one of the 4051s (IC11 / J13), not the first one.

Does this matter at all? Or is it better to use CH7 with a single 4051 setup?

#15 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,439 posts
  • LocationGermany

Posted 06 March 2012 - 23:20

It means that analog inputs will be available at pin number #56..63 - thats ok

But please note: you don't need a 4051 multiplexer if only 8 channels are required.
You even don't need a 74HC595 for this minimal solution.

Instead you would only need the MCP3208, pots can be directly connected to the 8 ADC inputs!
+ J2, R1, C4, C5, C6 - done!

Normally it's faster to build such a circuit on verboard instead of doing the timeconsuming layout + etching.

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#16 rvlt

rvlt

    MIDIbox Newbie

  • Members
  • Pip
  • 82 posts
  • LocationBerlin

Posted 07 March 2012 - 01:28

Ah, sure ...

I thought it way too complicated.
Thanks, you just saved me a lot of work.

Will report back when I finished the breadboard.

Cheers!

#17 rvlt

rvlt

    MIDIbox Newbie

  • Members
  • Pip
  • 82 posts
  • LocationBerlin

Posted 19 March 2012 - 03:50

Hey,

I built my small "Ainser8" on breadboard today and it all works perfectly!

At first I wondered why a single pot would send 8 values at a time, but then I figured out that I had to disable all the pins which were on by default.

btw I bought my MCP3208 from Segor, and they have two different versions (C and B, which has slightly better specs) of the chip. In the store I was unsure what to buy so I just got the B version to be on the safe side, but maybe that's not necessary at all.

anyway, no more jitter!

Thanks!

Attached Files


Edited by rvlt, 19 March 2012 - 13:11.


#18 3raserFace

3raserFace

    MIDIbox Newbie

  • Members
  • Pip
  • 5 posts
  • LocationUSA

Posted 28 March 2012 - 02:21

Is there any word about when Smash will have these boards available?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users