> -----Original Message----- > From: piclist-bounces@mit.edu > [mailto:piclist-bounces@mit.edu] On Behalf Of David VanHorn > Sent: Friday, February 16, 2007 7:08 PM > To: Microcontroller discussion list - Public. > Subject: Re: [EE] Problem using logic level MOSFET as a PIC > controlledpowerswitch > > > > > > > Setting the control pins for the servos and sensors high before > > putting the pic to sleep has solved the problem. With the pic > > sleeping, I measure about 325 microamps. That's still too high > > according to my calculations but acceptable. > > > I'm not surprised, see below. > > > > Dave - you mention that a P-FET is the more conventional switching > > method. I'd like to know why? My understanding is that the > N channel > > devices are better because of lower Ron. They are also simpler to > > control - no transistor interface required. I would be > interested in > > hearing why this is not the best choice. > > > It's not the parts, it's how you're using them. > Interrupting the ground lead on the servos will means that > the circuit inside the servo is now in a really unusual > state. If you interrupted the + lead, then we could count on > the pulse lead just being a load to ground on the PIC > outputs, and taking them low during sleep would eliminate that issue. > With ground interrupted, we may be seeing current leaking > back into the pic through the pulse leads. Your observation > that setting those outputs high reduces sleep current confirms this. > We don't know what this might be doing to the servo circuits, > or the protection diodes in the PIC. > SCR latchup is a distinct possibility. > > In general, with any circuit of more than two leads, > interrupting ground, and leaving power and other leads > connected, is a "BAD IDEA (tm)" Ground should always be the > first connection made, and the last connection broken. > > > > As for connecting the servos directly to the pic's Vcc rail, > I know this > > is an issue. I wanted the first prototype to be as simple > as possible > > and I did not see or measure any serious noise issues while testing > > this on a breadboard - so I left out the filtering being lazy!) > > > "It worked on the bench!" Famous last words.. :) > -- Hi David, Thanks for your comments. I want to clarify a few things and see if I'm right or wrong. When I say that the pic is drawing 325 uA when sleeping I do mean just the pic. With the sensors/servos connected or disconnected the current consumption is the same. I've also measured current at the connectors and confirmed that there is no current flowing through the control lines. On the SCR latchup issue, I think you might be wrong. I just double checked in Art of Electronics (page 138, top of column 2) and I think I'm ok. The SLEEP code sets the control pins for the servos and sensors HIGH, turns off the MOSFETS then enters sleep mode. In this state, no current can be forced into the pic's output pins. Were you mistaken or have I missed something else? I've looked inside the servos and they have filter capacitors between the power and ground connection which may explain the lack of noise on the Vcc bus. I know I still need a better solution and that's my plan for this weekend. Thanks again for all the great info! Chris -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist