need to output 50v via micro controller trigger

Thread Starter

patrick99e99

Joined Aug 19, 2013
17
I previously had opened a thread regarding a 50v step up driver PCB board that I was struggling with making work:
http://forum.allaboutcircuits.com/showthread.php?p=639830#post639830

After some thought, I have determined that the problem I experienced was purely coming from using this 50v step up driver board... Which I was only using for convenience-- it was something someone else had designed specifically for firing a solenoid (which is my goal), so I figured I could just use it, but I ended up having a lot of problems making it work right in conjunction with my circuit involving the microcontroller.

So, I would like to rethink the design of my circuit and try to accomplish what this 50v step up driver board was doing.

This is what I am thinking:
solenoid_firer.png

My questions are:

1) I have no idea what value should be used for the diode between the solenoid terminals. How do I know what to use for this?

2) Is a 10k resistor necessary for the OUT pin of my micro controller chip? I was told that the gate pin of a MOSFET requires a resistor because 0v on the output may still not cause the transistor to close due to it acting somewhat like a capacitor. Is this correct? If so, how do I know 10k ohm is the right amount here?

3) Is this circuit missing anything important? (for longevity) Are there any safety precautions I could / should make to sure none of these components get fried?

4) Is there a reason to choose using a relay vs. a MOSFET for this? I could use a small transistor to activate a relay which could pass through the 50V. It seems like the same result, so I am just curious which is "better"? I also was told that a MOSFET requires a lot more "support" components, and that this was the benefit of using the 50v step up driver board because that had all those support components already (unfortunately that board just was not working for me).

Thank you very much for any advice, guidance, feedback, etc.

-patrick
 

MrChips

Joined Oct 2, 2009
30,821
1) The diode is a snubber diode to suppress the large emf spike when the solenoid is turned off. Any thing such as a 1N4007 will work.

2) 3) For protecting the microcontroller I would use an optocoupler to drive the gate of the MOSFET

4) A relay is similar to a solenoid so not much point in driving a relay followed by a solenoid. A BJT or MOSFET is fine. Again, because of the high voltage (50V) I would choose to isolate the microcontroller from the 50V circuit.

You can buy a SSR (solid-state relay) to switch 100VDC.
 

Thread Starter

patrick99e99

Joined Aug 19, 2013
17
Thanks for the reply!

What about #2? I notice you included it as part of your answer to question #3? So are you suggesting that using an optocoupler would have the same effect as a resistor?

I thought the point was if something isn't there to drain the voltage still hanging around in the MOSFET, then the solenoid will be energized a lot longer than one would want. Am I missing something?
 

MrChips

Joined Oct 2, 2009
30,821
That is only if you disconnect the microcontroller.

When the output of the mcu goes low the charge on the MOSFET gate will drain through the mcu output pin. A 10kΩ resistor is ok for a MOSFET gate.
 

Thread Starter

patrick99e99

Joined Aug 19, 2013
17
OK cool.. So my next question is, how do I find the "right" optocoupler?

I am using the BS2SX as my micro controller, and its documentation states:

General-purpose I/O pins: each can sink 25 mA and source 20
mA. However, the total of all pins should not exceed 50 mA (sink)
and 40 mA (source) if using the internal 5-volt regulator. The total
per 8-pin groups (P0 – P7 or P8 – 15) should not exceed 50 mA
(sink) and 40 mA (source) if using an external 5-volt regulator.
So this means the optocoupler needs to allow a max of 20mA, and be able to handle 5v...?

Where do you recommend I get optocouplers?

http://www.radioshack.com/product/index.jsp?productId=12673913

Radio shack has this one-- which seems like overkill as it has 8 pins, I would think I only need 4. Also, $20 for this part seems a bit ridiculous.
 

Thread Starter

patrick99e99

Joined Aug 19, 2013
17
Frankly I don't see why you should not get the original to work, I have used IRL540 directly connected to the PIC in the past for projects.
Hmm, well I would like to play it safe as I previously blew up a micro controller chip from high voltage.

I just don't understand how to find the right part...

http://www.digikey.com/product-detail/en/H11L1S(TA)/1080-1201-2-ND/2675692

This product for example-- where does it say how much voltage the input can handle? In other words, am I ok to hook my BS2SX directly to it, or do I need a resistor between the output pin of my micro controller and the input of this optocoupler?

So I guess a more specific question is:

How do I know what kind of optocoupler I need that will satisfy taking the output of my BS2SX as input, and then be able to output to a 20N10L MOSFET?
 

MaxHeadRoom

Joined Jul 18, 2013
28,698
This product for example-- where does it say how much voltage the input can handle? In other words, am I ok to hook my BS2SX directly to it, or do I need a resistor between the output pin of my micro controller and the input of this optocoupler?

