Wednesday 19 July 2017

pnp - High side switching bizarre side effects


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



Answer




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.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...