Switching 20V Off with +5V - Page 1
Forum section: electronics / beginners

author: Michaelaudio
author_rank: Regular Contributor
timestamp: March 02, 2021, 07:01:29 pm
content: So i need Something like the circuit in the Pic, but vise versa. I have a Push button Controller, where i want to Switch a Voltage (15-22V) to Drive a N CH Mosfet. But i dont wanna drive the Mosfet when the controller is high, i want it to switch when the output is Low. Therefore the Fet should be switching off, when the controller Output is high (5v)It would be nice to achive this with only 2 Transistor, but i just couldnt figure it out how.

author: mikerj
author_rank: Super Contributor
timestamp: March 02, 2021, 08:42:30 pm
content: Use a common base configuration. The micro drives an NPN emitter, the base is biased at a voltage in the middle of your logic signal range, and the collector go up to the gate of your P channel MOSFET with a pull-up resistor.Depending on Vgs(max) of your mosfet you may well need another resistor in the collector circuit to reduce Vgs. You could use a logic mosfet for the lower transistor too, but a bipolar gives a more predictable switching threshold.

author: Zero999
author_rank: Super Contributor
timestamp: March 02, 2021, 08:59:02 pm
content: Quote from: mikerj on March 02, 2021, 08:42:30 pmIf the resistor is moved to the emitter, the circuit can be greatly simplified.Note that the logic is inverting: when the MCU's output is low, the MOSFET will be on.

author: Michaelaudio
author_rank: Regular Contributor
timestamp: March 02, 2021, 09:13:43 pm
content: I had something Like this in mind, but whats V2? Do i have to bias R2? BC otherweise it would be the same as in my pic.Why would the Logic be inverted in this circuit? When V3 is ground, Q1 doesnt Switch on.

author: Zero999
author_rank: Super Contributor
timestamp: March 02, 2021, 09:56:13 pm
content: Quote from: Michaelaudio on March 02, 2021, 09:13:43 pmV3 is your microcontroller's 5V rail.V2 is the output of the microcontroller.The circuit is inverting because M1 turns on when its gate voltage is pulled below the source, which happens when V2 is pulled towards 0V.If the circuit is rearranged to common emitter, it's no longer inverting. V1 would be the 20V supply in your circuit and V2, the output from the microcontroller.

author: Michaelaudio
author_rank: Regular Contributor
timestamp: March 03, 2021, 08:13:10 am
content: Ah yea, now its clear. I'll try that, thanks Guys.

author: Michaelaudio
author_rank: Regular Contributor
timestamp: March 05, 2021, 06:03:26 pm
content: The circuit works fine, Till i Connect the Left Mosfet via a Cap to the Input of my amp board. Then, the drain of Q3 goes only to 7,5V, (exact the bias voltage of the audio Signal (half the supply voltage of the OP amps) Not 0. When i disconnect the the Left N CH Mosfet, from the amp Input, it goes down to 0V imidiatly. When i Put a Diode in series between the Output of the Left Mosfet and the amp Input, then it works, but then it gets a little difficult with the audio Signal, ofc. At the Gate of Q3, i have 5V in the Off state, Changes to 12.5V when i Turn it on. (Batt voltage 17,5-5V = 12,5V) When i turn it off, it first rises to 15V, then goes down to 5V. That Changes when i use a lower Gate source resistor, instead of 12.5 i have 15, then goes Up to 15.1 or so. Something is wrong Here, but what?Edit: the drain of Q3 stays at 7.5 when i Switch Off, as Long as the 220u of Q2 is charged, ergo as Long as the amp Board ist getting its voltage from Q2. (Not directly, there is a bost converter between.

author: Michaelaudio
author_rank: Regular Contributor
timestamp: March 07, 2021, 07:38:26 pm
content: Heres the full schematic, cant See where the error cames from.VBatt doesnt Go straight to the amps, there is a boost converter in between.