Subversion Repositories svn.mios

Rev

Rev 1130 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1033 tk 1
HEADER 3 MBHP_AINSER64 Module
2
 
3
<H1>MIDIbox Hardware Platform, AINSER64 Module</H1>
4
 
5
<P><CENTER><IMG SRC="mbhp/mbhp_ainser64.jpg" width=550 height=448></CENTER></P>
6
 
7
<P CLASS=INFO>MBHP_AINSER64 is the successor of the <A HREF="mbhp_ain.html">MBHP_AIN</A> module and only supported by <A HREF="mios.html">MIOS32</A>!</P>
1130 tk 8
<P CLASS=INFO><A HREF="mbhp_ainser8.html">MBHP_AINSER8</A> is a reduced version without 1-to-8 multiplexers and on-board VR.</P>
1033 tk 9
 
10
<P CLASS=INFO>It is based on the 8-channel ADC MCP3208 from <A HREF="http://www.microchip.com" TARGET="_blank">Microchip</A> and 8 4051 multiplexers so that up to 64 analog inputs are available. They can be used to scan pots and/or faders with 12bit resolution between 0 and 5V.</P>
11
 
12
<P CLASS=INFO>The accuracy and especially the signal/noise ratio is much better compared to the internal ADCs of STM32 or LPC17 for insignificantly higher costs (+ 3 EUR).</P>
13
 
1130 tk 14
<P CLASS=INFO>Another advantage is the improved scalability. While with the previous <A HREF="mbhp_ain.html">MBHP_AIN</A> module the maximum number of scannable inputs was limited by the number of on-chip ADC channels, the new approach allows to access multiple MBHP_AINSER64 and MBHP_AINSER8 modules from the same microcontroller.</P>
1033 tk 15
 
1200 tk 16
<P CLASS=INFO>The ADC is accessed via SPI (e.g. J19 of the <A HREF="mbhp_core_lpc17.html">MBHP_CORE_LPC17</A> or <A HREF="mbhp_core_stm32f4.html">MBHP_CORE_STM32F4</A> module). An additional 74HC595 is accessed via SPI as well to control the 4051 multiplexers and the "link status" LED which is helpful for troubleshooting the module connections.</P>
1033 tk 17
 
1130 tk 18
<P CLASS=INFO>Multiple MBHP_AINSER64 (or MBHP_AINSER8) modules are connected to J19 in parallel, and accessed by strobing dedicated chip select lines. J19 provides two chip selects (called "RC1" and "RC2"), if more modules should be scanned, common IO pins could be used for the same purpose (e.g. available at J5). To programmers: alternatively, AINSER64 modules could be chained, or a 3-to-8 MUX could be used for accessing 8 modules via 3 IO pins of the microcontroller.</P>
1033 tk 19
 
20
<P CLASS=INFO>Accuracy: if directly powered from the <A HREF="mbhp_core_lpc17.html">MBHP_CORE_LPC17</A> module, values are jittering by ca. +/-1..2 LSBs (for comparison: the on-chip ADCs of STM32 and LPC17 are jittering by at least +/- 16). Accordingly, the effective resolution which can be used for MIDI controller purposes is 10 bit. Such a high resolution is especially useful for PitchBender and NRPN messages.</P>
21
 
22
<P CLASS=INFO>The jitter is around +/- 1 LSB if the module is externally powered via J1, on the other hand this option is only interesting for applications where a slightly higher resolution does really matter, or if multiple MBHP_AINSER64 modules are used with low resistance pots (1k) so that the power can't be supplied by an USB (hub) anymore.</P>
23
 
24
<P CLASS=INFO>Usually powering the module via USB (provided at J19 by the core module) is sufficient. It's recommended to use a "selfpowered" USB Hub like <A HREF="http://www.reichelt.de/USB-Hubs/MAXXTRO-MX-UAP/index.html?;ACTION=3;LA=444;GROUP=EU3;GROUPID=4831;ARTICLE=99781;START=0;SORT=artnr;OFFSET=16;SID=11TVLbZ38AAAIAAG9MIgIec1e46ae3eb4fc2fe4e011f269170227" TARGET="_blank">this one from Reichelt</A>. It also decouples the power from the (noisy) PC supply, and allows to run the MIDIbox without a PC connection.</P>
25
 
26
<DL>
27
   <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Download </H2></DT>
28
   <DD>
29
   <DD><TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
30
    <TR>
