[net.micro.amiga] Expansion floppies for AMIGA

eric@chronon.UUCP (Eric Black) (05/01/86)

People have asked how the expansion floppy for the Amiga works,
why can't you have more than one, how do you add more than that,...

Attached is a how-to article describing the way the floppies
work, and how I added df2: and df3: to my system.  It's a bit
long, but meaty, and (I hope) fairly understandable.



	                AMIGA Expansion:
              Adding a Third and Fourth Floppy Disk


                (c) Copyright 1986  Eric D. Black
       (pass it around freely, just leave my name attached)


     The floppy  drives  supplied by Commodore are NEC FD1035.  I
have   successfully   used   Toshiba  FDD-4403AQK-02.   They  are
available  for  approximately  $100  each from various sources (I
got  mine  at Halted Specialties in Sunnyvale for $99).  They are
plug-compatible  with  the  NEC units.  In fact, when I first got
them,  I removed the NEC drive from my Amiga 1010 expansion drive
and  tried  them in its place with complete success.  The Toshiba
drives  are  much  quieter  than my NEC drives; in fact, the disk
validation  process  is  nearly  silent.   My expansion drives (a
total  of  four floppies on my system) have been in operation for
about three weeks now with no problems.  

     The electronic  part  is  fairly  easy,  and  the mechanical
aspect  is also quite easy if you don't worry about shielding and
RFI  (if  you  start seeing garbage on your TV screen, can't hear
radio  stations  any more, or receive threats from neighbors, you
better  shield  it  thoroughly)  -- I won't go into that here.  I
didn't  shield  mine,  but  I  live  out in the woods and have no
neighbors to complain.  

     The drives  have  two  connectors, one a 34-pin 3M-style pin
header  for  control  and  data,  the other a 4-pin connector for
power.   Mating  connectors  should  be  available  from  various
sources.   The  3M  connector  is  easy,  but  I kludged up power
connections   just   using   connector  pins  for  subminiature-D
connectors,  a  practice I DO NOT recommend, and intend to remedy
as  soon  as I find suitable connector bodies [using one side row
of a 3M-style connector should work].  

     Power connections   are  to  each  drive  according  to  the
capacity  of  the  power supply; the internal supply on the Amiga
can  handle  ONLY  the  internal  drive  and ONE external floppy.
Other  drives  (i.e.  df2:  and  df3:)  must have their own power
supply,  which  they can share if it has the capacity (5V @ 0.8A,
12V  @  0.34A).   The 4-pin power connector gets 5V on pin 1, 12V
on pin 4, and ground on pins 2 & 3.  

     The 34-pin  data/control  connector gets most of its signals
directly  from the 23-pin daisy-chain connector.  A few come from
a simple 2-chip drive select interface circuit.  

     Disk drives  are  daisy-chained  using 23-pin subminiature-D
connectors  (similar  to  the 25-pin connectors used for RS-232).
Female  connectors  (DB23S)  provide signals to the NEXT drive in
the  chain  (the  connector  on the back of the Amiga is female).
Nearly  all  signals  on the 23-pin connector go straight through
to  the  next drive.  Those that don't are power (this forces you
to  provide  external  power  for  all  drives  after  the  first


                             Page 1


              Adding a Third and Fourth Floppy Disk


expansion  drive)  and  the  unary  drive select lines; these are
shifted  one  place  down  so  that  each succeeding drive on the
chain is automatically assigned the next drive number.  

     The pins  connected  directly  from DB23P (male, daisy-chain
IN) to DB23S (female, daisy chain OUT) are: 

        Pin    Signal
          1     RDY*
          2     DKRD*
         3-7    Ground
         10     DRESB*
         11     CHNG*
         13     SIDEB*
         14     WPRO*
         15     TK0*
         16     DKWEB*
         17     DKWDB*
         18     STEPB*
         19     DIRB
         22     INDEX*

(the * indicates active-low signals).  

     The drive  select  pins  which are down-shifted one place by
each drive are: 

        Pin    Signal
          9     SEL2B*
         20     SEL3B*
         21     SEL1B*

(i.e.  pin  20  coming in goes out on pin 9, pin 9 coming in goes
out  on  pin  21,  pin  21  coming in goes to the drive interface
circuit).  

     The following  pins  on  the  DB23P (daisy-chain IN) connect
directly   to  the  34-pin  connector  on  the  disk  drive  (all
odd-numbered pins on the 34-pin are connected to ground): 















                             Page 2


              Adding a Third and Fourth Floppy Disk



        DB23P   34-pin   Signal
           1      34       RDY    (also connected to circuit below)
           2      30       DKRD*
          11       2       CHNG*
          13      32       SIDEB*
          14      28       WPRO*
          15      26       TK0*
          16      24       DKWEB*
          17      22       DKWDB*
          18      20       STEPB*
          19      18       DIRB
          21      10       SEL1B* (also connected to circuit below)
          22       8       INDEX*

As  far  as  I can tell, pin 10 (DRESB*) is passed directly on to
the  next drive, but is not used by 3.5" external drives.  It may
be used by the 5.25" drives.  

     The interface  circuit  is basically a latch (flip-flop) and
high-current  driver.   When  the  drive  is  selected, the latch
loads  the state of the motor control line; thus, if the drive is
selected  with  the  motor  on, then de-selected, the motor keeps
running  (and up to speed).  To stop the motor, the drive must be
selected with the motor control line off.  

     This function  is  accomplished  with a 74LS74 D latch and a
