0
\$\begingroup\$

I am looking to activate a switch on a sensor platform I have, via a GPIO(3.3v) pin on a Raspberry PI. The board itself is powered by the Pi, via USB. The problem is, I have very limited electronics experience, so I'm hoping someone can advise me.

The switch looks quite easy to bypass if I solder to the underside of the board. I was thinking of something like Using an NPN transistor, but would like some expert advice before I attempt anything.

One more thing, would you advise me to put some form of GPIO protection circuit into the design?

Edit Testing the sensor board, it appears one of the pins on the switch is grounded, the other is to some pin on one of the IC's

Edit #2 Voltage across the switch is 5.07v when open, and ~500μA current when closed

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
9
  • \$\begingroup\$ Can it be done.. of course, But you would need to add a schematic, show voltages currents etc. Details matter... \$\endgroup\$
    – Trevor_G
    Mar 16, 2017 at 18:25
  • 1
    \$\begingroup\$ Things like, is one end connected to ground, or the plus side of the battery, is the switch just carrying a signal, are all important details to know before you can decide on a bypass circuit. \$\endgroup\$
    – Trevor_G
    Mar 16, 2017 at 19:04
  • 1
    \$\begingroup\$ Assuming you got that all the right way round, i.e. the arrow on Q1 goes to ground, that circuit should work, yes. \$\endgroup\$
    – Trevor_G
    Mar 16, 2017 at 19:39
  • 1
    \$\begingroup\$ nope transistor is upside down the way your drew it. \$\endgroup\$
    – Trevor_G
    Mar 16, 2017 at 19:51
  • 1
    \$\begingroup\$ does it have internal pullup? NPN-E goes to gnd, not C. \$\endgroup\$ Mar 16, 2017 at 19:51

1 Answer 1

2
\$\begingroup\$

You can only use an NPN trasnistor to bypass a switch if you know that the switch is connected in the circuit in a way that an NPN transistor will work.

If you don't know how the switch is connectected, you should probably use a small relay. The relay contacts will be totally isolated from the circuit controlling the relay, so won't interfere with the operation of the original circuit.

\$\endgroup\$
3
  • \$\begingroup\$ I have updated the schematic with the switch configuration, and my proposed circuit \$\endgroup\$
    – jasper
    Mar 16, 2017 at 19:48
  • \$\begingroup\$ Your drawing hurts my head! We normally place the ground wire at the bottom of the drawing. If the transistor's emitter connects to the sensor board's ground as well as to the Pi's ground, that should work. \$\endgroup\$ Mar 16, 2017 at 20:06
  • \$\begingroup\$ Sorry :\ Its almost like this isn't my day job \$\endgroup\$
    – jasper
    Mar 16, 2017 at 20:11

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.