2-coil latching relay sets off unwantedly

Hi guys,

so I made this greenhouse with humidity, light sensor etc. If the light is too low the 2-coil latching relay is supposed to switch a usb led-light on.

This works really well, unfortunately the relay switches on and off very fast unintentionally all the time. So when I check for the temperature, the light or the moisture for example, the relay switches on and off for about 1 second.

I can even just run a python script for the sensors:

import grovepi

moisture_s=2
light_s=1
temp_hum_s=2
moisture=grovepi.analogRead(moisture_s)
light=grovepi.analogRead(light_s)
[temp,hum]=grovepi.dht(temp_hum_s)

Same thing happens.

How is this possible?

Hi @gollium,

Could you connect the DHT sensor to port D4 (you need to assign 4 as value)?
If you do this, does the relay still switch very fast?

And to which port is the relay connected?
Other than the suggestion I gave you up there, you could also start adding a sensor at a time and see when the relay starts switching without any reason.

And last, please tell us the firmware version of it. We want to be sure you have the latest.

Thank you!