Open collector microcontroller output SEEK HELP!

  • Thread starter Windows Central Question
  • Start date
W

Windows Central Question

I am building the following circuit, in order to control the P channel MOSFET as a high side switch for my load.

The input of this circuit will be from a microcontroller (maybe an STM32F103), and I was planning to use the output pin, in open collector mode.

Will this work? Please note that I am pulling up the pin at 12V.

I know that in other circumstances it would work, but in a microcontroller, will the output handle the 12V? When in open collector, are the ESD diodes disconnected?

And if it works, how do you handle the initialization of the pin, (after reset, before configured as an open collector pin).
 

spring_iou

New member
Aug 29, 2016
3
0
0
Visit site
No, the ESD network is not disconnected. There are a very few micros that may have one pin or so that can be pulled up to a higher voltage than supply voltage (eg. RA4 on PIC16F7X, which can be pulled up to 12V absolute maximum), but generally you cannot do this without causing the ESD network to conduct (which you should avoid doing for several reasons, for here it will suffice to note that it won't work for you). Some newer micros may have special ESD networks to allow 5V inputs which allow the output to be pulled up to +5 even with a lower voltage supply, but I don't think an operating voltage of 12V is a reasonable expectation.
You can refer to the pdf of STM32F103.
Just drive a small MOSFET or a BJT+base resistor with the GPIO push-pull and use that as your 'open drain'. You may even be able to find a dual n-channel/p-channel MOSFET that suits your purposes and keep the parts count identical (though I like the idea of a series resistor to the GPIO if possible, just because it could save the micro in case something shorts the 12V to the GPIO).
Even open collector type GPIO will have an absolute limit on maximum voltage that can be pulled up to. Assuming your MCU is okay with that, your circuit works. During MCU boot up, or when MCU is under reset, the pin will not be driven and hence the gate of the FET will only see 12 V. Hence Load will not be energised by default. Once you drive MCU to zero PFET will definitely turn on and provide current to load. The pull up value can be around 10k. Ideally, you can look upon the Iol of the MCU. The current value, 12V /R should be less than that. Your circuit will work.If the pins are not open drain by default, then I would suggest to have a NFET driving the gate of PFET low. No worries of open drain.
 

Members online

Forum statistics

Threads
323,278
Messages
2,243,563
Members
428,054
Latest member
BevitalGlucoPremium