Sorry . It is a NPN.
Anyway I suspect that my error was that I was not saturating the transistor.
I changed RB to 10K and now it works to some extent although inverted.
When I apply 5V to base I got 0.5V to the bridge
when I apply 0v to the base I got 12V to the bridge
I suppose I will invert the base signal to make it correct.
I am not calculating anything about currents... I am a little bit worried about that.
edit: I measured the current going to the bridge . goes to 0.0375A or 37.5mA
I tried changing RC to 550 and now I got 22mA and good 0.17v~12V.
so I guess changing RC reduces the current without affecting the voltage. News to me
The two important questions are how much current do you need and how fast do you need to switch it?
I have previously driven 12v LED lights from a 5v PIC using just a 2N7000 FET. This has a low Vgs so I drove it directly from the uC. I'm unsure if that is a sensible way of driving a FET, perhaps someone can correct me if not. However, it worked
I have previously driven 12v LED lights from a 5v PIC using just a 2N7000 FET. This has a low Vgs so I drove it directly from the uC. I'm unsure if that is a sensible way of driving a FET, perhaps someone can correct me if not. However, it worked
hi ed,
That will work OK.
If I was switching an inductive load with the FET, I would have a series 1K resistor from the PIC pin to the FET Gate.
In the event of a Drain/Gate breakdown the 12V will not drive enough into the PIC pin to destroy the PIC's internal clamp diode.