Difference between revisions of "MultiSerial Shield"

From Hackstrich
(Clarifying RX design issue comment.)
(New production run starting soon.)
 
(55 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
|ports=2x RS232 (3.3v or RS232 levels), 8x GPIO
 
|ports=2x RS232 (3.3v or RS232 levels), 8x GPIO
 
|pins=A4 (I2C SDA), A5 (I2C SCL)
 
|pins=A4 (I2C SDA), A5 (I2C SCL)
 +
|opt_pins=D2, D3 (Interrupts)
 
}}
 
}}
  
 
== Project Status ==
 
== Project Status ==
PCB design complete, prototype PCBs ordered and received from BatchPCB. Full BOM ordered and received from Digikey (SC16IS762 substituted instead of SC16IS752 because the latter is out of stock for another 6 weeks and the former is pin-compatible).  First prototype PCB assembled except for 3 of the 4 LEDs, electrically tests OK.  Software testing in progress.
+
* 2011-12-27: First production run is nearing sold out, ordered another 80 boards from MyRO PCB.
 +
* 2011-05: This project is now [http://store.strichlabs.com/products/multiserial-shield Strich Labs product SHLD-0001].
 +
* Past: Revision 2 PCBs have been received, first one assembled (using an SC16IS762 because the 752 was out of stock and they're pin-and-software-compatible) and passes CTLR, SERI, FIFO, INTR, and GPIO tests with no major hardware bugs found so farQuick validation at RS232 levels has been done, but a better unit test needs to be written for this.  Revision 3 PCBs (production RC1) received from MyRO and parts received from Digikey.  Revision 3 PCBs have a fatal issue (argh), the I2C level shifter pads are too far apart for the current batch of the chip to fit!  The last batch had extra-long leads it looks like, but this one does not.  I'm going to have to do a Revision 4 of the PCB and eliminate the level shifting on the input all together (as the controller doesn't need it (anymore?) anyway).  A revision 3 board has been green-wired into a revision 4 board and tests fine.  Revision 4 PCBs received and tested, only minor silkscreen changes need to be done for rev 5.  Revision 5 sent off to MyRoPCB 2011-03-18.  PCBs received, tested OK, and 25 have been assembled, QA'd, and packagedThis batch (s/n 0010-0035) will be sold starting at Mini Maker Faire Toronto 2011, then the remaining shields from the batch online.
  
 
== Revision 1 PCB Issues ==
 
== Revision 1 PCB Issues ==
Line 17: Line 20:
 
* Fixed in revision 2: <s>Pins 15-28 on controller IC are mirrored! Doh!</s>
 
* Fixed in revision 2: <s>Pins 15-28 on controller IC are mirrored! Doh!</s>
 
* Fixed in revision 2: <s>Fix needlessly close spacing on traces running between pins for no reason.</s>
 
* Fixed in revision 2: <s>Fix needlessly close spacing on traces running between pins for no reason.</s>
* SCL33/SDA33 test points/jumper points are needlessly bigger than other pads.
+
* Fixed in revision 2: <s>SCL33/SDA33 test points/jumper points are needlessly bigger than other pads.</s>
 
* Fixed in revision 2: <s>Addresses printed on board are 8 bit, not 7 bit like the Wire library uses.</s>
 
* Fixed in revision 2: <s>Addresses printed on board are 8 bit, not 7 bit like the Wire library uses.</s>
* RX level translators/jumpers not designed right.  TX and RX both need to be switched between the output of the level translator and the input of the level translator.  TX already is, RX is not.
+
* Added in revision 2: <s>Functions for Arduino headers not printed on board, makes debugging harder.</s>
 +
* Fixed in revision 2: <s>C7 and C12 are needlessly too close to the header, making it hard not to melt the header (if placed first) while adding the caps.</s>
 +
* Fixed in revision 2: <s>RX level translators/jumpers not designed right.  TX and RX both need to be switched between the output of the level translator and the input of the level translator.  TX already is, RX is not.</s>
 +
* Fixed in revision 2: <s>LEDs wired such that they are on for idle state.</s>
 +
* Added in revision 2: <s>Power LED would be very useful as shield blocks visibility of Arduino's power LED.</s>
 +
* Added in revision 2: <s>No interrupt capability because /IRQ line not connected.</s>
 +
* Fixed in revision 2: <s>Channels should be 0 and 1, not 1 and 2 (to match chip and reduce confusion)</s>
 +
* Fixed in revision 2: <s>LEDs very dim, replace resistors with 150 ohm not 330.</s>
 +
* Fixed in revision 2: <S>RS232 header pins touch USB header on Arduino, shorting them to ground.  Tape over the USB connector helps, but the pins can punch through the tape and cause hours of debugging frustration.  Should consider moving the header to the opposite side of the board, even though it means basically rerouting the entire board.</s>
 +
 
 +
== Revision 2 PCB Issues ==
 +
* Fixed in revision 3: <s>It doesn't make much sense to send +5v out on the header when the board is all +3.3v.  Should change this.</s>
 +
* Fixed in revision 3: <s>No label on power header VIN pin</s>
 +
* Fixed in revision 3: <s>The board is 2.05" high, should make it 2" to increase flexibility in panelizing it.</s>
 +
 
 +
== Revision 3 PCB issues ==
 +
* Fixed in revision 4 (by removing IC all together): <s>Pads on the I2C level shifter are too far apart, some batches of the IC don't reach the pads!</s>
 +
* Fixed in revision 4: <s>BOM doesn't match board for LED SMD sizes</s>
 +
* Fixed in revision 4: <s>BOM doesn't contain 1x3 header for INT jumper</s>
 +
* Removed in revision 4: <s>May be able to remove the I2C pullup resistors and use the built-in Arduino pullups</s>
 +
* Changed text to stop mask layer in revision 4: <s>Copper text on the bottom is completely unreadable w/ black solder mask</s>
 +
 
 +
== Revision 4 PCB issues ==
 +
* Fixed in revision 5: <s>RX-I and TX-O labels are backwards!</s>
 +
* Added in revision 5: <s>Add 0/1 markings beside ADDR DIP</s>
 +
* Changed to silk in revision 5: <s>Move bottom text to top or change to silk.</s>
 +
 
 +
== Revision 6 PCB ideas ==
 +
* Change passives to 0805 or 0603, 0402 is too hard to solder and can't really be offered as a kit
 +
* Align components in the same orientation all over the board, to make assembly more efficient
  
 
== Overview ==
 
== Overview ==
  
The Arduino MultiSerial shield will let the Arduino access two RS232 serial ports via I2C.  It will have switchable 3.3v or RS232 levels.  This project exists mainly as a debugging tool for networks of [[BlinkieBits]], as (at least during BlinkieNet design/prototyping) it would be extremely useful to be able to receive debugging information from a whole network of BlinkieBits, rather than just one at a time.
+
The Arduino MultiSerial shield will let the Arduino access two RS232 serial ports via I2C.  It will have switchable 3.3v or RS232 levels.  This project was initially created as a debugging tool for networks of [[BlinkieBits]], as (at least during BlinkieNet design/prototyping) it would be extremely useful to be able to receive debugging information from a whole network of BlinkieBits, rather than just one at a time.
 +
 
 +
* The NXP [http://www.nxp.com/documents/data_sheet/SC16IS752_SC16IS762.pdf SC16IS752] chip is used, which gives 2 channels for ~$4.50.  It talks 3.3v RS232, so level shifters are needed (but is 5V tolerant on the I2C side).  The RS232 level shifter used is a second-sourced TI [http://datasheets.maxim-ic.com/en/ds/MAX3222-MAX3241.pdf MAX3232] in a SOT16 package (~$1.70 qty. 1).
 +
 
 +
== Documentation ==
 +
// initialize the multiserial shield, pass it the address of the shield and the port number
 +
msTest = MultiSerial(boardAddr, 0);
 +
// begin communications on the port, pass it the baud rate to communicate at
 +
msTest.begin(9600);
 +
 +
// read a byte from the serial port
 +
data = msTest.read();
 +
// write a byte to the serial port
 +
msTest.write(data);
 +
// write text to the serial port
 +
msTest.print("String");
 +
// write a number to the serial port
 +
msTest.print(42, DEC);
 +
 +
// set a GPIO pin
 +
digitalWrite(pin, LOW);
 +
// read a GPIO pin
 +
data = digitalRead(pin);
 +
 +
// store a byte in the scratch register
 +
msTest.store(42);
 +
// retreieve the byte from the scratch register
 +
msTest.retrieve();
  
* The NXP [http://www.nxp.com/documents/data_sheet/SC16IS752_SC16IS762.pdf SC16IS752] chip is used, which gives 2 channels for ~$7.  It needs 3.3v I/O and talks 3.3v RS232, so level shifters are needed.  The I2C level shifter is a [http://www.ti.com/lit/gpn/pca9306 PCA9306] ($0.95 qty. 1), and the RS232 level shifter is a second-sourced TI [http://datasheets.maxim-ic.com/en/ds/MAX3222-MAX3241.pdf MAX3232] in a SOT16 package ($1.70 qty. 1).
+
[[Image:MultiSerial_Shield_Schematic.png|thumb|MultiSerial Shield Rev. 2 Schematic]]
  
[[Image:MultiSerial_Shield_Schematic.png|thumb|MultiSerial Shield Rev. 1 Schematic]]
 
  
[[Category:Current Projects]]
+
[[Category:Completed Projects]]
 
[[Category:Arduino Shields]]
 
[[Category:Arduino Shields]]
 +
[[Category:Products]]

Latest revision as of 20:47, 27 December 2011

MultiSerial Shield
MultiSerial Shield.png
This Page
Function: Provide two RS232 ports with 3.3v or RS232 levels, accessible via I2C.
Key Chips: NXP SC16IS752
External Ports: 2x RS232 (3.3v or RS232 levels), 8x GPIO
Required Pins: A4 (I2C SDA), A5 (I2C SCL)
Optional Pins: D2, D3 (Interrupts)

Project Status

  • 2011-12-27: First production run is nearing sold out, ordered another 80 boards from MyRO PCB.
  • 2011-05: This project is now Strich Labs product SHLD-0001.
  • Past: Revision 2 PCBs have been received, first one assembled (using an SC16IS762 because the 752 was out of stock and they're pin-and-software-compatible) and passes CTLR, SERI, FIFO, INTR, and GPIO tests with no major hardware bugs found so far. Quick validation at RS232 levels has been done, but a better unit test needs to be written for this. Revision 3 PCBs (production RC1) received from MyRO and parts received from Digikey. Revision 3 PCBs have a fatal issue (argh), the I2C level shifter pads are too far apart for the current batch of the chip to fit! The last batch had extra-long leads it looks like, but this one does not. I'm going to have to do a Revision 4 of the PCB and eliminate the level shifting on the input all together (as the controller doesn't need it (anymore?) anyway). A revision 3 board has been green-wired into a revision 4 board and tests fine. Revision 4 PCBs received and tested, only minor silkscreen changes need to be done for rev 5. Revision 5 sent off to MyRoPCB 2011-03-18. PCBs received, tested OK, and 25 have been assembled, QA'd, and packaged. This batch (s/n 0010-0035) will be sold starting at Mini Maker Faire Toronto 2011, then the remaining shields from the batch online.

Revision 1 PCB Issues

  • Fixed in revision 2: Should connect GND pins on Arduino header together
  • Fixed in revision 2: +5V and GND labels on RS232 port are swapped
  • Fixed in revision 2: Pins 15-28 on controller IC are mirrored! Doh!
  • Fixed in revision 2: Fix needlessly close spacing on traces running between pins for no reason.
  • Fixed in revision 2: SCL33/SDA33 test points/jumper points are needlessly bigger than other pads.
  • Fixed in revision 2: Addresses printed on board are 8 bit, not 7 bit like the Wire library uses.
  • Added in revision 2: Functions for Arduino headers not printed on board, makes debugging harder.
  • Fixed in revision 2: C7 and C12 are needlessly too close to the header, making it hard not to melt the header (if placed first) while adding the caps.
  • Fixed in revision 2: RX level translators/jumpers not designed right. TX and RX both need to be switched between the output of the level translator and the input of the level translator. TX already is, RX is not.
  • Fixed in revision 2: LEDs wired such that they are on for idle state.
  • Added in revision 2: Power LED would be very useful as shield blocks visibility of Arduino's power LED.
  • Added in revision 2: No interrupt capability because /IRQ line not connected.
  • Fixed in revision 2: Channels should be 0 and 1, not 1 and 2 (to match chip and reduce confusion)
  • Fixed in revision 2: LEDs very dim, replace resistors with 150 ohm not 330.
  • Fixed in revision 2: RS232 header pins touch USB header on Arduino, shorting them to ground. Tape over the USB connector helps, but the pins can punch through the tape and cause hours of debugging frustration. Should consider moving the header to the opposite side of the board, even though it means basically rerouting the entire board.

Revision 2 PCB Issues

  • Fixed in revision 3: It doesn't make much sense to send +5v out on the header when the board is all +3.3v. Should change this.
  • Fixed in revision 3: No label on power header VIN pin
  • Fixed in revision 3: The board is 2.05" high, should make it 2" to increase flexibility in panelizing it.

Revision 3 PCB issues

  • Fixed in revision 4 (by removing IC all together): Pads on the I2C level shifter are too far apart, some batches of the IC don't reach the pads!
  • Fixed in revision 4: BOM doesn't match board for LED SMD sizes
  • Fixed in revision 4: BOM doesn't contain 1x3 header for INT jumper
  • Removed in revision 4: May be able to remove the I2C pullup resistors and use the built-in Arduino pullups
  • Changed text to stop mask layer in revision 4: Copper text on the bottom is completely unreadable w/ black solder mask

Revision 4 PCB issues

  • Fixed in revision 5: RX-I and TX-O labels are backwards!
  • Added in revision 5: Add 0/1 markings beside ADDR DIP
  • Changed to silk in revision 5: Move bottom text to top or change to silk.

Revision 6 PCB ideas

  • Change passives to 0805 or 0603, 0402 is too hard to solder and can't really be offered as a kit
  • Align components in the same orientation all over the board, to make assembly more efficient

Overview

The Arduino MultiSerial shield will let the Arduino access two RS232 serial ports via I2C. It will have switchable 3.3v or RS232 levels. This project was initially created as a debugging tool for networks of BlinkieBits, as (at least during BlinkieNet design/prototyping) it would be extremely useful to be able to receive debugging information from a whole network of BlinkieBits, rather than just one at a time.

  • The NXP SC16IS752 chip is used, which gives 2 channels for ~$4.50. It talks 3.3v RS232, so level shifters are needed (but is 5V tolerant on the I2C side). The RS232 level shifter used is a second-sourced TI MAX3232 in a SOT16 package (~$1.70 qty. 1).

Documentation

// initialize the multiserial shield, pass it the address of the shield and the port number
msTest = MultiSerial(boardAddr, 0);
// begin communications on the port, pass it the baud rate to communicate at
msTest.begin(9600);

// read a byte from the serial port
data = msTest.read();
// write a byte to the serial port
msTest.write(data);
// write text to the serial port
msTest.print("String");
// write a number to the serial port
msTest.print(42, DEC);

// set a GPIO pin
digitalWrite(pin, LOW);
// read a GPIO pin
data = digitalRead(pin); 

// store a byte in the scratch register
msTest.store(42);
// retreieve the byte from the scratch register
msTest.retrieve();
MultiSerial Shield Rev. 2 Schematic