Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 11 of 11

Thread: Interfacing with 24V industrial system

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    19

    Interfacing with 24V industrial system

    Hi everyone,

    we have been hired for a job which includes something that we don't have too much experience with. It's not rocket science, but I could use some critique/help.

    We have to control some media players over a serial port, which we'll do with Teensies (probably 3.2). These media players will be installed in passenger elevator cabins, and will change the content that is displayed in sync with whatever the elevator cabin is doing (door open, going up, etc.).

    For this we need to interface with the elevator's control unit. There will be a module with twenty active low 24V ouputs that sits on the control unit's main bus, and I am currently trying to figure out the best design for the interface board.

    The main goals/requirements are:

    1. It needs to be simple. We'll only need three boards (plus a couple of spares), so I'll be populating and soldering these by hand.
    2. Reliability. It's not safety critical, but it needs to work.


    The big question now is how to do it. Resistor dividers? No isolation. Relays? Big and expensive (not much of a budget for this aspect of the job). Optocouplers? I read somewhere that it's better for them not be on most of the time.

    So, if anybody out there has experience with this kind of scenario, I would really appreciate their opinion.

    Cheers,
    Wolfgang

    P.S.: If you need more information, I'll be happy to provide. I wanted to keep this short, to increase the chances of it actually being read...

  2. #2
    Senior Member johnnyfp's Avatar
    Join Date
    Jan 2014
    Location
    New Zealand
    Posts
    263
    How do you communicate with the main bus? Is the isolation required because of noise or voltage protection? Could you isolate the teensy from the Bus instead of having 24 isolation on the outputs, so that way the Teensy is considered on the dangerous/noisy side, and all you have to isolate is the comms, which then you could use a opto?

  3. #3
    Junior Member
    Join Date
    Apr 2013
    Posts
    19
    I can't communicate with the main bus, that is the problem. Whether that's a security thing, has technical reasons, or "they" (the manufacturer of the elevator system) just don't want to let me, I don't know. Information doesn't exactly flow freely...

    So all I get are those 20 outputs.

    If isolation is actually necessary is one of the points I'm wondering about. I figure it won't hurt to have it, though.

  4. #4
    Senior Member johnnyfp's Avatar
    Join Date
    Jan 2014
    Location
    New Zealand
    Posts
    263
    I would be tempted to skip isolation in favor of protection. And do something like the following

    Click image for larger version. 

Name:	TTL-Converter_94678109-C66D-8526-AFACD6A0CB2643D2.jpg 
Views:	76 
Size:	10.8 KB 
ID:	9137

    Maybe attach a mov, or something similar.

  5. #5
    Senior Member Epyon's Avatar
    Join Date
    Apr 2013
    Location
    Belgium
    Posts
    443
    If it's an industrial application, you really need isolation. You don't want common mode offsets of different circuits shorting through your device!

    As someone who uses Teensy almost exclusively in industrial appliances, I can recommend the MOCD223M optocoupler. I use these all the time to interface with 24V lines. By limiting the current through the diode, these can stay on as long as you like. The current transfer is high enough that they already start to conduct from 1mA! You can even exploit this to build a digital input that can detect a logical high from 5V (TTL) up to 28V and still stay within the specs.

    MOCD devices are quite cheap, and you can find even cheaper ones on Aliexpress.

    For added safety, it's best to add a TVS across the diode that starts to break down above 24V.
    Last edited by Epyon; 12-13-2016 at 10:43 PM.

  6. #6
    Junior Member
    Join Date
    Apr 2013
    Posts
    19
    Am I assuming correctly that it's the high CTR (i.e. low current) that makes the MOCD223M suitable in this application? If so, any optocoupler with sufficiently high CTR should do, right? I'd prefer a through hole component.
    With TVS you mean a TVS diode specifically, or any type of TVS device? I guess a TVS diode would do. I did a quick search, and found one with UR 23.1V, UBR 25.7V, and UCL 37.5V. Would that be ok, or is 23.1V UR too low?

  7. #7
    Senior Member Epyon's Avatar
    Join Date
    Apr 2013
    Location
    Belgium
    Posts
    443
    Correct. Optocouplers can't stay on for too long because of power dissipation over the LED. However if they have a high CTR you can make the phototransistor conduct at very low LED current and power. Any optocoupler with comparable CTR should work.

    Any TVS device would work, depending on your application and required level of safety. I use a PTVS24VS1UR TVS diode, which starts to break down at 28V typ. You will have to select one your own, because the breakdown voltage is dependent on current, which is dependent on your series resistor, which is dependent on your CTR .

  8. #8
    Junior Member
    Join Date
    Apr 2013
    Posts
    19
    Makes sense

    Any preference for uni- or bidirectional?

  9. #9
    Senior Member Epyon's Avatar
    Join Date
    Apr 2013
    Location
    Belgium
    Posts
    443
    For single-ended applications I go for unidirectional diodes. Bidirectional doesn't always make sense, because if you invert the polarity the optocoupler LED will probably be destroyed before the TVS kicks in. If you use unidirectional, it will short the line over your series resistor and prevent destruction of the diode.

    I use bidirectional TVS diodes for differential lines, like RS-485.

  10. #10
    Junior Member
    Join Date
    Apr 2013
    Posts
    19
    Thanks a lot so far.

    I've found parts that I believe should work. I'll get some, play around with them and see what happens.

    What I'm not entirely clear on, however, is the number, placement, and value of resistors. Obviously, I have a current limiting resistor for the LED in the opto (probably around 20 k). The TVS diode also needs some series resisitance. As I understand it, this resistance needs to be low enough to allow enough current for whatever load is protected by the TVS, but high enough so as not to waste too much energy. As I need only very little current, is it enough to use only one resistor R1 as in (A), or do I need a resistor R1 for the TVS, and a separate R2 for the opto as in (B), with R1 << R2?

    Click image for larger version. 

Name:	IMG_4715.jpg 
Views:	34 
Size:	42.7 KB 
ID:	9161

  11. #11
    Senior Member Epyon's Avatar
    Join Date
    Apr 2013
    Location
    Belgium
    Posts
    443
    Scenario A seems optimal, and it's the scenario I use. It gives the TVS some resistance to work with and saves a component compared to B.

    You don't actually need to add a series resistance to a TVS btw, but it improves the level of protection during longer lasting peak events (limiting the power the TVS has to dissipate).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •