SCSI2SD Schematic Notes: Difference between revisions

From code/src wiki
Jump to navigationJump to search
Line 49: Line 49:
5V supply from a hard drive molex connector should provide more than sufficient current.  The 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).
5V supply from a hard drive molex connector should provide more than sufficient current.  The 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).


==== Switching Regulator Requirements ====
=== Switching Regulator Requirements ===
* Require at least 83% duty cycle, to allow operation down to Vin = 4v.
* Require at least 83% duty cycle, to allow operation down to Vin = 4v.
* Require >= 90% efficiency to reduce heat.
* Require >= 90% efficiency to reduce heat.
Line 56: Line 56:
* Easy hand-soldering.
* Easy hand-soldering.


==== MAX1951 Design ====
=== MAX1951 Design ===
* [http://www.maxim-ic.com/datasheet/index.mvp/id/3649 MAX1951]
* [http://www.maxim-ic.com/datasheet/index.mvp/id/3649 MAX1951]
* Supports Vout == Vin.
* Supports Vout == Vin.
Line 71: Line 71:


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


==== Output Inductor ====
==== Output Inductor ====
Line 81: Line 79:
Given LIR = 30% (Inductor ripple %, recommended range 20%-40%):
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>
  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).
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).
Line 104: Line 95:
|}
|}


==== Input Capacitor ====
==== Filter Capacitors ====
The MAX1951 recommends a 10μF ceramic capacitor.
The MAX1951 recommends a 10μF input and output ceramic capacitor.  There is no point calculating ripple current/voltages etc, because manufacturers don't bother supplying a ripple voltage spec on their datasheets; the low ESR and ESL of ceramic capacitors makes it somewhat irrelevant.


The capacitor must handle the ripple current, given by:
The value of ceramic capacitors decreases significantly (80% or greater) as they approach their rated voltage. For this reason, the filter caps will be over-rated to 25V, and the bypass caps to 10V.
<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:
The chosen capacitors are:
<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 ====
The MAX1951 recommends a 10μF ceramic capacitor.
 
We'll use ESL = 2nH as a nominal value for ceramic caps at the switching frequency.  This information is generally NOT supplied by the manufacturer via the datasheet.
 
<math>VRIPPLE_{C} = \frac{I_{P-P}}{8 C_{OUT} F_{SW}} = \frac{0.51}{8 \times 10e^{-6} \times 1e^6} = 6.4mV</math>
<math>VRIPPLE_{ESR} = I_{P-P} \times ESR = 0.51 \times 0.1 = 51mV</math>
<math>t_{ON} = \frac{3.3}{5} * \frac{1}{1e^6} = 660ns, t_{OFF} = \left ( 1 - \frac{3.3}{5} \right ) * \frac{1}{1e^6} = 330ns</math>
<math>VRIPPLE_{ESL} = \left [ \frac{I_{P-P}}{t_{ON}} ESL \right ] or \left [ \frac{I_{P-P}}{t_{OFF}} ESL \right ] </math> (whichever is greater) = <math>\left [ \frac{0.51}{660e^{-9}} \times 2e^{-9} \right ] or \left [ \frac{0.51}{330e^{-9}} \times 2e^{-9} \right ] = 3mV</math>
<math>VRIPPLE = VRIPPLE_{C} + VRIPPLE_{ESR} + VRIPPLE_{ESL} = 6.4mV + 51mV + 3mV = 60.4mV</math>
 
==== Selected Capacitors ====
Given the previous sections, the chosen capacitors are:
{|
{|
! Value
! Value
! Voltage  10V
! Voltage  10V
! Type  X5R
! Type  X5R or X7R
! Tolerance
! Tolerance
! Package
! Package
! Device
! Device
! Ripple thingy
! Use
! Use
|-
|-
| input, input bulk, decoupling, output, comp,  
| input, input bulk, decoupling, output, comp,  
|}
|}


* Input FERRITE bead to reduce EMI going back to the host.
* Input FERRITE bead to reduce EMI going back to the host.
* May do some inrush current protecting as well
* May do some inrush current protecting as well
* Via 10Ohm resistor.
* Via 10Ohm resistor.
* Input filtering
** ripple RMS / frequency
** voltage
** esr requirements
** bulk capacitance needed ?
* Output filtering
** Same as input


== In-circuit programming ==
== In-circuit programming ==

Revision as of 07:26, 8 March 2012

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 200mA

42mA excl. peripherals.
See IDD(REG)(3V3), Table 6, LPC1751 datasheet.

(160mA @ 80% efficiency)
SD Card 200mA

Peak value from [1]

(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 current. The 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).

Switching Regulator Requirements

  • Require at least 83% duty cycle, to allow operation down to Vin = 4v.
  • Require >= 90% efficiency to reduce heat.
  • > 500mA output.
  • Fsw >= 1MHz for small output filtering capacitance.
  • Easy hand-soldering.

MAX1951 Design

  • MAX1951
  • Supports Vout == Vin.
    • 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 1.36A
  • 1MHz fixed switching
  • Digital soft-start
  • Reasonably priced for single units $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.

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 the above values, the chosen inductor is TDK SPM6530T-2R2M ($1.41 for single units).

Inductance 2.2μH
Tolerance 20%
DC Resistance 19mΩ
Current 8.4A

Filter Capacitors

The MAX1951 recommends a 10μF input and output ceramic capacitor. There is no point calculating ripple current/voltages etc, because manufacturers don't bother supplying a ripple voltage spec on their datasheets; the low ESR and ESL of ceramic capacitors makes it somewhat irrelevant.

The value of ceramic capacitors decreases significantly (80% or greater) as they approach their rated voltage. For this reason, the filter caps will be over-rated to 25V, and the bypass caps to 10V.

The chosen capacitors are:

Value Voltage 10V Type X5R or X7R Tolerance Package Device 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.

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)