Connect with us

Choosing an Opto Isolator

Discussion in 'General Electronics Discussion' started by BodhiSci, Jul 4, 2014.

  1. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    Hi All,

    I am working on a maze for my research lab at school, hopefully replacing a large opto isolator (picture attached) with a smaller one. I found one that might work but I'm not sure. It is connected to a solenoid.

    https://www.sparkfun.com/products/9118

    The large one is working it is too big. The controllers run on 5v and a 12v battery powers the solenoid

    The specs of the solenoid : 12 V 540 mA 6.5W

    If I omitted something or got something wrong, sorry. This is over my head. Trying to figure it out. If you could tell me if that small one would work or what I'd need I'd appreciate it!

    Thanks in Advance to All
     

    Attached Files:

  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,178
    2,690
    Jan 21, 2010
    You've attached pictures of a bare board.

    The device you link to is designed to handle signals, not power.

    Perhaps what you want is a solid state relay?

    Can you tell us more about why it needs to be optically isolated. Do you actually just need a driver for the solenoid (to (say) allow a microcontroller to operate the solenoid)?
     
  3. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    Sorry about that. Picked the wrong file! Here is the correct one. Well, like I said, this is not my area and I don't know that much about it. I do know that my PI (runs the lab) said that he considered some type of physical relay (two pieces of metal somehow coming together to complete a circuit.) The reason he did not go with that is because it creates some noise. This is all in a neuroscience lab and we do electrophysiology recordings that are on the nanoAmp scale ( it is a separate circuit, but even just being in the same room it is affected (I don't know if that is from a common ground or what, we recently switched to batteries because the old power bar caused issues! electromagnetic fields are a big noise problem too). I am not sure why we need the opto isolator exactly, I thought that it was to prevent bleeding from the high voltage circuitry to the lower, maybe it lowers noise from the solenoid, I saw on another forum old discussions where people were discussing optoisolators for solenoids as well, it seemed like something you have to do). I will ask why we need it exactly on Monday and post here. Really though I just need to know if the smaller one (or another one like it) would work with that level of current and other info, connecting it in the same way as a replacement.

    If you have some questions I should ask him then I will do that!

    I really appreciate yours (and others) help! Sorry I know so little here.

    **From my memory, I believe that those wires in the pictures are a 5v and 12v power/gnd and then one that goes to the controlling pin on the development board (it is a programmable card that uses eproms and zbasic) Will confirm and get more details on monday.
     

    Attached Files:

    • Opto.jpg
      Opto.jpg
      File size:
      96.2 KB
      Views:
      166
    Last edited: Jul 5, 2014
  4. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    This one looks suitable: http://www.digikey.com/product-detail/en/CPC1708J/CLA279-ND/1277134

    It's rated for 4A which seems like overkill, but it's the cheapest that Digikey have.

    Its input pins connect to an internal LED, so your control voltage will need to go through a resistor to limit the current. If your control voltage is 5V, the resistor should be about 270 ohms; if it's 12V, use about 820 ohms.

    The input and output are both polarised; see the data sheet.

    You will also need some kind of suppression on the solenoid. This is probably already present. The simplest type of suppression is a diode (e.g. 1N4001~4007) connected across the solenoid with its cathode to the positive voltage end. This will delay the turn-off of the solenoid though; other kinds of suppression may be better if a very fast release is needed.
     
  5. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    Alright. Thanks alot. How did you calculate the resistor that is needed? V=IR type equation?
     
  6. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    Yes. The SSR's input is an infra-red LED. According to the data sheet, it has a typical forward voltage of 1.2V, and it needs at least 10 mA flowing through it to activate the output. These conditions both apply to the ON state, when your control voltage is present.

    The driving circuit looks like this:
    Code:
    drive voltage (+) ------\/\/\/\/----------|>|---------- 0V
                            resistor     LED inside SSR
    The resistor is connected in series with the LED and the drive voltage is applied across the series string. Positive is shown on the left, and negative (your 0V rail) on the right. Current flows through the circuit from left to right.

    The LED has typically 1.2V across it, so the rest of the drive voltage is dropped across the resistor. The value is chosen to set the current to at least 10 mA. I recommend designing for 15 mA. (Your drive voltage source also needs to be able to comfortably supply at least this much current.)

    If the drive voltage is 5V, there will be about 3.8V across the resistor. Using Ohm's Law:
    R = V / I
    = 3.8V / 15 mA
    = 3.8V /. 0.015A (you must use amps, not milliamps, in the formula)
    = 3.8 / 0.015
    = 253 ohms

    253 ohms is not a preferred resistance value. Since 15 mA is the minimum current you want, and higher current corresponds to lower resistance, you need to choose a preferred resistance that's lower than 253 ohms - 240 ohms or 220 ohms would be suitable.

    Repeating the calculation for a 12V drive voltage, the voltage across the resistor will be 10.8V, so:
    R = V / I
    = 10.8V / 0.015A
    = 720 ohms

    Closest lower preferred value would be 680 ohms.

    Make sure your drive voltage source can supply at least 20 mA comfortably. If it comes from an IC, it may not be able to supply that much current, and you may need a buffer of some kind. The simplest kind is a transistor connected as an emitter follower, or a MOSFET connected in common source configuration. The former will drop around 0.8V, so you should recalculate the resistor value with the voltage across the resistor being reduced by 0.8V.

    If this information is not specific enough, tell us about your drive voltage source.
     
  7. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    Thanks again for your help. I have a twist on this setup. Right now the control pin is set to 5v TTL, high state as I understand it, which means that voltage but very little current. The input side of the opto isolator that is on the diode side is like this:

    5v+ drive voltage from DevBoard (regulated)----------------|>| LED inside opto isolator--------------5v from TTL high state (low current)

    The two opposing voltages cancel each other out and to activate it, the 5v from the TTL drops to ground (or at least to 0V) and that lets the driving voltage/current go through the diode.

    It seems like it shouldn't work but it does. Somehow this is supposed to save power I'm told but I don't see how. Could I keep this same setup? One of my friends suggested it but it seems that perhaps that 5v is too much for the diode? I see that you said to reduce the driving voltage to 1.2 v . Does voltage drop mean that 5V is out of the question. I wonder if it is possible to use resistors on both sides. I am not sure how the vastly different current affects that. *** Edit, Actually there are already resistors on the side with the 5v driving voltage. They are built into the opto isolator which is a 70RCK4R http://www.digikey.com/product-detail/en/70RCK4R/GH3035-ND/247707
    http://lgrws01.grayhill.com/web1/images/ProductImages/IO_Racks_4_Channel.pdf

    It has a 3.3K resistor between the input and the driving voltage. It is for a different diode though

    If that is not possible then I guess we could look at using a transistor like you suggested and change the programming of the control pin. My friend said a 2222, non metal transistor might work. I have very limited access to him though and digikey has 5 million versions of everything, I have no idea which one to pick.

    I hope that these curveballs are not too crazy. Thx
     
    Last edited: Jul 14, 2014
  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    Yes, that general setup will work. You feed +5V into the anode side of the LED, and when you pull the cathode side down to 0V, the LED sees voltage across it, and the SSR is activated. But if there is no resistor in series with the LED, there is nothing to limit the LED current, and things can be damaged. You can't apply 5V directly across an LED; you need something (usually just a series resistor) to limit the current.

    I showed the formula in post #6. The circuit I showed drives the LED from an output that's 0V for OFF, and +5V for ON, so the LED (and its series resistor) need to be connected between that output and the 0V rail, so when the output is ON, +5V appears across the LED+resistor combination, with positive at the anode end. But it's equally valid to connect the anode end of the LED+resistor combination to a constant +5V rail and drive the other end from an output that pulls down to 0V when you want to activate the LED and close the SSR.

    It's not clear whether there is a resistor in series with the LED inside the solid state relay modules or not. There are 3k3 resistors on the board, but they appear to be connected between the "+VCC" and "LOGIC" connections for each channel, i.e. in parallel with the SSR input, not in series with it. Also, at 5V, 3k3 will only give an LED current of about 3.8V / 3300Ω = 1.15 mA, which is not enough to activate any of the SSRs that I've seen.

    So we need to find out whether the actual SSR module contains a limiting resistor or not, and what voltage it's designed to be driven from.

    Can you give a part number and/or data sheet link for the actual SSR modules that you are plugging into the base board that you linked to in post #7?

    Edit: If the SSR modules have their own limiting resistors and are designed to accept 5V DC at their inputs, then you can use NPNs to provide the path from the "LOGIC" connections to 0V. Any small-signal NPN will do - a very common and cheap one is the 2N3904: http://www.digikey.com/product-detail/en/2N3904BU/2N3904FS-ND/1413. See Steve's excellent resource at https://www.electronicspoint.com/resources/using-a-bipolar-transistor-to-turn-a-load-on-and-off.30/ for details of how to connect the transistor.
     
    Last edited: Jul 15, 2014
  9. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
  10. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    To clarify. We are not using that board that in the picture with the optoisolator on it. We are getting rid of it completely. I am thinking that it will be a just a resistor on the anode side and maybe the cathode side of the SSR diode like I think we are talking about.Right now though on the side from the control pin that goes to the optoisolator with the opposing current, there is no resistor bet as I understand it except the one you said is in parallel. Sorry for any confusion.

    I also am wondering about the suppression diode across the solenoid. You said that "The simplest type of suppression is a diode (e.g. 1N4001~4007) connected across the solenoid with its cathode to the positive voltage end" So would any of these work? I'd guess a 1N4004 would work.

    Thank you
     
  11. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    OK, so you're going to use the SSR that I recommended. That WILL need a resistor in series with the LED. I calculated the values for two different control voltages back in post #6. It doesn't matter which side of the LED the resistor is on, and it doesn't matter whether you connect the LED+resistor combination between an active high output and 0V (as I drew in post #6) or between +5V and an active low output, as you drew in post #7, as long as the voltage is applied with positive to the anode side.

    But it is important that the output, whatever type it is, is able to comfortably supply at least 15 mA. This is not generally true of signals in logic circuits. If your driving signal can't sink that much current, or if you want to add a layer of protection between the off-board SSR and the sensitive components, you can use a transistor, connected as described in the resource I linked at the end of post #8. The series combination of the LED in the SSR and the series resistor are the collector load for the transistor in that article.

    Yes, a 1N4004 is fine. It just needs to be rated for at least the same current as the solenoid (540 mA), and a comfortably higher voltage. A 400V 1A diode is fine. This diode will protect the solid state relay against damage from the back EMF from the solenoid. But as I mentioned in post #4, this simple scheme slows down the release of the solenoid. Depending on what the solenoid does (which you haven't told us yet), this could be a problem.

    If it is, you can speed up the solenoid release by adding a zener in series with the diode (facing the opposite direction). The zener voltage should be somewhat less than the maximum rated voltage of the SSR output, which is 60V, and the required power rating might be able to be estimated if you know the inductance of the solenoid and other details; for safety I recommend a 5W 47V zener: 1N5368: http://www.digikey.com/product-detail/en/1N5368BRLG/1N5368BRLGOSCT-ND/893871
     
  12. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    It works fantastic! Thanks for your help! I'm curious as to how the zener works. I did use it and looked it up on Wiki but it is still unclear as to what is going on there.
     
  13. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    You connected the zener in series with the diode that's connected across the solenoid, right?

    The current in an inductor changes only in response to voltage across it, and at a rate proportional to that voltage. When the SSR turns ON, the current builds from zero to a level where it is limited by the solenoid's own internal DC resistance (i.e. the resistance of the wire).

    When the SSR turns OFF, and stops applying the constant 12V DC to the inductor, the inductor "tries" to keep the same current flowing; this requires that the current flows through the components connected to it. Because physics, it generates a voltage across itself, to try to keep the current flowing in the same direction it was flowing in before, and the magnetic field, and the current, "discharge" into the external circuit. This voltage is called the back EMF.

    If there is no specific path for the current to follow, the back EMF voltage can get very high - hundreds, or even thousands of volts. If you were driving the solenoid with an electromechanical relay, the voltage would cause arcing in the contacts. With an SSR, the voltage would blow the snot out of the MOSFET inside the relay.

    So the simplest approach is to provide an external circuit for this current to flow through. Luckily, the voltage has the opposite polarity to the applied voltage (because the direction of current flow is the same), so a simple diode across the solenoid will clamp the voltage and prevent damage to whatever is driving it. But a diode clamps the voltage to only about 1V and the magnetic field, and current, "discharge" at a rate proportional to the voltage across the inductor, which in this case is quite slowly.

    A good compromise is to add a zener in series with the diode, so the voltage across the inductor is allowed to go fairly high, so it "discharges" fairly quickly, but not so high that the SSR will be damaged.

    A MOV is another option, though they are not really intended to be forced into conduction on a regular basis - they are intended to suppress unexpected voltage surges, not expected ones!

    This subject is described elsewhere online by people far more knowledgeable than me. Often, it is in relation to relay coils, not solenoids, because in the electronics world, relay coils are the most common large inductor that needs suppression in this way. Google zener diode suppression relay coil.
     
  14. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    Thanks. The diode and zener are in series across the solenoid like this:

    Solenoid (+) -------- + 1N4004 Diode - -------- - Zener Diode + --------- Solenoid (-)

    That right?
     
  15. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
  16. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    Yes, makes perfect sense! lol
     
  17. Arouse1973

    Arouse1973 Adam

    5,164
    1,078
    Dec 18, 2013
    An MOV is what I would use for a solenoid or an electromagnet. It allows the release of the solenoid much faster than a diode because of the reduced power dissipation. I think it's what they use for large solenoids for automatic entry systems into buildings that use magnets to hold the door closed.
    Adam
     
  18. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    What do you mean? Can you explain why you think an MOV is better than a zener diode?
     
  19. Arouse1973

    Arouse1973 Adam

    5,164
    1,078
    Dec 18, 2013
    I didnt say it was better than a zener diode. I just mentioned the use of MOVs for solenoids. But anything that has a PN junctions isnt going to be as fast as an MOV. Its dynamic resistance will be alot higher than the on resistance of an MOV. I have done alot of tests regarding ligthning surges and diodes are just too slow.
    Just my opinion.
    cheers
    Adam
     
  20. BodhiSci

    BodhiSci

    32
    0
    Jul 4, 2014
    Cool, I think that this is plenty fast for our purposes. I can mention the possibility of using that but I think the diode and zener is totally adequate. Thx.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-