Switching mains AC power with small switch - Page 1
Forum section: electronics / beginners

author: VEGETA
author_rank: Super Contributor
timestamp: June 28, 2024, 09:11:12 pm
content: Hello,I have a design of power supply which takes 100-220v AC. It has a button which must be in a specific location (it is a replacement of Sony Playstation 1 internal PSU) and I am not comfortable using it in-line in the power circuit. On the other hand, I still require the circuit to be fully off until the switch is pressed.therefore, I thought of this circuit:AC mains -> the small switch -> bridge rectifier -> resistor divider (using regular resistors) -> small linear regulator -> solid-state relay ---> which outputs the mains to go into the desired circuit.this way, I have the device fully off until you press the button. Then the divider will get the voltage to about 10-40v or so which feeds into the linear regulator. this one delivers something like 3.3v or less to activate the solid state relay.here the are the parts I settled on:solid-state relay: Panasonic AQH2223 ---> requires 1.21v input voltage, I assumed that I cannot deliver 3.3v therefore a small limiting resistor of 100 ohms can work right? or use a 1.25v linear regulator?linear regulator: AP7384 or TPS7B6933bridge rectifier: ABS10A-13notice that this activation circuit will be very small current, basically < 10 mA or so. thus, I assumed any cheap switch can do the job since 220v AC with such low requirements can be ok.what do you think of this?any other suggestion?

author: calzap
author_rank: Frequent Contributor
timestamp: June 28, 2024, 10:05:55 pm
content: Is the small switch listed (UL, ETL,TUV or etc.) and rated for 220 VAC? An input fuse should be used.Mike

author: VEGETA
author_rank: Super Contributor
timestamp: June 28, 2024, 10:11:09 pm
content: Quote from: calzap on June 28, 2024, 10:05:55 pmi still didn't choose the switch but it will be rated for high voltage... still cheap from LCSC or my supplier in Alibaba.so you suggest something like 20 mA fuse for this activation circuit?assume the switch is ok, is the circuit mentioned good?what about the panasonic solid-state relay input? you suggest my choice of 3.3v + resistor in series or just use 1.25v regulator?regards

