mysensors relay stops working after few hours



  • Hello,

    I have a serial gateway, 2 mySensors temperature nodes, and 1 relay mySensors node.

    The 2 temperature nodes work good, but the relay one stops worling after a few hours .. I have to turn it off and on again and it works again for a few hours ...

    (I use mysensors with jeedom).

    I have think the problem could be material, I have built another relay board, with another arduino (duemilanove original) and a new NRF ... but same again ...

    Do you have some idea ?

    Thanks ๐Ÿ™‚

    Carmelo



  • @carmelo24

    same problem here...did you found the solution?



  • "Classic" way to rule out the power source + relay related issues is to replace the relay with a led.
    Noise in power lines may stop the NRF module, but also Arduino can get messed up due to spikes in power supply.



  • @Nuubi said:

    "Classic" way to rule out the power source + relay related issues is to replace the relay with a led.
    Noise in power lines may stop the NRF module, but also Arduino can get messed up due to spikes in power supply.

    I did'nt see your answer ...
    What can I do to avoid this ? Put the relay away from the NRF & atmega ?



  • These are most often related to noise of the power supply or other transient noise/spikes in the circuit (due to a relay for example).

    To be more specific, I'd first remove the relay from the circuit and just use a led instead. If the node works then without problems for longer time, the reason indicates it's a noise issue from the relay section.

    Similar examples can be found, e.g. http://forum.arduino.cc/index.php?topic=186879.15

    Generally these are solved by separating the power supplies, or 'de-coupling'. A good read illustrating the situation, please read it through: http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

    I have bunch of nodes that are troublesome. So fat it's been due to noisy somewhere in the circuit. Also, noticed that some nodes start to malfunction after few years due to low quality capacitors. And that is painful to cure...



  • @Nuubi said:

    These are most often related to noise of the power supply or other transient noise/spikes in the circuit (due to a relay for example).

    To be more specific, I'd first remove the relay from the circuit and just use a led instead. If the node works then without problems for longer time, the reason indicates it's a noise issue from the relay section.

    Similar examples can be found, e.g. http://forum.arduino.cc/index.php?topic=186879.15

    Generally these are solved by separating the power supplies, or 'de-coupling'. A good read illustrating the situation, please read it through: http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

    I have bunch of nodes that are troublesome. So fat it's been due to noisy somewhere in the circuit. Also, noticed that some nodes start to malfunction after few years due to low quality capacitors. And that is painful to cure...

    thanks ๐Ÿ™‚

    I understand better ๐Ÿ™‚

    So, if I understand the right way, I have to put a decoupling capacitor because of the noise produced by the power supply and another decoupling capacitor because of the noise produced by the relay.

    I have already a 47ยตF cap on the VCC and GND pins of my NRF24.
    Should I put another 47ยตF beetween the VCC and GND of my relay ?

    I think it's noob question ... may be it'll be nice to put these infos in the relay page of mysensors website ?



  • To give a definite answer would require investigating the signals with an oscilloscope! Noisy signals can be seen quite easily, and also the effects of adding caps.

    Note, that often a combination of a larger and smaller cap is needed to solve these issues. Think that larger one smooths out the slower changes (in the power line) while smaller ones smooth out higher frequency components.

    I've ended up in some cases, depending on the power supply and the rest of the circuit, having a number of caps all over the circuit. Not pretty, not pro, but needed to stabilize the node sometimes..


  • Hardware Contributor

    if it's about power supply, it's possible to add few capa as already said above, or ferrite bead + capa. of course a scope is useful!
    I don't know how relay is wired too. but it's a good practice to use wheeling diode or zener at least, on the relay coil. It can prevent voltage spikes etc into sensitive digital circuit. I use relay driver for this as it's integrated (but smd).



  • I'm using these relay : https://www.mysensors.org/build/relay

    I think there is already protection from the coil voltage spikes.


  • Hardware Contributor

    @carmelo42 - I have been working alot with mysensors and relays.
    Im using a pro mini, powered from 240V AC through a iphone charger.
    My experience is that its mostly about the power.

    Your power to the relay can't come from the arduio, it needs to be feed directly from a good source.
    Ground can sometimes go through the arduino, but this I have had to try back and forth on each device.
    Caps! As mentioned above! Important!

    Also make sure your sketch works - begin with minimums. Attach a led instead of a relay and try HIGH/LOW and see that works. If it does, take the next step with attaching mysensors library and recive function. If that works try next step and attach relay.


Log in to reply
 

Suggested Topics

12
Online

11.4k
Users

11.1k
Topics

112.7k
Posts