TK.

MBHP_AINSER64

18 posts in this topic

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! :)

mbhp_ainser64_proto.jpg

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.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftutorials%2F012b_ainser_muxed%2F

Jitter Monitor (for testing purposes): http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftroubleshooting%2Fainser_jitter_mon%2F

Driver: http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fmodules%2Fainser%2F

Schematic: http://www.ucapps.de/mbhp/mbhp_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/mbhp_ainser64.html

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Great news TK!

512 Pots...

Unendliche Weiten ;-)

Share this post


Link to post
Share on other sites

Schematic: http://www.ucapps.de/mbhp/mbhp_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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

fixed! :)

mbhp_ainser64_v1.png

Is anybody interested to join the prototype order?

Estimated price: due to the low quantity ca. 10 EUR per PCB

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Is anybody interested to join the prototype order?

Count me in - I need high definition ADCs.

This looks very promising.

Share this post


Link to post
Share on other sites

Hey!

Great project!

Could you upload the eagle layout file?

Thanks!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

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

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

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Thorsten,

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

Best, ilmenator

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

post-6075-0-33694200-1332125289_thumb.jp

Edited by rvlt

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now