Motamob
Posts: 1
Joined: Mon Jun 11, 2018 7:17 pm

Circuit using a MOSFET to control power

Mon Jun 11, 2018 7:34 pm

I have a control board for a BLDC that controls the speed using a 0v-5v range. The GPIO pins only output 3.3v so my thought is to have a 9v power supply running through an N- MOSFET and using PWM on the GPIO pin to switch it on and off and control the power that way.

Here's a diagram of my circuit using a 2N7000

Image

I believe this should work but I'd like some confirmation. Thanks!


NOTE: Yes, I did totally miss the BBCode on the image hosting site. Sorry.
Last edited by Motamob on Tue Jun 12, 2018 7:51 pm, edited 1 time in total.

wh7qq
Posts: 1504
Joined: Thu Oct 09, 2014 2:50 am

Re: Circuit using a MOSFET to control power

Tue Jun 12, 2018 5:04 am

Your image does not come up for me but if your circuit looks similar to this, it should work...specific to the 2N7000 but also works with other devices with similar specs.

http://elinux.org/GPIO/RPi_GPIO_Interface_Circuits.

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Circuit using a MOSFET to control power

Tue Jun 12, 2018 7:56 am

I'm not seeing an image in the first post or any kind of diagram in the link in the second post.

I have no direct experience of using MOSFETs (a bit of a hole in my otherwise wide experience with electronics), so I would personally probably steer towards an integrated driver with complete overload protection (by current limiting and shut-down), eg VPN10N07.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

User avatar
DougieLawson
Posts: 40583
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Circuit using a MOSFET to control power

Tue Jun 12, 2018 11:40 am

Motamob wrote:
Mon Jun 11, 2018 7:34 pm
https://ibb.co/fvCjiT
Diagram is at the URL above.

Note: the OP missed that his/her hosting site has a function to generate the BBCode needed to post on here.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

wh7qq
Posts: 1504
Joined: Thu Oct 09, 2014 2:50 am

Re: Circuit using a MOSFET to control power

Tue Jun 12, 2018 7:27 pm

Sorry...the link I posted has gone bad since I last visited. I did make a hard copy for my file and extracted the url from that. Dougie Lawson's link is close enough. The other link had the load between the power source and drain side of the MOSFET and the source goes to ground. Either way works.

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Circuit using a MOSFET to control power

Wed Jun 13, 2018 9:46 am

wh7qq wrote:
Tue Jun 12, 2018 7:27 pm
The other link had the load between the power source and drain side of the MOSFET and the source goes to ground. Either way works.
Really? The illustration now available in the first post looks completely weird (although I did say I have little experience of FETs). I would be happier with the source to ground and the load in the place of the drain resistor, I don't see how it could work as diagrammed. As shown, the drain resistor would seriously limit the performance, even if the FET did switch.

Please correct me if I'm wrong, but isn't a FET controlled by the gate-source voltage? And an enhancement FET is turned on while a depletion FET is turned off?

So, as illustrated, an enhancement FET will only turn on while the gate voltage is higher than the output, limiting the maximum output voltage at 3.3V and current-limited by the drain resistor. Nothing you can't do with a naked GPIO pin.

A depletion FET would go into current limiting.

Or I might be completely mistaken.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

User avatar
Burngate
Posts: 6405
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Circuit using a MOSFET to control power

Wed Jun 13, 2018 10:19 am

That's my understanding, as well.
What's drawn is a source follower, a.k.a common drain. Wikipedia has a page.
Z80 Refugee wrote:
Wed Jun 13, 2018 9:46 am
So, as illustrated, an enhancement FET will only turn on while the gate voltage is higher than the output, limiting the maximum output voltage at 3.3V
It's even worse than that - the gate-source voltage must be greater than VGS(th), which for the 2N7000 is between 1v and 2v5 (depending on the drain current), so the output to the speed control will be no more than a couple of volts.

I'd be happier to make a recommendation if I had some information about what it's going to feed

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Circuit using a MOSFET to control power

Wed Jun 13, 2018 12:02 pm

Motamob wrote:
Mon Jun 11, 2018 7:34 pm
I believe this should work but I'd like some confirmation. Thanks!
I don't think it will, and I seem to have some agreement on that. For some design principles on circuits I, personally, know will work, take a look at my guide: viewtopic.php?f=34&t=207597 (scroll down to "Hardware Interfacing").
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

Return to “Interfacing (DSI, CSI, I2C, etc.)”