MOSFET as a switch basic circuit - Abandoned for relay...... - Page 1
Forum section: electronics / beginners

author: cowasaki
author_rank: Frequent Contributor
timestamp: January 26, 2018, 12:03:15 pm
content: Sorry. This thread was amoment. I’m now using some Omron 5v solid state relays G3MB-202P which is what I should have used in the first place.I'm thinking of creating a replacement for my 8 bit switchable control box which I made over a decade ago. This time I'm looking at making it 32 bit with lots of extras and micro processor control.I need to control a 5v output (100mA) via a banana plug plus a pair of banana plugs acting as a switch with an LED to show on/off the whole box will eventually provide 32 outputs of:Switchable 5v out5v in LEDSwitch aSwitch bGroundThe D0 input is pulled LOW at the microprocessor. How does this look to people?EDIT: First image shown had the resister values messed upEDIT 2: Optocoupler and 5v output (not part of this) removed.

author: Damianos
author_rank: Frequent Contributor
timestamp: January 26, 2018, 12:49:22 pm
content: Some points to consider:- What is the role of the opto-isolator? The output(s) are from the same power source as the input.- Why an AC input opto-coupler?- The driving of the above device is not enough to operate reliably, even without the next...- The 5V output cannot be satisfied by the above device. Also it is unprotected.- If you want to control the high side of the 12V load, use a P-channel transistor. Placing the load in series with the source creates negative feedback, that is not what you want.These from the first glance on the circuit.

author: cowasaki
author_rank: Frequent Contributor
timestamp: January 26, 2018, 01:01:53 pm
content: Quote from: Damianos on January 26, 2018, 12:49:22 pmThanks.The 5V output is a straight 5V output and has nothing to do with the switching side. I shouldn't have included it so will remove it and re-save the diagram. The optocoupler is just supposed to be a normal 4 pin one but that is the closest I could find at short notice in KiCAD but I take your point so I will remove it for the version 2 diagram.....

author: cowasaki
author_rank: Frequent Contributor
timestamp: January 26, 2018, 01:05:46 pm
content: DOH...Actually I've just realised that I copied this diagram from another project and the whole 12v thing is actually irrelevant! DOH! Facepalm....I will start again from scratch......I think a solid state relay or an optocoupler is what I should have used from the start, this is what you get for trying to design things whilst watching TVSo now I'm having a look to see what current I can get through each of them.

author: David Hess
author_rank: Super Contributor
timestamp: January 26, 2018, 03:55:51 pm
content: All I get is "An Error Has Occurred! You are not allowed to access this section" from EEVBlog when trying to view your images in other than postage stamp size.For any voltage outputs or switch outputs, I would consider including current limiting to protect the power transistors.

author: cowasaki
author_rank: Frequent Contributor
timestamp: January 26, 2018, 04:28:31 pm
content: Quote from: David Hess on January 26, 2018, 03:55:51 pmMy brain wasn’t in gear and I mixed up the controlled 12v output and switch sections making a circuit which made no sense when I looked back on it. I’m going to use SSRs for the switch and will use a MOSFET for the 12v later.Weirdly someone had actually posted an answer to my original question on another totally unrelated threadI'm sticking to the SSR though now.https://www.eevblog.com/forum/beginners/confusion-about-pull-down-resistors/msg1410280/#msg1410280

author: David Hess
author_rank: Super Contributor
timestamp: January 26, 2018, 05:46:21 pm
content: For switch outputs, galvanic isolation in one form or another is the way to go whether you do it yourself or use a solid state relay which has it built in.