pmos switch question

I'd like to control a switch using a microcontroller, I was thinking I'd feed the output of the microcontroller into an npn that would pull a pmos gate low and let current flow, it seems to be working ok in LTSpice except I have a negative spike, when I switch.

Is this an ok way to accomplish my goal, and does anybody know what that negative spike is about? I'm using 2 pmos transistors so that the body diodes can block current from flowing when they are off

here's a link to my circuit

formatting link

thanks

Reply to
panfilero
Loading thread data ...

--- M1 is mis-wired, you don't need two MOSFETs, R2 should be in series with the base of Q1, and the output of the microcontroller probably isn't 1 volt.

I think the spike is being caused by the MOSFET's gate-to-drain capacitance differentiating the negative edge of Q1's output.

Slowing down the MOSFET a little, with R4, and lowering the value of R3 to 100 ohms drops the spike's amplitude to about 18 millivolts:

Version 4 SHEET 1 980 680 WIRE 48 48 -96 48 WIRE 160 48 48 48 WIRE 400 48 256 48 WIRE 400 64 400 48 WIRE 48 80 48 48 WIRE 176 128 176 96 WIRE 400 176 400 144 WIRE -96 224 -96 48 WIRE 48 240 48 160 WIRE 176 240 176 208 WIRE 176 240 48 240 WIRE 176 272 176 240 WIRE 256 320 240 320 WIRE 400 320 336 320 WIRE 400 352 400 320 WIRE -96 480 -96 304 WIRE 176 480 176 368 WIRE 176 480 -96 480 WIRE 400 480 400 432 WIRE 400 480 176 480 WIRE -96 560 -96 480 FLAG 400 176 0 FLAG -96 560 0 SYMBOL voltage -96 208 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value 10 SYMBOL npn 240 272 M0 SYMATTR InstName Q1 SYMATTR Value 2N2222 SYMBOL pmos 256 96 M270 SYMATTR InstName M1 SYMATTR Value Si7137DP SYMBOL res 32 64 R0 SYMATTR InstName R1 SYMATTR Value 1000 SYMBOL res 352 304 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R2 SYMATTR Value 10k SYMBOL voltage 400 336 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V2 SYMATTR Value PULSE(0 5 0 100u 100u 10ms 20ms) SYMBOL res 384 48 R0 SYMATTR InstName R3 SYMATTR Value 100 SYMBOL res 160 112 R0 SYMATTR InstName R4 SYMATTR Value 1000 TEXT -66 514 Left 2 !.tran 50ms

-- JF

Reply to
John Fields

thank you sir

Reply to
panfilero

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.