element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Sauna Heater Control. Help Needed.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 24 replies
  • Subscribers 393 subscribers
  • Views 3452 views
  • Users 0 members are here
Related

Sauna Heater Control. Help Needed.

studioab
studioab over 7 years ago

I've finished my first IoT project based on Arduino Yun. It's a remote control for my sauna. Everything is working as expected in test mode (relay is not connected to contactor so there is no real load), I was able to test this system for hours without any problems.

 

When I hook up contactor to relay, it turns the heater on and off, and everything seems to be working, but after a while (absolutely random, it could be an hour or a few minutes) LCD screen freezes, or sometimes, starts flashing random symbols, server is not responding to commands, rotary encoder isn't working and it seems Arduino freezes. The only workaround is to turn off the power and reset the system. After it restarts, everything is back to normal.

 

I came across this post 16*2 LCD getting weird characters symptoms are the same, I think high AC load is causing EMF impulse that is crashing Arduino. Power Module, Relay board, LCD, and Arduino board are really close to each other and inside the box.

 

I'm not sure if it violates the rules, but I would like to mention these people from the other post @WarrenW @Robert Peter Oakes @Gough Lui @neilk @D_Hersey

 

I think here are my options. What would you recommend to do?

 

- replace relays with solid state relay

- shield AC wires

- remove power module from the box

- don't use the same power module for relays

- ???

Attachments:
image
image
image
image
image
  • Sign in to reply
  • Cancel

Top Replies

  • mcb1
    mcb1 over 7 years ago in reply to studioab +4
    I would like to say huge thank you to all people that contributed to this thread. I was able to eliminate all the issues causing arduino to crash Glad we could help. Do you guys think this project should…
  • jw0752
    jw0752 over 7 years ago +3
    Hi Eugene, The answer might be as simple as adding more decoupling capacitance with low ESR to the power feed to the Arduino. This can be done by putting a 100 nF capacitor and a 100 uF cap in parallel…
  • ralphjy
    ralphjy over 7 years ago +3
    Hi Eugene, Nice looking project. I would suspect your problem is that the 240V input glitches when your load switches and that causes the 5V to glitch. If you had a scope you could monitor the 5V supply…
