Skip to main content

Timeline for wiring AC switch with DC led

Current License: CC BY-SA 3.0

26 events
when toggle format what by license comment
Jun 9, 2015 at 8:26 comment added Nick Johnson @PanayiotisSpanos The watt value of a resistor is a rating - so since a 47k resistor would dissipate more than 1/2 watt, you need a bigger wattage, or a bigger resistance. The rectifier you listed will work fine; for a cap, yes, it should be rated for at least 169V.
Jun 8, 2015 at 18:15 comment added Panayiotis Spanos @NickJohnson will a 1/2w ~50k(47k ohm resistor) be enough? not sure how that effects heat and power to the led as a 1/2w resistor. Had a tentative parts list if you wouldn't mind looking. 1. rectifier: Here 2. D1 & D2: 3 Amp diode PIV 200v Here 3. resistor: 1/2 w 47k ohm here or 1w 47k ohm here 4. capacitor: (not sure what v rating to get) is this supposed to be rated for the 169vDC what?
Jun 8, 2015 at 10:06 comment added Nick Johnson All sounds correct. Picking a 100k resistor will halve your current, though - if you want 3mA, pick a resistor like a 1W ~50K (47k would be a reasonable match).
Jun 8, 2015 at 9:48 comment added Panayiotis Spanos @NickJohnson power (w) = ((v^2)/R) right? so do i get w = ((169.2^2)/0.00327A) or 0.553284w? if this is the case and we recap: 50.596 k Ohm min resistor size and ~.55w, would a resistor that is rated for 100k Ohm and 1/2w suffice for this application? resistor here. is this too big? I can do math I just don't understand the relational concepts that well. Really appreciating your help here.
Jun 8, 2015 at 9:29 comment added Nick Johnson @PanayiotisSpanos That sounds about right. It's big because you're dropping a lot of voltage across it! You can double check by calculating the current through the resistor given the voltage drop and its value. Make sure to calculate the power, too, so you pick a sufficiently big resistor.
Jun 8, 2015 at 9:17 comment added Panayiotis Spanos @NickJohnson okay. Feeling like my calculations are off again. using my last setup, i measured the current through the led at 3.27mA. i'm getting that if Vs is 169VDC, and my LED fwd voltage is 3.55V, do I use 3.27mA to calculate the resistor size? I used this formula R = ((Vs - VLed)/ILed) and got R as equal to 50596.33028 ohms. That sounds huge so I have to be wrong or I measured something incorrectly. thoughts?
Jun 8, 2015 at 8:36 comment added Nick Johnson @PanayiotisSpanos Okay, that sounds reasonable. Now you just need to figure out the resistor value for mains based on that. As for diodes, any mains-voltage-rated rectifier diode will do just fine.
Jun 8, 2015 at 8:09 comment added Panayiotis Spanos Okay @NickJohnson .possibly correct now. Rectified mains I have as 169V. as for the LED, i measured forward voltage as 3.55V. Had the LED in series with a 470ohm resistor with 5.1VDC running to it and that's what I measured.
Jun 8, 2015 at 6:26 comment added Nick Johnson @PanayiotisSpanos I don't know where you got 108.086 VDC from; rectified mains should be more like 155 volts if you're in the US. And you definitely don't want 1 amp through your LED! You need to find the LED's forward voltage, which will be between 1.6V and 3V depending on color, and you want no more than a few milliamps through it.
Jun 8, 2015 at 4:15 comment added Panayiotis Spanos @NickJohnson okay. I think I have made the necessary calculations. Thanks for putting me on the right track. Would you mind checking my math? I got average VDC to be 108.086VDC. I'd like to run the LED @ max 1A and 12VDC. That's 108.086ohm resistor or larger if I understand correctly. I found this resistor link & rectifier linkthat I think will work. I also have a 330μF capacitor. I'm still at a loss for D1 and D2 in your diagram. Thoughts as to what I should use for D1 and D2 and do you think everything else I've said is good?
Jun 7, 2015 at 15:12 comment added Nick Johnson @PanayiotisSpanos It seems like you have a bit of ground to cover. All you really need, though, is ohms law - figure out the rectified voltage, figure out how much current you want through the LED, then divide one by the other to get the size of the resistor you need.
Jun 7, 2015 at 0:04 comment added Panayiotis Spanos @NickJohnson Hey thank you again for your help. I've laid out my circuit by hand but i'm not sure how to use LTSpice to make my appropriate calculations. Is there anywhere you can suggest either for me to learn to do the calculations by hand? I've had trouble finding a formula for determining the voltage/amperage output from the bridge rectifier if the input is 120AC at 15amps and I'm not using a transformer to step down the AC. Perhaps we could talk offline and I can share my project with you to get your input for 5-10 mins? If not I understand and will endeavor to work through the site?
Jun 3, 2015 at 13:46 comment added Panayiotis Spanos Thank you Nick and Simon. I will post about best practices for insulation once I understand the circuit and have it mapped out. It's going into a really tight and not ventilated space so my concern is exactly that (that the circuit will get hot and burn/melt through its insulation to ground out on the pipe, which would make it then live)
Jun 3, 2015 at 11:26 comment added Simon B A few safety warnings: Make sure all components are rated for at least 1.4 times the supply voltage. If the pipe isn't going to be grounded (earthed) then make sure all components and wiring in it are double-insulated. Make sure the resistor doesn't melt your insulation as it will get hot.
Jun 3, 2015 at 8:13 history edited Nick Johnson CC BY-SA 3.0
edited body
Jun 3, 2015 at 8:13 comment added Nick Johnson @PanayiotisSpanos They're rectifier diodes; together they form a half-bridge rectifier, turning AC from the mains into a sort of lumpy DC, which the capacitor smooths. I'd recommend getting something like ltspice out and simulating the circuit to better understand how it works.
Jun 3, 2015 at 7:32 comment added Panayiotis Spanos Sorry, just one clarification. What are D1 and D2 in the diagram? I realize they're diodes but what kind and why are they included (is it to protect from reverse flow?) I think I'm grasping the rest of the diagram so far.
Jun 3, 2015 at 7:12 comment added Panayiotis Spanos Sounds good. Thank you for all your help and I will be accepting your answer above.
Jun 3, 2015 at 7:12 vote accept Panayiotis Spanos
Jun 3, 2015 at 7:02 comment added Nick Johnson @PanayiotisSpanos That's probably a good topic for a separate question. If you can, put it inside a mains rated enclosure before putting it in the pipe, but beyond that I can't say.
Jun 3, 2015 at 7:01 history edited Nick Johnson CC BY-SA 3.0
added 520 characters in body
Jun 3, 2015 at 6:59 comment added Panayiotis Spanos i'm so glad to hear that this isn't too difficult. I'm pretty inexperienced though and will have to take some time to "translate" your diagram so I can understand what's going on. Do you have any suggestions on how best to insulate this? I'd like to add that this whole setup is going into a metal pipe so the last thing I want is it to ground out to the pipe body and have one of my cats electrocute themselves if they touch it. I'm assuming something more robust than shrink tubing and electric tape is necessary but that again could be my inexperience.
Jun 3, 2015 at 6:44 comment added DoxyLover There's going to be exposed mains voltage on the back of the switch anyway. I don't see that having a few more components exposed to mains voltage is going to make much difference. The OP just needs to make sure that everything is enclosed and nothing can short to exposed metal.
Jun 3, 2015 at 6:42 comment added Nick Johnson @jippie There's no risk of either if done properly. Direct conversion is commonly use for far more demanding circuits. This is also how every wall socket indicator LED ever works.
Jun 3, 2015 at 6:38 comment added jippie I'm not sure this would pass the "I just want to be safe. I don't want to create a fire or electrocution hazard."-requirement.
Jun 3, 2015 at 6:33 history answered Nick Johnson CC BY-SA 3.0