> At 02:45 AM 2/27/2004 -0500, Spehro Pefhany wrote: > > It's called latch-up and results from current going through the on-chip > protection diodes (too much current) which triggers the GIANT PARASITIC > SCR which lives inside every PIC, right across the power supply. Ah, I see. Thank you for the description. > > >By the way, the circuit worked very well until I turned up the > duty-cycle. > > It was probably marginal. Sounds like the rest of my life. :) > I suspect your problem is one of circuit layout. You must not allow > motor current to flow between the ground pin on the darlington array > and the Vss pin on the PIC. Ah. Here's what my power and grounding looks like: ------------------------------------------------------------- | 5v bus (big copper pad area) | -------------*------------*-----------*---------*-----------* | | | | / | | | (zener) | / motor [74244] [PIC] [ULN]--|<---* / coil | | | \ / | | | \------------------* ------ ----*------------*-----------* (to ULN outs) |GND *-|<-* (big copper pad area) | ------ ------------------------------ It seems my circuit does EXACTLY what you prescribe against! Laying it out like I did above, I can "feel" the oscillations latching-up across the PIC. The diode to ground is an "anti-idiot" diode to protect against inproper polarity hookup to the power supply. Then again, it probably raises ground to something like 0.1v??? That's not good if it does... I guess I should ask the group: are beginners of my sort welcome here? >IOW if you think of a "star" connection > at the ground of the power supply, one point goes off to the PIC > and one goes off to the ULNxxxx ground. You do NOT ground the PIC > to the supply and run the connection from there to the ULNxxx (although > the opposite would be okay). There should be a BFC (electrolytic) > paralleled with a 0.1 ~ 1uF ceramic close to the PIC and the motor > from ground to Vdd/5V. 1000uF 6.3V low impedance (like you > find on a PC motherboard) works fine. Okay, so drawing this again, I get the following??? ------------------------------------------------------------- | 5v bus (big copper pad area) | ---*---------*----*-----*-------------*---------*-----------* | | | | | | / | | | | | (zener) | / motor [74244] [PIC] - - [ULN]--|<---* / coil \____ | -.1uF - 1000uF | \ / | | | | | \------------------* ------ -*---*----*-----*-------------* (to ULN outs) |GND *-|<-* (big copper pad area) | ------ ------------------------------- And, now for a new, improved design (I think): ---------------------------------- ----------------------- | Logic Vdd plane. (+5v) | | Motor V+ plane. | ---*---------*----*-----*--------- *---------*-----------* | | | | | | / | | | | | (zener) | / motor [74244] [PIC] - - [ULN]--|<---* / coil \____ | -.1uF - 1000uF | \______________ / | | | | | \----* ---------*---*----*-----*--------- *---------------------- | Logic GND plane. | | Motor ground plane. | ---------------------------------- ----------------------- > BTW, you might want to put a 1K on each PIC output. Yes, there's a > resistor inside the ULNxxx, but trust me. There's also an isolation > junction diode to the substrate... I didn't draw them, but I will put the 1k resistors in as well. Why on earth do they draw the isolation diodes with dotted connection lines on the datasheet? > The zener on the catch diodes is just fine, provided it doesn't > get too warm. Is a catch diode a different term for "free wheeling" diode? I saw the term "free wheeling diodes" on the datasheet, so I'm just wondering. I can't thank you enough! Gustaf -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics