Circuit....DId I mess up here? - Page 1
Forum section: electronics / projects

author: Falcon69
author_rank: Super Contributor
timestamp: October 03, 2014, 06:21:39 am
content: Okay, long story short. I already ordered the boards, and just now, I realize I may have messed up. The boards have already gone into production, and can't be stopped and fixed.The circuit below, is there a resistor needed between the emitter of the transistor and the input of the inverter? The whole circuit is 5volts. The circuit works, although, kinda weird, but I think it's my bread board, been having problems with it.The SS441A is a hall effect switch.

author: rob77
author_rank: Super Contributor
timestamp: October 03, 2014, 07:17:41 pm
content: it's not needed - you can safely strap the input to VCC, so the resistor is not needed there.

author: tggzzz
author_rank: Super Contributor
timestamp: October 03, 2014, 08:51:14 pm
content: Why do you think that resistor might be needed?What's the purpose of the 100K resistor between the emitter and ground?What's the purpose of the 100K resistor between the emitter and GND2?Why is there a 1R resistor in series with the 0.1uF capacitor? Normally you do everything to minimise the impedance of decoupling capacitors.

author: wraper
author_rank: Unknown
timestamp: October 03, 2014, 09:17:06 pm
content: Try to short the first led. Especially if it is blue color, voltage drop on it can mess up everything. Even if it is red or green, voltage on emitter won't go below 1+V. +1 about 1 ohm resistors (really weird) and 100k resistor to GND2.

author: tggzzz
author_rank: Super Contributor
timestamp: October 03, 2014, 09:47:32 pm
content: Quote from: wraper on October 03, 2014, 09:17:06 pmAn emitter follower has a high input impedance and a low output impedance. If the '3904 can drive enough current to turn on the emitter LED, then it can almost certainly drive the extra 0.1% through the 100K (0.1%=100/100K).Overall I would expect the emitter voltage to be Vx-0.6, where Vx is the voltaqe at the junction of the 150R,4k7 and LED. Hence from understanding the '14's Vih and Vil, add 0.6V and you will get the required voltage at that junction (Vx).

author: Falcon69
author_rank: Super Contributor
timestamp: October 03, 2014, 10:18:51 pm
content: I thought a resistor needed to be in series with a logic gate and it's input, whether it is supply or ground. I guess as long as the supply voltage is between the rated limits it is okay not to have a resistor?Again, I thought a resistor to ground is needed between the input of the inverter and the emitter of the transistor. If there wasn't a resistor there, then wouldn't the inverter input be floating when the transistor is turned off? And from my understanding, floating inputs of logic gates/inverters is bad in a circuit.In another thread, they said to put a 1 ohm resistor in series with the 0.1uF cap for decoupling. If it is not needed, I guess I can thrown in a 0ohm (jumper) in it's place.GND2 is simply a connection point. If I want the switch to perform as normally open, then I ground that wire, otherwise, it receives a supply voltage through that 100k resistor and gives a "1" output to the gate of that mosFET. Making the switch default as normally closed.

author: Falcon69
author_rank: Super Contributor
timestamp: October 03, 2014, 10:23:34 pm
content: Quote from: wraper on October 03, 2014, 09:17:06 pmWhat do you mean 'short the first LED'? The First LED, with cathode going to the hall switch, is red, the other LED is green. The hall switch can sink 25mA, and that LED will only operate around 17mA or so.

author: tggzzz
author_rank: Super Contributor
timestamp: October 03, 2014, 10:34:15 pm
content: Quote from: Falcon69 on October 03, 2014, 10:18:51 pmPrecisely. The only reason for a resistor would be to limit current if something (e.g. ESD) tries to drive the input above Vcc or below GND.QuoteIf the transistor is off (which will only happen if its base is < 0.6V), then it won't be floating due to the 100R and emitter LED. (It would be worth checking that the voltage is < Vil, though.) Personally I wouldn't have the LED in the emitter; I presume it is there as some form of visible indicator.QuoteIt is always worth understanding why a statement is made. I cannot think of a valid reason in this case. Even if you replace it with a jmper, you will still have unnecessary inductance, which is undesirable. But you'll probably get away with it.QuoteIn that case GND2 is a very inappropriate confusing name.BTW, it would be a lot easier to discuss your circuit if you gave the components reference numbers, e.g. R1, R2, R3, LED1, U1

