I am a hobbyist trying to select an appropriate relay to control the heating profile of a DIY coffee roaster. For years, I have been varying the heating duty cycle by manually turning the heat OFF/ON. Now I plan to use a microcontroller to do that. The heating circuit is literally ~40 ft. of nichrome wire connected to household current. My obstacle: how to translate the resistance (my DMM says 9.5 ohms across the heating circuit plug) to amps so that I can choose a 12 VDC coil relay capable of handling the 120 VAC current. Is 60-hertz 120 VAC expressed as 120/0.707, or 170 Vrms? Do I then use Ohm’s law to get the current (170/9.5 = 18A)? And finally, when I look up the contact current rating, is this the way amperage in typical specs is expressed?

  • \$\begingroup\$ Safetywise, when making DIY AC mains equipment, you would be rather wise to power it from GFCI, either a GFCI receptacle or other GFCI device between there and the supply. A 5mA leakage from hot or neutral to ground ought to trip it. \$\endgroup\$ Mar 9 at 2:12
  • 1
    \$\begingroup\$ Are you measuring the hot resistance, or the cold? They are likely to differ significantly. \$\endgroup\$
    – MikeB
    Mar 9 at 15:27
  • 1
    \$\begingroup\$ my DMM says 9.5 ohms across the heating circuit plug - that reading can be misleading. Wires increases resistance with heat. So the actual resistance of that wire is actually variable depending on how much current you put through it and how cold the room is. \$\endgroup\$
    – slebetman
    Mar 9 at 19:17
  • \$\begingroup\$ Thanks for the pointers on measuring resistance. \$\endgroup\$
    – couldabin
    Mar 9 at 22:55

7 Answers 7


AC mains-powered devices are quoted in RMS. Your device may peak at an instantaneous 18 A but the RMS current is what matters. 120 V(rms) ÷ 9.5 Ω is 12.6 A(rms).

Nevertheless, your relay should be rated higher than the circuit breaker on the circuit. If this is a 15 A circuit, use at least a 15 A relay. Your circuit breaker is there to protect your components in case of an overload; you want the breaker to trip before the device is actually overloaded.

Also note that instantaneous voltage does matter for dielectric breakdown. If your relay is marked for 120 VAC this means it will actually withstand more than 170 V before dielectric breakdown occurs. But any component (e.g. a diode) simply rated at "120 V" will exceed that rating twice per cycle in an 120 VAC system.

Finally, a caveat: for any hobbyist working with mains power, it is very dangerous, potentially deadly, and can go wrong in many ways. There are strict standards for creating devices that operate at high voltages which you will have to be careful to meet for your device to be safe. While what you are asking is absolutely possible to do, for many reasons, it can be much easier and safer to purchase a device like this one which keeps all of the high-voltage switching safely out of harm's way.

  • 5
    \$\begingroup\$ but the average current is what matters <-- it's the RMS that matters because the average of a sinewave is zero. \$\endgroup\$
    – Andy aka
    Mar 8 at 19:12
  • 1
    \$\begingroup\$ @Andyaka RMS is a kind of average. So is arithmetic mean. Only one of those averages is zero for a sine. Editing for clarity though. \$\endgroup\$
    – Matt S
    Mar 8 at 19:22
  • 2
    \$\begingroup\$ Average is arithmetic mean for a full cycle and it equals zero. I know many sites talk about the average of a sinewave being non-zero but, they are referring to an average of 180 degrees of sine starting at 0 degrees and finishing at 180 degrees. \$\endgroup\$
    – Andy aka
    Mar 8 at 20:07
  • 6
    \$\begingroup\$ No, arithmetic mean is arithmetic mean. Average, synonymous with mean, is a broad category of various mathematical functions, which take in a set of values and provide a single representative statistical value. RMS is one such averaging function. \$\endgroup\$
    – Matt S
    Mar 8 at 20:18
  • 1
    \$\begingroup\$ Folks, RMS is not an average of the sinewave voltage. It's an average of the square of the sinewave voltage, because it is modeling the power of a resistive load. P= I2R. A resistive load on 120VDC will use the same power as a resistive load on 120VAC. When Edison lost the War of the Currents and they started switching whole cities from DC to AC, they didn't want to have to replace everyone's light bulbs. \$\endgroup\$ Mar 9 at 18:33

