need to output 50v via micro controller trigger

Discussion in 'The Projects Forum' started by patrick99e99, Aug 25, 2013.

  1. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    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
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,414
    3,353
    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.
     
  3. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    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?
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,414
    3,353
    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.
     
  5. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    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:

    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.
     
  6. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    or is something like this more what I want?
    http://www.vishay.com/docs/83725/4n25.pdf

    It says its max voltage is 1.5? So I would need a resistor after my micro controller's output pin to lower the 5v down to that?

    What is the difference between forward and reverse voltage?
    what is the difference between forward and reverse current?
     
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,494
    2,364
    Never buy NTE if you can help it, they are a source of substitue semi's at upwards of 5x the original.
    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.
    http://www.talkingelectronics.com/ChipDataEbook-1d/html/OptoList.html
    Max.
     
  8. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    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?
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,494
    2,364
    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: Aug 25, 2013
  10. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    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!
     
  11. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,494
    2,364
    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: Aug 26, 2013
  12. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,000
    1,512
    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.
     
  13. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,494
    2,364
    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.
     
  14. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    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?
     
  15. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,494
    2,364
    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.
     
  16. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    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?
     
  17. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,494
    2,364
    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.
     
  18. patrick99e99

    Thread Starter New Member

    Aug 19, 2013
    17
    0
    when you say "common the pic supply and 50v common", you mean, those two share the same ground, right?
     
  19. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,494
    2,364
    Yes, the respective -ve's of each supply are common to each other in a non-opto or other isolated circuit.
    Max.
     
Loading...