author: Falcon69
author_rank: Super Contributor
timestamp: October 03, 2014, 10:45:30 pm
content: Ya, I was in a hurry. I didn't display the references.So just using the 0.1uF cap is good enough on all my logic gates and inverters on this circuit, and future circuit? Currently, I am working on a similar one, but uses 8 switches (pretty much identical circuits), then allows from a front panel with led's to indicate which led's are active on the switches themselves. So in that circuit, I can eliminate the 1 ohm resistors as well?If I put the led above the transistor, i.e. cathode to collector, then I am not sure I would have the voltage swing needed to turn on and off the inverter. I will check it on simulation, but I agree. I normally don;t like using NPN as a high side switch.If the wires are cut, while they are connected, (unlikely, but could happen) then wouldn't that cause a quick burst of voltage which could validate the need for that resistor being between the emitter of the transistor and the inverter/logic gate? Or, since the original supply voltage is 5 volts, that won't happen, only the current would spike?

author: wraper
author_rank: Unknown
timestamp: October 03, 2014, 10:57:04 pm
content: Quote from: Falcon69 on October 03, 2014, 10:23:34 pmI mean that minimum voltage on the base will be the same as voltage drop on the led + voltage on the hall sensor output. Assuming that hall sensor can sink voltage to ~0.2V (there is some voltage drop, likely a bit higher) and red LED voltage drop which is around 1.8V, minimum voltage on the base will be ~2V -> minimum voltage after emitter follower will be ~ 2-0.6 = 1.4V, nowhere near logic 0. Transistor is never off.

author: wraper
author_rank: Unknown
timestamp: October 03, 2014, 11:04:34 pm
content: Quote from: Falcon69 on October 03, 2014, 10:45:30 pmit is not about good enough without a resistor. But bad enough with a resistor to completely screw up the decoupling capacitor purpose. Theremust notbe any resistor in series with capacitor unless for some unusual reason.

author: tggzzz
author_rank: Super Contributor
timestamp: October 03, 2014, 11:37:07 pm
content: Quote from: Falcon69 on October 03, 2014, 10:45:30 pmYou need to do some research to understand why decoupling capacitors are needed, what type they should/shouldn't be, and the associated PCB layout. Preferably before your next PCB.QuoteEmitter follower amplifiers (a.k.a. common collector amplifiers) such as in your circuit have a voltage gain of (very slightly less than) 1. And an "offset" of 0.6V.Since I don't know why the LED is there, I can't comment on whether it should be in the collector. However common collector amplifiers are useful, can have voltage gain, and are frequently used.(Common base amplifiers are rarely used except in conjunction with common emitter amplifiers, when they are known as a cascode pair)

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 01:12:50 am
content: Okay, i redid it. Anything wrong with this set-up?I tested it on the breadboard. everything seems to work much better now. Though, the switches will be ran along machinery, and have in some cases 35feet of cable. the cable is double shielded (braided/foil) and 28awg wires.The green LED with the 820 resistor seems to give off about the same brightness level as the red with the 154 resistor. At least, to the human eye anyway, which is what I am after. The green LED uses up about 2.5 mA, while the red is about 18.7 mA.The input to the XOR Gate U2 is working much better then that transistor. I am now getting 5 volt and about 135mV. Good range for turn off and turn on I think. The transistor before to the inverter was way too close. It was like 3.8v and 1.8v.So, if this circuit looks good to you guys, I'll redo the boards and send them off again. Sucks though, wasted all that money to have the others made. Learning experience I guess. That's what counts. Learned some things today.FYI, the Logic Gates put out 32mA and the Inverter does ±50mA continuous current, according to the data sheets (if I read them correctly).Thanks Guys.

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 02:03:40 am
content: oops, forgot the decoupling cap above U2. Will fix that.

author: Rufus
author_rank: Super Contributor
timestamp: October 04, 2014, 02:06:23 am
content: Quote from: Falcon69 on October 04, 2014, 01:12:50 amMore complicated than need be. You haven't said what the output interfaces to. If you are trying to emulate a microswitch the MOSFET will only look like a switch under specific circumstances.The CNTRL input left floating will be sensitive. If it runs down a cable capacitive coupling from IN or OUT (depending what the hell they are switching) could even turn the whole thing into an oscillator.If you don't mind the LED colors swapping with the state of the CNTRL input you could do the whole thing with one XOR gate. You don't need two LEDs either unless you are also using them to indicate the presence of power.

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 02:17:07 am
content: The red goes on when the switch is tripped (magnet is close), otherwise the green stays on steady (turns off and switches to red when tripped)The source and drain of the mosfet would be connected to another circuit that would need to sink to ground when the switch is tripped.Anyway to solve the CNTRL thing? It will be floating by default, unless the switch needs to be normally open, then it will be connected to ground at the end of the cable.Because I only have 4 wires in the cable, I will need to use the drain/shield wire for the CNTRL wire.

author: Rufus
author_rank: Super Contributor
timestamp: October 04, 2014, 02:47:25 am
content: Quote from: Falcon69 on October 04, 2014, 02:17:07 amThe green turning off tells you the same thing as the red turning on. One or the other being on tells you the circuit has power. Red being driven by the sensor and green being driven from the supply would tell you just as much in a slightly different way.Quote from: Falcon69 on October 04, 2014, 02:17:07 amThat will only work if the grounds of the two circuits are connected (or at least held close to the same voltage). If they are connected why isn't the MOSFET source just connected to ground instead of being wired separately?Quote from: Falcon69 on October 04, 2014, 02:17:07 amA screened cable isn't screened if you don't ground the screen, it isn't going to work. You might be able to use the screen for ground. It depends if whatever you are connecting it to minds noise picked up on the screen being injected into its supply/signal ground rather than a chassis ground if it has one. If you can free up a wire for the CNTRL signal some capacitance to ground could swamp the coupled capacitance in the cable.

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 03:02:13 am
content: What if I change R5 to 4.7k, then connect a 100k resistor between GND and U4.A that way the ground wire won't be floating. In Simulation, it still functions as intended, except now, when CNTRL is connected to ground, there's 1.5mA current flowing through the CNTRL wire (before was zero). No big deal really.Would that solve the problem you mentioned?Also, I could make the drain/shield the ground, and make another wire the control. If that works better. that way, the shield is always connected to ground/circuit.The mosfet (source) is not always grounded. If the circuit it is connected to normally would sink to ground, however, some circuits require +5 volt pull up. Also, some switches will need to be in series with each other in some cases, so leaving the mosfet as is (not connected to ground) would allow a series connection instead of just a single or direct connection or parallel switch operation.

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 03:03:42 am
content: oh, just tested it on the bread board. With the source and drain of the mosfet connected to a 12volt power and ground. It operates just as intended. I tried on simulation and connected 4 switches in series (via the mosfets) and it also works as intended. Anyone switch is tripped, it shuts of the other circuit (mainly just the LED in an Optocoupler).

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 03:48:11 pm
content: any thoughts on this circuit? thoughts on what i said in last two posts?the new circuit works better, but i still have concerns on what Rufus said about the shielding and noise. i thought that the decoupling caps on each ic would take away the noise.I need to get these made VERY soon, so any input is greatly appreciated.Would it be good to put another cap between supply and ground to help with any noise if I use the shielding as the ground? Maybe a 4.7uF Cap?Thanks in advance(fixed schematic below)

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 06:40:18 pm
content: I've read on the capacitance and noise when using shielded wires. I've heard that in some cases, it is better to ground both ends of the braid (shield) which makes a Faraday Cage that helps isolate noise for the wires inside the cage. Others say it's bad and only connect one end.The problem is that these switches/cables will go through a cable carrier and will be close to stepper motors or servos. Being that these will only be hobby machines, I don't see the motors operating at voltages above 80vdc. however, there will also be spindles that operate via a VFD and could see high frequencies and voltages to control those.The wire I have is 4 conductor, dual shielded (braid and foil). My plan was to use the shield as the ground , and the other wires for power, signal, and mosFET in/out (source/drain). The length of cable will not be any longer then 50ft (realistically, probably 12 feet for the most part).I have room on the tiny circuit board for the switches for more components if need be to combat any problems that could arise from noise or what not.Any suggestions? Maybe another cap? Comparator? Or it's fine the way it is? On the breadboard, it works great! But, when i apply length of wire, then install on machine, I don't want to encounter problems.