You use the relay's rating

There's no formula here, you simply use the relay's published ratings.

The relay will have separate AC and DC ratings (or not) - use the one that is correct for you. If it doesn't state a rating for your type of power, you can't use it. I would be surprised to see a relay that lacks an AC rating because AC is much, much easier to interrupt than DC. (As reflected in typical rated voltage numbers). Here are numbers from some J. Random relay that was the first thing to pop up. I'm not recommending that one.

enter image description here

A relay will also have different ratings for different load types.

  • A "tungsten" rating for a load with large inrush current, such as incandescent bulbs or power supplies with capacitors to charge.
  • A "ballast" rating applicable to inductive loads with high inductive kick on interrupt - the relay must suppress the arc.
  • typically a "horsepower" rating for motors, which accounts for their Locked Rotor Amperage and inductive kick.
  • A resistive rating for a truly resistive element that doesn't have surges or inductive kick.

enter image description here

You measure the amps, not guess.

Ohm's Law is invalid on many heating elements because their resistance increases as they heat up. That's why they have inrush current.

Since you are dealing in 120V, you need a "Kill-a-Watt" home energy monitor. They're like $25, Walmart stocks them and they are an easy way to get a current readout. I realize that's Rather Lowbrow for a hardcore electronics designer; nonetheless I like them because they're easy, cheap, and everywhere.

I recommend building a test model so you can simply test the current as-built. Once you have your AC amps, you can size your relay. I suspect that your wires will behave like tungsten, with high in-rush current until they warm up. Did you catch the part where inrush current is already factored into its tungsten rating? If your steady-state draw is 11 amps, then a relay with a 14A tungsten rating will suffice.

Generally electrical codes want you to size components for 125% of draw. Not a universal rule, but a good rule of thumb. So 11A -> 14A.

NEC and UL/CSA require that if you are using a standard NEMA 1/5-15 plug, you must limit current draw to 12 amps. With the NEMA 5-20 plug, you can go 16A. See UL White Book and NEC 210.23(A)(1).

Your project needs to be on GFCI

AC mains power is dangerous. It can shock you or burn your house down. To reduce shock risk, I recommend using GFCI (RCD) protection on the outlets used by the device - even (especially) on the workbench! It will turn a "you are dead" calamity into an annoyance trip.