author: calzap
author_rank: Frequent Contributor
timestamp: June 29, 2024, 01:12:51 am
content: If the circuit draws 20 mA, you’ll want a higher rated fuse. Probably something like 100 mA. Might wait until everything is laid out and measure actual current draw before deciding on a fuse. Be careful testing low current fuses with a multimeter. The meter may produce enough current to blow them unless you use a series resistor.I won’t comment on other components without seeing a schematic and might not then.Mike

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 10:33:44 am
content: You can use something like thathttps://www.boospa.net/en/tbs106a-pneumatic-switch.htmlfor your main power switch.

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 12:05:15 pm
content: Quote from: calzap on June 29, 2024, 01:12:51 amplease check suggested schematic.I could add the fuse later, probably best suited after the rectifier.the main ac input feeds the bridge rectifier, then with resistor voltage divider it delivers 9-22v dc to LDO. LDO easily delivers 3.3v and with limiting resistor it ensures small current to the SSR which has 1.2v drop at the internal LED. Then it delivers the AC_L power line to the target circuit while AC_R line is connected to it directly.this is what I have suggested.these panasonic relays are interchangeable so that if one is not available at lcsc i can get another one from digikey or so. the smallest one of 300 mA is enough since PS1 is rated at 10W (or 17W in some extreme cases). this makes 100v AC at 17W requires 170 mA, most cases will be a lot less than this.I wished for slightly cheaper solution but can't figure it out now.Quoteplease check the image attached.the image is the power supply i want to create a substitute for. it has to have the showed button in that exact place and exact form in order to fit and work properly.I could not find such buttons to be rated for higher voltage till now, except in LCSC which I don't know if I can trust it xD... but this one for example can work in the activation circuit since it won't need much current:https://www.lcsc.com/product-detail/Push-Switches_XKB-Connection-XKB8080-Z_C318860.htmlthe original thought was to get one which can directly switch the ac power, that one requires say 200mA in the same formfactor as seen in picture below. i could not find one.and my requirement is to have the entire circuit totally powered off when the button is not pressed... so i can't for example have the bridge rectifier + LDO before the switch in order to use low voltage switch. this way they will be active all the time.

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 12:13:34 pm
content: Take a look at my suggestion. It completely mechanical and did not required any power to operate. It rated to 220V 16A. It is pneumatic operated switch. It's button can be install in any place, switch itself unstalled separately. They connected by pvc tube. You just have to find pneumo button of desired shape.

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 01:00:07 pm
content: Quote from: xvr on June 29, 2024, 12:13:34 pmthe one you linked is very robust for sure, but its price is more than my entire BOM xD. I couldn't find something like it on digikey.I found stuff like this:https://www.digikey.com/en/products/detail/e-switch/PB1973ABLKBLKEF0/1426844but this one is also expensive and its height may not be compatible.right now i am asking my alibaba button\switch manufacturer if they have a catalogue of compatible parts. I am getting some stuff from alibaba anyway, so adding another part is not a problem.I am still interested in opinions about my circuit above... since it does the job using regular cheap lcsc parts with no danger. i just prefer a simple button though.

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 01:15:03 pm
content: QuoteThese kind of switches used in bath and kitchen equipment. You can try to search something in spare part for them (jacuzzi, food waste disposer, etc)QuoteIt could be made simpler with capacitor dropper. Basic circuit in attachement.It will replace all your circuit from button and till R10 & U5

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 01:17:05 pm
content: Quote from: xvr on June 29, 2024, 01:15:03 pmwill this circuit you suggested be totally off (no current drawn at all) when button is not pressed?

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 01:19:15 pm
content: QuoteShure. It will be power via button, plugged in series in mains power. There is no current path when button is not pressed.

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 01:37:51 pm
content: Quote from: xvr on June 29, 2024, 01:19:15 pmso the button is placed before R1 in your schematic?what would the final dc voltage be? since I need it very small for the panasonic SSR. at least in a range acceptable for the LDO. since I still need a SSR to activate the power.

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 01:41:08 pm
content: Yes, button placed between AC mains and R1. Output voltage will be any you like - it defined by zenner voltage. And it will be regulated - you don't need LDO.

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 01:43:47 pm
content: R1 limit inrush current - it can be a small one. Main voltage drop performed by C1. It shoud be rated for AC voltage. C2 perform output voltage smoothing.

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 01:53:14 pm
content: Quote from: xvr on June 29, 2024, 01:43:47 pmso how much capacitor value?quick search i found this:https://www.lcsc.com/product-detail/Multilayer-Ceramic-Capacitors-MLCC-SMD-SMT_PSA-Prosperity-Dielectrics-FM43X104K631EFG_C394157.htmlbut it is just 100nF.ceramics won't be of huge values at mains voltage, so am i required to get elec. caps or polymers? these are polarized tho

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 02:12:35 pm
content: Let's set 10mA current in capacitor net. For 220V AC amplitude will be 220*✓2 = 308 Let take 10% of possible voltage drop. It will be around 280V. So we need impendance of 280V/10mA = 28KCapacitance impendance is 1/2*pi*f*c ~ 1/314*cHere C is 0.1uF (just your capacitor)Capacitor should be film capacitor (not polarised) MKP or MKT or analog

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 02:28:45 pm
content: Quote from: xvr on June 29, 2024, 02:12:35 pmso can i for example put 3x in parallel to have 0.3uF total and still use ceramic? i guess x and y caps can't work here... or if they do, then they are readily available.as for film caps, here are my findings:https://www.lcsc.com/product-detail/Film-Capacitors_JOEY-MEF104K2G3AS3040A1_C18295884.html--> can put 2 or 3 in parallel since it is very cheaphttps://www.lcsc.com/product-detail/Film-Capacitors_Vishay-Intertech-BFC237357104_C3778615.html--> from Vishay but a lot more expensive.those are 400v, going down to 250v can be cheaper.

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 29, 2024, 02:36:26 pm
content: So much complexity... just use a small relay?

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 02:44:11 pm
content: Yes, you can use ceramic (but check datasheet for conditions - ceramic of such voltage could be very special). You can also use X and Y capacitors, but they could be bulky.> as for film caps, here are my findings:Yes, they will fit> So much complexity... just use a small relay?Relay with 220AC coil will be not small 😕

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 02:58:03 pm
content: Quote from: DavidAlfa on June 29, 2024, 02:36:26 pmthis is good idea but i am trying to stay away from any mechanical part... will consider this if all solutions failed.still, i would need regulation and step down for voltage in order to be in the 5v range of such small relays... those with full ac coil rating are a lot more expensive, 5$ or so in lcsc. the SSR i have is kinda ok in terms of price.Quotewhat type of ceramics are used here?x and y caps can be bulky but i do have some space... the space i have is about 20mm width and 30mm length.here are some options for x and y caps:https://www.lcsc.com/product-detail/Suppression-Capacitors_KEMET-R463I310050M1K_C3298492.html--> 100nf and cheap if only one is needed, even if using 2 in parallel is also cheap.https://www.lcsc.com/product-detail/Suppression-Capacitors_TDK-B32921C3473M189_C125424.html--> 3 in parallel for 141 nF, still cheaper than 2x of the above one. 3 of it can fit in the space mentioned. this one is 305v though.those are Kemet and TDK brands, if I go with Chinese brands it will be a lot cheaper. if it is gonna be reliable then 3 ofQuote from:https://www.lcsc.com/product-detail/Suppression-Capacitors_KNSCHA-MPX473K31C2KN15600_C489073.htmlcan cost a fraction of all above.do you recommend going wit 3x in parallel or just one?can chinese parts (especially in parallel) be reliable here?

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 29, 2024, 03:03:21 pm
content: Or leave the primary rectifier connected (Won't consume any power) and use a fet to switch the output on/off.BTW always use a PTC to limit capacitor inrush current, otherwise charging currents will get huge and stress any device switching it (Fets, relays, switches) causing early failure.I know this circuit looks "ugly" because it's left floating, but its mains anyways, everything there is dangerous and should be completely isolated from the secondary.Omitted the obvious fuse!

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 03:09:18 pm
content: Any ceramic capacitors here should be checked first with they datasheet. There is no any generic recommendations here. Ceramic of such voltage are always unique.As for X capacitors - 1 pcs preferably than multiple in parallel, at least from reliability point of view. TDK and Vishy also preferable. As for Chinese - take a look in their datasheet. If they do not have one it will be a clear signal do not use them. Check for datasheet completeness first, for characteristics second.

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 03:36:51 pm
content: Quote from: DavidAlfa on June 29, 2024, 03:03:21 pmso you used a 15v zener with those 1M + 100K resistors to put 15v at N-Mosfet gate... then it will be activated by the switch. when On, the circuit gets complete and secondary side is fully on.then i can use that high voltage dc and step it down + regulate it to be able to supply the necessary voltage to SSR right?Quotei found tons of them in LCSC which are X7R or X7T. I guess since they are in ac voltage series circuit, they won't suffer from DC bias.here are some good ones I found:https://www.lcsc.com/product-detail/Multilayer-Ceramic-Capacitors-MLCC-SMD-SMT_TDK-CGA5L4X7T2W104MT0Y0N_C2991839.htmlhttps://www.lcsc.com/product-detail/Multilayer-Ceramic-Capacitors-MLCC-SMD-SMT_PSA-Prosperity-Dielectrics-FM31X104K451EEG_C784091.htmlmaybe i forgot to inform you that the power supply will be in 100-240v 50-60hz range. you calculated 113 nF to be ok for 220v AC 50hz, it gave 28k so the same thing for 100v ac would be 14k impedance. that is without considering the slightly higher amp consumption if needed.therefore, wouldn't it be a better choice to use 3x parallel of those ceramic caps listed above? they will give 300nF and will be robust since they are regular ceramics, not x or y rated.what do you think?BTW, voltage rating should be taken as rms or peak? like there are 275v rated x caps... in our case of putting them in series, what should we consider the voltage be?

author: xvr
author_rank: Frequent Contributor
timestamp: June 29, 2024, 03:54:52 pm
content: QuoteI think DavidAlfa means to power device from this voltage directly, without any SSRQuoteTDK part looks good. Prosperity Dielectrics also looks not bad.QuoteIt is ok with a quite marging. 10mA of output should be enough for both zener and SSR. 5mA also could be enough. Just check how much current SSR required. And what minimum regulation current of zener.

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 04:22:08 pm
content: Quotethe output of his circuit is high voltage dc though. I still need something to connect the mains ac to my target.Quotenice, then I could use 10x in parallel to have 1000nF total (or other smaller solution like 5x220nF or just 1uF cap alone), should be good enough for all cases since 1uf impedance is 3.2k and 2.65k for 100v ac and 220v ac respectively which ensures more than enough current is there since for 100v it will be around 31mA/37mA and for 240v will be 75mA/90 mA for 50/60 hz respectively. won't cost much too. good that cheap reliable ceramics can work.here is official datasheet for SSR:https://api.pim.na.industrial.panasonic.com/file_stream/main/fileversion/2787If I understand correctly, it needs 20 mA forward current for the LED at 1.21-1.3v but under that it is mentioned that trigger LED current is 10 mA and yet under that the recommended LED current is 15-20 mA, so we assume 20 mA... therefore I could use 5 or 3.3v rated zener (or LDO) then put a series resistor to limit the current.this Zener seems ok:https://www.lcsc.com/product-detail/Zener-Diodes_Diodes-Incorporated-BZT52C3V3-7-F_C151564.htmlit is 3.3v, with a series 100 ohm (or 120 ohm) resistor, combined with 1.21v (to 1.3v max) SSR internal LED drop it can deliver 20 mA or near that... certainly within the range of 15-25 mA recommended. chosen resistor must be 250mW to ensure no issues.

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 06:54:47 pm
content: hmmm, this way the rectifier diode will have some drop before going to the SSR circuit. so can i let the diode be before the zener? so that the zener delivers final regulated voltage.if not, then i will just assume it is gonna be 3.3v - 0.6v = 2.7v and use another resistor value. this time for 2.7v input voltage and roughly 19-20 mA it will be 75 ohms instead of 100-120 ohms.also using the 75 ohms as inrush protection resistor in your circuit, if it is not gonna mess it up. this one seems fine:https://www.lcsc.com/product-detail/Chip-Resistor-Surface-Mount_PANASONIC-ERJP06F75R0V_C441974.htmlwhat is your opinion on this?

author: mariush
author_rank: Super Contributor
timestamp: June 29, 2024, 08:23:38 pm
content: Look at rocker switches :https://www.digikey.com/en/products/filter/rocker-switches/195Use heatshrink to insulate any exposed metal bits.As for fuses, no you wouldn't use fuses with such low current rating, shocking you even have to ask stuff like this. Power supplies have inrush current, they'll pull some current when they're plugged in. Wouldn't use anything less than 100-200mA fuse.Example :https://www.digikey.com/en/products/detail/adam-tech/SW-R3-1A-A-1-0/15284400- 13mm by 9 mm cutout.There's high voltage regulators like microchip lr8 :https://www.digikey.com/en/products/detail/adam-tech/SW-R3-1A-A-1-0/15284400ac in -> diode for half wave rectification -> capacitor (4.7-10uF 400v+ should be plenty) -> regulator -> output 24v or 48v -> mechanical relayBut the voltage would still not be isolated so whatever button you use would still have to be isolated, so just waste of components, just as unsafe as straight using ac rocker switch.Anyway... I'm reluctant to give you advice because of your approach at making these things ... I'm not even sure you can be bothered to get a few of them in your hands to test them, you just order the pcb and have it assembled by JLC or whatever and dropship directly to customer without being physically involved.not cool.

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 08:37:46 pm
content: Quote from: mariush on June 29, 2024, 08:23:38 pmrocker switches can't work. the PS1 has plastic switch on top shelf which pushes the button switch. this one is the one i need to choose and make a circuit for. rocker switches can't work here as you see.i will use resistors to limit inrush currents for sure, i said it above i believe.Quoteyou thought wrong.in my current product which is a psu for dreamcast, I got units and tested it a lot, then sent it to a friend who is more experienced with power supplies to further test and take readings...etc. after verification that everything works as intended.... I start batch manufacture at pcbway and ship to customers.i would love to hand test ALL units myself, even hundreds of them but getting them delivered to me will ruin everything as the customs and imports will be too much. However, I do not ship a design until I test it to death and verify it works exactly as i need... which is what happened with my first and second products (www.thundertronics.net).in this one, i am trying to find nice solution then I will make one to test as mentioned.....etc THEN I will make and sell.where did you find that I ship products without testing first? if I said it, I need to watch my words to be reflective of what i do

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 08:43:51 pm
content: Quotei was about to write this myself! this was kinda my last resort since it is expensive and must be purchased from digikey not lcsc.i prefer not using mechanical relays in case i can use something else....looks like LR8 can deliver really small voltage but also just 10 mA of current, with 30 mA max limit. looks like 10mA is the rated one, dunno if it is gonna be enough for the relay.edit: datasheet of ssr mentions led trigger current of 10 ma, while above mentions Ir=20 ma for led dropout of 1.21v. so I assume the 10mA are enough to trigger the output as with other similar parts such as SharpPR39MF51NSLH

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 29, 2024, 09:57:26 pm
content: Quote from: xvr on June 29, 2024, 03:54:52 pmExactly, powering the entire psu.Of course you need a smps for the isolation and secondary voltages.May I ask why are you making this, when you can get cheap modules off AliExpress/eBay?

author: VEGETA
author_rank: Super Contributor
timestamp: June 29, 2024, 10:29:41 pm
content: Quote from: DavidAlfa on June 29, 2024, 09:57:26 pmnow I don't understand what you meant.take a look at my product here:https://thundertronics.net/product/dreamcast-universal-power-supply/it is for sega dreamcast, i finished designing one for sega saturn... this one i am asking for is for sony playstation 1. PS1 has power switch which activates the 2 DC rails 8v and 3.5v, thus when you plug it, it is live and consumes power even if device is off.i want to make it better by completely turning it off when the power button switch is not pressed.in ALL of my PSU designs I use professional power modules from Recom and now from Meanwell. no cheap modules or so. the rest of the circuit is my own doing.these professional aftermarket PSUs for old consoles are highly required, I made just 40 units and sold in less than 2 days and have over 80 subscribers to website alone + 2 distributors all demanding new stock.the idea behind the current circuit we discuss is to deliver AC voltage to the AC-DC power module... instead of the AC-DC module being connected (and active) all the time, that is all._______________On another thought process, I remember I could use MOC opto-coupler with a good TRIAC for this, which is a replica of the solid-state relay if the later is harder to get.this still needs some form of AC voltage step down and regulation. SSR are kinda affordable and can be replaced if one is not stocked... for example:https://www.lcsc.com/product-detail/Solid-State-Relay-Thyristor-Output_Everlight-Elec-ELR0223_C367224.htmlhttps://www.lcsc.com/product-detail/Solid-State-Relay-Thyristor-Output_Lite-On-LTV-0223_C2918480.htmlhttps://www.lcsc.com/product-detail/Solid-State-Relay-Thyristor-Output_PANASONIC-AQH0223_C719685.htmlall these are pin-to-pin compatible.... Lite-on is very cheap, so is Everlight. Panasonic is obviously more expensive. All should work with 10mA current. I never used lite-on or everlight brands so i don't know if they are reliable.

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 30, 2024, 01:22:03 am
content: It's exactly that, it cuts power to the primary side of the DC/DC module.Edit: Ah, it's a not DC/DC, butAC/DC module,!Well, not very different, you can make an AC switch with two mosfets.The gates are charged only in the positive cycle, so a small 100nF cap is needed to retain some power.When the switch opens, power remains only for 100-200ms.Don't even think on using 08050, 0603 or 0402 for R3, must be rated for 400V+, better to use 5x 220K resistors in series, use large size (1206) or through hole!Otherwiseit might arc over the resistor, thus unsafe. The rest is low voltage so no problem.The IRF840 is overkill here, anything capable 2-3A continuous is more than enough for these small PSUs - Do some research!

author: VEGETA
author_rank: Super Contributor
timestamp: June 30, 2024, 05:36:57 am
content: Quote from: DavidAlfa on June 30, 2024, 01:22:03 amlast circuit you posted kinda felt like it was for cutting off the entire circuit but you put positive and negative terminals and one mosfet... this confused me since i mentioned lots of times that my target is ac not dc. good thing now it is clear for both.i mentioned before that i did an ac switch circuit before (was for ATS) and it used MOC + Triac not dual mosfets. seeing a mosfet immediately gives me the signal it is a dc circuit for some reason.so instead of the 2 mosfets can't i just use a simple triac? like for not depending on the capacitor charge but rather continuously connected current. I attached a simple circuit drawn roughly in mspaint since i am away from my pc.my old ATS circuit had to use MOC opto-coupler since it was controller by MCU. this time I don't need that since I do have a physical button. so since the button is a switch then triac will keep working until switch is switched off, i remember this is called natural commutation. i.e, no need for special off circuit since ac voltage itself reaches 0 and goes negative each cycle... thus if you want triac to be on you have to keep supplying ac voltage to it and if you want it off then you release the ac voltage off its gate. this is exactly my case.I found lots of good triacs available, cheap and more than powerful enough.Here is avery simple simulationto prove the idea. It shows a complete off status as needed. but i have to say that ssr seems more robust and guaranteed.

author: VEGETA
author_rank: Super Contributor
timestamp: June 30, 2024, 06:53:51 am
content: If the triac route is not best suited... then we revert back to using dc control.so if LR8 won't deliver enough current, I found AL17050 (and similar ICs) to be able to do the job. It has to be paired with a SSR as mentioned.AL17050 uses very cheap inductors but requires high voltage elec. caps, of such LR8 also requires at its input.price-wise don't know if LR8 is gonna be cheaper than AL17050 solution with its extra components. al17050 will provide more than enough current for sure. LNK305 is another solid choicefrom digikey LR8N8-G is about 0.63$ at 100 quantity while in lcsc it is 0.3$ but in lcsc it seems not in-stock. pair it with 0.2$ bridge rectifier from LCSC and it will be around 0.8-1$.AL17050 from lcsc is about 0.3$ without external components. inductors are about say 0.3$, diodes and resistors can be 0.3$ = nearly 1$.for 5v using lr8 and about 270 ohms series resistor to the ssr, it will allow 14 ma of current.going with capacitor dropper could be a bit cheaper but these above solutions seem more robust.

author: DavidAlfa
author_rank: Super Contributor
timestamp: June 30, 2024, 06:41:45 pm
content: Quote from: VEGETA on June 30, 2024, 05:36:57 amTriacs are robust devices, they handle rough current spikes and voltages. Just go with it.I think SSR here is "killing flies with gunshots"

author: xvr
author_rank: Frequent Contributor
timestamp: June 30, 2024, 06:51:09 pm
content: Quote from: VEGETA on June 29, 2024, 06:54:47 pmNo. Zenner works on both polarities of AC input. At positive it provide 3.3V (or whatever it will provide), at negative it keep current path to recharge capacitor C1. If you move diode before zener negative part of AC will be blocked and C1 just will be charged to peak AC value. And it will not be function as dropper, just as level shift. All curcuit will blow out.QuoteYes, it will. But you can use shotky diode and/or get 5V zenner.QuoteBetter do not reduce voltage drop on resistor. Zenner is not ideal, so its output voltag can slightly be changed over time/temperature/etc. If you reduce voltage gap after zenner you will enlarge range of possible currents through SSR LED.QuoteSeems good. But may be a little higher resistanse and may be little biger chip size (1206 at least). It should be capable to consume big peak energy serge (unfortunately datasheet doesn't say its energy absorption capability)And check for current through zener - it could be too much (max zenner power dissipation should be considered). At your current values it almost at limit.

author: xvr
author_rank: Frequent Contributor
timestamp: June 30, 2024, 06:58:16 pm
content: Quote from: DavidAlfa on June 30, 2024, 06:41:45 pmSSR that OP use is a basicly triac + control net. So both versions are roughly the same.Separate triac could be much more powerfull, but OP says that power budget of SSR will be enough.On the other hand one of main advantage of SSR - galvanic isolation, is not used here. So separate triac can be used instead SSR - it's almost equivalent replacement for this cuircuit.

author: VEGETA
author_rank: Super Contributor
timestamp: June 30, 2024, 07:43:21 pm
content: Quote from: DavidAlfa on June 30, 2024, 06:41:45 pmyou meanthis circuitis totally fine?I really liked it since it requires no extra components at all. I just want to verify if it is safe to use with no potential failures as well as won't generate heat.Quoteif i use this circuit then i will pair it with capable regulator such as that LNK or AL17050 which can deliver several tens or hundreds of milliamps.Quoteso it isthis circuitright?I mean by using 100 ohms or so resistor from AC line to triac base, and the circuit is cut by the switch. the switch is pressed down = it works forever. once button is off = immediately shuts off. I am understanding correctly?as you mentioned galvanic isolation is not really used since no MCU and no isolated dc supply, thus triac alone should be enough. correct?Here is a suggested triac:https://www.lcsc.com/product-detail/TRIACs_STMicroelectronics-T405Q-600B-TR_C144390.html

author: xvr
author_rank: Frequent Contributor
timestamp: June 30, 2024, 08:31:42 pm
content: QuoteYesQuoteCorrect. The original circuit had no galvanic isolation, despite the use of SSR.

author: VEGETA
author_rank: Super Contributor
timestamp: July 01, 2024, 06:55:09 am
content: well, i will do the triac circuit tonight.however, i am thinking of the gate resistor value which suits all voltages from 100 to 240v ac.triac gate current ranges from 5-10ma to 10-25ma depending on which to choose from.a lot of triac circuits i see use 100-180 ohms resistor.assume i used 330 ohm resistor:triac gate voltage = 1.3v (add 0.2v for Igd = 1.5v)series resistor = 330 ohmsgate current = 10 mAline voltage necessary to turn it on = 1.5v + 10mA*330ohms = 1.5v + 3.3v = ~ 4.8vwhich is too low, i don't know if this is gonna cause a problem... i feel it should not.but for argument sake let's make it 1k ohm:v_line = 11.5vI think choosing a very big size resistor with some wattage is a safe guard to heating and problems. they are cheap anyway.but which resistor value do you recommend i choose for all line voltages from 100v to 240v?

author: Phil1977
author_rank: Frequent Contributor
timestamp: July 01, 2024, 09:05:15 am
content: What is the advantage of using the triac compared to direct switching of the mains load? A mains switch does not get much smaller if it carries 10mA instead of 2A. The only way to make the switch smaller would be to have galvanic isolation in the relais box, so that you can use a non-insulated low voltage switch, but the triac can't do that.The idea with the FETs could be an alternative. It´s also not galvanically isolated, but the current through the megaohm-resistors could be that low that it is safe to touch.

author: VEGETA
author_rank: Super Contributor
timestamp: July 01, 2024, 11:07:22 am
content: Quote from: Phil1977 on July 01, 2024, 09:05:15 ami need a middleman circuit since the switch I have is not suitable or rated for high voltage power line. I know i can easily get a rocker switch or so but as i mentioned earlier, I am forced to use a certain switch shape and formfactor.in short, it is a PSU for sony PS1. top shell of ps1 has plastic part which presses the button therefore the button must be push type not rocker, and of a certain height at least. when i searched i found these mostly suitable for just lower currents at high voltages. don't want to risk run it on higher voltage and cause problem.my small triac circuit above still use the power line but in a very small current which even may not be totally ok due to high voltage

author: Phil1977
author_rank: Frequent Contributor
timestamp: July 01, 2024, 11:59:05 am
content: Can you show the type of switch you want to use? I´m just curious what switch is specified for high voltage and that little current.

author: VEGETA
author_rank: Super Contributor
timestamp: July 01, 2024, 12:15:17 pm
content: Quote from: Phil1977 on July 01, 2024, 11:59:05 amPlease check image in attachment, I want to build a replacement PSU for this. the button must be in that exact place (can take care of routing easily) and of the same height.PS1 is rated at maximum of 17 watts, for worst case is gonna be 100v AC @ 17 watts = 170 mA.all buttons i am finding are rated for smaller voltages, i was at least hoping for one which is rated for high voltages but withstand small current which will work with triac circuit.Thus, after finding this i started searching again from scratch and found these:https://www.lcsc.com/product-detail/Push-Switches_Legion-MPS21-BBDAM-S1-R_C309203.htmlhttps://www.lcsc.com/product-detail/Push-Switches_Legion-MPS01-BBCAA03-A-R_C5186997.htmlhttps://www.lcsc.com/product-detail/Push-Switches_HONGJU-PB-04B-R_C268253.htmlhttps://www.lcsc.com/product-detail/Push-Switches_Legion-MPS21-WWBCB-R_C309205.htmlhttps://www.lcsc.com/product-detail/Push-Switches_HONGJU-PB-05B-R_C268254.htmlthey can be used to switch it directly, since i could not find 250v AC rated switches with the formfactor I showed in attached picture but these can definitely work easily.it is just that they are suited and made for "panel mount" but I believe I can just solder them as a through hole component easily.gonna find if the height is suitable or not since it is important that it fits and can be pushed by the top shell plastic button. The one in first link is promising... if so then the remaining problem is the big contacts. these should be cut but they would need pcb house to have big plier to do so.what do you think?can you find a better button which is more suitable?

author: VEGETA
author_rank: Super Contributor
timestamp: July 01, 2024, 05:53:34 pm
content: I measured original button to have height above board of about 25.5mm without being pressed. plastic top shell button can travel 3mm down.https://www.lcsc.com/product-detail/Push-Switches_Legion-MPS21-BBDAM-S1-R_C309203.htmlthis one is 24.1mm, so I don't really know if it will press well. there is almost 1.5mm difference.however i found these 2 in mouser:https://eu.mouser.com/ProductDetail/E-Switch/PA512C?qs=QtyuwXswaQjHWi%2FoiLfOww%3D%3Dhttps://eu.mouser.com/ProductDetail/E-Switch/PA511C?qs=QtyuwXswaQgztMXaZA20Zw%3D%3Dbasically the same but one is 2 poles and the other is 1. their height above board is about 26.5mm. so this one is about 1mm taller, i guess these can actually get pressed well but they are a lot more expensive.