author: Rufus
author_rank: Super Contributor
timestamp: October 04, 2014, 08:13:43 pm
content: I was waiting for someone else to chip in with free consultancy but it doesn't look like you have any other takers.R2 doesn't do anything replace it with a short.If you connect D2 and R4 between +5v and U2 output you can get rid of U3.If you connect the CNTRL input to U2 B you can get rid of U4. The LED color will swap with CNTRL input state. If you really don't want that then drive the red LED from U1 and put the green across the supply which provides just as much information from the LEDs.Reducing the value of R5 the CNTRL input pull up makes it less sensitive to picked up noise on the cable. Adding the pull down R7 just makes it worse.You still possibly have problems with the MOSFET. MOSFETs are turned on when the gate voltage exceeds the source voltage by a certain amount. If the source voltage is not defined (because it is connected to 'some other circuit') then the MOSFET being on or off is not defined.Regardless of what +ve voltage you place on IN, OUT will never go above about 3.5v so it won't look like a closed switch to IN for any IN voltage above 3 or 4 volts.Then you can start protecting the circuit so it doesn't get blown up by static or transients when handled or plugged in and out. A resistor in series with the gate input that takes the CNTRL signal will limit the current in the chip's protection diodes. A capacitor to ground on the input will also help and filter out noise picked up on the CNTRL wire. The MOSFET gate will get blown by static/transients on IN or OUT. It probably needs a couple of small TVS diodes to protect it but without knowing what IN and OUT can be connected to it is hard to know what to do.

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 09:21:52 pm
content: the mosFETs source and drain are connected to an external optocoupler of another circuit.The red and green LED's only switch depending on what the SS441A is doing. if a magnet gets close, the red led lights and the green turns off.The CNTRL wire has nothing to do with the LED's coming on or off. The control wire is only there to make the switch act as normally open or normally closed.I tried taking out U3 as you said and connecting the D2 and R4 like you said. It doesn't work as intended. Now the switch will operate as normally open (unless the cntrl wire is grounded, then it will act as normally closed). I only want the cntrl wire connected to ground IF i want the switch to perform normally open. Otherwise, leaving it unconnected (default) makes the switch perform as normally closed, or rather, turns mosfet on, allowing current to sink to ground through drain and source.The mosFET I am using is a enhanced Logic one. It will turn on with a 3.3v or 5v logic input. On the breadboard, I connected a 12 volt supply and ground on the source/drain of the mosfet. it switches just fine.I am not sure what you mean by TVS diodes. I have not used those yet. I think the mosFET I am using has them built in?http://www.mouser.com/ds/2/302/2N7002BK-353610.pdfA capacitor to ground on the control wire input into U4? Will another 0.1uF work fine for that?IF I leave R5 as 4k7, and put a 100 in series with the control wire, will that work okay? Simulation shows 1.04mA flowing through the control wire when it is connected to ground, 104.17mV going to the input of U4. When the cntrl wire is NOT connected, simulation shows the full 5v going to U4 input."Reducing the value of R5 the CNTRL input pull up makes it less sensitive to picked up noise on the cable. Adding the pull down R7 just makes it worse. "So I would want more mA flowing through the CNTRL wire to reduce noise? If I make R5 1k, then 4.55mA flows through the wire, instead of the 1.04mA when R5 is 4K7.Will these TVS Diode work? From a quick read, it looks like I need one with operating voltage of 5 volts, and for break down voltage of 10%-15% above that (5.7v). This one has a peak surge current of 1A.http://www.onsemi.com/pub_link/Collateral/ESD9B-D.PDFThe TVS Diode just gets connected between the ground and supply of the circuit, correct?

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 10:08:28 pm
content: Here's the circuit, if I understood you correctly Rufus

