I have a few questions to ask and I’m hoping there’s someone here who can help me out.
So basically, me and my friend we decided to make a controller that controls the temperature and humidity of room.
At the moment I’m using the official Raspberry power supply for the Raspbery. Then, we have a 12v5a power supply which is connected to a step-down (LM2596) that now converts it to 5v and it connects to a breadboard. This breadboard then supplies the 8 relay board and the three DHT22.
So all the coding is done in node-red and when we testing all seemed fine. I left it on for a few days and it was all good. Then we tried to connect a few lamps to see if the relays were doing its job properly. And everything worked out fine.
When we tried to do the final test, connecting lamps, humidifier, dehumidifier, heater, fans and ventilation system, was when all the system collapsed. For 2 weeks we’ve been testing one by one and try to understand where the problem resides. We found (at least we think we did)! So basically everytime the relay board lets any of the equipment with a motor work, when the relay stop the equipment there’s some sort of spike and messes the communication between the DHT22 and the Pi.
So we decided to buy another power supply 5v2a to make and independent power supply for the relay board. We tested it and we thought we solve the problem. The sad reality is, now it doesn’t freeze the readings straight after the relay shuts the equipment with a motor. Instead it works for about 5 to 10 minutes and then freezes the readings.
After this last test we realized this is not a problem from the code but from power supply/interference.
We’ve been melting our brains for over 6 months and I don’t know what to do anymore. Should I use the power supply from the breadboard and then create an independent power supply for the sensors? Should I have an independent power supply for the Pi, another one for the relay board and another one for the sensors? Does anyone experienced the same problem? All the help is welcome and you guys are my last resort.
Thank you in advance and happy electronics for everyone!