i have connected a esp8266 D1 mini to a D1 relay. right now i am not sure if i should be connecting the D1 mini relay to Relay1
The project idea is to detect if the co2 in a room is too high. if it is then the fan is turned on.
The parts i have are 2 channel relay board, esp8266, D1 relay and a fan.
what i have done so far is to connect the esp8266 with the d1 relay as shown in the first picture the esp8266 is directly under the D1 relay, and i have included a picture of the 2 channel relay board, im not sure how to continue the connection
I am not connecting the relay shield directly to directly to the co2 sensor itself so i want to be able to control it remotely, as the 2 channel relay board has a web ui and it allows me to communicate to the data my co2 sensor has given on thingsboard
Your connections as shown in the opening post are completely wrong. Why do you connect the outputs of one relay to the outputs of another relay?
It also brings the question (already asked in post #3) why you need to connect a relay to a relay. The relay on the 2-channel relay board is already a relay (that you can probably control using the web interface).
I do not know what the voltage of your fan is; for the drawing I assumed it's 12V.
So the plus of the 12V power supply goes to the common contact of the relay and another wire goes from the relay (NO or NC) to the fan. The other wire of the fan goes to the minus of the 12V power supply.