SCSI2SD Schematic Notes: Difference between revisions

From code/src wiki
Jump to navigationJump to search
mNo edit summary
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
Details for the circuit design of [[SCSI2SD]].
Details for the circuit design of [[SCSI2SD]].


== SMT Type ==
== Changes between V1 and V2 ==
# 0805 sized components will be used where applicableThese represent a good tradeoff between hand-solderability and PCB board space.
The [[First_reflow_soldering_attempt]] was a failureAs a result, the schematic is being improved to simplify construction.


== Crystal Oscillator ==
=== Change of microcontroller footprint ===
* LCP1751 requires a 25MHz crystal, which results in a 100MHz clock with x4 PLL
The V1 incorrectly made use of a 10x10mm QFN68 0.5mm pitch footprint for the [http://www.cypress.com/?id=2326 CY8C53] microcontroller, instead of the smaller 8x8mm QFN68. 8x8mm is seriously tiny, with a pitch of only 0.4mm. The TSSOP packages (0.635mm pitch) on the V1 boards had many solder bridges etc, and moving to an even finer pitch device would be well beyond my soldering ability.
* The crystal requires 2 caps for stability. The required value is:
2 * (CL - CS)


Where CL is the crystal's load capacitance, as specified by the crystal manufacturer, and CS is the PCB's stray capacitance (around 5pF for a reasonable PCB).
The solution is to make use of the 100-pin TQFP versions of the microcontroller instead.  The devices use a 0.5mm pitch, 25% larger than the QFN68 devices, and the same as the (incorrect) footprint on the V1 board.


[http://au.element14.com/txc/9c-25-000meej-t/quartz-crystal-25-mhz-18-pf-hc/dp/1842314 TXC - 9C-25.000MEEJ-T] Load capacitance 18pF. Therefore, use 2x 22pF standard ceramic capacitors.
=== Change of PHY ===
The V1 schematic made use of a typical bus arrangement to interface to the SCSI wires.   SCSI signals were split into read and write paths, with the microcontroller using a signal to switch the bus between read or write mode. This arrangement uses minimal microcontroller pins (18 SCSI pins + 1 R/W signal), but additional interface IC's.


== Power Supply ==
The V2 schematic will switch back to a much simpler arrangement whereby each SCSI signal is connected to the microcontroller twice - once for read, and another for write (via an inverting buffer).  This arrangement is possible due to the additional I/Os available with the 100-pin QFP version of the microcontroller, and saves the cost/board space/soldering of 6 additional ICs.  The PSoC5 supports configurable CMOS or LVTTL (SCSI-compatible) signal levels on all GPIO pins.


=== Power Requirements ===
== Removal of the switching regulator ==
{| border="1"
Since the change of PHY has reduced the need for 3.3V power, it is now feasible to run the SD Card from a much simpler (cheaper) LDO linear regulator.
!
!3.3V
!5V
|-
|LPC1751
|200mA
42mA excl. peripherals.<br />
See IDD(REG)(3V3), Table 6, LPC1751 datasheet.
|(160mA @ 80% efficiency)
|-
|SD Card
|200mA
Peak value from [http://www.embeddedrelated.com/groups/msp430/show/14851.php]
|(160mA @ 80% efficiency)
|-
|UCC5617
|N/A
|440mA
4V - 5.25V
|-
|74HCT05
| N/A
| 150mA (50mA * 3)
4.5V - 5.5V
|-
|'''Total'''
|'''400mA'''
|'''910mA'''
|}


5V supply from a hard drive molex connector should provide more than sufficient currentThe 3.3v supply will be regulated from the 5v supply to share input capacitance and therefore reduce complexity (since each set of input filter caps will need a resistor+disconnect circuit to decrease inrush current).
The CY8C53 micro will use the 5V supply instead (internally regulated to 1.8V anyway)Running at 5V is necessary for the PHY design of directly connecting the input SCSI signals.  This micro allows some I/O pins to run at a lower voltage for interfacing directly to the SD card at 3.3V.


==== Switching Regulator Requirements ====
=== Use of a solder stencil ===
* Require at least 83% duty cycle, to allow operation down to Vin = 4v.
The 0.5mm pitch of the microcontroller will require the use of a stencil to limit the amount of solder paste applied. I applied way too much paste to the 0.635mm pitch devices on the V1 boards, and this caused many solder bridges.
* Require >= 90% efficiency to reduce heat.
* > 500mA output.
* Fsw >= 1MHz for small output filtering capacitance.
* Easy hand-soldering.


==== MAX1951 Design ====
The 0.5mm pitch will require a laser-cut stencil.
* [http://www.maxim-ic.com/datasheet/index.mvp/id/3649 MAX1951]
# Laser-cut 3mil mylar (plastic) stencils available from [http://www.pololu.com/catalog/product/446 pololu] for $25. Non-framed.
* Supports Vout == Vin.
# Laser-cut 3.5mil kapton (plastic) stencils available from [http://ohararp.com/Stencils.html ohararp] for $25. Non-framed.
** Regulator won't dropout if the 5V rail temporarily drops down to 3.3V.
* Over 90% efficiency with 5V input.
* 2A output
** Max load current without a heatsink is [http://www.codesrc.com/utilities/thermal-resistance.php?Tamb=70&Tj=150&r_jc=32&r_b=0&r_ha=146&efficiency=90&voltage=3.3&switching 1.36A]
* 1MHz fixed switching
* Digital soft-start
* Reasonably priced for single units [http://search.digikey.com/us/en/products/MAX1951AESA%2B/MAX1951AESA%2B-ND/2236664 $4.41]
* Designed for use with small ceramic capacitors.
** Only 10uF is required for both the input & output filters.
** Additional bulk capacitance will be provided on input to deal with the 5V IC's.


We will take 400mA as the expected load; in truth, it is likely to be much less. Derating to provide a safety margin will be done as a last step in chosing components - this derating should allow a higher load without any problems.
== Board specifications ==
# 0805 sized components will be used where applicable. These represent a good tradeoff between hand-solderability and PCB board space.
# Pin pitch will be 0.5mm or (preferably) larger.


Ceramic capacitors will be used for both input and output filtering.  Modern multilayer SMD ceramic caps are available in the required values (47uF and above), and provide superior [http://en.wikipedia.org/wiki/Equivalent_series_resistance ESR] to electrolytic and tantalum caps. 
== Power Supply ==
 
Everything except the SD Card and terminator will make use of the 5V supplied over the molex connector.
==== Output Inductor ====
The MAX1951 recommends a 2μH inductor, making selection very simple.
* 2A minimum current rating, 3A minimum saturation.
* 20mΩ maximum DC resistance.
 
Given LIR = 30% (Inductor ripple %, recommended range 20%-40%):
Peak inductor current = <math>\left ( 1 + \frac{LIR}{2} \right ) \times I_{OUT} = \left ( 1 + \frac{0.3}{2} \right ) \times 0.4 = 460mA</math>
 
Given ESR = 100mΩ (max. estimate of output capacitor equivalent-series-resistance):
Output ripple voltage = <math>\frac{V_{OUT} \times \left ( V_{IN} - V_{OUT} \right ) \times ESR}{V_{IN} \times L \times F_{SW}} = \frac{3.3 \times \left ( 5 - 3.3 \right ) \times 0.1}{5 \times 2.2e^{-6} \times 1e^6} = 51mV</math>
 
(max) power loss through inductor = <math>I^2 \times R = 0.46^2 * 0.020 = 4.2mW</math>
 
Peak-to-peak current through inductor = <math>I_{P-P} = \left [ \frac{V_{IN} - V_{OUT}}{F_{SW} \times L} \right ] \times \frac{V_{OUT}}{V_{IN}} = \left [ \frac{5 - 3.3}{1e^6 \times 2.2e^{-6}} \right ] \times \frac{3.3}{5} = 510mA</math>
 
Given the above values, the chosen inductor is [http://www.tdk.co.jp/tefe02/e531_spm.pdf TDK SPM6530T-2R2M] ([http://search.digikey.com/us/en/products/SPM6530T-2R2M/445-4118-1-ND/1993656 $1.41] for single units).
{| border="1"
|Inductance
|2.2μH
|-
|Tolerance
|20%
|-
|DC Resistance
|19mΩ
|-
|Current
|8.4A
|}
 
==== Input Capacitor ====
The MAX1951 recommends a 10μF ceramic capacitor.
 
The capacitor must handle the ripple current, given by:
<math>I_{RMS} = \frac{\sqrt{I_{OUT}^2 \times V_{OUT} \times \left ( V_{IN} - V_{OUT} \right ) }}{V_{IN}} = \frac{\sqrt{0.4^2 \times 3.3 \times \left ( 5 - 3.3 \right ) }}{5} = 189mA</math>
 
For a 10μF capacitor, the ripple voltage caused by capacitor discharge when the switching regulator MOSFET turns on is:
<math>V_{InRipple} = \frac{I_{OUT} V_{OUT}}{F_{SW} V_{IN} C_{IN} } = \frac{0.4 \times 3.3}{1e^6 \times 5 \times 10e^{-6} } = 26mV</math>
Including the 47μF "bulk" capacitance added for other 5V IC's,
<math>V_{InRipple} = \frac{0.4 \times 3.3}{1e^6 \times 5 \times 57e^{-6} } = 5mV</math>
 
The datasheet recomments the ripple voltage be < 3% of the input voltage (< 150mV).
 
 
==== Output Capacitor ====
 
==== Selected Capacitors ====
Given the previous sections, the chosen capacitors are:
{|
! Value
! Voltage
! Type
! Ripple thingy
! Use
|-
| input, input bulk, decoupling, output, comp,
|}
 
* Input FERRITE bead to reduce EMI going back to the host.
* May do some inrush current protecting as well
* Via 10Ohm resistor.
* Input filtering
** ripple RMS / frequency
** voltage
** esr requirements
** bulk capacitance needed ?
* Output filtering
** Same as input
 
== In-circuit programming ==
The LPC17xx micro will be programmed via JTAG using [http://openocd.sourceforge.net/doc/html/Flash-Commands.html Open OCD].
 
The standard ARM 0.1" 20-pin JTAG header will be used (see http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm for connector and necessary pull-up/pull-down details).


Serial programming of the LPC1751 is performed via the UART0 TX and RX pins. To enter programming mode, <span style="text-decoration: overline">P2.10</span> must be low on <span style="text-decoration: overline">RESET</span>.  The active-low <span style="text-decoration: overline">P2.10</span> and <span style="text-decoration: overline">RESET</span> lines will be pulled up to +3.3V via a 10kΩ resistor to ensure the micro isn't reset.
The SCSI terminator will use a 2.85 fixed-voltage verson of the LD1117 (LT1117) LDO Regulator. The datasheet provides examples of use for SCSI termination.


== Termination ==
The SD Card (approv 200mA max) will be serviced by a fixed 3.3V version of the same LD1117 LDO regulator.
* The [http://www.ti.com/product/ucc5617?qgpn=ucc5617 ucc5617] will be powered by +5v, not TERMPWR. This enables testing the device without connecting to a live SCSI bus.  The PHY essentially connects the outputs back to the inputs, but we still need the terminator powered to provide pullups.
* A DIP Switch will be used to connect the DISCNCT pin of the [http://www.ti.com/product/ucc5617?qgpn=ucc5617 ucc5617] to ground if the user wants to disable termination. The pin will be pulled-up to +5V via a 10k resistor.


== Switches ==
== Switches ==

Latest revision as of 02:27, 1 June 2013

Details for the circuit design of SCSI2SD.

Changes between V1 and V2

The First_reflow_soldering_attempt was a failure. As a result, the schematic is being improved to simplify construction.

Change of microcontroller footprint

The V1 incorrectly made use of a 10x10mm QFN68 0.5mm pitch footprint for the CY8C53 microcontroller, instead of the smaller 8x8mm QFN68. 8x8mm is seriously tiny, with a pitch of only 0.4mm. The TSSOP packages (0.635mm pitch) on the V1 boards had many solder bridges etc, and moving to an even finer pitch device would be well beyond my soldering ability.

The solution is to make use of the 100-pin TQFP versions of the microcontroller instead. The devices use a 0.5mm pitch, 25% larger than the QFN68 devices, and the same as the (incorrect) footprint on the V1 board.

Change of PHY

The V1 schematic made use of a typical bus arrangement to interface to the SCSI wires. SCSI signals were split into read and write paths, with the microcontroller using a signal to switch the bus between read or write mode. This arrangement uses minimal microcontroller pins (18 SCSI pins + 1 R/W signal), but additional interface IC's.

The V2 schematic will switch back to a much simpler arrangement whereby each SCSI signal is connected to the microcontroller twice - once for read, and another for write (via an inverting buffer). This arrangement is possible due to the additional I/Os available with the 100-pin QFP version of the microcontroller, and saves the cost/board space/soldering of 6 additional ICs. The PSoC5 supports configurable CMOS or LVTTL (SCSI-compatible) signal levels on all GPIO pins.

Removal of the switching regulator

Since the change of PHY has reduced the need for 3.3V power, it is now feasible to run the SD Card from a much simpler (cheaper) LDO linear regulator.

The CY8C53 micro will use the 5V supply instead (internally regulated to 1.8V anyway). Running at 5V is necessary for the PHY design of directly connecting the input SCSI signals. This micro allows some I/O pins to run at a lower voltage for interfacing directly to the SD card at 3.3V.

Use of a solder stencil

The 0.5mm pitch of the microcontroller will require the use of a stencil to limit the amount of solder paste applied. I applied way too much paste to the 0.635mm pitch devices on the V1 boards, and this caused many solder bridges.

The 0.5mm pitch will require a laser-cut stencil.

  1. Laser-cut 3mil mylar (plastic) stencils available from pololu for $25. Non-framed.
  2. Laser-cut 3.5mil kapton (plastic) stencils available from ohararp for $25. Non-framed.

Board specifications

  1. 0805 sized components will be used where applicable. These represent a good tradeoff between hand-solderability and PCB board space.
  2. Pin pitch will be 0.5mm or (preferably) larger.

Power Supply

Everything except the SD Card and terminator will make use of the 5V supplied over the molex connector.

The SCSI terminator will use a 2.85 fixed-voltage verson of the LD1117 (LT1117) LDO Regulator. The datasheet provides examples of use for SCSI termination.

The SD Card (approv 200mA max) will be serviced by a fixed 3.3V version of the same LD1117 LDO regulator.

Switches

  • Parity and SCSI ID will be set via a set of DIP switches to ground.
  • The micro GPIO port pull-ups will be enabled (this is the default anyway).
  • Parity requires 1 bit, SCSI ID requires 3 bits, SCSI Terminator DISCNT requires 1 bit. (5-way DIP switch required)