Homemade Solid State Relay for 12 Volt Automotive Application - Page 1
Forum section: electronics / projects

author: David Hess
author_rank: Super Contributor
timestamp: July 07, 2023, 11:44:43 pm
content: I have been making various improvements to my old 2002 GMC Sonoma pickup. It came with two 12 volt accessory sockets however like the cigarette lighter socket they are always powered, which means manually connecting/disconnecting my GPS, Bluetooth to FM converter, phone, and battery bank.So to improve the situation I am going to make the accessory sockets switchable. Originally I was going to tie them to the accessory/power from the key through a relay, but I think I will just add a manual switch. The problem then becomes how to switch potentially 10+ amps. I decided that a solid state relay would be best, however MOSFET output solid state relays with suitable ratings are incredibly expensive, so I am making my own using theTLP591 photovoltaic optocouplerand a pair ofIRFP7530PBF power MOSFETswired in anti-series.Using the optocoupler removes some potential failure modes involving ground currents and provides the boost voltage needed to use n-channel MOSFETs for high side switching. Using two MOSFETs in anti-series allows reverse blocking when off which also removes some failure modes. The large MOSFET is selected based on keeping power dissipation low at high currents.I also considered using a Linear Technology high side driver which would have allowed for fault protection, but decided that the photovoltaic optocoupler would be better.Any thoughts?

author: langwadt
author_rank: Super Contributor
timestamp: July 08, 2023, 12:02:15 am
content: what's wrong with a relay? it is easy and reliable

author: thm_w
author_rank: Super Contributor
timestamp: July 08, 2023, 12:14:31 am
content: Is an appropriately rated high current switch too large or too expensive?https://www.digikey.com/en/products/detail/cw-industries/GRB234A2NABA1/3190606edit: if you could find a trusted source there are the fotek SSRs, no idea if the genuine ones are reasonably priced thoughhttps://www.fotek.com.tw/en-gb/product-category/144https://www.aliexpress.us/item/3256802316870663.htmlhttps://www.aliexpress.us/item/3256805242722323.html(fake?)

author: coromonadalix
author_rank: Super Contributor
timestamp: July 08, 2023, 12:18:53 am
content: sound complicated for nothing, you have ssr with 5 to 30 vdc in for the isolated input control, and the main contacts between 20 30 40 60 amps of your model choice

author: langwadt
author_rank: Super Contributor
timestamp: July 08, 2023, 12:48:42 am
content: Quote from: coromonadalix on July 08, 2023, 12:18:53 amthat work with DC?

author: David Hess
author_rank: Super Contributor
timestamp: July 08, 2023, 01:17:03 am
content: Quote from: langwadt on July 08, 2023, 12:02:15 amCurrent draw would be higher and relays suffer from contact welding, and there would not be any price advantage. A mechanical switch would be cheaper but still suffers from contact welding and an SSR can be soft starting.I also wanted something like an illuminated safety switch and they do not come with high current ratings, so relay would have been needed anyway. I am actually spending more for the switch than for the parts for the solid state relay.Quote from: thm_w on July 08, 2023, 12:14:31 amI searched for a suitable SSR module however almost none of them give a voltage drop or on resistance specification, and many DC modules were bipolar transistors with zero crossing control. It was difficult or even impossible to determine which were actual MOSFET outputs. The ones which might work well were incredibly expensive.

author: DarkMode
author_rank: Contributor
timestamp: July 08, 2023, 01:58:42 am
content: Hi David, what kind of Amps are you wanting to draw from the power socket?Typically a car electrical socket is rated for about 10 Amps and at 12V that's about 120 Watts of power.Mosfets could fit your bill, and yes, they are expensive, but just as expensive as suitable switch.I was looking at Dave's project, Soft Switch. I was also planning on powering a few safety lights.