Parents
  • studioab
    studioab over 7 years ago

    https://www.element14.com/community/servlet/JiveServlet/download/232713-252340/Sauna.png

     

    Here is how everything is wired including 5v power module specs.

     

    System works without issues switching relay only without activating contactor.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to studioab

    System works without issues switching relay only without activating contactor.

    In that case I suspect that the issue is caused by the mains voltage dropping enough to upset the power supply, and therfore glitching your Yun.

     

    The simpliest thing to try is adding a large capacitor across the 5v.

    You'll need a 10,000 uF or more and it can be made from several capacitors.

    This acts as a reserviour to hold the 5v up while the supply drops when the mains drop

     

    The second option is to try another power supply, but of a different type (ie not the same type).

    Your design is physically limiting your options, and you don't want to comprimise the safety aspects of this build.

     

     

    A 2 Amp supply would seem to be adequate, but many struggle to provide the full voltage at higher load currents.

    With the YUN, relay, and the display, the drop in the 24ov supply is probably enough to cause a reset, of either the Yun or the LCD as you are observing.

    You might be able to save a bit by pulling the backlight jumper off temporarily.

     

    It seems that the hardware design of the Yun makes them more susceptible to power than other boards.

    https://playground.arduino.cc/Hardware/Yun

     

     

    You can measure the mains voltage when the 9Kw heater is on.

    You may be shocked to see how much it drops to.

     

    Here in NZ the maximum load on a sinlge phase is less ... 32A which equates to 7.6Kw.

    Most Spas (similar sized heaters) used dual heaters on seperate phases.

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • jw0752
    jw0752 over 7 years ago in reply to mcb1

    Hi Mark,

     

    I checked out the Arduino site and they mentioned some of the same issues that Eugene is experiencing. Unlike many of the other Arduino boards the Yun doesn't seem to have its own regulator.

     

    John

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • studioab
    studioab over 7 years ago in reply to jw0752

    Thank you for pointing me to the Yun specs, it seems this board is quite different from another Arduinos.

     

    The Yún board does NOT come with a built-in power regulator (as does the Yún Shield). If you are experiencing instability on the WiFi chip, blue LED going off, strange or sudden resets, etc., adding a good regulator will likely solve these issues. The Atheros chip (the WiFipart) seems especially sensitive to transient spikes, ripples, lead inductance and the like when powered from the vIn pin. For example, if you power high current devices (e.g. a high torque servo) on the same power supply as the Yún (obviously not from the board, but on the same input power line) the inductance pulse, spikes or ripples will likely reset the Atheros chip much like pressing the Yún reset button. Placing a small up/down, adjustable dc-dc regulator such as the Pololu S7V8A accompanied by a 33-100uF Electrolytic Cap just before the regulator will most probably solve most of these instability issues. Pololu has a good article on Understanding Destructive LC Voltage Spikes If you are driving high power stuff, feed them before the regulator, always with common ground, of course.

     

    I can order this regulator and try to add it, but I still don't understand why reset doesn't happen when the heater is actually being turned on. I only observed the issue when the board sends a signal to relay to turn off the heater after it's been working for a while. I'm wondering can it be a voltage spike or EMI occurs when contactor disengage contacts that are under high AC load?

     

    It's easier for me to rewire the relay board and use an external phone charger. Please let me know if it would make sense to do it this way?



    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to studioab

    I still don't understand why reset doesn't happen when the heater is actually being turned on

    but I noticed that almost all the time Arduino crashes right after contactor turns off the heater. I haven't seen any issues when contactor turns on the heater.

    I hadn't seen these responses when I answered you earlier (cant explain why they didn't show)

    This suggests that either the coil of the contactor is causing an issue with a component on the YUN (earlier Pi3 had issues with flash from cameras), or the rise in 240v mains is making the power supply think it's too high and shutting down enough to cause the YUN to glitch.

     

     

    The capacitor is probably the quicker and easier method (if you have one).

    Adding a phone charger will require tying the negative of both sources together, but you could try powering the YUN temporarily with it.

     

    Glitches in power supplies will not show on a meter. You really need an Oscilloscope to see it.

     

    You might be able to test this by manually switching the contactor ON and OFF using a switch.

    This would allow more cycling to see if you can eliminate it.

     

     

    I was a bit surprised by the YUN board power arrangements. It seems a little crude given that these aren't particularily cheep and have a lot going on.

     

    Cheers

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jw0752
    jw0752 over 7 years ago in reply to studioab

    Hi Eugene,

    Spikes are not as likely to be generated by a relay or contactor coil when they are being energized as when the power is cut. This is not as serious if the switch is a manual one compared to a solid state switch like a transistor or gate. A lot of situations may be contributing to make your problem. The fact that you have no trouble when the main heater isn't in the circuit suggests that it is a factor. If there are more than one variables in this equation it might be difficult to pin down one cause. If you add a regulator like a 7805 you will have to supply it with at least 8 volts so that it has enough voltage to do its job. The fact that others have had similar issues to yours and the use of a regulator solved the problems is a good indication. Here is a recommended wiring of the LM7805 regulator.

     

    image

    Click on the schematic to enlarge it.

     

    Here is the data sheet for the LM78XX series of regulators:

     

    http://www.farnell.com/datasheets/2298694.pdf?_ga=2.245920388.1679369121.1514241859-118307707.1475274175

     

    John

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to mcb1

    studioab

    I just had another thought to assist in isolating the cause.

     

    If you are able to disconnect the Heater but leave the contactor switching, it will help identify if the contactor col or the load on the mains voltage is causing the issue.

    In theory this is simply a matter of disconnecting the load side, and operating the contactor.

     

     

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • studioab
    studioab over 7 years ago in reply to mcb1

    This is what I'm going to try tonight. I'll disconnected heater wires and run the test that turns on and off the contactor every 15 minutes.

     

    Will post results tomorrow.

     

    Thanks.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • studioab
    studioab over 7 years ago in reply to studioab

    Results came really fast image

     

    I disconnected heater wires from the terminals, and tried to turn on and off contactor without the load. LCD is still glitching but arduino seems to be working fine, because knob is still controlling the relay.

     

    here is the video if you want to see it.

    https://photos.app.goo.gl/flRyRDLa82xNVoar1

     

    My understanding is that:

    #1 - LCD is glitching because high voltage wires that go to relay are too close to LCD data wires

    #2 - I wasn't able to reproduce issue when Arduino crashes or freezes, which I believe is another issue caused by voltage drop or something else, I need to eliminate issue #1 first

     

    My next step is:

    - Shorten LCD wires and shield them from AC wires

     

    Please let me know what you think.

     

    Thank you.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to studioab

    LCD is glitching because high voltage wires that go to relay are too close to LCD data wires

    I don't think that is the cause.

    I still think you have an issue with the supply.

     

    Yes the LCD is glitching, but in theory the YUN should also be locking up.

     

     

    Is there a way to run the controller off another supply temporarily (and carefully)

    Also you haven't answered if you have a large capacitor (it can be higher than 5v) to hang across the 5v supply.

    These LCD's have no brownout protection at all, and are susceptible to power.

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • studioab
    studioab over 7 years ago in reply to mcb1

    So I ended up:

     

    - adding between Vin and gnd 1000 mf / 24v cap (didn't find anything better)

    - replacing existing power module with external Nokia 5V 3A phone charger

    - removing all AC high voltage wires and relay module from the box

     

    Quick testing shows that LCD is not glitching anymore when quickly turning on and off. I tried it with and without heater connected to contactor.

     

    At this point I will continue using it for a few days to see if the system is working without issues.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • beacon_dave
    beacon_dave over 7 years ago in reply to mcb1

    The ATmega32u4 in the Arduino Yún does have brown-out protection however and assuming that is enabled it should cause the Arduino to be held in reset with a voltage drop (not sure about the Atheros coprocessor) and then restart when power is back within limits, so in theory the Yún shouldn't stay locked up even if the LCD display does.

    ne question perhaps is where the Yún originated from for this project and if its brown-out detection fuses have been altered or not from their default.

     

    Not so sure about the discussion about the need for an additional regulator, as presumably the IRM-10-5 should be regulating the output to 5V:

    https://www.meanwell-web.com/en-gb/ac-dc-single-output-encapsulated-power-supply-irm--10--5

    However if you look at the datasheet the IRM-10-5 does appear to have overload protection which shuts off the output upon voltage overload (5.75 - 6.75V) and then restores it after the fault condition is removed:

    https://www.meanwell-web.com/content/files/pdfs/productPdfs/MW/IRM-10-spec.pdf

    It doesn't appear to state how long this recovery takes. If there was a sufficient spike on the line after the contactors were released then perhaps this could be triggering the shutdown of the 5V output rail.

     

    Once again however I would have expected this behaviour to trigger the brown-out detector in the ATmega32u4 and cause a controlled reset to take place rather than a lock-up. This could suggest that there may also be an initialisation issue in the programming causing the lock-up after a brown-out reset.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • beacon_dave
    beacon_dave over 7 years ago in reply to mcb1

    The ATmega32u4 in the Arduino Yún does have brown-out protection however and assuming that is enabled it should cause the Arduino to be held in reset with a voltage drop (not sure about the Atheros coprocessor) and then restart when power is back within limits, so in theory the Yún shouldn't stay locked up even if the LCD display does.

    ne question perhaps is where the Yún originated from for this project and if its brown-out detection fuses have been altered or not from their default.

     

    Not so sure about the discussion about the need for an additional regulator, as presumably the IRM-10-5 should be regulating the output to 5V:

    https://www.meanwell-web.com/en-gb/ac-dc-single-output-encapsulated-power-supply-irm--10--5

    However if you look at the datasheet the IRM-10-5 does appear to have overload protection which shuts off the output upon voltage overload (5.75 - 6.75V) and then restores it after the fault condition is removed:

    https://www.meanwell-web.com/content/files/pdfs/productPdfs/MW/IRM-10-spec.pdf

    It doesn't appear to state how long this recovery takes. If there was a sufficient spike on the line after the contactors were released then perhaps this could be triggering the shutdown of the 5V output rail.

     

    Once again however I would have expected this behaviour to trigger the brown-out detector in the ATmega32u4 and cause a controlled reset to take place rather than a lock-up. This could suggest that there may also be an initialisation issue in the programming causing the lock-up after a brown-out reset.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
  • mcb1
    mcb1 over 7 years ago in reply to beacon_dave

    beacon_dave

    Thanks for the link to the supply. That was my next task to chase it down.

    Not so sure about the discussion about the need for an additional regulator, as presumably the IRM-10-5 should be regulating the output to 5V:

    I seriously doubt it has anything in the way of decent filter caps, as they get paranoid about caps being able to rupture and vent, rather than explode.

    Being encapsulated and the block diagram suggests it has the smaller caps for the high frequency inverter only.

     

    The unit is designed to part of a complete equipment, which means the necessary filtering would be external to theis supply, in the same way they are with a three terminal reg..

     

     

    The LCD has nothing in the way of filter caps, and they have no brown-out protection at all, hence can be less tolerant than the YUN.

    If this is wired across the 5v supply, then it's very likely it is the first casualty for spikes in the supply.

     

     

    The YUN, LCD and relays have become an aerial floating above ground, and one other trick might be to connect the negative to earth if it appears in the box.

     

    Firstly we need to help the OP isolate what the cause is and sort out the best solution.

    Filtering may be enough as it seems that 1000uF might have made the difference.

     

    Cheers

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • studioab
    studioab over 7 years ago in reply to mcb1

    I've had sauna working for 10 hours straight heating to 80C and then cooling to 40C, my test log shows that it completed 5 full cycles. This is a huge improvement, before it was always crashing after 1 cycle.

     

    With the new 3A power supplier V output is 5.36 vs 4.75 (old one). I can see that LCD screen is much brighter now, I even adjusted brightness level a little bit.

     

    At this point, I'm totally fine to keep power supplier and relay board ouside of the Arduino/LCD box, because I have plenty of space in the electrical box, and there is no reason for me to cramp everything together. Initially I thought that it would be good idea to keep everything together, but I was wrong.

     

    I'll try to answer some of your questions:

     

    - I've tried to add 100w lamp, as mcb1 suggested, I can see a little flash, but it didn't make any difference

    - LCD power is connected to Arduino 5V out, connecting it to power supplier directly didn't make any difference

    - I have common ground in the box and can easily connect to Arduino ground if you think it would be safe

     

    It's hard to say what was the main cause, but we eliminated it, I hope, completely by:

    - adding 1000 cap

    - removing AC components and wires outside of the box

    - replacing 2A power module with external phone charger 3A

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to studioab

    This is a huge improvement, before it was always crashing after 1 cycle.

    That's great it has stopped crashing.

     

    - LCD power is connected to Arduino 5V out, connecting it to power supplier directly didn't make any difference

    I presume then that the 5v from the supply connects to Vin.

     

    I can see a little flash, but it didn't make any difference

    I would expect to see the lamp ON whenever the contactor was ON, and off when it wasn't.

    I'm not sure why you only saw a flash.

     

     

     

     

    - I have common ground in the box and can easily connect to Arduino ground if you think it would be safe

     

    The current arrangement leaves it possible for the whole setup to become 'live' which is fine, except that the encoder knob is the part a person could touch.

    Yes it has a plastic knob but this may not be 230v rated and it is behind a plastic cover so it's unlikely to be accidently bumped.

     

    Connecting the ground (negative) to earth means that you have a better chance of stopping parts from becoming live.

    HOWEVER before doing this it might pay to use a voltmeter to check if there is a voltage between the negative from your 3A supply and the earth.

    It may have some leakage which elevated it, but this should drop when you connect the meter (although it might be slow)

     

     

    For future reference.

    The relay board might have relays that are 250v rated, but the pcb design is not suitable for mains.

      versus  imageimage

    The second image shows the extra cutout in the pcb around the common, so that mains voltages cannot creep or jump across to the relay coil terminal.

    (Yes it is only a single, but the dual ones are the same)

     

     

    This style uses a different relay where the physical isolation is much greater.

    image

     

     

     

    Cheers

    Mark

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 7 years ago in reply to studioab
    1. adding 1000 cap
    2. removing AC components and wires outside of the box
    3. -replacing 2A power module with external phone charger 3A

     

    I'd vote for #1 and #3 in this case.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube