Connect with us

Replacing switch with transistor

Discussion in 'General Electronics Discussion' started by tonyeson, Sep 12, 2018.

Scroll to continue with content
  1. tonyeson


    Nov 26, 2016
    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:

    what am I doing wrong?
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    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).
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day