1066 tk 31
      <TD COLSPAN=4 CLASS=TABCOLOR1>PCB data, can be viewed, modified and converted with <A HREF="http://www.cadsoft.de/download.htm" TARGET="_blank">Eagle Light</A>. The .pdf based schematic has been created with <A HREF="http://opencircuitdesign.com/xcircuit" TARGET="_blank">xcircuit</A>. There are no special eagle schematics available, since components have been netlisted in the .brd file directly!</TD>
32
    </TR>
33
    <TR>
1033 tk 34
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Module</STRONG></FONT></td>
35
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Schematic</STRONG></FONT></td>
36
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Layout Data</STRONG></FONT></td>
37
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Quick-view</STRONG></FONT></TD>
38
    </TR>
39
    <TR>
40
      <TD CLASS=TABCOLOR2><I>MBHP_AINSER64_V1</I></TD>
41
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_ainser64.pdf">mbhp_ainser64.pdf</A></TD>
42
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_ainser64_v1.brd">mbhp_ainser64_v1.brd</A></TD>
43
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_ainser64_v1.png">mbhp_ainser64_v1.png</A></TD>
44
    </TR>
45
  </TABLE></DD>
46
 
47
  <DD><TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
48
    <TR>
49
      <TD COLSPAN=4 CLASS=TABCOLOR1><FONT SIZE=3>Additional informations</FONT></TD>
50
    </TR>
51
    <TR>
52
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>File</STRONG></FONT></td>
53
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Size</STRONG></FONT></td>
54
      <TD NOWRAP CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Description</STRONG></FONT></TD>
55
    </TR>
56
    <TR>
57
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_ainser64_orderlist.txt">mbhp_ainser64_orderlist.txt</A></TD>
58
      <TD CLASS=TABCOLOR2>1k</TD>
59
      <TD CLASS=TABCOLOR2><A HREF="http://www.reichelt.de/" TARGET="_blank">Reichelt</A> orderlist</TD>
60
    </TR>
61
    <TR>
62
      <TD CLASS=TABCOLOR2><A HREF="mbhp/mbhp_ainser64_interconnections.pdf">mbhp_ainser64_interconnections.pdf</A></TD>
63
      <TD CLASS=TABCOLOR2>18k</TD>
64
      <TD CLASS=TABCOLOR2>Interconnection diagram between MBHP_CORE_LPC17 and two MBHP_AINSER64 modules</TD>
65
    </TR>
66
  </TABLE></DD>
67
  </DD>
68
</DL>
69
 
70
<DL>
71
   <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Available Ports </H2></DT>
72
   <DD>
73
<P CLASS=DESC>Following interfaces are provided by the AINSER64 module:
74
  <DD><TABLE CLASS=BOX WIDTH="100%" BORDER=1 CELLSPACING=5 CELLPADDING=0>
75
 
76
    <TR>
77
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Name</STRONG></FONT></td>
78
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>No. of pins</STRONG></FONT></td>
79
      <TD NOWRAP CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Description</STRONG></FONT></TD>
80
    </TR>
81
    <TR>
82
      <TD CLASS=TABCOLOR2>J1</TD>
83
      <TD CLASS=TABCOLOR2>2</TD>
84
      <TD CLASS=TABCOLOR2>Optional connection to a powersupply unit (PSU). A 7V-10V transformer, or a wall adapter could be used. At least 500 mA is recommended if 1k pots are used, and 50 mA if 10k pots are used.<BR>
85
       Jumper J5 has to select the "Ext." routing if the analog domain should be powered by the external source.<BR>
1200 tk 86
       Note that the prefered solution is to power the module via J2 (resp. via the USB supply of the MBHP_CORE_LPC17 or MBHP_CORE_STM32F4 module). The external supply option is only provided for the case that the USB based power source is too weak to supply the module.</TD>
1033 tk 87
    </TR>
88
 
89
    <TR>
1130 tk 90
      <TD CLASS=TABCOLOR2>J2</TD>
91
      <TD CLASS=TABCOLOR2>10</TD>
92
      <TD CLASS=TABCOLOR2>Serial input which is usually connected to J19 of the MBHP_CORE_LPC17 module.<BR>
93
    </TR>
94
 
95
    <TR>
1033 tk 96
      <TD CLASS=TABCOLOR2>J3</TD>
97
      <TD CLASS=TABCOLOR2>10</TD>
1130 tk 98
      <TD CLASS=TABCOLOR2>Serial output which could be used to chain multiple MBHP_AINSER* modules.<BR>
99
      <B>Please note: the standard AINSER driver for MIOS32 doesn't support this method!</B> Instead it expects that multiple modules are connected to J19 in parallel, and that they are using dedicated chip select lines (selected via jumper J4)!</TD>
