# Reducing the AC voltage using resistors

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:

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.

• 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. Apr 1, 2016 at 10:01
• 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.
– user103993
Apr 1, 2016 at 10:04
• Did you actually touch it to check if it's hot? I wouldn't if I were you. Apr 1, 2016 at 10:38
• @DmitryGrigoryev Good question! I wouldn't be asking the question if I had touched it. I killed the power first and then touched it. Apr 1, 2016 at 10:56
• 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) Apr 1, 2016 at 10:58

## * 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.

• 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. Apr 1, 2016 at 10:21
• 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.
– user103993
Apr 1, 2016 at 10:23
• @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. Apr 1, 2016 at 10:48
• @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? Apr 1, 2016 at 10:58
• @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. Apr 1, 2016 at 11:26

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 .

• Your calculation of the power dissipated by the resistor is wrong. I is in A, not in mA. Jan 6 at 9:55
• @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 . Jan 6 at 11:08
• 0.0023 (A) * 0.0023 (A) * 100000 (Ohm) = 0.53 W Jan 6 at 11:12
• 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 . Jan 6 at 11:38

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

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.

• What will happen to the LED n the opto when the mains changes polarity? Apr 1, 2016 at 11:38
• @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. Apr 1, 2016 at 12:18
• 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. Apr 1, 2016 at 13:10
• @EMFields - I have posted it as a question here. Can you please take a look. I have provided some experimental info. Apr 2, 2016 at 11:17
• 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. Nov 15, 2023 at 14:12

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.

• Hi there! Please include a schematic or diagram of the circuit your describe, with values. Nov 15, 2023 at 12:28
• 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. Nov 15, 2023 at 14:09