author: floobydust
author_rank: Super Contributor
timestamp: July 08, 2023, 02:20:40 am
content: Cranking is the biggest problem for these switches.Relays can chatter and cut out, and a mosfet expecting 10V drive gets much less which can kill it if it's supplying load.Or the day you plug in an air compressor and expect 15A. Toyota has a hilarious 2A cig lighter ability screw that 20ga wire.You need a charge-pump for sufficient gate-drive, or the PV optocoupler.There are many caravan "battery isolator" circuits same application but higher current, or "ideal diode" similar circuit on Ali but hard to find on/off control and surely fake specs.Silicon Chip Magazine "Battery Isolator" July 2019 uses twoIRFS7434-7PN-ch 40V 240A 0.70mohm D2PAK 7 pin. LM339 for LVCO and charge pump for gate drive. I'd post sch but not sure if that causes trouble.Smaller IRFS7434PbF D2PAK or TO-262 195A 1.8mohm at 6V drive, 50A.But for both Ciss~11nF is high and I think would switch slow with the PV drive at say 15-40uA. I would simulate it and see how long it takes to switch them or go with smaller mosfets.Opto-couplers are not popular in the automotive industry due to cost and few (PV) have AEC-Q101.VishayVOM1271SOP-4 orTLP3906and TLX9905/6 has AEC-Q101, they have internal discharge circuit.I use an ATTiny 85 for control so it basically follows IGN after a 5-sec on and off delay (I used to drive a stick and sometimes stall it, don't want the NAV rebooting) 0.12mA quiescent.Or press a button: single run for 3 hrs. Ign key not required. Press again: off. For charging a phone or people in the car needing power/radio when I go into a store.Long-term average voltage used for a LVCO to avoid a dead battery. I have to do a redesign, it's all point to point wiring for years now.

author: jonpaul
author_rank: Super Contributor
timestamp: July 08, 2023, 06:30:26 am
content: use a properly rated contactor not a SSR or relay.See epayUp to 100s of AJon

author: David Hess
author_rank: Super Contributor
timestamp: July 08, 2023, 08:06:01 am
content: Quote from: DarkMode on July 08, 2023, 01:58:42 amThe existing circuit is protected by a 10 amp fuse and powers 1 cigarette lighter and 2 accessory sockets. I know I blew the fuse once long ago, but do not remember what the load was. The largest load I have is my power station which can draw about 10 amps. My charger which can connect through the circuit provides 10 amps.QuoteI think I am getting a lot more capability for the price by making a solid state relay from parts. I do not understand why the suitable SSRs that I found are so incredibly expensive.Quote from: floobydust on July 08, 2023, 02:20:40 amThat convinces me that I am on the right track. A photovoltaic optocoupler or gate driver will be largely immune to low voltage conditions during starting.QuoteI am not adverse to simulating it, however it only takes a couple minutes to calculate with pen and paper.QuoteThat explains why they do not use them, but I can use whatever I like, and it is not like I am placing it into the engine compartment.Quote from: jonpaul on July 08, 2023, 06:30:26 amI just occurred to me that there are suitable relays; the fuse block in the engine compartment is full of them for controlling various loads, and automotive relays are relative inexpensive.

author: jfiresto
author_rank: Frequent Contributor
timestamp: July 08, 2023, 08:37:08 am
content: Have you looked at the Hella 931774031 automotive SSR? It has an active low ("negative pulse", ground to activate) input. Unfortunately, it has roughly doubled in price since I first used one.

author: langwadt
author_rank: Super Contributor
timestamp: July 08, 2023, 11:53:25 am
content: Quote from: David Hess on July 08, 2023, 01:17:03 amIf that was a big issue the car wouldn't work, there is a lot of relays used in carQuote from: David Hess on July 08, 2023, 01:17:03 amthen use something like this,https://www.digikey.com/en/products/detail/infineon-technologies/BTS6143DAUMA1/1281799

author: DavidAlfa
author_rank: Super Contributor
timestamp: July 08, 2023, 12:18:01 pm
content: It's just 12-14V DC, you don't need anything fancy, a simple P-FET will work great.Most cars turn auxiliary systems off while cranking, even the radio.Voltage going down during cranking is les than a issue, you had to be idiot to be sucking 20amps while also cranking lol.You could take the crank signal so it disables automatically, this is what I would do.

author: David Hess
author_rank: Super Contributor
timestamp: July 08, 2023, 01:57:12 pm
content: Quote from: jfiresto on July 08, 2023, 08:37:08 amThat probably would have worked, although specifications are lacking.Quote from: langwadt on July 08, 2023, 11:53:25 amCar relays can rely on operating with a known load.QuoteI looked for integrated protected switches but none had a high enough current. I also considered using a load protected switch driver from Linear Technology which includes a charge pump, however it would have been more expensive and more complicated than the photovoltaic optocoupler. Ultimately I decided that derating the power transistor and relying on the fuse would work better with sensitive loads.Quote from: DavidAlfa on July 08, 2023, 12:18:01 pmI started with that design but p-channel parts are so much more expensive, and I had already decided to use a photovoltaic optocoupler or a charge pump switch driver so there was no reason not to use an n-channel part.QuoteI will have to check that. I do not know if mine does. I was originally thinking of taking the accessory signal from the wiring harness where it goes to the radio since it is close by. I will have to see if I can find detailed documentation for the signals going into the radio.QuoteI agree, but mistakes happen.The accessory outputs are continuously powered now and it has not been a problem with any of my loads or the charger.QuoteDo you mean the signal to the starter relay? The wiring diagrams for my pickup are not as thorough as I would like.

author: jfiresto
author_rank: Frequent Contributor
timestamp: July 08, 2023, 03:04:06 pm
content: Quote from: David Hess on July 08, 2023, 01:57:12 pmI could probably dig up a data sheet somewhere if that would dispense with the subjunctive.IIRC, it has something like a 10~15mA input current, to wet a mechanical switch, and is protected against surges, to drive incandescent bulbs. It seems to have no problem PWM switching a pair of 12V 55W halogen bulbs having a perhaps 70A inrush current. I do not know its load dump rating, but I would assume it is protected against the usual catalog of automotive electrical horrors.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 08, 2023, 03:22:43 pm
content: Photovoltaic gate drivers are slow with large Qg, so SOA can become a problem as the MOSFET is spending too much time in linear region.Robust, short-circuit protected semiconductor switching in presence of small impedances like batteries is surprisingly difficult, which is why integrated solutions exist. They also have the benefit of being able to directly monitor die temperature, not accessible in discrete design.

author: DavidAlfa
author_rank: Super Contributor
timestamp: July 08, 2023, 03:44:01 pm
content: P-ch so much expensive? Search properly and you'll find it's not always true.Going to china makers, you can get AOD403 (-30V, 70A) for peanuts.If your car makes 30V you'll have way more serious problems than a burned mosfet.Or you can get a IRF4905S (-55V, 74A) from a local distributor for ~60 cents.

author: David Hess
author_rank: Super Contributor
timestamp: July 08, 2023, 06:21:28 pm
content: Quote from: DavidAlfa on July 08, 2023, 03:44:01 pmAutomotive designs should be capable of handling negative voltages, and up to 60 volt spikes.QuoteI selected the IRFP7530PBF based mostly on performance per price. The closest p-channel equivalent is slightly more than twice the price, so not unreasonable, but with the charge pump gate driver included in a protection IC or a photovoltaic gate driver, there is no reason to use a more expensive p-channel part.Quote from: Siwastaja on July 08, 2023, 03:22:43 pmI agree. I will have to keep an eye on that but I think the current and power derating of the power MOSFET that I selected will be able to handle it. I had always intended to use 2 photovoltaic optocouplers in parallel to double the drive current; I ordered 4 optocouplers and 4 MOSFETs to make 2 SSRs.

author: DavidAlfa
author_rank: Super Contributor
timestamp: July 08, 2023, 06:59:37 pm
content: Quote from: David Hess on July 08, 2023, 06:21:28 pmTry connecting the battery backwards and tell me how many $$$ it was!Ever wondered what would happen to your gps, bluetooth and all that if you fed reverse power or 60V to them?It's just a power socket and DIY application.

author: David Hess
author_rank: Super Contributor
timestamp: July 09, 2023, 12:36:45 am
content: Quote from: DavidAlfa on July 08, 2023, 06:59:37 pm-15 to +60 volts is just a common standard to handle load dumps, reverse battery, and various other calamities. Everything except my power bank and charger connect via 12 volt to USB converters which hopefully would handle anything abnormal without destroying their loads. The charger and battery bank handle up to at least 24 volts and I know the charger handles reverse voltage.I brought this pickup out of storage last year after it had sat in the garage since 2014. Back in 2014 I had to cut the battery cables to get the battery out because the side posts had corroded. Last year I spliced new cables in and installed a top post battery. GMC of course makes all of their battery cables black, so I had to decipher which were positive. Luckily I got it correct.

author: floobydust
author_rank: Super Contributor
timestamp: July 09, 2023, 08:46:46 am
content: Adding SC schematic. I don't think the TVS are useful, the body diode avalanches well enough, and TVS can short and burn up esp. 15V ones.IRFP7530PBF mosfet Ciss13.7nF, two are 27.4nF which is a lot for the PV opto. If I get time I will try a LTSpice sim and see how slow that is, as far as SOA limits.First rev I used a single P-chBMS3003but backfeed can happen which I don't like.

author: David Hess
author_rank: Super Contributor
timestamp: July 11, 2023, 03:38:50 pm
content: Here are photographs of the construction. Continuous current is limited by power dissipation to about 50 amps which is plenty; this could be considerably improved with heat sinking, but I chose such large MOSFETs just to avoid heat sinking.The 1N270s form a bridge rectifier so the drive polarity to the optocouplers does not matter. I only used 1N270s because they were immediately available; I would have preferred 1N4448s.I will measure the switching time later today.Update:Turn-off: 10 millisecondsTurn-off Delay: 34 millisecondsTurn-on: 1.0 millisecondsTurn-on Delay: 1.3 milliseconds

author: Scrts
author_rank: Frequent Contributor
timestamp: July 11, 2023, 07:48:04 pm
content: You should look into high-side switches. Something like this one:https://www.ti.com/product/TPS27SA08Automotive companies use these for multiple applications. We're using them for camera power control on driver assistance systems for the last 15 years...

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 11, 2023, 08:35:12 pm
content: There are Ic's that combine some LED's with an integrated solar cell, and these are specifically designed to make a solid state relay in combination with a MOSfet. I'm not sure of the exact name, but now you know they exist, you should be able to find them easily yourself.

author: David Hess
author_rank: Super Contributor
timestamp: July 11, 2023, 08:40:37 pm
content: Quote from: Scrts on July 11, 2023, 07:48:04 pmI think I need to be able to switch more than 10 amps so all of the integrated high side switches that I checked were marginal at best.I also looked at using a fault protected high side switch driver with a big external MOSFET. This definitely would have worked but was more complex and there was some question about the fault protection causing more problems than it solves.I decided to rely on the existing fuse for fault protection as it has done so for years without problems, but I did need to make sure that the solid state relay will not limit the current preventing the fuse from blowing.Quote from: Doctorandus_P on July 11, 2023, 08:35:12 pmThey are commonly known as photovoltaic optocouplers and that is what I ended up using. I used a pair wired in series on the input and in parallel on the output to double the output current, but based on the switching times that was not necessary.

author: langwadt
author_rank: Super Contributor
timestamp: July 11, 2023, 09:01:37 pm
content: Quote from: David Hess on July 11, 2023, 08:40:37 pmsomething like these are marginal for 10A?https://www.digikey.dk/da/products/detail/infineon-technologies/BTS500201TADATMA2/9693061https://www.digikey.dk/da/products/detail/stmicroelectronics/VN7007ALHTR/6208062

author: james_s
author_rank: Super Contributor
timestamp: July 11, 2023, 09:13:30 pm
content: Personally I prefer mechanical relays in applications like this, good quality high current automotive relays are robust, readily available and inexpensive, they have been widely used for large loads like radiator cooling fans for decades with good success. Solid state relays are good for applications requiring frequent cycling but they are much more easily damaged and they have higher losses.

author: Scrts
author_rank: Frequent Contributor
timestamp: July 11, 2023, 10:10:13 pm
content: Quote from: langwadt on July 11, 2023, 09:01:37 pmPlenty of options...https://www.st.com/resource/en/datasheet/vn9006aj.pdfshows 82A current limitation.I know they use similar high-side drivers in vehicle headlamps as well. Old ones, with regular bulb were pulling more than 10A for sure.

author: Benta
author_rank: Super Contributor
timestamp: July 11, 2023, 10:45:57 pm
content: I don't understand all the effort being put into this.The Infineon PROFETs (automotive smart high-side switches) will support nominal currents up to 65 A and short-circuit currents up to 250 A.Is that too little current for you?

author: David Hess
author_rank: Super Contributor
timestamp: July 11, 2023, 11:06:59 pm
content: I did not find any of those higher current integrated high side switched when I looked, and it would take much more effort to deal with a surface mount design. Using an automotive relay did not occur to me until after I ordered parts.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 11, 2023, 11:24:43 pm
content: Quote from: David Hess on July 11, 2023, 08:40:37 pmThe challenge there, is hoping that the fuse also protects your MOSFETSThe worst case may be trying to turn on into a dead short/damaged cable.Some discussions on Safe operating areas on MOSFETs for hotswap operations.https://assets.nexperia.com/documents/data-sheet/PSMNR56-25YLE.pdfI'm not sure opto isolation is vital here, as you simply want to switch the load, so maybe look at drivers designed for ideal-diode/reverse protection ?One example :https://www.diodes.com/assets/Datasheets/AP74700Q.pdf±65V REVERSE VOLTAGE PROTECTION AUTOMOTIVE-COMPLIANT IDEAL DIODE CONTROLLERThat has a N-MOS gate driver charge pump, and an enable pin, and is low cost / simple package.Further up the price curve are parts likehttps://www.ti.com/lit/ds/symlink/lm74900-q1.pdfAutomotive Ideal Diode controller With Circuit Breaker, Undervoltage, and Overvoltage Protection With Fault Output

author: David Hess
author_rank: Super Contributor
timestamp: July 11, 2023, 11:43:38 pm
content: Quote from: PCB.Wiz on July 11, 2023, 11:24:43 pmI have confidence that the 200+ amp MOSFETs will survive and the fuse will blow. It will be easy enough to test.QuoteGalvanic isolation of the control signal removes the possibility of a ground loop. Using a photovoltaic optocoupler is an easy way to generate the proper gate drive for an n-channel MOSFET used as a high side switch.QuoteA high side switch controller was the alternative that I considered. There were availability problems and the design would be more complex. Linear Technology has one intended for automotive applications.

author: floobydust
author_rank: Super Contributor
timestamp: July 12, 2023, 01:08:42 am
content: I'm fine with your solution and think it's good - no backfeed, isolated drive and large mosfets. I was not sure in general how it would do switching into a load as it takes you near the DC SOA at 5-30msec. Latest gen trenchfets are very impressive but the usual hyped misleading specs galore.Toshiba PV SPICE models are in OrCAD format and I could not get rolling with them in LTSpice. Other PV optocouplers like Vishay VOM1271 with built-in turnoff network the model looks simple- IR led and current-source, discharge network is switched as 100k or 10MEG. Big mosfets are all >10nF Ciss

author: Siwastaja
author_rank: Super Contributor
timestamp: July 12, 2023, 05:03:54 am
content: Quote from: james_s on July 11, 2023, 09:13:30 pmNeither is true if properly designed. In a previous project, switching 25V 50A battery pack into a mobile robot application, I ended up going with ground-up custom-designed solid state solution because all relays rated for the task were simply too expensive, too large, and had significant losses, too. (Don't forget the coil power which is many W for large relays; contact resistance may surprise you as well; meanwhile, 1mOhm MOSFETs are cheap, easily available, and tiny in comparison to a 10mOhm power relay.)The reason I went for custom design instead of ICs was all those ICs had significant quiescent current from the supply even when disconnected. The design included back-to-back MOSFETs with Vds-based desaturation detection and overcurrent sensing using a comparator, charge pump gate driver, and overvoltage transient clamping.Failure mode for mechanical and semiconductor is the same: fail as short. Of course, if you are used to pick mechanical relays out of a catalog, designing a semiconductor solution, even using an integrated chip (even more so with custom design), poses a significant risk of doing it wrong. But I'm sure David Hess knows what he's doing and is able to engineer a good solution.

author: james_s
author_rank: Super Contributor
timestamp: July 12, 2023, 05:47:22 am
content: Quote from: Siwastaja on July 12, 2023, 05:03:54 amSure it's possible to do, but it seems like a lot of work when there are readily available off the shelf automotive grade relays that are tried & true and cost very little. Even modern cars usually still have several relays for controlling power to various things. Switching 10A at 12V is easy, the common 5 pin cube relays that have been around forever will do that easily and will usually last the life of the car.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 12, 2023, 06:03:22 am
content: Yeah sure, just buying a mechanical relay is sure easier, maybe by two orders of magnitude. I was not commenting about that.I think you got the loss idea mentally mixed from triac-based AC SSR modules, which are quite lossy because the large voltage drop of TRIACs. MOSFETs do not have this limitation and indeed, if you buy MOSFETs to the same price, same volume or same weight of a relay, the resulting power loss would be at least an order of magnitude less. It's engineering the whole system to be reliable which is difficult and requires quite some work. (I worked for weeks with that power switch I described above, and then many days testing it against different kinds of overloads and short circuits.)

author: David Hess
author_rank: Super Contributor
timestamp: July 12, 2023, 03:32:57 pm
content: Quote from: floobydust on July 12, 2023, 01:08:42 amIt should not be switching 1000s of microfarads, but who knows what designers are sticking in various loads like inverters and power banks. Maybe I can make a surge current measurement after I get it all together.QuoteAfter making measurements, I thought about adding an external resistor for faster turn-off, but it is not that important and it would lower the open circuit voltage. It is also possible to make a microamp active fast turn-off network but there is no real need.Quote from: Siwastaja on July 12, 2023, 05:03:54 amMy solution has an operating current when on of 26.3 milliamps, of which almost all of that is to drive the photovoltaic optocouplers. The illuminated switch draws about 2.5 milliamps.QuoteI noticed the same thing with the high side protection ICs; the ones intended for automotive applications all drew considerable quiescent current, so I would have had to use the mechanical switch to shut off the high side driver as well. There are microamp versions but they are not protected against automotive surge voltages so extra protection circuitry would be needed.QuoteIn my case the existing fuse is still in the circuit providing safety, and a fail to short would just result in the outlets being left on. I connected the illuminated switch to the output so the indicator always reflects the true status, rather than just the status of the switch. If there is a failure either way I will know.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 12, 2023, 04:20:37 pm
content: Quote from: David Hess on July 12, 2023, 03:32:57 pmYeah, to protect the battery from self-destroying by overdischarge; sounds familiar. I spent a lot of time trying to find existing ICs, and was surprised to find none. All the ICs are for switching loads from a bus which already has another, mechanical master switch.

author: David Hess
author_rank: Super Contributor
timestamp: July 14, 2023, 10:14:02 pm
content: The SSR is installed and operates like it should. It is mounted inside the center console. The two 12 volt accessory sockets are now switched, and there is a switched and unswitched Powerpole leads for connecting to my power bank and charger. I need to add a strain relief to the leads.The loads do have a noticeable amount of capacitance. When I turn the SSR off, the switch remains illuminated for many seconds, which makes me think that the accessory loads have low voltage shutoffs preventing them from draining their input capacitance.