53238P  2-input  NAND  open-collector  buffer/driver.  The latter
part  used  by  Commodore  turns  out  to  be available only from
Mitsubishi  in  Japan,  and  I  have  not yet been able to find a
suitable  single-chip  substitute  which  is  commonly  available
here.   The highest current rating I can find for a standard quad
NAND  driver  chip  is  60ma,  and  180ma  is  required here.  My
solution  --  use  an ordinary 74LS00 quad NAND gate and a 74LS06
hex  inverter  for  the  logic  functions  required, and discrete
transistors  for  the  current  handling (hey, this is a homebrew
project,  right?).   Three  IC's, four 2N2905 general purpose NPN
transistors  (you  can  use  the  ubiquitous  2N2222),  and a few
random resistors is all it takes to handle two disk drives.  

     My circuit  is  built  to  handle  two  drives,  all  in one
package.   Since  23-pin D connectors are hard to find right now,
I  made the design assumption that my expansion drives are always
the  last  on the daisy-chain, i.e.  I don't have to find a DB23S
for  another  disk  to  plug  into.   DB23P (male) connectors are
easily  made  from  25-pin  connectors: with pin-insertion types,
just  don't  insert  the  two  pins  at one end (13 and 25); with
solder-type  connectors,  snip  off  those  two  pins.  Carefully
"mash"  the  now-empty  end  of  the  shell so that it clears the
standoff/tie-down  studs.   You  may  need  a connector or two to
practice  on...   Be  aware that the pins formerly numbered 14-24
are now pins 13-23!   Female  connectors  may be made from 25-pin
connectors using a file or grinder.

                             Page 3


              Adding a Third and Fourth Floppy Disk



     A description  of  the  circuit  follows  (it's  not easy to
represent  a  schematic  diagram  with  a character display; gee,
wouldn't  an  ASCII-compatible  graphics  command stream be handy
right  here?   Pretty  soon  I'll be able to do this by including
the  NAPLPS  data  stream  to  paint  a  picture  on  your  Amiga
screen...   Oh,  WELL...).   This  description  should  be easily
understood by techies -- draw it out! 

     Schematic diagrams  are also available from me by mail; send
a  SASE  and wait -- drawing it is faster! I hope to lay out a PC
board  for this, it's pretty simple, but haven't yet, and my unit
is  wire-wrapped.   If  there  is interest, I may be convinced to
make such an item available at reasonable cost...  


          DB23P pin  8 (MTRXD*) goes to the D inputs of the latch
     (pins  2  and  11  of  the 74LS74), with a 1K pullup to VCC.
     Latch  presets  and clears (pins 1, 4, 10 and 13) are pulled
     high  (disabled).   DB23P  pin  21  (SEL1B*) goes through an
     inverter  (pin  1),  the output of which (pin 2) goes to the
     latch  clock  (pin  3) and one input of a NAND gate (pin 1).
     The  other  input of that NAND gate (pin 2) comes from the Q
     (non-inverting)  output  of  the  latch (pin 5).  The output
     (pin  3)  goes  to  another  inverter (74LS06 pin 3), thence
     (pin  4)  to  the  10K  series base resistor of a 2N2905 NPN
     driver  transistor.   The  emitter  is  tied  to ground, the
     collector  goes  to  the RDY* line of the disk drive (pin 34
     of  the 34-pin connector).  The Q* (inverting) output of the
     latch  (pin  4) goes to the series base resistor of a second
     NPN  driver  transistor,  whose  emitter  is  also  tied  to
     ground,  and  whose  collector  goes  to the MTR0D* and LED*
     drive signals, pins 4 and 16 on the 34-pin connector.  

          An analogous  circuit  takes  care of the second drive,
     using  the  other half of the 74LS74, another NAND gate, and
     two more inverters.  


     That's it!  Be sure to pull up all unused inputs, as well as
logic  inputs  taken directly from the daisy-chain connector.  If
you  find and use a suitable open-collector NAND gate, be careful
to  use  pullups  when  feeding  that  OC output to another logic
input (and let me know what part you used!).   The discrete tran-
sistor circuit described  here is not fancy,  but it gets the job
done.

     NOTE that  each floppy drive takes about 50K bytes of memory
for  track  buffering  and  other overhead; you may find that you
can't  always  afford  the  100K  for these additional two drives
There  may  be  a  software way to tell the Exec to add or delete
the drives without rebooting, but I don't know it yet.  



                             Page 4


              Adding a Third and Fourth Floppy Disk


     If you  build  an expansion floppy unit for yourself, please
let me know about it  ({sun,pyramid,hplabs,amdcad}!chronon!eric).
Conversely,  if  you  would be interested in obtaining a small PC
board  with  the necessary interface circuitry (maybe even cables
and connectors, who knows?), let me know that.  

     Having more  floppy  drives  sure  does  cut  down  on  disk
swapping,  but  I've  found  that  512K  is  not  enough (what an
understatement!),  and  am  constructing an expansion memory unit
for   myself.   Initial  plans  are  to  ignore  the  auto-config
protocol  (Kickstart 1.1 doesn't do that, anyway), and just put a
suitable  command  in  :s/Startup-Sequence to tell Exec about the
additional   memory,   but   eventually   I   would  like  it  to
auto-config.  I'll let y'all know how it goes.  

     Special thanks to  Rick Frasier  (now mips!rick) for helping
sort all this out!


































                             Page 5

-- 
Eric Black   "Garbage In, Gospel Out"
UUCP:        {sun,pyramid,hplabs,amdcad}!chronon!eric
WELL:        eblack
BIX:         eblack