1033 tk 100
    </TR>
101
 
102
    <TR>
103
      <TD CLASS=TABCOLOR2>J4</TD>
104
      <TD CLASS=TABCOLOR2>3</TD>
105
      <TD CLASS=TABCOLOR2>A jumper has to be connected to this port to select the first or second chip select line of J2 for accessing the ADC.</TD>
106
    </TR>
107
 
108
    <TR>
109
      <TD CLASS=TABCOLOR2>J5</TD>
110
      <TD CLASS=TABCOLOR2>3</TD>
111
      <TD CLASS=TABCOLOR2>A jumper has to be connected to this port to select the voltage source for the analog domain (ADC, 4051 multiplexers and pots). With "dig." power will be supplied via the serial port J2, with "ext." power can be supplied via J1</TD>
112
    </TR>
113
 
114
    <TR>
115
      <TD CLASS=TABCOLOR2>J6..J13</TD>
116
      <TD CLASS=TABCOLOR2>10</TD>
117
      <TD CLASS=TABCOLOR2>8 * 8 analog inputs and 5V (=Vd) / Ground (=Vs) connections.<BR>
118
      <B>Please note:</B> all unused analog inputs have to be clamped to ground (Vss), otherwise your MIDIbox will send out a lot of random MIDI events!</TD>
119
    </TR>
120
 
121
  </TABLE></DD>
122
  </DD>
123
</DL>
124
 
125
 
126
<DL>
127
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Soldering Guide</H2></DT>
128
  <DD>
1042 tk 129
  <DD><TABLE CELLSPACING=2 CELLPADDING=2>
1033 tk 130
    <TR>
131
      <TD><IMG SRC="mbhp/mbhp_ainser64_1.jpg" WIDTH=280 HEIGHT=347 BORDER=0 ALT=""></TD>
132
      <TD CLASS=TABCOLOR2>
133
It's always a good idea to start with the smallest components to simplify mounting, So: start with the sockets!
134
      </TD>
135
    </TR>
136
 
137
    <TR>
138
      <TD><IMG SRC="mbhp/mbhp_ainser64_2.jpg" WIDTH=280 HEIGHT=342 BORDER=0 ALT=""></TD>
139
      <TD CLASS=TABCOLOR2>
140
Thereafter solder following components:
141
<UL CLASS=CL>
142
  <LI>R1 = 10 Ohm
143
  <LI>R2, R3, R4 = 470 Ohm
144
  <LI>C4, C6, C7 = 100 nF
145
  <LI>C5 = 10 uF (check the polarity!)
146
  <LI>Yellow "Analog Supply" LED (polarity! Long leg is + (Anode))
147
  <LI>Red "Digital Supply" LED (polarity! Long leg is + (Anode))
148
  <LI>Green "Link" LED (polarity! Long leg is + (Anode))
149
</UL>
150
      </TD>
151
      </TD>
152
    </TR>
153
 
154
    <TR>
155
      <TD><IMG SRC="mbhp/mbhp_ainser64_3.jpg" WIDTH=280 HEIGHT=336 BORDER=0 ALT=""></TD>
156
      <TD CLASS=TABCOLOR2>
157
Now mount the 2x5 DIL Headers, 3-pin SIL headers for chip select and analog supply, and put the ICs into the sockets.<BR>
158
Important: the jumpers have to be stuffed to get the module working!<BR>
159
Usually J4 selects Chip Select line 1, and J5 selects the "Dig." option for analog supply.<BR>
160
If the "Ext." supply option is desired (normaly not), solder the additional caps, voltage regulator and the rectifier.
161
      </TD>
162
    </TR>
163
 
164
    <TR>
165
      <TD><IMG SRC="mbhp/mbhp_ainser64_4.jpg" WIDTH=280 HEIGHT=210 BORDER=0 ALT=""></TD>
166
      <TD CLASS=TABCOLOR2>
167
Before testing the module, it's very important that <B>all unusued analog inputs are clamped to ground!</B>.<BR>
168
This could be done with "dummy plugs" as shown in this picture. It connects the A0..A7 pins with Vs (Ground). Vd is open (never connected it to Vs, because it will cause a short circuit!)
169
      </TD>
170
    </TR>
171
 
172
    <TR>
173
      <TD><IMG SRC="mbhp/mbhp_ainser64_5.jpg" WIDTH=280 HEIGHT=210 BORDER=0 ALT=""></TD>
174
      <TD CLASS=TABCOLOR2>
