Mosfet, cap, diode selection question - Page 1
Forum section: electronics / beginners

author: SimonF
author_rank: Contributor
timestamp: January 06, 2024, 01:34:33 pm
content: Am planning to have an Arduino 5V digital out signal switch a 240VAC load (~100W) at 1-80Hz (variable).I'm a newbie, but from what I can gather from looking around a mosfet would be best for that. I found this module I think will do the trick:https://www.aliexpress.com/item/1005004527630582.html?spm=a2g0n.order_detail.order_detail_item.3.68d9f19cajHAphAlong the way, while looking into whether a relay or mosfet would be best, I saw mention of adding a capacitor and diode to the mix for the sake of voltage spikes. After an hour looking it seems like something of a rabbit hole figuring out which cap to use. Sites are saying you need to consider things I've never heard of before. At this stage I think I need a ceramic one, and a schottky diode(?), but at what values I don't know. Is the purpose of the cap just to temporarily store excess voltage during a spike then slowly bleed it back out? In which case I could just get a high capacity one and all is good?Any advice welcome. Cheers.Ps. I should mention I'm learning this in what little spare time I have and haven't progressed far. Last time I asked for advice on one of these boards 90% went over my head. Apologies in advance for my ignorance.

author: RoGeorge
author_rank: Super Contributor
timestamp: January 06, 2024, 01:49:53 pm
content: Quote from: SimonF on January 06, 2024, 01:34:33 pmNo. Do not try any of that.At best you'll electrocute yourself and burn the Arduino, at worst you'll start a fire or electrocute yourself (or someone else) to death. Not joking.Start with something else, a project at low voltage and without connections to the mains power.

author: MarkT
author_rank: Frequent Contributor
timestamp: January 06, 2024, 02:00:27 pm
content: A MOSFET switches DC, not AC, and that one is rated for 36V at most, so heed the warnings above...A solid state relay designed and rated for mains might be a far wiser option. And never trust mains to some random supplier, go to the reputable electronics suppliers.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 06, 2024, 02:12:37 pm
content: Quote from: SimonF on January 06, 2024, 01:34:33 pmWhat is your load? Incandescent lighting? LED lighting? Electric motor? Heating element?What is the purpose of variable frequency? Dimming? Heating control? Music/sound modulation?Your answers will dictate the proper control methodology and circuit topology.

author: Zero999
author_rank: Super Contributor
timestamp: January 06, 2024, 02:56:02 pm
content: Why? 80Hz, is above the mains frequency, which is 50Hz in Australia.Two MOSFETs connected back-to-back are required to switch AC.

author: SimonF
author_rank: Contributor
timestamp: January 06, 2024, 11:01:45 pm
content: Thanks all for the sound advice.To answer a few of the questions: I'm trying to help my Dad (who has Alzheimer's) with 40Hz frequency LEDs at Near Infrared (850nm) for the sake of photobiomodulation. To get 40Hz blinking you need to switch the LED twice, so 80Hz - I haven't gotten to this step and really thought it through yet, but I think this is right(?). The variability is for the sake of adjusting the frequency between different brainwave states (delta up to gamma). This is a pretty common feature of commercial photobiomodulation lamps because experiments have shown pulsed NIR light to be more beneficial than continuous, and people figure they may as well pulse the lights at known brainwave frequencies to entrain particular brain states.I was going to use an LED light strip running mains, but I've taken the advice above to heart and ordered a 12VDC LED strip and a power supply. So now I've got 96W of 12V LEDs to switch at 40Hz. Would I be right in thinking I no longer need to worry about a capacitor/diode for power spikes?

author: abeyer
author_rank: Frequent Contributor
timestamp: January 07, 2024, 01:46:32 am
content: Quote from: SimonF on January 06, 2024, 11:01:45 pmThere are lots of interesting projects to learn diy electronics, but I'd posit that performing biomedical research on someone else (who may not even be capable of giving informed consent) isnotone of them.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 07, 2024, 04:09:13 am
content: Quote from: SimonF on January 06, 2024, 11:01:45 pmThe next thing you need to do is to read up the medical research literature on photobiomodulation and find out whether the blinking is a; square wave, triangle wave, sine wave, or some other wave shape.And as the name implies, there could be an AM or FM modulation to the waveform i.e. the LED is actually blinking at a 'carrier frequency' of, say, 1kHz, and modulated at 80Hz.In summary, you really need to study the medical literature first to get the waveform specifications.