author: Falcon69
author_rank: Super Contributor
timestamp: October 04, 2014, 10:44:48 pm
content: I played around with it alittle more. By supplying 5v to input B of U2 and eliminating the inverter, and switching the color of LED's, instead of how Rufus suggested, (all though basically exactly as he suggested) the circuit works as intended. I did not know that D3 would ground out through U2. Interesting.Is R2 even needed?So, looks like the circuit should work fine, just abit confused as far as what Rufus was explaining, with the CNTRL input and Transient Voltages (i.e. TVS Diode). If someone could suggest a TVS diode to use, that would be great. the one I linked I think is way to small for my fingers/tweezers to try and place. It's the size of about an 0402 case. 0603 is about as small as I can physically handle. Something about the size of an 0603 or 0805 package?FYI, I really appreciate the help Guys, and especially Rufus. Your guys comments are helping me finish this circuit correctly, and Helping me to learn as well.

author: Rufus
author_rank: Super Contributor
timestamp: October 04, 2014, 11:46:52 pm
content: R2 can be a short circuit.R5 needs to go to the other end of R6, C4 also needs to go to the other end of R6.R6 needs to be 47k or something. It limits the current into the IC pin when there is a high voltage transient on the CNTRL line. The higher the better limited by leakage current of the IC pin, C4, and across the PCB if it gets dirty. The value of R5 can go up again if you care about the wasted supply current. R1 is also lower than it need be.I still don't think you understand how MOSFETs work and so won't be able to understand if it will work with whatever connections you need to make to IN and OUT.The MOSFET has an absolute maximum rating of +/- 20v on its gate with respect to its source. A 12v TVS diode between gate and source would protect the gate but passes the transient on to the IC output. Making R7 10k or something would probably be enough protection for the IC at the cost of slightly slower MOSFET switching.A TVS diode across the supply doesn't hurt but doesn't do much good either.

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 01:20:48 am
content: Okay, I think I understood you correctly.Here is an Updated Schematic.The CNTRL input will only be plugged in (or not plugged in) once. Once it is connected to ground, it will stay that way. I noticed on simulation that it takes nearly 5 micro seconds for the U3 to switch the mosfet on. But, once the cap charges, it's pretty instant (well, to me nano seconds is instant). So, that is not a big deal because the CNTRL wire won't be plugged in and disconnected multiple times.The circuit in the grey box..that is the external circuit. The one the mosfet's drain/source connect too.The mosfet i think already has the TVS diodes built in. am I wrong? (see picture of data sheet)Again, thank you Rufus for all your help

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 01:40:25 am
content: hmm, i tried changing R1 to 100k and the circuit acted wierd. Red LED still stayed lit, though dim, when the hall sensor was tripped. Just didn't switch well at all with the 100k. I put in a 4K7, and that worked okay, lowering the mA of current it was sinking. I can probably go abit higher, but I've already bought the 4K7 resistors.

