Ds18b20, interference from PWM controlled lights?

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
687
Reaction score
1,108
Location
Malmö, Sweden
I'm not sure this is a hardware issue but I can't figure out what causes it if it's real and true data.

Every morning between 07.00-08.30 the readings from my ds18b20 gets a little crazy. See graph below on the left side. The sensor is monitoring my vivarium. There's no other equipment coming on or off inside the tank during this time. No appliances or vents coming on or off. The only thing that happens is that the light on the tank is rising up to reach peak value two hours after the graph has stabilized. Lights are led strips controlled with pwm via a mosfet circuit. The reef-pi and circuitry are located below the tank, far from the sensor. The sensor is located quite close (7 inches?) to one of the led strips though.

The "event" starts with a quick drop in temperature reading at the same time as the lights get turned on (they are set to diurnal mode).

Could these weird readings be caused by some interference from the lights when they are at a very low value? The pwm signal I use is straight from the raspberry pi and is 25kHz.

1618676094590.png
 
https://www.youtube.com/c/ReefStache
OP
Mandelstam

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
687
Reaction score
1,108
Location
Malmö, Sweden
Screenshot from the dashboard showing the temp graph before and after lights were completely off. Definitely seems like there are some interference from drivers or something... Anyone experienced this?

1618687753119.png
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
139
Reaction score
235
I had this happen too and never quite figured it out. I had to rewire to move the case and it hasn't happened since but I'm not sure what changed. You might try switching to a different pwm pin as there might be a bit of wire or solder arcing between the two pi pins, but that's just a guess.
 
UniqueCorals.com shop rare & farmed corls
Top