Connecting esp8266 with relay and relay to relay


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.


this is a picture of the 2 channel relay board

Welcome to the forum

Why did you start a topic in the Uncategorised category of the forum ?

Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics

why do you need to connect relay to relay

Please post a link to the 2 channel relay board or at least full details of it

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

As far i can understand you have relay shield above esp8266 mini So you need relay for controlling fan. When CO2 is high in room

yes

So why do you need the 2 channel relay board do you have anything else to control

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

Which sensor are you using and how are you connecting it

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).

oh now i understand, sorry it took me so long to realise my mistake


so if i am using esp8266 with the relay this is how i should use it to connect with the fan?

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.

yep i got it thanks to the both of you for your help in making me realise i misunderstood something and thanks for the drawing it helps a lot.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.