I would like to pass 3.3V and Ground to an component. How can I achieve such a thing?

I for example would like to let a wire get 3.3V when I for example do digitalWrite(pin, HIGH). It is hard for me to explain this, so I created an illustration in the hope of better clarifying it.

Edit: I have an product that I have dismantled. On the PCB, there is a push button. I would like to solder some wires to the place where the button is so it can be controlled with an arduino (probably wemos d1). When plugging a cable in the 3.3v of the arduino and a cable from the ground, when connecting it to the push button it will cause a boot of the dismantled product. This explains why I would like to give power to a component ONLY when a pin is set high, so I can for example boot the product via a website / app eventually.

enter image description here

  • Are you trying to supply "power" to a component or just send a "low current" HIGH/LOW signal?
    – VE7JRO
    Aug 1, 2019 at 19:55
  • Supply power (3.3v) when a pin is set to high
    – Mark D
    Aug 1, 2019 at 20:27
  • 1
    How much power? 1 mA, 10mA, 500mA?
    – VE7JRO
    Aug 1, 2019 at 20:50
  • What is this mystery component?
    – Majenko
    Aug 1, 2019 at 20:54
  • Doesn't really matter, connecting the 3.3V directly to the component will already work so I guess it won't be too much
    – Mark D
    Aug 1, 2019 at 20:55

1 Answer 1


The normal way is to use a P-channel MOSFET as a "high side" switch.


simulate this circuit – Schematic created using CircuitLab

R1 keeps it switched off under "normal" circumstances. Driving D4 LOW makes M1 turn on and allow power through to the "component".

Make sure that the MOSFET has a threshold voltage of no more than (less than?) -3V (that is, somewhere between 0V and -3V - note: P-channel MOSFETs have their thresholds quoted as a negative voltage).

You could connect R1 to 3.3V instead of 5V, but since the GPIO would have 5V on it when HIGH it would be wasting power while idling - so it's better to pull it to 5V instead.

  • I think I have kind of used the same principle as you described. I simply put a transistor between it, did some configuring and it worked. Thank you for the right answer and the help in the right direction!
    – Mark D
    Aug 3, 2019 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.