author: Rufus
author_rank: Super Contributor
timestamp: October 05, 2014, 02:09:49 am
content: R5 needs to pull up not down.Yes MOSFETs have gate protection diodes because the gates are so fragile just handling them would likely cause damage without. Most data sheets don't mention them or have any rating for them. The NXP data sheet does - 2kV and human body model but plugging two bits of equipment together isn't the same as a human body - there is no resistance and so more potential for damage even with less voltage.The connection to the 'other circuit' will work as long as ground on the 'other circuit' is strapped to or held close to ground on 'this circuit'. If you wire +12v to IN and put the resistor and isolator between OUT and ground the isolator LED will get about 1/4 current and probably won't work.

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 02:12:38 am
content: yes, the grounds are tied together. I remember seeing a problem with that external circuit operating as you have said, and tieing the grounds together solved that problem.So where would the TVS diode go?

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 02:13:43 am
content: oh yes, R5, saw that. I will fix. My simulation program shows it correctly, but I drew the schematic wrong. I will fix.thanks

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 02:21:51 am
content: oh, i need to mention, that some circuit sthat the mosfet wll be connected to, may not have a 12v optocoupler, but a 5v instead. If putting a 12v TVS diode, will it still work? And you said the 12volt TVS diode between the source and gate, correct? In simulation, I don't have TVS diodes to work with, but when placing a Zener Diode that way, I can't get the mosfet to switch the Optocoupler.

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 03:36:14 am
content: Been doing some reading.Is this what Rufus means to do for the transient voltage protection?I placed two diodes on the gate of the mosfet. D4 and D5 in the schematic below. Would that be enough to protect the circuit? That along with D1?

author: Rufus
author_rank: Super Contributor
timestamp: October 05, 2014, 02:43:46 pm
content: Quote from: Falcon69 on October 05, 2014, 03:36:14 amNo they make it worse.Consider you are installing the switch, it is mounted on the equipment and because you are wearing nylon socks you left the whole circuit with 500v of static charge with respect to earth. When you plug it in if the OUT pin connects first you earth the MOSFET source while the gate still has 500v on it and the gate gets destroyed. Pretty much the same if the IN pin connects first. Possibly the same problem if your 'other circuit' gets plugged in.A TVS diode (which is just a fast zener) cathode to MOSFET gate anode to MOSFET source will protect the gate. The zap then gets passed to the output of U3 which is more robust than the MOSFET gate. If you bump up the value of R5 most of the zap energy will be dissipated in it giving the IC an easier time.Under normal conditions the gate will never be negative or more than 5v positive with respect to the source so a 12v TVS between them will never conduct and have no effect on circuit operation. 12v because it is more than 5 and less than the 20 the gate can stand.Crap like this is why you will almost never see a pair of MOSFET pins on a connector that plugs into the rest of the world.If this thing isn't too cost sensitive and doesn't need to be especially fast then you would be better off using an OPTOMOS relay for the output which really does look like floating switch contacts.

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 04:31:40 pm
content: Never knew about the OptoMOS. Very Cool, however, the cheapest Mouser has is $1.24 each, too expensive for my application. In your honest opinion Rufus, would the 12V TVS be just fine? Or would it be better to go with the OptoMOS? Perhaps later, I could use those in another application. thank you for showing me those. Very cool device, but out of the price range for this project.I remember reading somewhere, that You do not want to put too many Optocoupler devices in series. Putting an OptoMOS in there, when the device I am trying to switch is an Optocoupler, could be too many opto devices in series.I could do the TVS Diode, no problem if that is good enough. Any suggestions as to which type? Just an operating voltage of 12volts? Bidirectional? Unidirectional?I found these two...http://www.onsemi.com/pub_link/Collateral/SD12CT1-D.PDFhttp://www.mouser.com/ds/2/308/ESD5Z2.5T1-D-241596.pdfWhich in your opinion would be better for this application?Again, thanks for all the advice.

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 04:35:43 pm
content: Would it also be a good idea to put one on the CNTRL wire as well? Cathode to CNTRL and anode to ground of circuit? That way, all inputs are protected?Maybe a 5.1v or 5.6v one?

