2
\$\begingroup\$

I want to reduce 220VAC to 5VAC and using one 100K Ohm resistor and another 2K Ohm resistor. Two resistors are connected in series and measuring the voltage from middle of two resistors. I am happy with the result I am getting. It is giving 4.5 VAC, but the problem is 100K Ohm resistor is getting hot. I haven't used the 4.5 VAC to anything if you say the Amps are going high.

My question is: Is it normal if the 100K Ohm resistor gets hot? I might put 20mAh on 4.5 VAC. If the answer to my question is "no" then what should I do to make it work?

Here is my schema: enter image description here

Claudio Avi Chami's answer is the answer to my question, he explained it very good, since he answered to my question I am marking it as an answer, but I like Whiskeyjack's answer. He gave me better idea for what I am trying to do.

\$\endgroup\$
8
  • 3
    \$\begingroup\$ It is to be expected that the resistor gets hot, did you not do any calculation to determine the power dissipated by this resistor before building this ? Also note that this circuit is not something you want to connect to the mains voltage directly as you would receive an electric shock if you touch it. Also calculate what happens if you draw 20 mA from this circuit, will it still give 4.5 V ? It would be far better and safer to use a mains transformer to do this. \$\endgroup\$ Apr 1, 2016 at 10:01
  • \$\begingroup\$ I = V/R gives a current of 2.1mA with no load. V = IxR gives us a volt drop of 210 across the resistor. P= IxV gives us 441mW power dissipated in the resistor. If you've just picked up any old resistor you had lying around it's probably 1/4W or 1/8W, it's no surprise it gets hot. \$\endgroup\$
    – user103993
    Apr 1, 2016 at 10:04
  • \$\begingroup\$ Did you actually touch it to check if it's hot? I wouldn't if I were you. \$\endgroup\$ Apr 1, 2016 at 10:38
  • \$\begingroup\$ @DmitryGrigoryev Good question! I wouldn't be asking the question if I had touched it. I killed the power first and then touched it. \$\endgroup\$
    – Dilshod
    Apr 1, 2016 at 10:56
  • 1
    \$\begingroup\$ also note that resistors often have a rated voltage of 200V, you might want to use 2 50k resistors, or dissipated less power and use way higher values, Megaohms might be feasable (or the mentioned C-R divider) \$\endgroup\$
    – Christian
    Apr 1, 2016 at 10:58

4 Answers 4

3
\$\begingroup\$

* Danger *

According your question you are probably trying to make a direct, transformer-less connection to 220VAC. There is SERIOUS RISK of death by electric shock in what you are doing!!!!

* Danger *

I hope you take my above warning seriously. If you still want an answer to your question, make the math by yourself and check that the power dissipated by the 100K resistor is close to 1/2W. Depending on the size of the resistor, it could put a lot of heat on it and even burn it. Usually transformer-less power supplies are done using Capacitor in series, but if you are not VERY cautious, you are risking your life.

