Wednesday 4 September 2019

switches - Choosing transistor for a raspberry pi switch


I'm trying to design a circuit that will control the power to a raspberry pi with a button. The basic usage is:



  1. first button press-> rasp powers up.

  2. second button press-> rasp continues with power but detects that should shutdown.

  3. (After the shutdown sequence is done, raspberry shuts off).


The design envisioned is a circuit with a normally off button that is connected to a binary counter (74LS161AN). The idea is to count the button presses and use the XOR of the counter's 2 least significant bits as a control for the power to the rasp. The XOR I intend to use is 74LS86. The msb of the counter's 2 bits is how the rasp detects it should shutdown. The rasp cuts its power by ouputing a High to a gpio that is connected to the counter reset.



This button/counter contraption is sort of working on a breadboard but now needs a transistor that actually takes the output of the XOR and controls the voltage in the rasp. power. Do you think that BD135 is a good choice for this? (datasheet) I chose it because Raspberry is powered by a 1.2A power supply, therefore the transistor needs to handle more current (bd135 has max collector current of 1.5A). It also needs to be NPN.


I have a few doubts if this is going to work, for example, how do I know if the XOR can supply enough current for the transistor base? Actually what does it mean when the high level output current of the XOR is -0.4mA ?


If this transistor would not work, could you point one that does and explain the reasoning to select it? I am a bit lost..


Thank you very much.


PS: between the button and the counter there is a 555timer in monostable to clear the bounces.




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