MIDIbox Forum: MBHP_AINSER64 - MIDIbox Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

MBHP_AINSER64 Rate Topic: -----

#1 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 11,141
  • Joined: 01-January 01
  • 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...ainser_muxed%2F
Jitter Monitor (for testing purposes): http://svnmios.midib...r_jitter_mon%2F

Driver: http://svnmios.midib...les%2Fainser%2F


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 User is offline   lemonhorse 

  • MIDIbox Tweaker
  • PipPipPip
  • Group: Programmer
  • Posts: 288
  • Joined: 01-September 02
  • LocationKiel (Northern Germany)

Posted 20 December 2011 - 10:21

Great news TK!
512 Pots...

Unendliche Weiten ;-)

#3 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 11,141
  • Joined: 01-January 01
  • 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 User is offline   ilmenator 

  • MIDIbox Guru
  • PipPipPipPip
  • Group: Frequent Writer
  • Posts: 1,120
  • Joined: 01-September 02
  • 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 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 11,141
  • Joined: 01-January 01
  • 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 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 11,141
  • Joined: 01-January 01
  • 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 User is offline   technobreath 

  • MIDIbox Tweaker
  • PipPipPip
  • View blog
  • View gallery
  • Group: Members
  • Posts: 253
  • Joined: 14-November 10
  • 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
Best Regards,
Tbreath

#8 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 11,141
  • Joined: 01-January 01
  • LocationGermany

Posted 15 January 2012 - 14:36

View Posttechnobreath, on 14 January 2012 - 15:08, said:

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

Quote

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


yes

Quote

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


yes!

Quote

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 User is offline   J. C. Aqfaq 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 01-February 12

Posted 01 February 2012 - 14:59

View PostTK., on 28 December 2011 - 21:08, said:


Is anybody interested to join the prototype order?



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

#10 User is offline   eddiemolko 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 26-February 12

Posted 26 February 2012 - 12:30

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

Thanks!

#11 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 11,141
  • Joined: 01-January 01
  • 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 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 11,141
  • Joined: 01-January 01
  • 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 User is offline   ilmenator 

  • MIDIbox Guru
  • PipPipPipPip
  • Group: Frequent Writer
  • Posts: 1,120
  • Joined: 01-September 02
  • 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 User is offline   rvlt 

  • MIDIbox Newbie
  • Pip
  • View gallery
  • Group: Members
  • Posts: 19
  • Joined: 10-November 08

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 User is offline   TK. 

  • MIDIbox Guru
  • View gallery
  • Group: Administrators
  • Posts: 11,141
  • Joined: 01-January 01
  • 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 User is offline   rvlt 

  • MIDIbox Newbie
  • Pip
  • View gallery
  • Group: Members
  • Posts: 19
  • Joined: 10-November 08

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 User is offline   rvlt 

  • MIDIbox Newbie
  • Pip
  • View gallery
  • Group: Members
  • Posts: 19
  • Joined: 10-November 08

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 File(s)


This post has been edited by rvlt: 19 March 2012 - 13:11


#18 User is offline   3raserFace 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 20-November 11
  • LocationUSA

Posted 28 March 2012 - 02:21

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users