Maker Pro
Maker Pro

Replacing switch with transistor

tonyeson

Nov 26, 2016
4
Joined
Nov 26, 2016
Messages
4
Hello!, sry for the n00b question, but i'm new at this.

I'm trying to replace a switch with a transistor, powered by a raspberry pi, but don't quite get it to work.

the switch that i'm trying to control is 5v at max 1A (the right click button of a computer mouse)
my transistor is a BC337-25
the pi is putting out 3.3v on its gpio.

this is my setup:
tran.JPG


what am I doing wrong?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Firstly, that transistor probably won't handle 1A.

Secondly, see the resources section of this site for a resource describing how to switch a load with a transistor.

I don't the right house button on a mouse will need to switch 1A!

You may be better off using an optocoupler because then you don't have to worry how the mouse button is wired up (aside from requiring you get the polarity correct).
 
Top