Can someone confirm that this circuit will work?

Hello, i searched alot about "high side switches" because i need to control a rgb led via PWM with a rp2040 ... i wanna drive one of these buttons: https://de.aliexpress.com/item/1005003427617171.html im not sure how much current they need but probably 20mA max per color

i found this circuit, can someone confirm that this will work with the components used?

i know its probably overkill but my main concern is if its works and mosfets seem to be more power efficient... regarding power effiencency i also wanna ask if i can increase both pulldown/up ressistors in value for more power effiency?

the resistor at the n channel mosfet is calculated at rougly 4mA... can i increase the resistor value further?

Q2 source and drain should be reversed.

2 Likes

Is H1 for a jumper?

1 Like

yes, to switch between 3.3V and 5V

since these led button mostly support 3-6V, i thought it might be a good idea to support both 3.3V and 5V since the RP2040 biard is already providing a additional 3.3V rail

its a P channel mosfet, are you sure its reversed?

It is obviously wrong. Just look at the direction the body diode on Q2 is pointing.

3 Likes

oh true, thanks i turned it around, i wonder why the symbol is mirrored

since the circuit seems to work i have some questions:

  1. can i increase the pulldown/up resistors to say 50k or 100k?
  2. how does the base of Q2 not need a resistor?
  1. Yes, but why bother?

  2. The series resistor on Q1 is to protect the port pin from excessive current draw. The gate is a capacitor and briefly acts as a short circuit to ground at the moment you apply voltage.

isnt it more power effiecient in some way?

but isnt the Q2 gate shorted between +5/+3.3V and GND?

  1. No

  2. Sorry, that makes no sense.

If you increase the pullup/pulldown resistor values, less current will flow when the respective mosfets are turned on. So yes, in that sense it would help extend battery life, but it wouldn't work any better. In fact, if this is a PWM circuit, at some point the resistor value will be too high for it to work properly, and it may actually use more current because the mosfet spends more time in the linear mode.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.