I'm not quite sure how to title this question. In essence, I have a high-side power switch circuit that is not switching off all the way under circumstances I cannot explain.

First, here's the entire circuit:

GPS Pack schematic

It is a battery powered GPS system. It is designed primarily to be a reverse geocache. When operating, it draws about 150 mA of battery power, and when it's sleeping it draws about 1 mA, both of which are perfect.

What is bizarre is that the power switch won't switch completely off unless I set the pinMode of the 6 logic pins connected to the LCD to INPUT.

I've spent an all-nighter trying other things, and that's the only one that causes the power to go completely out. It's a complete mystery to me.

A logic low on the MMBT3904 base resistor is only 0.06 volts. If I simulate the power circuit, it requires closer to 1 volt to even begin to switch on (with a 100k resistor).

The other weirdness is that with the LCD connected, AVR-ISP programming doesn't work. I've used that same pin configuration before and it's worked, so that's another mystery (but probably for a different question).

| improve this question | | | | |

The LCD has internal pull-up resistors (at least on the data lines), and probably a protection network on each pin with a diode to Vcc. Hence when a uC output to the LCD is high, it attempts to 'power' the LCD via the LCD input pin. Making the uC pins inputs will prevent this. Making the pins low should also prevent this.

| improve this answer | | | | |
  • \$\begingroup\$ Oh bother! That explains the programming difficulties as well, I expect. Grumble. \$\endgroup\$ – nsayer Apr 26 '14 at 18:03
  • \$\begingroup\$ Yes, writing low works too. I will have to rev the hardware to add protection resistors before the LCD. Damn! Thanks for the quick answer. \$\endgroup\$ – nsayer Apr 26 '14 at 18:09
  • 1
    \$\begingroup\$ One last note... Forcing the power pin to "on" allows programming to succeed. Without power, the pull-up-power situation you describe was excessively loading the programming pins. That explains why my other projects worked - none of them attempted to de-power the LCD. \$\endgroup\$ – nsayer Apr 26 '14 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.