P Channel MOSFET switching with Teensy 3.2

Status
Not open for further replies.

Shadrach

Member
Hey everyone, I've been struggling through circuit design and with this forums help have been able to get almost everything in this project working... now I'm stuck on why my teensy isn't switching my P channel MOSFET on/off.

In case it wasn't already abundantly clear, electrical components are not something I have much (if any) knowledge about, so any and all advice would be greatly appreciated.

Here's my best attempt at a schematic;
Circuit Diagram.PNG
The specific parts are;
N MOSFET: https://cdn.sparkfun.com/datasheets/Components/General/FQP30N06L.pdf
P MOSFET: https://www.sparkfun.com/datasheets/Components/General/FQP27P06.pdf
Transistor: http://www.mouser.com/ds/2/149/BC548-888648.pdf
Power Booster: https://www.batterysolutions.co.za/files/bat/1353669051_CA_PB-1108.pdf?cache=3417
Battery is a 12V Lithium Battery 51.2 Watt Hrs
Teensy 3.2

Quick outline of the project;

1)There's a car battery that I pull 12V from and it is primarily used to charge the second battery.
2)That battery is hooked into the input of a DC Power Booster (charger) which has an external control cable (remote on/off).
a) When the charger external control switch is high the charger pulls from the car battery and charges the second battery.
3)The teensy reads the voltage on both batteries and is also sending data over CAN to a logging system.
4)When the teensy reads that the car battery is low it switches the P channel Mosfet off with a low signal
a)This MOSFET's drain is hooked to the External control so that when it is off the charger turns off.
5) When the teensy reads the second battery is low it turns off all the load components by cutting ground with an N channel MOSFET
6) When the teensy has switched both MOSFETS off it goes into a low power mode (Thank you Duff)


step 4 is where my problem is.
I've tried running source of the P MOSFET to both batteries. it doesn't turn on when hooked to the car battery, and doesn't turn off when hooked to the 12V battery.
At this point I'm 99% sure I just chose the wrong MOSFET or Transistor, but don't see where my error is or how to correct it.

Thanks in advance!
 
Okay so continuing the trend of my incredible prowess in all things electrical, I took out the 10k resistor between the Teensy and the Transistor and it seems to be working fine now. I saw plenty of schematics online where that resistor was included... am I hurting anything by pulling it out?
 
am I hurting anything by pulling it out?

If "pulling it out" means replacing the 10K resistor (the one between Teensy and the BC548) with a wire, then yes. Directly driving the B-E junction of a transistor will stress the Teensy pin beyond it's maximum recommended current.

Definitely use a resistor, 330 ohms or higher.


As a side note, when you draw a schematic, there are 2 broad guidelines. #1, which you did pretty well, inputs on the left, outputs on the right, so control or cause-effect flows from left to right. #2, which is where your diagram is a bit confusing to people used to conventions of schematics, is to arrange things so the most positive voltages are at the top and most negative voltages are at the bottom. Normally a N-channel mosfet is drawn with the source facing down and the drain facing up. If you arrange things this way, more people will be able to quickly and easily understand your drawing.
 
Thanks Paul! I threw in a 390 ohm resistor and it's still working like a charm. I'll clean up my schematic with your advice before my presentation.
 
Status
Not open for further replies.
Back
Top