author: Rufus
author_rank: Super Contributor
timestamp: October 05, 2014, 05:19:08 pm
content: I would go with an OPTOMOS relay.Like VO1400AEFTR $0.92 10 off and $0.76 100 off from Mouser and you save the MOSFET and TVS diode.I would go with that because it will actually work switching 100mA and up to 60v high side or low side even AC.Your switch circuit and 'other circuit' don't have to be referenced to each other. There will be no issues connecting them in parallel or series for wired logic functions. The only down side is they are a bit slow but the VO1400AEFTR is pretty good at 0.5ms max switching times.The CNTRL input doesn't need a TVS. The chip can take the zap because all the energy goes into the high value resistor in series with its input.

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 05:31:10 pm
content: Okay, thank you Rufus.I will look into it, but a SOP-4 package i think will be too big for the tiny circuit board I have to work with. The molds for the casting resin over the board have already been made. SO I can't change the circuit board dimensions.

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 11:03:39 pm
content: Hmm, if I am reading the data sheet correctly on that OptoMOS Rufus linked. It is a normally open, which means when no power is supplied to the led in it (lighting the LED), then the mosfet is open? If that is the case, I need to redo the circuit so the XOR gate puts zero volts out when the green LED in the switch is on. Or, I need to find an OptoMOS that is normally closed?Also, the data sheet shows a resistor going to a source VL...what is the VL?http://www.mouser.com/ds/2/427/vo1400ae-244774.pdf

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 11:09:11 pm
content: oh wait, maybe NO is what I want. The mosFET in the OptoMOS let's current/voltage flow when the LED is lit, correct? Meaning, when the Logic gates delivers a 1 to the input of the OptoMOS, the OptoMOS switches on, allowing the current to flow. Correct?

author: rs20
author_rank: Super Contributor
timestamp: October 05, 2014, 11:24:07 pm
content: Quote from: Falcon69 on October 05, 2014, 11:09:11 pmWhen current is flowing through the LED, current is allowed to flow through the mosFETs.You don't need separately manufactured NC or NO solid state relays; you can just change how you drive them:If you want a high voltage to make current flow through the LED, connect the LED from your control line down to ground.If you want a low voltage to make current flow through the LED, connect the LED from your Vcc down to your control line.

author: Rufus
author_rank: Super Contributor
timestamp: October 05, 2014, 11:35:12 pm
content: There is no 'input' it is an LED. You can drive it against 0v or 5v to choose which logic level causes current flow, just like the other LEDs in your circuit.The data sheet shows the circuit used to determine switching characteristics. VL and IL are specified.

author: Falcon69
author_rank: Super Contributor
timestamp: October 05, 2014, 11:54:13 pm
content: okayIt looks like the forward voltage is 1.1v TYP., the forward current is 0.3 - 3.2mA to switch on. Using ohms law with forward LED voltage of 1.1v and 5v source (logic Gate) I would need a resistor between the value of 1218.75 (3.2mA) and 13K (.3mA) to successfully switch on the mosFET. Data sheet shows Typical is 1mA to switch it on which is 3k9 resistor to go between the logic gate output and the OptoMos LED input. So that is what I need to purchase for the resistor value and all is well, correct? (I am still learning how to read data sheets).

author: rs20
author_rank: Super Contributor
timestamp: October 06, 2014, 12:02:58 am
content: Quote from: Falcon69 on October 05, 2014, 11:54:13 pmNot quite -- it's saying that some VO1400's will turn on with 0.3 mA, others will require a whole 3.2mA, but the typical one will turn on* with 1mA. To make sure your circuit works reliably, you should supply 3.2mA at the very least. The "maximum" means "the maximum value that we 'guarantee' the part will have", not "maximum allowable current" (which is 50mA). For example, you can see the turn-on times further down the page are specified for an LED current of 10mA.Similarly, you should ideally assume the worst case for the LED forward voltage as well: 1.4V, not 1.1V. If you choose your resistor to supply 3.2mA to a 1.4V LED, and then round the resistor value down to the nearest E12 value, that would be a bare maximum value for reliable operation.* Albeit very slowly: that row is talking about how much current you need to supply before the part switches on after 10ms -- further down the page is gives a turn-on-time of 52us typical (200 times faster) for an LED current of 10mA.

author: Falcon69
author_rank: Super Contributor
timestamp: October 06, 2014, 12:18:18 am
content: ahh! OkayMakes sense now. Does that go for all data sheets? I can apply this knowledge you just gave me to any data sheet I see like that?Hmm, I am trying to reduce the amount of mA the switches draw. I am not sure if the switching times is important. It is for application of machines, and the switches will make the machines stop if triggered. But, If we are dealing with Micro Seconds here, I don't think it makes too much of a difference as machines will take longer then that most likely to actually stop.What do you think? Shoot for the faster time and use 10mA current, or stick with the typical 3.2mA. I am guessing that the breakout boards probably don't even swtch that fast, but I could be wrong.

