SCSI2SD Schematic Notes

From code/src wiki
Jump to navigationJump to search

Details for the circuit design of SCSI2SD.

SMT Type

  1. 0805 sized components will be used where applicable. These represent a good tradeoff between hand-solderability and PCB board space.

Crystal Oscillator

  • LCP1751 requires a 25MHz crystal, which results in a 100MHz clock with x4 PLL
  • 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).

TXC - 9C-25.000MEEJ-T Load capacitance 18pF. Therefore, use 2x 22pF standard ceramic capacitors.

Power Supply

Power Requirements

3.3V 5V
LPC1751 600mA

Rated at 100mA per supply pin.
Analog supply pin unused.

0
SD Card 200mA

[1]

0
UCC5617 0 440mA
74HCT05 0 ?

Likely to be insignificant

Total 800mA > 440mA

5V supply from a hard drive molex connector should provide more than sufficient current. A regulator will be required to convert the 5v supply to 3.3V.

Preferred Option: Switching Regulator

  • NCP3170B
  • Over 90% efficiency with 5V input.
  • CHEAP $1.73
  • * Max load current without a heatsink is 2.75A

The NCP3170 supports operation down to 4.5v. This is not quite low enough to enable stable operation from the 5v power supply rail, considering the intended use of the device with vintage systems with poor power supplies. A low +5v rail, combined with transient voltage drops, will cause the NCP3170 to run out of spec. The selected duty ratio must be in the range of 8-92%.

Duty Ratio <math>D = \frac{3.3v}{12v}=27.5%</math>.

We will take 800mA 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.

Ceramic capacitors will be used for input and output filtering. Modern multilayer SMD ceramic caps are available in the required values (47uF and above), and provide superior ESR to electrolytic and tantalum caps. The low ESR allows a higher ripple current.

The NCP3170 advises a ripple current between 10%-40%. We'll use the upper range value to allow a smaller inductor..

 <math>ra = 20% = \frac{\vartriangle I}{I_{out}}</math>
 <math>{\vartriangle I} = 40% \times 800mA = 320mA</math> ripple current through the inductor
Inductor Selection
<math>L_{out} = \frac{V_{out}}{I_{out} \times ra \times F_{sw}} \times (1-D)</math>
<math>L_{out} = \frac{3.3}{0.8 \times 0.40 \times 1000000} \times (1-0.275) = 7.5uH</math>

The inductor is specified for the NCP3170B version, which switches at <math>F_{sw}=1MHz</math> (the 'A' version switches at 500kHz, and requires a much larger inductor).

Inductor RMS current = <math>I_{out} \sqrt{1+\frac{ra^2}{V_{in}}} = 0.8 \times \sqrt{1+\frac{0.4^2}{12}} = 805mA</math>
Inductor peak current = <math>I_{out} \left ( 1+\frac{ra}{2} \right ) = 0.8 \times \left ( 1 + \frac{0.4}{2} \right ) = 960mA</math>

TODO: Select inductor TODO calculator power loss through inductor - Irms^2 * dc resistance.

  • TODO link to excel worksheet
    • and supply FILLED OUT spreadsheet -values- here.
    • Link to specific chosen inductor.
  • Link to the appnote on choosing caps.
  • Input inductor filter - need more bulk capacitance then.
    • Looks to be a good idea.
    • May do some inrush current protecting as well
  • Inrush current: XA. does it need limiting ?
    • Perhaps do soft-start as well
  • Input filtering
    • ripple RMS / frequency
    • voltage
    • esr requirements
    • bulk capacitance needed ?
  • Output filtering
    • Same as input

Backup Option: Linear Regulator

A LMS1585A linear LDO regulator can be used to convert the 5v supply to the required 3.3v.

  • 5A max current is more than enough
  • Easy TO-220 mounting
  • 1.3V dropout @ 3A allows for 5V supply to drop to 4.6V
  • Significantly cheaper than a switching regulator
  • Simpler than a switching regulator.
  • At an expected peak current of 800mA, the regulator will dissipate: (5-3.3)*0.8 = 1.36W
  • Thermal Resistance Junction-to-Case: 2.3C/W
  • Max load current without a heatsink is insufficient at 0.7A

In-circuit programming

The LPC17xx micro will be programmed via JTAG using 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, P2.10 must be low on RESET. The active-low P2.10 and RESET lines will be pulled up to +3.3V via a 10kΩ resistor to ensure the micro isn't reset.

Termination

  • The 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 ucc5617 to ground if the user wants to disable termination. The pin will be pulled-up to +5V via a 10k resistor.

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)