AFCI wouldn't hurt either. AFCI detects "arc faults" or arcing due to loose or failing connections in the device. It's a digital signal processor that "listens" for the distinctive "sound" of arcing (hook up speakers with the power turned on and you've heard it).


As other answers have already mentioned, you have a slight error in your calculation, so in theory it's just 120/9.5= 12.6 amps.

However, in practice, you have measured the heater resistance when cold. In practice the resistance changes when the wire heats up, so the resistance won't be 9.5 ohms, but higher, so current will be lower too.

It still means that the relay must handle more than 13 amps with safe margin.


Is 60-hertz 120 VAC expressed as 120/0.707, or 170 Vrms?

No, you're going the wrong way. Your 120V power is 120V RMS, 170V peak, 340V peak-to-peak.

The current is 120 / 9.5 ≈ 12.6A RMS, and the power is ≈1500W.

It's the RMS current and the peak voltage that matter, so you should be looking for ratings of 200V and 15A at least.


Divide the 120VAC by the 9.5 ohms, and you get 12.63 amps. Use a relay with contacts rated for 15 amps or more.

The 120VAC is an rms value. So is the 12.63 amps. So there is no need to use a factor of 0.707.

  • 1
    \$\begingroup\$ All, this is VERY helpful. I had no idea that good old 120VAC was in reality 170. And I was completely unaware of the IoT Relay. Will give that some serious consideration. Thanks again. \$\endgroup\$
    – couldabin
    Mar 8 at 20:37
  • 1
    \$\begingroup\$ Yes, 170 volts peak. 340 volts peak to peak. \$\endgroup\$ Mar 8 at 21:58

For a coffee roaster a mechanical relay is not appropriate due to the temperature profile and control required by this application. An appropriate AC rated, zero crossing, Solid State Relay (SSR) should be used. This will provide the isolation required for the microprocessor and perform the AC switching function without creating transients. SSRs will provide finer control of AC switching (i.e. temperature control) than a mechanial relay. They also have the advantage that an appropriate SSR can be directly driven by a microprocessor.

As a side note. An SSR could also be used for whatever method/device is being used to stir the coffee beans. If say a DC motor is used for stiring then an AC rated SSR is not appropriate and a DC rated SSR might be used. First Crack, Second Crack detection, coffee bean temperature measurement and PID (Proportional, Integral, Derivative) temperature control of a moving target are not appropriate for this question.

As Nichrome is actually a metal alloy (Ni, Fe, Cr alloy) due to variations (e.g. 80% Ni, 20% Cr content may vary) a range of published temperature coefficients will be found. Given a typical temperature co-efficient the resistance change with temperature in this application can be calculated. Over the typical temperature ranges of a coffee roaster the variations can be taken to be linear. Given the temperature required for coffee bean Second Crack a heating element capable of 250 degrees Celsius is a good starting point for a calculation. 300 degrees Celsius might give an answer for an extreme upper limit for a coffee roaster. The melting point for Nichrome is in the region of 1,400 degrees Celsius therefore an appropriate material for this application. Temperatures can be converted online to degrees F if appropriate for you.

Published temperature co-efficients of Nichrome can be found on the web and possibly the most accurate answer can be found from the manufacturer of the Nichrome Wire. Some answers I found on the web have been:

  1. 0.00013 "alpha" per degree Celsius
  2. 0.00017 "alpha" per degree Celsius
  3. 0.0004 per degree Celsius
  4. 0.0002 per degree Celsius
  5. 0.004 per degree Celsius

As these are all positive values the resistance of Nichrome will increase linearly with temperature. The highest co-efficient is typically 0.004 per degree Celsius and this will give a much greater change in resistance than these other values.

Assuming the given Resistance of 9.5 Ohms was measured at 20 degrees Celsius (room temperature) and the "alpha" temperature co-efficient of 0.004 then the resistance at 0 and 250 degrees Celsius can be calculated.

Given the coffee chaff generated by a reasonable volume of coffee beans the coffee roaster may be outside and exposed to lower temperatures. If winter temperatures are even lower then this calculation could be repeated.

For 0 degrees Celsius (i.e. 20 degrees Celsius lower):

R0 = R20 * (1 + 0.004 * -20)

R0 = 9.5 * (1 - 0.08)

R0 = 9.5 * 0.92

R0 = 8.74 Ohms

For 250 degrees Celsius (i.e. 230 degrees Celsius higher) R250 = R20 * (1 + 0.004 * 230)

R250 = 9.5 * (1 + 0.92)

R250 = 9.5 * 1.92

R250 = 18.24 Ohms

The 120Vrms for mains voltage is a nominal value and the actual voltage might vary by 5% 6%, 9% or 10%. Variations in regional/country areas tend to be higher than city/suburban locations. For a worst case calculation a 10% variation will be used i.e. mains voltage of 132Vrms.

The current range for R0 and R250 values given a mains voltage of 132Vrms:

I0 = E / R0

I0 = 132 / 8.74

I0 = 15.1 Amps(rms)

I250 = E / R250

I250 = 132 / 18.24

I250 = 7.24 Amps(rms)

Just out of interest the peak current at 0 degrees Celsius can be calculated. The multiplying factor is the square root of 2 or the rounded value o 1.414 can be used.

Ipeak = 1.414 * Irms

Ipeak = 1.414 * 15.1

Ipeak = 21.35 Amps(peak)

These calculations can be repeated for the local temperature rangess expected.

The critical issue is the 9.5 Ohm value will only be valid at one unknown temperature and this may not be the lowest temperature experienced by the coffee roasting equipment.

Given a requirement to switch 15.1 Amps(rms) a component rating for an SSR or mechanical relay of 10% or higher current rating is appropriate. In your country component selection may be 125% of a calculated value for a nominal mains voltage.

I'm located in Australia which has mains voltages of 230Vrms or 415Vrms. Therefore recalculate with appropriate calculation factors for your country plus the actual temperature co-efficient of the Nichrome wire by the manufacturer or sales outlet.

The additional earth leakage safety equipment recomended in other answers should be mandatory for this application.

  • \$\begingroup\$ Thanks, that's a lot of detail. Do date, my roasting "profile" has consisted of repeatedly counting to 10 and manually switching the power to the heat on and off to achieve 30% to 70% duty cycles, while watching an analog thermometer. I aim to use the Arduino to impose a modifiable duty cycle once a trigger temperature is reached. Very low brow. \$\endgroup\$
    – couldabin
    Mar 9 at 23:01
  • \$\begingroup\$ My partner uses a secondhand bread maker. It has a paddle to continuously stir the beans in dough making mode (no heat) with a heatgun and digital multimeter with a thermocouple for temperature measurement. The heatgun has a dial for temperature control and she leaves the heatgun on and uses the temperature dial to continuously adjust the heat input. By using a timer with a printed spreadsheet of timestamps and temperature she has a target profile to control the roasting profile. This avoids the complication of manually switching the heatgun on and off. \$\endgroup\$
    – PDP11
    Sep 7 at 1:37
  • \$\begingroup\$ Not all breadmakers are suitable, check specifications. As a roasting profile should not step from room temperature directly to the final roast temperature the Arduino code needs to take into account the thermal delays as well as the roasting profile. The 40A SSR that you propose to use is a good choice. Just realise in some circumstances an SSR needs a heatsink. You should consult the specifications data to determine any thermal limitations that need to be addressed by a heatsink or other cooling arrangements such as a metal case. You will be working with potentially lethal circuitry. \$\endgroup\$
    – PDP11
    Sep 7 at 1:55

To compute power for AC you use the RMS rating for voltage and current. Your 9.5 ohm (cold) heater will thus draw about 12.6A (~1500W) RMS at startup.

By itself the heating element's 12.6A initial draw is just a wee bit more than 80% of an ordinary 15A circuit (that is, 12A.) As it warms up its resistance will increase and current will drop. You could model it, but in your case it’s probably more convenient to just measure it while it’s doing its job of making your building smell of roasted beans (please don’t burn them like Starbucks does!)

Why is that important? That 12A figure doesn't come from nowhere. It's the NEC recommended limit for continuous loads on a 15A plug. This is why you don't see 120V space heaters rated for more than 1500W.

In other words you’re allowed some higher current at the beginning, but no more than 12A total for an extended period of time.

You didn't mention other loads in the roaster, such as the stirring motor and convection fan, if present. These need to be accounted for as well. Again, best to measure the gross roaster load to be certain.

If you find that the roaster's continuous draw exceeds that 80% / 12A figure, you need to consider either downsizing the heating element or upsizing the roaster feed to use a 20A plug.

GFI and or AFI (arc fault) protection would be nice, if not required. In any event this protection would be part of the plug or branch circuit, not as part of your device.

Finally, use a relay rated for 20A. It can be a contactor type with a logic interface, or a solid-state type.

  • \$\begingroup\$ Thanks for these observations. I have been toying with acquiring a general purpose 30-40A relay that would be fenced off with a snubber circuit and manipulated with a transistor switch. However, I found a place that specializes in kiln equipment that sells a 40A SSR for a very reasonable price -- I may well go with that. \$\endgroup\$
    – couldabin
    Mar 10 at 0:55
  • \$\begingroup\$ That sounds like a winner. You could possibly consider PWM drive to the heater which would allow a specific set-point and more control over the thermal profile. \$\endgroup\$ Mar 10 at 2:57

Your Answer

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

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