Shop OBEX P1 Docs P2 Docs Learn Events
Input Circuit problem — Parallax Forums

Input Circuit problem

blakrapterblakrapter Posts: 38
edited 2007-04-18 17:33 in BASIC Stamp
Hello everyone,
·
I have been working on a project it seems like forever.· I am in the process of building a truck with an airride suspension, automatic doors, ect.· We should have been to the electronics part about 6-8 months ago, but we are finally getting there.
·
At any rate I have multiple 12VCD inputs from toggle switches, limit switches, and my alarm to my BS2 which interprets them and outputs to a EFX-TEK DC-16 and a HB-25.· I plan to isolate those inputs using optoisolators that you guys helped me choose months ago.· This one to be exact:
·
(http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=320821&productId=320821)
·
I am trying to make this system redundant in every way if at all possible with the controller/circuitry because it is what I know the least about and is the hardest to get parts for in my area, so I need it to last.· I also want LEDs·for troubleshooting·to see when a switch is closed and not.· With that in mind, I designed the attached circuit.
·
There is a problem.· I can only get 1/2 of the optoisolator to work.· The other attached·circuit, which is not redundant, works fine.· I think half of the isolator is dead.· Not sure if my circuit did it, or if it was bad from the factory.· I have a few questions about my redundant circuit:
·
1.· Is there anything you see that would damage the optoisolator and cause only half of it to work?
2.· Is the circuit truly redundant, or do·I have something crossed that links the two together (other than the switch and BS2 pin) that would cause both to fail if one did?
3.· Is a redundant system truly necessary?· What’s the chance 1/2 of the isolator will fail and the other not, or one resistor go out and the other not?
4.· Will I be better, or just as well, to run the non-redundant system?

[noparse][[/noparse]added during edit:
5.· My resistor selection is based mainly on what I have, does it seem good, or should I change?· The 1k ohm resistor between the switch and isolator seems to get warmer than the others.· Not so hot I cannot touch and hold it, but should I be concerned about it heating up?··· end edit]
·
As you can tell by now, I am not an electronics guy at all.· I am jumping right in there and trying to get it all figured out for my specific needs.· Any help will be appreciated.

Thanks!


Post Edited (blakrapter) : 4/15/2007 12:57:13 AM GMT
1246 x 1199 - 57K

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2007-04-15 11:58
    Not sure which opto you're using. I don't know exactly what the "redundancy" buys you, though. For example, if the opto's output transistor fails short, you're still out of luck because it also shorts out the second transistor.

    Also, on the transistor side of the opto, the resistor really should go on the Vdd side. That is, transistor emitter directly to ground. The resistor should be connected as a "pull-up" not a pull down as you now have it.

    Double check the opto connection diagram because the input sides sometimes have the leds facing each other ( one pointing uphill, one pointing downhill).

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • blakrapterblakrapter Posts: 38
    edited 2007-04-16 18:04
    stamptrol,

    Thanks for the input.· The opto I am using is the one the link in my first post takes you to on jameco's site.· As far as the redundancy, that is what I was curious about.· If I understand you correctly, if one "end" of the opto fails, the other "end" is going to fail as well.· Right now, that single unit can function as 2 independent opto-isolators, but if one fails, the other will go as well.· Am I understanding that correctly?· How and why are they tied together other than packaging?

    Since this single unit dual opto (sorry if the terminology is wrong) is the weak-link in the chain, should I go to 2 separate optos with the same redundant circuit as attached above?· Do I really need redundancy?· I am a mechanical guy, so I don't have a clue how reliable these things can be, or what can be done to improve their reliability (although I think part of it is proper selection of connected components, such as properly sized resistors).

    Why should I choose to pull it up rather than down?· Will pulling it down cause a problem with the stamp or opto?· I can do it either way without a problem, I am just curious why it matters.

    The opto diagram is correct.· I checked it.· It is identical to the one in the documentation that is contained in the link above.

    More input from all will be greatly appreciated.

    Thank you!!
  • stamptrolstamptrol Posts: 1,731
    edited 2007-04-17 18:03
    Its not so much that one failed part of the opto will cause the other to fail, but that the shorted transistor also shorts out the remaining good one. You can do some more elaborate isolation with diodes, but the overall reliability will go down with a higher parts count.

    These devices are extremely reliable when operated within their parameters. There's infinitely more chance of some other part of the machine failing before the opto.

    The pull-up/pull-down relates to the type of transistor inside the the opto. NPN types (which you have) are designed to take current to the negative rail when operated as switches (which is what happens inside the opto). A PNP transistor is the one designed to take the current to the +ve rail. They are less common in optos. BTW, make sure the resistor limits the transistor current to some safe level. All you need is for the stamp input voltage to swing from close to zero to something above 3.5 or so volts.

    While you might get a working solution with a low current set up like an opto circuit, its good practice to do it the right way for the day you're using a transistor to control a higher power device. With the configuration you have, if it were a high power load, say a motor or heater, having the transistor emitter above the load will allow the transistor to slip into the linear operating region, dissipate some serious heat and vaporize before your eyes.

    One other thing, in your sketch, on the side going to the stamp, I hope Vdd is 5 volts! Otherwise the stamp is getting something quite a bit higher when the opto transistor is not conducting.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • blakrapterblakrapter Posts: 38
    edited 2007-04-18 17:33
    stamptrol,

    Thank you again for the information and the explination of why I need to pull up instead of down. I am new to this so much of my knowledge is gained experimentally. In this case, it could have caused a big problem if I had been using a tranistor for a higher power application as you stated.

    Yes, the Vdd is 5v. My prototype area is on a BOE, so the Vdd is 5V.

    Thanks for your help!
Sign In or Register to comment.