In this post we'll study a simple high current mosfet based SPDT DC relay, which can be used in place conventional bulky SPDT mechanical relays. The idea was requested by Mr. Abu-Hafss.
Working Concept
A simple high current SPDT solid state DC relay or a DC SSR can be constructed using a couple of mosfets and an optocoupler, as shown in the digaram above.
The idea looks self explanatory.
In an absence of an external trigger, the lower mosfet stays switched OFF allowing the upper mosfet to conduct through the 10k resistor connected across the positive and the gate of the mosfet.
This enables the N/C contact to get active, and a DC load connected across the supply positive and the N/C gets activated in this situation and vice versa.
Conversely in the presence of an input trigger, the mosfet connected with the opto emitter gets an opportunity to switch ON, switching OFF the upper mosfet.
In this situation a load connected between positive and N/O points gets activated or vice versa.
The Circuit Diagram
The above design can be configured in the following manner, and in fact this appears to be technically more correct, and therefore is the recommended one.
This design will work regardless of the opto input switching voltage, right from 3V to 30V DC.
PCB Layout
The following image shows the pinout details of the MOSFET IRF540, you can use any other MOSFET of your choice and as desired:
Upgrading the SPDT Relay to DPDT Version
Creating a DPDT version of the above DC solid state relay is actually not too difficult. We can do this by adding a couple of more MOSFETs as shown in the following illustration.
Here, although the poles appear to be a single pole, connected with the positive line, it could be simply separated and integrated with the different DC supplies for operating two individual loads, and implementing a DPDT SSR function.
Haydn says
Hi Swagatam,
Firstly, elegant design and wonderful to see someone so willing to help. I am only just beginning to learn about semiconductors, most of my electrical knowledge is based on 12vdc automotive applications this is what has lead me to your design. I am looking to create a NC SPDT SSR. This is to be triggered by a 12vdc source. My aim is to be able to interrupt a low output (earth) from the ecu that is used to activate an ignition coil.
In this application the coil is supplied +12v from the ignition and the ecu supply’s the -12v.
Using conventional SPDT relay or “switching relay” I would wire the output from the ECU to the COM terminal, then connect the negative side of the coil to the NC terminal, and no connection to the NO terminal. This would allow the ECU signal to trigger the ignition coil until the relay is activated creating an open circuit. Is it possible to utilise your design in this application?
Regards
Haydn
Swagatam says
Thank you Haydn, for your interesting question!
If I understood your requirement correctly, the following design should do the job for you.:
https://www.homemade-circuits.com/wp-content/uploads/2024/09/solid-state-relay-for-automotive-ignition-switching.jpg
If it doesn’t, please let me know, then I may have to replace the N-channel MOSET with a P-Channel MOSFET.
Let me know if it works or not?
Laurent says
Merci d’avoir répondu rapidement, j’ai bien compris pour le circuit que je dois faire.
Merci infiniment
Laurent
Swagatam says
You are welcome Laurent!!
Dodi says
Hello there,this is my first time visiting here. I want to ask:
By using the schematic above, will there be a delay (in ms) when switching from NO to NC and vice versa, or the transition can occur instantly?
Swagatam says
There may be a negligible delay in microseconds which may be practically undetectable.
Greg says
Great circuit. What if I wanted to switch 12VDC to control a circuit instead of ground. Most SSR’s switch voltage source to control a device instead of ground.
Swagatam says
Glad you liked the post. For sourcing +12V the N-channel MOSFET side configuration will need to be replaced with P-channel MOSFETs. It’s as simple as that.
Greg says
Thanks, Swagatam!
Swagatam says
My pleasure Greg!!
Robert says
Hi Swagatam, I’m trying to build a more generic relay replacement where the common output could be positive, negative or signal of some kind that can either be opened from normally closed or applied through normally open. I may want to wire them up reversal rest at ground for actuators or use them for hi low series parallel switching. This design seem to hold common at 12V I need all contacts isolated like a mechanical relay where they don’t switch power but take whatever is on the common contact and either connects or disconnects it through normaly open or normaly closed. Is this possible with mosfet or should I be using something else?
Swagatam says
Hi Robert,
Presently I can’t figure out how this can be done. This can be probably created using a couple of mosfets, like in half-bridge driver circuit, but designing the configuration seems a little confusing right now. It will need some deep thinking.
dave says
Hi,
Wondering how we can adapt the SPDT circuit so that we can switch a signal between two outputs? I am not trying to switch power between two loads, but am trying to steer a signal one of two paths. Not sure how to make sure N/C is properly isolated without a conducting path when we apply a signal to the optocoupler and move the switch to N/O.
Swagatam says
Hi, in an SPDT switch the contacts are perfectly isolated and the signals will never short across each other while toggling the switch.
You can connect the signal input to the center pin of the switch and connect the two outputs to the two outer pins of the switch.
Rudy says
Hello Swagatam,
Thank you for showing me how to assemble the transistors on the new PCB you designed. You have been very patient with me and have done so much in helping me that the work that is ahead of me will be so much easier! I have also learned some things from you that I didn’t know until I made contact with you and for all you have done I am forever grateful. I will update you when I start using the new PCB and relay you designed with my water level indicator.
Have a GREAT New Year!
Rudy
Swagatam says
You are most welcome Rudy, Let me know if you have any further doubts or problems with any of the circuits.
I wish you too a Great New Year.
Rudy Paredes says
Hello Swagatam,
I just wanted to give you an update on the new PCB relay design you made for me. I just soldered all the parts on the board and tested it with my water level indicator circuit and it worked perfectly.
I am so grateful to you for the help you provided for me to have designed a solid state relay in place of the mechanical relay I have been using. I had been asking in other forums and no one ever gave me an answer to my problem, UNTIL I landed on your web page!
A couple of my family members have been asking me if it’s possible to have a circuit designed that could send the LED water level indicating to a smart phone or a computer so I told them I would ask you since you have the knowledge and are up to date on issues like this. If it’s possible, that would be so convenient and simple for anyone wanting to know how much water is in their tank, especially the elderly people I am helping in trying to make their lives better.
Now that I have tested your new PCB relay I am going to try to design your relay and my level indicator and combine them together into one PCB. I will update you on my progress.
Thank You AGAIN!
Rudy
Swagatam says
Thank you Rudy, it’s my pleasure!
I am so glad you could make and implement the relay control operations successfully.
However, regarding the cellphone based transmission, it is beyond my reach, since the idea will require complex microcontroller coding and creating a cellphone Application.
All the best to you, let me know if you have any further problems with the circuit.
Rudy Paredes says
Hello Swagatam,
I want to explain more clearly how the siren is to function in my application.
When the water level in the tank is in contact with the probe where I get the +9V the siren is supposed to be off. When the water level drops down below the probe that is when the siren alarm should go off.
The siren is to let me know that we are out of water.
I built the ckt. with the P2N222 transistor and hooked it up to the probe but the siren turns on as soon as the water level makes contact with the probe but I want the siren to turn on when the water is not in contact with the probe.
The main reason I was originally using the relay was to get the result that I wanted in turning on the siren when out of water. I decided to use your MOSFET relay because it was a lot better and more reliable than the mecanical relay that I was using and might use less current to keep it energized and might help the
12 V battery last longer without discharging sooner. Also I was not sure if the relay I was using would last long because the coil was always energized as long as the probe touched the water and since I had never used that relay I wasn’t too comfortable using it.
Hope this helps you to see what I need for my application.
Thank you AGAIN!!
Swagatam says
No problem Rudy,
In that case you can try the following PCB design:
https://www.homemade-circuits.com/wp-content/uploads/2021/12/water-level-siren-pcb.jpg
Here I have removed the opto coupler. Since the input and output DCs are of the same level, an opto isolation is not required.
I have replaced the input transistor with a BC547
For the output transistor you can use an IRF540 or TIP31.
Hope it works.
Rudy Paredes says
Swagatam, I saw the new design with the new PCB with the new transistor but I don’t know how to identify the pins and how to mount them to the new PCB.
Have you made a schematic of this new PCB? It would be helpful in helping me identify where the parts go and also help me to add it to my water level indicator circuit that I am using now.
I continue to being grateful and thankful for all you have done for me. You have helped me resolve some issues that I couldn’t have done without you!
Swagatam says
Hello Rudy, I am always happy to help, so no problems at all.
The transistor pinouts can be easily identified.
Assuming you are using BC547 for T1, and TIP31 for T2, then you just have to insert the emitter pin of the transistors into the pads that are associated with ground line. Once you do this the other two pins will automatically fall into place. Meaning, once you insert the emitters to the ground line pads, the base the collector pins will automatically go into their remaining two pads respectively.
If you are using an IRF540 for T2, then again, you can simply insert the SOURCE pin of the mosfet into the ground pad, and the remaining pins will automatically go into their appropriate pads.
However, I am sorry it will be difficult for me to add this design into your PCB because I have not fully studied your water level controller design.
As you explained in your previous email, that when the water is available across the input probes, the siren must remain switched OFF, and it must sound whenever there’s no water available across the probes….so this circuit will fulfill this perfectly.
I have shown 12V as the input trigger instead of 9V, because 12V is already being used for switching the siren, so the same 12V can be also used as the triggering voltage through the water.
Rudy Paredes says
hope this image is better photos.app.goo.gl/29MrFC192NGbJEo67
Rudy Paredes says
Thanks for showing me how to correct the PCB.
I will update you after I make the changes.
You mentioned that I could use other MOSFET. Do you have the name, number of some others that I could buy?
By the way, I am using a 360 ohm current limiting resistor for the PC817 opto coupler. I have 9 volts before the resistor going pin 1 of the PC817. Is this correct?
THANKS AGAIN!!
Swagatam says
Sure, no problem.
360 ohm will be fine according to me.
The mosfet specs will depend on the load specs. If you can tell me about the voltage and current specifications of the load, then I can try to figure out the alternate mosfet numbers.
Rudy Paredes says
Hello Swagatam,
Thanks again for the new PCB design. I will be wiring up the corrected design just after Christmas.
I bought the PCB Wizard software program so that I could try learning how to do more schematics for the circuits that I am using for my water level indicator and maybe improve on what I am doing now.
I have designed a schematic that I have completed with the new program that includes your design of the MOSFET Relay and my design of the water level indicator and I was wondering if you would do me a favor and check it out if you have some time to see if it will work as designed. I could send it to you if you are interested in doing this for me. If you are, I am not sure if I could just paste it to here or if there is another way to send it to you so you could see it.
I hope I am not asking too much from you, I just don’t know where else to go to do this and I an truly grateful for all the help you have been to me thus far!
Thank you
Swagatam says
You are welcome Rudy,
if your design is not too large and if it is send to me in a schematic format then I can probably can have a look at it and try to solve it for you.
You can upload your schematic to any free online image hosting site and provide me the link here through comment. Please make sure to remove the https from the link so that the comment does not disappear into the spam folder.
Rudy Paredes says
Hello Swagatam,
This is the link for the schematic. Hope this works.
photos.app.goo.gl/hnBQaiLcVpiJkqdz5
Swagatam says
Hi Rudy, it looks OK to me and matching with my PCB layout, however if the load is a single load then two transistors may not be required, it can be simply handled by a single mosfet.
Rudy Paredes says
Thank you again for checking out the schematic!
I am glad that there were no mistake on the schematic I drew up.
I only have the siren that I need to turn on or off in my water level indicator and siren alarm but i didn’t know that I could control this with just 1 MOSFET. Could you please correct my schematic and show me how to use only 1 MOSFET to control the alarm? I would appreciate all the help you have given me thus far and anything more you could do for me.
Is there any way that I could compensate you for all you have done for me?
Swagatam says
Actually you won’t even require a MOSFET and an opto-coupler, you will just require a BJT switching stage as shown in the following PCB design. You can easily accommodate it in your main PCB layout as per your convenience. Compensation is not required, I am happy to help without any compensation.
https://www.homemade-circuits.com/wp-content/uploads/2021/12/single-transistor-control-pcb.jpg
Rudy Paredes says
Hello Swagatam,
I wanted to know if a PCB has ever been designed for the SPDT solid state relay using the 2 IRF540 as you designed it in this article. (Image #2)
I can really use this relay for the water level indicator I make but I need a pcb module for what I am making.
The other question I have is do you know anyone that could design the gerber file so that I could have someone make the PCB of your design for me.
I am using a 12 VDC 10 amp 250 Vac relay module just now (JQC-3FF-S-Z) but would prefer to use your design instead.
I do no have a lot of knowledge in electronics but the 9-12 VDC water level indicator is very simple and I am making it and installing the system for many of my neighbors and friends. We all live in an area where we have the have our water delivered and has to be stored in water storage tanks.
The system I am building is helping many of my neighbors now and a PCB for your relay would help me tremendously in putting the system together and save me a lot of time in the assembling the parts together. I am an 81 year old guy trying to help some of the people in this area and not having to run out of water so often.
I would appreciate any help you might be able to give me.
Thank you for all the good you are doing in helping so many people with their projects.
Rudy
Swagatam says
Thank you Rudy, I appreciate your interest and your efforts to help your neighbors.
However, unfortunately there’s no ready PCB design for the above concept.
Nevertheless, I can try creating a PCB layout design for the second schematic, without gerber files, if this fulfills your requirement.
Rudy Paredes says
Thank you so much for your prompt response. I would really appreciate it if you did that for me. This will help me in the assembly of my parts.
Do you have any suggestions on how and where I can get the gerbil file done and where to get the pin made?
I am truly grateful for your help!!
Have a blessed day
Swagatam says
No problem at all. I will try to do it soon, and let you once it is posted.
Regarding gerber files I have no idea from where this can be done, so I am unable to suggest much on this!
Swagatam says
I have uploaded the PCB designs for the second schematic, you can check it out.
The PCB size will need to be scaled down appropriately by comparing with real component lead dimensions.
Rudy Paredes says
First of all, I want to thank you for helping me with designing the PCB. You have been a great help for me! The PCB looks great!
I am not clear about the opto coupler how it is hooked up to the relay and exactly where it is mounted on the PCB. How do I determine the value of the resister for the coupler.
Lastly, Is the coupler necessary and what is the purpose for it. I mentioned that I am not very knowledgeable on electronics so I am just trying to understand the circuit.
Have a good day!
Swagatam says
Thank you, I am always glad to help!
The opto coupler can be seen at the bottom left of the PCB. I have shown a 4 pin opto coupler such as the PC817.
The opto LED resistor can be typically determined using the following formula:
R = LED supply Voltage – LED forward voltage / Max LED current
The opto coupler ensures that the input trigger DC is well isolated from the output load switching voltage.
If the difference between input and output voltage is not too high then the opto coupler can be avoided, and the input trigger voltage to the mosfet gate can be extracted from the load voltage itself.
Rudy Paredes says
Hi Swagatam, Thank you for designing the PCB for me. I copied the design and made the PCB exactly as the design you made. The PCb came out very good and a mirror solder side of the board looks exactly like your design.
I mounted all the components on the board as shown on the schematic and it doesn’t work.
I made sure all the components were soldered correctly and were hooked up correctly and I noticed that the #2 schematic has the NO hooked up to the drain of Q1 but the PCB design has it wired to the gate. Could this be the reason that the relay doesn’t work? Since I am not that knowledgeable on electronics, I couldn’t figure out what to do. I am sure that all the components are wired in the correct place as per the PCB design.
I have been encouraged about what I am trying to accomplish as the result of all the help you have given me. If there were more people like you the world would be a better place!
Thank You
Thank you again for all your help.
Swagatam says
Thank you Rudy, for trying the PCB.
Yes there seems to be a small mistake in the PCB design, I have corrected it now, and have updated the new design.
But you don’t have to change your existing PCB, you can simply do some minor corrections on it, like cutting one of the tracks with a sharp knife, and joining a couple of points with a jumper wire.
Here’s what exactly you need to do with your existing PCB:
William h burling says
First, You are an extraordinary person. Aside from your engineering knowledge, you are patient and strive to help others. I read all 80 comments and consistently you were supportive. We are exceptionally lucky you are so generous.
My search for help:
I am building an electric door strike control circuit. Fundamentally the circuit consists of a momentary capacitive switch which triggers a timer which energizes the solenoid of the electric door strike. Energizing the door strike enables the door to be opened. I dont need help with that part of the design.
I do need help with the Schurter 3-101-404
Capacitive switch regarding two issues:
The switch provides me with access to three internal leds each connected to an internal 3.3 bus where the 3.3 vdc come from in internal power supply powered by an external supply
Ranging from 5-28 vdc
My understanding of the spec sheet is that i only need to ground the other side of each led to turn it on. Not sure why a current limiting resistor does not exist between the led and ground. Regardless i want to operate these leds with a SPDT circuit. I would like to use
Your design but do not know enough to
Grasp if i can replace your 12vdc supply
With the 3vdc supply internal to the capacitive
Switch. Will the FETs still work at that low 3.3 vdc voltage?
The operation of the leds is such that one led is always on regardless of door strike state.
I intend to turn on the red led when the door strike is NOT energized. When the door strike IS energized i intend that the red light is turned off and the green light is turned on as long as the door strike is energized. When the door strike is no longer energized, the green led is turned off and the red led turned on.Hence the SPDT design.
Because one of the leds is always on
I am hoping the capacitive switch internal 3.3 vdc source seen through a led can be used as the Bus driving the FETs of your design.
Second issue:
My power supply for this project is a Mean well
Irm-30-24st. It is a floating 24 dc supply
The capacitive switch, on the other hand, is intended to be driven by a grounded supply
Whose voltage ranges from 5-28 vdc and can switch a max of 60Vdc and a current of 100 ma. Can i use the floating feature of my supply connecting the -12 vdc to the switch’s ground and +12 vdc to the switch Vin?
How will the switch’s internal power supply generate the 3 vdc to supply the leds?
In my mind, the 3 vdc coukd be generated by
The difference of any set of Voltages within the supply range. Hence if my -12vdc is attached at the switch ground lug, the 3 vdc led bus will actually be -9 vdc relative to the -12vdc. Is this true?
Yes, i could ground one side of my power supply and avoid the question. But that question bothers me. I need to understand
The case of the floating power supply vs grounded supply.
Any insight you can offer me is appreciated.
Thank you for helping us out.
Is there any way i can contribute funds to support your endeavor?
Swagatam says
Thank you for visiting my site, I am glad you found my contributions useful!
I checked the datasheet of the Schurter 3-101-404 but couldn’t understand how its terminals are configured. It is strange that no data is given regarding the connection details of the switch with the external power supply or with an external load.
I have to know the pinout details of the switch, and only then I can provide my suggestions regarding its integration with a delay switch.
The LEDs that you are referring to must have output pins for the connections, but the datasheet images of the unit show no output connections from the capacitive switch.
Dang Dinh Ngoc says
Hi Swagatam,
As I had previously talk to you on the Flip-flop, I came up with a final idea on using analogue SPDT IC (I used SN74LVC1G3157DBVR instead of the other that was a bit rare in Vietnam). However, I still wondering is there a way to make one with pure transistors and mosfet (smaller size) and Google bring me to this article.
I would like to have a question: Can we make a smaller circuit that can mimic the stair-case switches (control inputs are permanent set upon switch on/off) using the approach in this article.
I am thinking of combining 2 of your SPDT to deal with the task rather than using 02 SN74LVC1G3157DBVR
Thank you for your attention.
Ngoc
Swagatam says
Hi Dang, I have not yet investigated the staircase switch working, so presently I am unable to simulate the situation.
You can definitely use a couple of the above circuits for implementing your idea.
You can make it smaller in size by using SMD devices, which are highly efficient in terms of their working capability and compactness.
joseph dusta says
Hi Swagatam,
Thank you so much for this circuit design, you have inspired me to create a lithium battery balancing circuit based around the LTC6804 (https://www.analog.com/media/en/technical-documentation/data-sheets/680412fc.pdf)
My circuit: https://ibb.co/MBvJG9Z
Image of what I’m trying to create (easily possible but expensive with mechanical spdt relays): https://ibb.co/XzKbrbV
I don’t think my circuit works with NFETS as the short across the NO doesn’t allow the NC FETS gate to go low. Do you have any suggestions about how to reconfigure this circuit to work with NFETS or do I need to redesign with PFETS?
Kind Regards
Joe
Swagatam says
Hi Joseph,
Before suggesting I have to understand how the SPDT relay operation will charge the cells individually in the below diagram:
Because as the relays switch from N/O to N/C, the supply will go on increasing across the remaining cells, which can be dangerous
Please provide a brief explanation.
joseph dusta says
Yes the current will increase as cells are taken out of series. However I have designed each lane (parallel cells) of the battery to be able to take the maximum constant current the charger can give. As I am monitoring the SOC of each cell I can ensure that the charger will not exit CC mode. The important thing to note is the solid state relay must be identical in character to a mechanical spdt relay as it is a Break-Before-Make switch. This is to avoid a short circuit across the individual cells being diverted around. The overall design is to intelligently switch between intermittent loads, each device has a wide band of input voltages because of DC-DC regulators (fridge, charging a phone etc.) and intermittent charging supply (solar panels). The design will be able to bottom balance the pack by diverting around the strong cells when charging and when a weak lane is at the end of its life divert around it entirely. I will be current monitoring the loads, the supply and each battery lanes state of charge to dynamically allocate resources. I will also have dump loads like heating or freezing water when the batteries are charged. I’m am trying to get around piecemeal BMS systems by having every device (load, supply, storage) integrated into the system and configurable. I have implemented this system easily with mechanical spdt relays. I have implemented the energy sensing and allocation on the load, supply, storage side. What remains is to replace the mechanical spdt relays with N channel MOSFETS.
Swagatam says
Actually I was referring to the rise in the voltage not the current, but yes if the current is controlled and there’s an auto cut off based on current sensing then the increased voltage may not matter much.
I don’t think the N-MOSFET SPDT might work for this application, instead something like the following could be tried:
Joseph Dusta says
Hi Swagatam,
I don’t understand your suggestion to use PNP bjts, I would like to use MOSFETs if possible for simplicity in handling the high charging currents going through the battery pack and the ability to drive the gates with the ltc6804 outputs. I found this circuit which is for switching supplies in a break before make topology https://www.edn.com/mosfet-pair-makes-simple-spdt-switch/, what do you think?
Swagatam says
Hi Joseph, I can’t figure how the EDN circuit can be configured between the series batteries.
The concept suggested by me using PNP BJTs looks simple and effective, which can be even replaced with P FETs.
You just have to control the pairs appropriately using CMOS gates for implementing required SPDT toggling
Darediamond says
Please Swagatam Majumdar please view this Circuit here
Now how can the SPDT circuit you post above be used to discharged the Capacitors?
Please view the main page where the circuit is and the accompanying explanations about it for you to understand it.
Remember the Circuit is an High Voltage of minimum of 120VDC after the bridge rectification.
So which MOSFET will be suitable at voltage input up to 240AS or VDC?
Thank you for your in-depth reply in view.
Swagatam says
You can probably do it as given below:
Dare Diamond says
Thank you for the quick response.
I could not see the transistors you recommended on for sale on aliexpress .
Could you please reveal other complementary transistors I can use?
Swagatam says
You can try MJE340, MJE350. The negative of the pulse source at the transistor base must be connected in common with the circuits negative or ground line.
Dare Diamond says
Sir, again thank you for the prompt reply.
But please, I do not understand what you mean by “The negative of the pulse source at the transistor base must be connected in common with the circuits negative or ground line”
Could you please draw the Circuit diagram of how to properly do that using the newly recommended MJEs? Please I beg you do that for me.
Thank you for your kindness.
Swagatam says
Dare, the voltage pulse that you would use for triggering the transistor pair will need a low external DC source. The negative of this DC source must be connected with the negative line of the main circuit. Please refer to the datasheet of the transistor and identify the pinout details, and then you can connect them as indicated in the diagram.
Swagatam says
…I think the diagram needs a correction, because the transistor needs to be triggered alternately and not together…I’ll try to update it soon…
Swagatam says
Please ignore my previous comment..the diagram is actually correct, the NPN, PNP would conduct alternately.
Dare Diamond says
Swagatam you said “Please ignore my previous comment..the diagram is actually correct, the NPN, PNP would conduct alternately.”
Do you mean I should connect the Base of the 2 transistor as you ealier drawn it?
If yes, do I still need the additional process of connect the driving transistor to ground?
What driving transistor will be best suitable?
NOTE: I am not a trained Electronic Engineer. So please do not be annoyed at me for my “cheap” questions.
Swagatam says
Dare, do you want to switch the transistors through an oscillator stage? In that case you will have to connect the bases of the transistors to an oscillator stage such as IC 555 oscillator
This IC 555 circuit will need a separate 12 V DC for operating. The negative of this DC will need to be connected with the negative or the ground line of your free energy circuit.
I hope you have understood the configuration now!
Dare says
The Negative of the Circuit is 2. One at the F.W.B.R and the other at the end of the terminal of the second capacitor to the left which connects to ground via the amp meter.
Which one am I suppose to connect to put of the 2?
Please explain.
Swagatam says
The ammeter ground is the place where the external PWM negative should e connected.
Paul Ely says
Hi Swagatam. Not sure if you got my recent question so I’ll repeat.
I’m trying to use MOSFET’s to eliminate mechanical relays.
In this example the MOSFET gets extremely hot even though the load is only 3amps
http://www.dropbox.com/home/Public?preview=Problem+1.xlsx
In this second example, when the TV is switched on it’s ok with mains power but when on battery power, the 12v dips to 9v and the converter output goes haywire. Initially by mistake I had the S & D of the MOSFET reversed and it switched between AC and battery fine – it just wouldn’t switch off!
http://www.dropbox.com/home/Public?preview=Problem+2.xlsx
I would be very grateful for any help or suggestions
Thanks
Paul
Swagatam says
Hi Paul,
I have changed the design layout at the input side, you can find it in the second and the third diagrams. Please modify your circuit accordingly. If still it doesn’t work then probably your MOSFETs might have gone bad.
The dropbox site is asking me to register so I couldn’t view the diagrams.
Paul Ely says
Tks so much – I’ll try that. This link should work ok
http://www.dropbox.com/sh/us8dugcmb8971f3/AACSYvVBiWG8fmwgd6d-Jgpza?dl=0
Paul
Swagatam says
Sorry, it’s difficult to understand because it’s not drawn in the conventional manner with proper MOSFET symbols and markings.
Mr Paul Ely says
I do apologize! Trying to draw up something in excel doesn’t always work so well.
I’ve modified Problem 2 as follows
http://www.dropbox.com/s/8o24e6pd1guydog/problem%202.xlsx?dl=0
I hope this is more readable.
This is the one I really want sorted out if possible
If I short D & S together then the switchover from mains to battery and back again works perfectly. I just can’t then switch it off!
Many thanks for your patience
Paul
Swagatam says
What is the role of the MOSFET in the design, since it’s always ON?
Yes, you must remove the MOSFET and connect the D/S link directly, so that the diodes solely can handle the changeover.
Paul Ely says
The MOSFET is there in place of a mechanical relay to switch the system on and off.
I think I had resistor R1 wrongly connected to +12v instead of GND (now corrected). It still goes haywire.
Paul
Swagatam says
But there’s already a switch in the form of S1 to turn the system ON OFF If I am not mistaken. May be I am missing something in the design.
And what is value of the MOSFET, is it as per the input supply specs?
Mr Paul Ely says
Sorry I should have explained. The switch S1 is a remote microswitch which cannot take high current hence the need for a local switching device.
The MOSFET is IRF740 (n-channel).
Swagatam says
The IRF740 is a 400V device which may not be compatible with a 12V supply, I would recommend trying an IRF540 instead and see the results.
Nacho says
Hello,
Please how to add anti backfeed protection like your “Ideal Diode” circuit?
Thanks,
Nacho
Trex says
hey again Swagatam
I did a quick drawing on tour fist picture on this page to help you understand better of what problem i am facing:-
link to the file: https://ibb.co/NFHJb6r
you can see I am working on reconfiguration of PV panels so that when I turn on one mosfet the above PV panel connects to any one of the below two panels as required.
the thing is…
Vgs should be greater than threshold right but in my case the PV panels are going to hinder the Vs which is not ground for me
so is there a way an IC that I can use to control the gate without having the source potential problem
thank you
Swagatam says
Thanks Trex, Got it!
I think you can probably try the following full bridge concept:
https://www.homemade-circuits.com/wp-content/uploads/2018/12/IR2110-3.png
The upper panel could be connected at the center between the OUT/OUT terminals.
The other two panels could be connected in series with the drains of the upper MOSFETs.
The HIN/LIN inputs then could be flipped with opposite voltages for toggling the center panel with one of the upper panels.
Hope it makes sense!
Swagatam says
You can probably also try this:
https://www.homemade-circuits.com/wp-content/uploads/2019/08/PV-reconfiguration.png
Trex says
hey Swagatam
I am doing a project related to PV array dynamic reconfiguration based of partial shading concept.I wanted to use this (SPDT) and connect one PV panel with another when I want to. Currently this only gives me liberty to connect one PV panel with 2 others(SPDT)
Can you suggest a way for increasing the double throw method with less mosfets or a general way to help me with this project would be good too.
Swagatam says
Hey Trex, for isolated double throw two more MOSFETs would be required, without adding MOSFETs a DPDT feature may not be possible.
Nacho says
Hi Swagatam,
Thanks for so amazing solution thet helps me a lot with current solar/wind powered projects.
Would you please provide a similar solution for (DC) SP3T, SP4T.. SP*T Mosfets switch?
Best,
Swagatam says
Hi Nacho, I am glad my articles are helping you. For getting SP3T, SP4T etc, you just have to add that many MOSFeTs in parallel with the existing pair.
For example, for a SP3T, we would want 3 more N/C N/O points, which could be achieved by adding 3 more MOSFET pairs in parallel. I hope you got it!
Trex says
any schematic that you made for a SP3T?
Swagatam says
I have updated a DPDT version as an example, the idea can be further upgraded in an identical for getting SP3T also….
Swagatam says
I checked it, it looks too lengthy, so it can take many hours to get it sorted. A block diagram instead would be more suitable and easy to understand, or a written description step wise would also do.
Swagatam says
Could you upload it on any free image hosting site and give me the link? then I can check it out.
Or you may simply explain it verbally so that configure the schematic myself
Paul Ely says
Thanks so much for help. I now need to do some testing to see how this works out.
My next problem is eliminate 2 relays.
1. When 12v switches on I need to direct 12v load (up to 10amp) to the rest of the devices.
2. When 12v switches on I need to switch on the AC mains (250v) at 2amp
Because this system includes a pa amplifier I need to be careful about interference
So looking at various transistors and triacs has left me floundering.
Please help!
Paul
Swagatam says
Just to be sure, is this 12V from the battery and solar panel? For all these arrangements we might need a slightly more complex circuitry.
The interference from the diodes can be avoided by adding 1000uF capacitor across the common cathodes and ground.
If you can provide the complete scenario point-wise I may try to figure it out through a schematic.
Paul Ely says
Really? That’s fantastic. Is there a danger of the two sources oscillating between the two if the voltages are close (say 0.3v difference) because I don’t think the TV will work at 18.5v
Paul
Swagatam says
Yes it may oscillate if both the sources are at close levels. You can add a 19V volt regulator between the TV and diodes, this will ensure that the TV always gets 19V regardless of the source
Paul Ely says
Wow! This sounds too easy. The 12v solar battery also runs a sound console and some led lights so the buck converter is on all the time. If this converter and the mains power supply (smps) are both on and connected in parallel (with protective diodes) which one will the TV draw current from?
Thanks Paul
Swagatam says
It will depend which source has a slightly more voltage. If the SMPS has 1V higher than the buck output then the TV will draw from the SMPS and vice versa. So basically the diodes work like silent switches and allows only the source which has higher voltage for the load.
Paul Ely says
Hi Swagatam
I scratching my head to see if your spdt circuit will work for me.
I have a TV which requires 19.5v DC.
If AC power is on then it gets 19.5v from a mains power supply.
When AC fails then it needs to switch over to a solar battery backup with a 12v to 19.5v step-up converter.
When AC returns then it needs to switch back after a short delay to allow the power supply to come up to speed.
Help appreciated, thanks
Paul
Swagatam says
Hi Paul,
No need of using this complex circuit. You can feed the positives from the solar controller and the AC adapter through separate diodes and connect the common cathode ends with the TV positive terminal. The negatives can be all joined into common. However for getting a delayed response from your adapter you may have to add an additional delay timer at the cathode side of the adapter diode. Hope this helps!
Peter B says
Hi Swagatam,
I would like to do something similar, but maybe you can help me how to do it.
I have many 4.2V ION cells in series and would like to either couple the cell in or bypass the cell.
I would like to control each cell by a MCU (Arduino Mega) and select if the cell needs to be i serial with the other cells, or needs to be bypassed.
Thanks for your work, really appreciate it.
Swagatam says
Thank you Peter,
However Arduino is not within the range of my expertise so it can be difficult for me to program it for you, if it’s without Arduino then may be I can help!
Peter B says
I was only the analog MOSFET circuit i would like you help with. Actually it’s a OPTO isolated MOSFET SPDT switch, good for 20A, i would like help with.
Swagatam says
you could probably try the following idea:
https://www.homemade-circuits.com/wp-content/uploads/2018/08/series-Li-ion.png
only one transistor can be ON at a time.
Vinicius Senna says
Very nice tutorial.
I would like know how many current this circuit can flow with it mosfet of schematic?
Swagatam says
Thank you, however I am not sure regarding the specs of the shown mosfets, please refer to the datasheet for the answer, or you can replace the same with any other known n-channel mofet.
Vinicius Senna says
Thank you for your quick answer. I’m admiring your work.
I have a doubt maybe you could tell me about MOSFET. how transistor BJT have a drop voltage fixe or nearly 0,7V, i would like know if mosfet, have a drop voltage fixe how transistor BJT of 0,7V? Or only drop voltage MOSFET is calculed on your RdsOn?
I am createing a system of backup energy with battery for my circuit, when supply power main is cut, my battery begin work, I am use battery lipo 3.7V and doing a step-up for 5V just when power main is cut. when main power is cut, i have MOSFET P that begin work, flowing current for my circuit main again. I cant to lost nothing voltage when this mosfet switch. In my simulator everything work normaly, but still do not a real circuit for test, maybe your experience can anwser my doubt about mosfet have some lost voltage how transistor
thanks
Swagatam says
Vinicius,
0.6V is the BJTs base triggering voltage, for mosfets it is over 6V,… ideally 10V.
you can try the concept which is shown in the following article, and check the response
https://www.homemade-circuits.com/2014/12/12v-dc-solid-state-relay-ssr-100-amps.html
Johny Radio says
Can i simply duplicate the whole circuit for a DPDT? THX!
Swagatam says
yes that can be done.
Johny Radio says
Great circuit! But, why is the optocoupler needed? Why can’t control the switches directly from the trigger input? thx!
Swagatam says
yes opto coupler can be avoided and the input directly connected with the trigger point, an opto may be used only if the trigger source needs to be isolated from the relay
Aslesh Shetty says
Very nicely written. Thanks for your precious work. One question though. In absence of an external trigger, what is the input at gate for the lower MOSFET? SHould it be connected to ground or to a supply voltage?
Thanks!
Swagatam says
I am glad you liked it, the mosfet gate of the lower mosfet is connected to ground via a 10K resistor.
Usa Juana says
Hello sir thank you for this circuit now I can implement the over load protection circuit,relay have being my problem. Please may I ask.Q1 to achieve high amps I just need to use high amp mosfet.eg to handle 200amps I use like irfp2907 right? Q2 will the mosfets need heat sink as I plan to use it for up to 150amps inverter.Q3 how do I modify it to handle higher volts , say 24-48 volts. Q4 if I use 4 mosfet to make it DPDT will it work. Can the optocoupler handle it? Q5 what will be the recommended mosfet gate volts .Lastly Q6 what will be the trigger volts. Also is it ac or dc? I look forward to your reply is very important to me . Am Shedrach proudly your Student.
Swagatam says
Hello Sherach, here are the answers:
1) yes you just need to upgrade the mosfet current (or voltage) specs for achieving higher wattage at the output
2) heatsink will be strictly required, may be with fan cooling also.
3)For higher voltage make sure the mosfets are rated above that limit…for 48V it should 60V and so on.
4) 4 mosfets can be used for getting DPDT operations.
5) 10V minimum and 15V max
6) the trigger voltage can eb anywhere from 2V to 15V but make sure to add a roughly calculated limiting resistor in series accordingly for safeguarding the opto LED.
Cypherbuster says
Hey!
Amazing work! Wanted to know how do i modify the circuit to switch 230v AC?
Swagatam says
thanks cypher, that's a good suggestion I'll try to post it soon in this website.
Cypherbuster says
Thanks a lot! Looking forward to it. 🙂
Swagatam says
it's done, here's the link:
https://www.homemade-circuits.com/2016/07/triac-spdt-relay-circuit.html
Aaron says
I am currently using an automotive SPDT relay to simply switch a 0 ohm ground signal that my cruise control unit is looking for. This is the trigger that shuts the cruise control off when you tap the brake pedal.
I am currently using a relay and it works fine but that the relay is loud and click every time I tap the brake pedal drives me crazy. I see in your above diagram and write-up you use the word "load" for both the N/C and N/O terminals so that tells me this design would work for situations where the relay is being used to switch circuits drawing current. My question is whether or not the same circuit can be used for a near-zero load (ground signal wire switching) or if I'd need to stick with something like the mechanical relay to accomplish this?
Swagatam says
You can effectively use the above solid state relay as long as the "load" current rating does not exceed the current specs of the mosfets, as long as this is maintained the circuit would serve the purpose well….however the above SSR will require a positive signal for activation, a ground signal will not work with the above design.
Vasilis Karastergios says
Tested and working! Thanks a lot Swagatam..
Swagatam says
My pleasure Vasilis! keep up the good work
Fabrizio Ricciarelli says
Hi Swagatam, nice to see that there are people like you in this world. And, more, thanks for your precious work.
It should be interesting to publish an DPDT SSR…it shouldn't be so different from an SPDT: in the end a DPDT is a twin-SPDT!
In addition, it could be interesting to evaluate the possibility to add the optional "stepper" characteristic (at first pulse, the switch takes place and remains unchanged until a next pulse will be issued, see "stepping relay" on Wikipedia).
What I'm talking about is a full conversion of a mechanical "Form C" contact (break-before-make) DPDT into a perfect Solid-State equivalent, with 6 (3+3 independent each other) switching contacts (of which power & voltage can be easily adjusted by changing the components's values) plus the 2 low-voltage terminals to which apply the voltage needed to operate the switch.
There are already, on the market, devices like the one proposed but these are very expensive and often unavailable for tailor-made needs so it will be very useful for many people to learn how to build one by ourselves.
Many thanks in advance.
Fabrizio, Rome – Italy (fabrizioricciarelli@gmail.com)
Swagatam says
Thank you so much Fabrizio,
The first two specifications that you have mentioned looks feasible to me and could be designed.
However I am not so sure about the "form C" counterpart specs, I'll try to investigate it though, and see whether or not I am able to transform it into the solid state version.
I'll try to include the idea in my blog, possibly soon.
rahul chhallare says
I want to use relay to on & off motor as per level of water tank.current 10-12 amp.
10amp 120vac or 10 230 vac which relay use?
bc547 or sl100 ehich transistr use
rahul chhallare says
Hi swagatam
i want to use relay for on & off motor as per water level in tank .
current approx.10-12 amp.
so 10amp 230 vac,10 amp120 vac,which relay use ?
transistor bc547 or sl 100 which is suitable?
plaese reply me.
Swagatam says
Hi Rahul, BC547 will do, make sure the coil current is not rated above 60mA
hassan Hassan says
very nice