author: Rufus
author_rank: Super Contributor
timestamp: October 06, 2014, 12:25:52 am
content: Quote from: Falcon69 on October 05, 2014, 11:54:13 pm3.2mA is the minimum that will turn on all parts and only just turn on. You should probably aim for 10mA which is the current at which data sheet on resistance and switching times are specified. Guess at 1.2v forward voltage and pick the nearest standard resistor value (390R) it isn't at all critical.If you want to reduce current use a better red LED. High efficiency or super bright - the one you have seems to need a ridiculous amount of current.

author: Falcon69
author_rank: Super Contributor
timestamp: October 06, 2014, 12:29:26 am
content: Great, thanks!Now, one last thing, the TVS diode. Needed or not needed, or not really needed but not a bad idea to put on anyway? It is D1 in the last schematic. If yes, 5.6volt? 5.1 volt? 5 volt? Bidirectional? Unidirectional?

author: Rufus
author_rank: Super Contributor
timestamp: October 06, 2014, 12:51:39 am
content: Quote from: Falcon69 on October 06, 2014, 12:29:26 amIf a TVS 5v. TVS diodes are specified by working voltage, break down voltage is higher. Unidirectional.Not really needed. Zaps on a supply line couple to the other through the decoupling capacitors so circuits between the supplies don't really see them. It might save the circuit if someone sticks 12 or 24v on the supply or reverses it, but, if there is any significant current available it will just blow up the diode then the circuit. You need a fuse as well to protect against that.

author: Falcon69
author_rank: Super Contributor
timestamp: October 06, 2014, 12:55:34 am
content: Awesome, thank you Rufus and others. You have been a great help! Now to redesign the PCB and get them ordered. It will cost me alittle more, because of that OptoMOS, but, should be an overall better circuit.I will leave the TVS off, since it is not needed.Thank You very Much. I'll post a pic of the finished product in a couple weeks.Jason

author: rs20
author_rank: Super Contributor
timestamp: October 06, 2014, 02:32:51 am
content: Quote from: Falcon69 on October 06, 2014, 12:18:18 amAll components, like all manufactured goods, have some item-to-item variation. So, the "min, typ, max" thing is extremely common, and yes, you should always be designing to the worst case.

author: Falcon69
author_rank: Super Contributor
timestamp: October 06, 2014, 05:23:39 am
content: Well, I managed to get all the components, including that big SOP-4 package for the OptoMOS, onto the little tiny circuit board. It measures 21.36mm x 23.28mm. That was some work. the auto router for DipTrace really sucks. I did it all manually.

author: Falcon69
author_rank: Super Contributor
timestamp: October 13, 2014, 07:15:09 pm
content: I've added some TVS Diodes. Will this work correctly?I've also changed the chips to 74HC's. I was told it was bad having the other chips.

author: Falcon69
author_rank: Super Contributor
timestamp: October 13, 2014, 07:25:31 pm
content: Hmm, I'm going to have to eliminate D3 and the cap just above it. I don't have the room on the PCB

author: Falcon69
author_rank: Super Contributor
timestamp: October 16, 2014, 04:36:20 am
content: Got the boards in and a couple assembled. They Work!While testing, I accidentally touched the control wire to +5volts. WHAM! The red LED stayed on and the Hall switch wouldn't switch.What chip did I fry? Also, If I put a diode on the control wire, cathode out, anode toward circuit, would that solve the problem if it happens in the future? One like this maybe?http://www.mouser.com/ProductDetail/Vishay-Semiconductors/BAT54WS-E3-18/?qs=sGAEpiMZZMtQ8nqTKtFS%2fD7QH7JJs%2flZ9YSVt88cA%2fQ%3dOh, and it is the circuit above except that D3, D4, D5 and the cap above D3 is NOT there.FYI, on a side note. I am glad I'm not assembling thousands of these. Those little 0603 chips are hard to work with and that 28awg wire as well.