Would this work? - Page 1
Forum section: electronics / beginners

author: eliaselof
author_rank: Newbie
timestamp: January 23, 2021, 08:36:52 pm
content: I am just wondering if this would work. According to my spice simulation it will, but I want to be sure."OUTPUT_5V" is a 5V control signal from an Arduino and “OUTPUT” should be switch on (12V) and off (0V) by the forementioned control signal.

author: bob91343
author_rank: Super Contributor
timestamp: January 23, 2021, 09:46:09 pm
content: Too hard to read.

author: drussell
author_rank: Super Contributor
timestamp: January 23, 2021, 09:49:36 pm
content: Quote from: bob91343 on January 23, 2021, 09:46:09 pmI can see the schematic just fine but I have no idea what the OP is attempting to accomplish.

author: eliaselof
author_rank: Newbie
timestamp: January 23, 2021, 09:59:27 pm
content: Quote from: drussell on January 23, 2021, 09:49:36 pm"OUTPUT_5V" is a 5V control signal from an Arduino and “OUTPUT” should be switch on (12V) and off (0V) by the forementioned control signal.

author: capt bullshot
author_rank: Super Contributor
timestamp: January 23, 2021, 10:01:53 pm
content: Quote from: eliaselof on January 23, 2021, 09:59:27 pmThat or something alike is what I would have guessed. Yes, it'll work, beware of the maximum V_GS of the mosfet (can't be bothered to look up the datasheet).

author: ledtester
author_rank: Super Contributor
timestamp: January 23, 2021, 10:12:11 pm
content: It should work in practice. You see this configuration a lot in "relay module" boards, e.g.:http://www.robodukkan.com/class/INNOVAEditor/assets/2_CHANNEL_5V_10A_RELAY_MODULE.pdfhttps://www.researchgate.net/figure/Schematic-of-relay-modules_fig3_326350303The LED diode drop + V_BE drop will become much more significant if you want to use 3.3V logic - i.e. it may not work.

author: WattsThat
author_rank: Frequent Contributor
timestamp: January 23, 2021, 11:25:36 pm
content: If the 5v control is a very low duty cycle, it’s not a concern but... if this is a PWM or other rapidly pulsed based output, be careful with the amount of current drawn by the mosfet. This issue is the incredibly low gate drive current as this will have the device in its linear region for brief periods on every switching event.QuoteGuaranteed not to work at 3.3V with a blue or white LED.

author: AndersJ
author_rank: Frequent Contributor
timestamp: January 24, 2021, 12:15:48 am
content: R10 is too small.Put the LED as a collector load instead.

author: antenna
author_rank: Frequent Contributor
timestamp: February 28, 2021, 12:08:46 am
content: The 547 will have 1.2mA through its collector pulling down 12v through a 10k resistor, so that means, with an average Hfe of 200, the base current need only be around 6 microamp. There is no reason to force 10mA through the base emitter junction like that. What I would recommend is this:

author: Capernicus
author_rank: Frequent Contributor
timestamp: February 28, 2021, 12:14:30 am
content: I like how you put the little transistor into the big mosfet, that baby is going to be on alright, and its got a nice user friendly delay how it turns off.

author: antenna
author_rank: Frequent Contributor
timestamp: February 28, 2021, 01:01:33 am
content: I was wondering about that too but figured either he wanted it inverted (which I guess he could do programmatically) or the mosfet (which I didn't look up) has an on gate voltage higher than the (actually a bit less than) 5v from the arduino. It is a bit excessive, isn't it? lolI looked it up, that mosfet will do fine without the 547. Just invert the output in the arduino if thats how you wanted it.

author: MikeK
author_rank: Super Contributor
timestamp: February 28, 2021, 03:20:31 am
content: Quote from: antenna on February 28, 2021, 12:08:46 amA gain of 20, not 200, is used for calculating in saturation. See the datasheet.

author: Raj
author_rank: Frequent Contributor
timestamp: March 04, 2021, 10:40:30 am
content: if by 0v, you mean floating, then yes.

author: Zero999
author_rank: Super Contributor
timestamp: March 04, 2021, 12:33:10 pm
content: The circuit posted by the original poster will work. The BJT's base is overdriven, at 6.7mA, it's no big deal and it saves having to use an extra resistor to limit the LED current.The only downsides are: slow turn-off speed and the MOSFET's gate is driven at the full 12V, which could be too high for some small, logic level devices. If it's only switching at a low frequency and the maximum gate-source voltage rating of the MOSFET, is well above the 12V supply voltage, then these are non-issues.The other circuits posted here are more complex and of zero benifit. The one with the opto-coupler is common, but no opto-coupler is required because the relay already offers isolation and the 12V supply is normally referenced to the 5V, which defeats any additional isolation. The one with the 500k base resisistor and additional LED current limiting resistor, doesn't have any advantages, as the BC547 can take a base current of 7mA, with no problem.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 04, 2021, 04:46:47 pm
content: It's not great. I'd leave the LED out of the base circuit and put an LED and a resistor across the 12v Load. This will give you a more accurate indication of what's happening. Just because your LED is on doesn't mean the load is on. In your circuit, the PFET could blow and your base LED would still be telling you it's all OK. The BE junction could melt short and cause exactly the same problem. The series LED and high base current is slowing down the NPN transistor turn-off. The more charge you put in the more you have to take out.Minimalism does not equate to good practice, and it will cost you more later on when it fails. Spend the extra Öre!

author: perieanuo
author_rank: Frequent Contributor
timestamp: March 05, 2021, 08:42:18 am
content: Quote from: eliaselof on January 23, 2021, 08:36:52 pmas general rule, put the LED on controlled execution element, you got 2 rabbits with 1 bulletmove the LED, it will work there, but it's not a good ideaat least move it in collector with coresponding limiting resistorwhy you don't 'fire' directly the final transistor with your 5V signal from uP? and put the led directly paralel with the load?

author: Peabody
author_rank: Super Contributor
timestamp: March 05, 2021, 06:07:07 pm
content: I'm puzzled by what appear to be two suggestions that he drive the mosfet directly from the Arduino. If you do that, the mosfet will never turn off. Vgs will always be at least 7V, so the mosfet would always be on. Well perhaps I misinterpreted those suggestions.But I am curious whether you could connect the 547 base directly to the 5V rail, and the emitter to the GPIO pin through a resistor. Not sure where the LED would go. I'm not saying there's any particular benefit to doing it that way, but would it work? It would have the opposite logic to the OP's circuit. If that would work, then I think you could replace the 547 with an N-channel mosfet like the 2N7000, and then you could do away with the resistor, and it would require no current from the 5V supply to keep the P-channel on other than switching current during the transitions.