author: SimonF
author_rank: Contributor
timestamp: January 07, 2024, 08:38:40 am
content: Quote from: abeyer on January 07, 2024, 01:46:32 amYou've made a few assumptions there. Dad's not that far down the Alzheimer's track, and he definitely consents. I'm trying to slow the rate at which he gets to the point he can't consent. Also, it's not really "biomedical research" - there are papers where they've already done this stuff. Plus it's literally just light. The sun emits the same spectrum among all the others and we get a daily dose of it far outstripping the amount I'm intending. None of the literature I've seen says there can be any harm done by NIR exposure at the right intensity for the right duration.

author: SimonF
author_rank: Contributor
timestamp: January 07, 2024, 08:41:48 am
content: Quote from: Andy Chee on January 07, 2024, 04:09:13 amThanks for pointing out some of the things I'll need to look into. I do intend to get to those things but at this stage I'm just trying to work out the hardware side. The PWM will be done in code so I'll be researching that when I get to the coding part.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 07, 2024, 08:55:20 am
content: Quote from: SimonF on January 07, 2024, 08:41:48 amThe nature of the waveform will dictate the hardware required. You really need to find out what the waveform looks like.

author: SimonF
author_rank: Contributor
timestamp: January 08, 2024, 12:16:00 am
content: Thanks for the heads up. Rapidly realizing this is beyond my depth. Here's what I have (or have ordered) and want to achieve:1. Ordered 3m of 850nm (near infrared) LED strip lights operating at 12VDC with a power range of 21-30W per half metre (they're sold in half metre lengths. I probably won't be using all 3m, but got extra so I could do some practice runs in case I blow some up;2. Ordered a 200W 12VDC LED power supply;3. Have a couple Arduino Unos laying around;4. Have a 1602 display and ordered a 6 button display shield (https://www.aliexpress.com/item/32842943705.html?spm=a2g0n.order_detail.order_detail_item.4.4d2df19c9J3BCo) for a user interface.5. Ordered three of these mosfet PWM modules (mentioned in an earlier post):https://www.aliexpress.com/item/1005004527630582.html?spm=a2g0n.order_detail.order_detail_item.3.68d9f19cajHAphIf these are no good I'm happy to get a different mosfet.5. The object is to improve my Dad's health. NIR light is known to stimulate mitochondria to produce energy which upregulates a host of cellular functions. Research has found that pulsed light works slightly better than continuous, which is why I want to pulse width modulate it. The belief is that the mitochondria have a little down time to dissipate heat and recover between bursts. A square waveform is fine and what is generally used.6. There is another field of research concerning Alzheimer's that uses gamma brainwaves to help break up the amyloid deposits that seem to be integral to the disease. If I need to pulse the light in order to get (slightly) better results I figured I may as well pulse them at a frequency already known to have benefit. I plan to make it user adjustable though up to 300Hz (another research paper found good results at this frequency).7. I'm a newbie, so forgive my ignorance here, but:Suppose I ran all 3m of strip light at a maximum of 150W to keep them below their maximum and give the power supply some room to move, that would mean I'm getting 12.5A right? 150W/12V?Assuming that's right the resistor value to limit the current to 12.5A would be: 12/12.5 = 0.96ohms. So a 1ohm resistor capable of handling 150W should be ok? Or is there some other preferred way of controlling the current?Do I need anything else? When I was planning a 240V strip light version I came across information saying I should protect the mosfet with a diode and capacitor. Is that still necessary with a 12V version?All help appreciated. Thanks.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 08, 2024, 06:17:30 am
content: Quote from: SimonF on January 08, 2024, 12:16:00 amAssuming it is a specifically designed current limited LED power supply (you haven't specified the make or model), such a power supply will NOT force 200W into everything that is connected to it. For example, if you connect a puny 1W LED to it, the power supply should automatically regulate the current so that only 1W is output. i.e. the power supply only supplies what the LED wants, up to a maximum of 200W.Again, please specifiy make and model of power supply, in order to asses its specifications. Also the specification of the IR led strip would assist as well.QuotePlease provide a link to such information. Context is important to understanding.