175
Alternatively the 4051 of an unusued ADC channel could be removed, and a cable between Pin #3 and #8 could connect all 8 multiplexed channels to ground.
176
      </TD>
177
    </TR>
178
 
179
    <TR>
180
      <TD><IMG SRC="mbhp/mbhp_ainser64_6.jpg" WIDTH=280 HEIGHT=210 BORDER=0 ALT=""></TD>
181
      <TD CLASS=TABCOLOR2>
182
The cable could also be soldered at the bottom of the board if you don't plan to use the appr. inputs.
183
      </TD>
184
    </TR>
185
 
186
    <TR>
187
      <TD><IMG SRC="mbhp/mbhp_ainser64_7.jpg" WIDTH=280 HEIGHT=235 BORDER=0 ALT=""></TD>
188
      <TD CLASS=TABCOLOR2>
189
Finally connect your finished AINSER64 module to J19 of the core module with a ribbon cable.<BR>
190
This can be done during runtime ("hot plug&play"), a reboot isn't required.
191
      </TD>
192
    </TR>
193
 
194
  </TABLE></DD>
195
  </DD>
196
</DL>
197
 
198
 
199
<DL>
200
  <DT><H2> <IMG SRC="images/bullet.gif" ALT=""> Testing</H2></DT>
201
  <DD>
202
<P CLASS=DESC>After J2 of the AINSER64 module has been connected to J19 of the core module, the red "digital supply" LED should turn on. If it stays off, check the voltage between the Vs and Vd pin of J2 with a multimeter, it should be ca. 5V. Yes: check that the LED has been soldered with the right polarity (the long leg is anode and should be soldered with the pin which is marked with +).</P>
203
 
204
<P CLASS=DESC>The yellow "analog supply" LED is turned on as well independent from J5 jumper selection. It will turn off if there is a short circuit in the analog voltage domain (e.g. caused by a badly connected pot).</P>
205
 
1042 tk 206
<P CLASS=DESC>If the green "link" LED is permanently on or off, it signals, that the application which is running on the core module doesn't access the module. The LED should slowly flash (cheap PWM modulated) with an application which supports the AINSER64 module.</P>
1033 tk 207
 
208
<P CLASS=DESC>So, the next step is to upload an application for testing the analog inputs. <A HREF="midio128.html">MIDIO128</A> is well suitable for this, as it supports two AINSER64 modules and sends CC events for each analog pin by default without further configuration! The application can be downloaded from <A HREF="mios32_download.html">this page</A>. Upload it to the core module with <A HREF="mios_studio.html">MIOS Studio</A> as usual.</P>
209
 
210
<P CLASS=DESC>The green "link" LED should flash now, and CC events should be visible in the MIDI IN monitor of MIOS Studio whenever a pot/fader connected to an analog input is moved.</P>
211
 
212
<P CLASS=DESC>Sidenote (for the case this isn't obvious to you): the outer pins of a pot have to be connected to +5V (Vd) and Ground (Vs) - this voltage is available at each J6..J13 port. The middle pin of the pot has to be connected to one of the A0/A1/...A7 pins of J6..J13.</P>
213
 
214
<P CLASS=DESC>Please keep also in mind that all unusued analog inputs have to be clamped to ground, otherwise the application will flood the MIDI monitor with random CC values!</P>
215
 
1042 tk 216
<P CLASS=DESC>At the <A HREF="mios32_download.html">MIOS32 Download Page</A> you will also find a diagnosis application which measures the jitter for each analog input. It allows to check the quality of the power supply that you are using. After the upload of "ainser_jitter_mon" the MIOS Terminal will periodically output the minimum and maximum value which has been converted in between 1 second (1000 samples) + the difference (-> the jitter):
1033 tk 217
<P><CENTER><IMG SRC="mbhp/mbhp_ainser64_jittermon.png" width=802 height=456></CENTER></P>
218
 
219
<P CLASS=DESC>The monitor displays the 8 conversion results of a given 4051 multiplexer.<BR>
220
Most important terminal commands:
221
<UL CLASS=CL>
222
  <LI><I>check_module:</I> type "check_module 1" to check the first module, or "check_module 2" to check the second module
223
  <LI><I>check_mux:</I> type "check_mux 1" ... "check_mux 8" to select the 4051 multiplexer:<BR>
224
1=J6, 2=J7, 3=J8, 4=J9, 5=J10, 6=J11, 7=J12, 8=J13
225
  <LI><I>help:</I> to display all available commands
226
  </DD>
227
</DL>
228
 
229
FOOTER