How do I know what kind of optocoupler I need that will satisfy taking the output of my BS2SX as input, and then be able to output to a 20N10L MOSFET?
That one is a logic to logic opto, You are not interested in high speed switching, so 4N25 should work, if you study the link it shows how to select the various components, e.g. the diode LED is rated for a maximum of 60ma, so if you are feeding this from a 5v source, aim for say 20ma and calculate the resistor accordingly.
The same with the output, I believe the link also shows a typical example of logic to FET interface?
You could either change the zener to 5v or check the maximum gate voltage of the one you are using.
Max.
 
Last edited:

Thread Starter

patrick99e99

Joined Aug 19, 2013
17
You could either change the zener to 5v or check the maximum gate voltage of the one you are using.
What does this mean? The only zener I know of is a zener diode-- one that allows current to flow in both directions only if it's past a certain threshold. But I don't think there's a zener diode involved anywhere in my circuit, unless I am missing something...

My thought is my schematic stays exactly the same except after the resistor now is the optocoupler.. The output of the optocoupler however, I am still a bit confused about.

According to the link you previously sent (the OptoList), it shows the left side of the chip is an LED, and the right side is a transistor, so the 3 pins on the right side are Base, Collector, and Emitter.

So, my understanding is that normally you would have a lower voltage go into the base of a transistor, and that would allow a higher voltage to through from the collector to the emitter. And they have a diagram showing a 4n25 driving a mosfet...

Screen Shot 2013-08-25 at 7.50.33 PM.png

So I am pretty confused about what all is going on here... The collector and emitter are both getting a reduced voltage from the 3k resistor-- Why is it 3k?

I don't quite understand what the 15V diode, the 10u capacitor, and 1000u capacitor are doing...

I assume the 10k resistor is the same "pull down" resistor that I had originally thought my circuit needed-- but it didn't.. but I guess when an optocoupler is involved, it's needed again?

so much to understand!
 

MaxHeadRoom

Joined Jul 18, 2013
28,698
The 15v zener, 3.9k res. and 10μf are providing a lower voltage source for the gate circuit of the FET, from the 36vdc.

The 10k in the emitter of the Opto is referencing the gate to common.
The 1000μf cap is the smoothing/decoupling capacitor for the 36vdc supply
Max.
 
Last edited:

shortbus

Joined Sep 30, 2009
10,045
Why not use the correct component to drive the mosfet? Something like a FOD3182? It is a opto gate driver and made just for this type of situation.

Just using an opto coupler you would need a way to sink the gate voltage to turn it off faster, and the opto drivers have this built in to them. You would also need to use the circuit in your second attachment to give the gate voltage for the mosfet you chose, since it needs ~10V. If you haven't bought the mosfet yet, you could pick a logic level one and use the 5V supply voltage from the micro circuit.
 

Attachments

MaxHeadRoom

Joined Jul 18, 2013
28,698
If you tried the IRL540 5v gate Mosfet as I posted in #7, you may eliminate all the Opto interface or the circuitry posted in your other OP?
Max.
 

Thread Starter

patrick99e99

Joined Aug 19, 2013
17
If you tried the IRL540 5v gate Mosfet as I posted in #7, you may eliminate all the Opto interface or the circuitry posted in your other OP?
Max.
Sorry for the delay in my reply..

Yeah I am a little confused.. the 20N10L Mosfet that I have is listed as a IRL540-- It has a 5V gate..

http://www.marcospecialties.com/pinball-parts/STP20N10L

I just originally asked what might my circuit be missing as far as safety goes, and someone responded that I should isolate the 50v from the 5v, to protect the micro... That's how I got onto this whole optocoupler tangent in the first place.

So I also have the 4N25 optocouplers, but now I am confused because of the previous comment by shortbus... I was under the impression that the pins of the micro controller chip will sink (is that the right term?) voltage when the mosfet is off, so by that I wouldn't even need the resistor I originally had in my schematic.

...

My electronics design knowledge is very limited, so I am really just looking for what will work best. If an optocoupler is a good idea just to be safe, then I am all for it... If it's pointless and a waste, then obviously I don't want to bother with it. I feel like I am getting a lot of conflicting information and it's making it very hard for me to know how to proceed... So can someone clear it all up for me?
 

MaxHeadRoom

Joined Jul 18, 2013
28,698
I find it odd is that the data sheets I found on that FET indicated it was intended for 12v mobile applications and the gate voltage at 15v, I could not find a mention of 5v other than the IRL540 mention?
Also that your original print on the other thread shows shows a buffer FET to raise the gate to +15v?
IMO, of the two options you have outlined of either using an IRL540 OR an Opto, both should work with the necessary steps for the common ground plane and decoupling capacitors if using the direct switched version.
Max.
 

Thread Starter

patrick99e99

Joined Aug 19, 2013
17
Hmm so looking at this mosfet now, so were you saying I don't need an optocoupler because the gate actually has no physical connection to the drain / source pins? And therefore it's already isolated?
 

MaxHeadRoom

Joined Jul 18, 2013
28,698
It can't be considered Isolated, but with a Mosfet the gate is highly Insulated from drain and source, so the impedance is very high and for simple switching applications can be considered to offer virtually no load to the driving device.
You will need to common the PIC supply and 50v common, however.
Max.
 
Top