\$\endgroup\$
10
  • 3
    \$\begingroup\$ The right way to this is: Use a C-R divider instead or R-R divider, rectify this output and connect to an optocoupler, and the output of the optocoupler to the Arduino. If you are a complete beginner try to search advice from an experienced designer when dealing with AC mains. Take care. \$\endgroup\$ Apr 1, 2016 at 10:21
  • 3
    \$\begingroup\$ If it is mains and you do have wall sockets related to these lines why not just buy a 5V wall adapter and use that as your 5V input for your arduino. Easier and 99% less chance of death. \$\endgroup\$
    – user103993
    Apr 1, 2016 at 10:23
  • 2
    \$\begingroup\$ @Hayman: Regardless of others' cautions, your excellent comment is the only one that makes any sense in terms of keeping Dilshod from getting a Darwin Award. +1 for your comment and another +1 if you post your comment as an answer. \$\endgroup\$
    – EM Fields
    Apr 1, 2016 at 10:48
  • 4
    \$\begingroup\$ @ClaudioAviChami: Rather than just posting blather, why not post a real answer with reasons why an RC is better and even, perhaps, a schematic and the math justifying your claim? \$\endgroup\$
    – EM Fields
    Apr 1, 2016 at 10:58
  • 1
    \$\begingroup\$ @ClaudioAviChami: Since it's truly blather, it's merely a statement of fact, not disrespect. Also, since it should be apparent (to someone in your lofty realm, f'rinstance) that Dilshod has no clue, making the assumption that he knows anything about reactances is unwarranted and, perhaps, even dangerous. In any case, the "comments" area of this site isn't intended to be used for technical discussion, so a more appropriate location for your advice (with backup data supporting your opinion, of course) would be in a proferred answer. \$\endgroup\$
    – EM Fields
    Apr 1, 2016 at 11:26
1
\$\begingroup\$

Normally this type of resistor is using when the Dimming led light is in off condition , therefore we use this type of resistor with high wattage capacity In your case 220V AC is applied and 100K Resistor is using I= 230/100000 = 2.3mA In case current is very small but u need wattage capacity so power it is required P= I2 x R = 2.32.3 x 100000 = 0.0053W so u need For safer side You can use 1 watt or 2watt resistor .

\$\endgroup\$
4
  • \$\begingroup\$ Your calculation of the power dissipated by the resistor is wrong. I is in A, not in mA. \$\endgroup\$
    – StarCat
    Jan 6 at 9:55
  • \$\begingroup\$ @StarCat see the calculation Properly or use calculator , Power dissipated is 0.0053 W , Check the Calculation , And 23mA , and also in 0.0023A . if u have any other calculation then comment . \$\endgroup\$
    – Jaimin
    Jan 6 at 11:08
  • \$\begingroup\$ 0.0023 (A) * 0.0023 (A) * 100000 (Ohm) = 0.53 W \$\endgroup\$
    – StarCat
    Jan 6 at 11:12
  • \$\begingroup\$ bro watt calculation as per KW so as per i written and also I answered that resistor that use For safety is 1 watt or 2 watt is greater than the 0.53W . \$\endgroup\$
    – Jaimin
    Jan 6 at 11:38
-1
\$\begingroup\$

It's always a better idea to use optocouplers in this case. Here is a schematic:

ac detection

This circuit is well tested and is working. However you can use K814P in place of PC817 as an enhancement.

Why this method is better than what you posted:

1) Lesser power dissipation.

2) Minimized risks of shock.

3) Arduino isolated from high voltage line so minimized risks of arduino failure in case of surges or similar incidents.

4) The capacitor smoothens the output and holds it as active high so that you don't have to do anything on code side - lighter code and easier to program.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ What will happen to the LED n the opto when the mains changes polarity? \$\endgroup\$
    – EM Fields
    Apr 1, 2016 at 11:38
  • \$\begingroup\$ @emfields Theoretically seems like 220V will appear across the diode and will destroy it. However this is not the case. I have been using this circuit in a project and has been running fine for 6-7 months continuously. Still a better version will be with K814P which has two diodes inside connected in opposite polarity. \$\endgroup\$ Apr 1, 2016 at 12:18
  • 3
    \$\begingroup\$ I tend to err on the side of caution, so not knowing the cause of why it's not failing would make me gunshy to the point where I'd get rid of the old (maybe damaged) opto immediately and install a new one with an external inverse-parallel diode wired across the LED. I agree with you in that the K814P seems to be the right way to go, along with a higher wattage ballast resistor. \$\endgroup\$
    – EM Fields
    Apr 1, 2016 at 13:10
  • 1
    \$\begingroup\$ @EMFields - I have posted it as a question here. Can you please take a look. I have provided some experimental info. \$\endgroup\$ Apr 2, 2016 at 11:17
  • \$\begingroup\$ Your circuit need reverse-polarity protection for the LED. Because of leakage current, the reverse-biased LED and R48 form a voltage divider. The lower the leakage current, the greater the voltage across the LED. \$\endgroup\$
    – AnalogKid
    Nov 15, 2023 at 14:12
-2
\$\begingroup\$

First you must rectify the AC with a diode. Your rectified voltage will be like 1.414 higher than the AC voltage.

Now you can put a resistor sized by the current you need, a Zener diode rated 5 V, and a capacitor across the Zener diode to smooth out the DC voltage.

\$\endgroup\$
2
  • \$\begingroup\$ Hi there! Please include a schematic or diagram of the circuit your describe, with values. \$\endgroup\$
    – MiNiMe
    Nov 15, 2023 at 12:28
  • 1
    \$\begingroup\$ There is nothing in the original post that indicates that he wants a DC output. In fact, he says he is "happy" with the AC output. \$\endgroup\$
    – AnalogKid
    Nov 15, 2023 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.