Control 8 channel relay module by arduino uno and nodemcu

i want to control 8 channel relay module by using arduino uno and node mcu together, out of 8 channel, 4 channels i have to control by arduino uno and remaining 4 channels i have to control by node mcu…but inbuilt leds on relay module can ON sequencly…and they should be OFF in reverse manner…all this can be done without using any application

Please post your code and schematic

It is common for relay modules to operate such that a LOW input to them turns then on causing the NO contacts to close. Is that how your module operates ?

yes exactly same way module is working…but how to control 8 channels using 2 controllers at a time…this is my project …i dont have code or schematic with me right now im doing R&D

Who shall do this job?
A magic-controller ? :wink:

im using arduino IDE,we dont need to do it manually…it must be done automatically ,when we plug both controllers to power supply, relays must be ON in sequence…1,2,3,4 like this and should be OFF in reverse mode like 8,7,6…

Show your sketch to see how we can help you.

i have no sketch with me right now…i m trying to sketch…trying to work out this project but no idea how to do this,
result should be this, when i will plug both controllers at time,relay should be ON …relay 1,relay 2 …in manner and should be OFF in reverse…there is serial communication between 2 controllers

Try this as kickoff.

OK, I am going to pose the Elephant in the Room question:

Why on earth would you use a UNO and a Node MCU together? :roll_eyes:

That will be easy to do. Pick one controller to go first. It will turn on 1, 2, 3, and 4 in sequence. Then it will turn on a pin connected to an input on the other controller. The second controller will wait until the input turns on and then turn on 5, 6, 7, and 8 in sequence.

When? When the two two controllers are unplugged from power they will stop working and will not be able to sequence the relays off.

Makes no sense (without knowing the reason).

Hi, @amrita93
Welcome to the forum.

Please read the post at the start of any forum , entitled “How to use this Forum”.

Can you please tell us your electronics, programming, arduino, hardware experience?

What is the application?

Tom… :grinning: :+1: :coffee: :australia:

Based on the “I have to” wording, it sounds like a class assignment to me. :slight_smile:

thanks for replying…im very new to IOT,im learning arduino tutorials,trying to sketch so because of this I used word…“I have to”

hellow tomGeorge,
im really sorry for not sharing the details about project,i only shared statement of my project. but im in learning state,i have completed basic arduino tutorials and very new to IOT system.i have no experience about IOT but learning to get experience

It seems you want WiFi, so forget about the Uno.
You could use a port expander with your NodeMCU.

sir,will you please provide me the code for this

There are many (types of) port expanders.
Could be a 74HC595 shift register, or one of the many I2C ones.
Google (and your favorite parts supplier) will help you choose one.

I can’t. You have not provided enough information. You have not said why you want to use two processors when one will do the job. You have not said which processor controls the first four relays and which controls the last four. You have not said what triggers the orderly shutdown. You have not said how long between each relay turning on or turning off. You have not said which pins you want to use for the eight outputs.

If this is a school/college/university assignment then please post the Project Task Sheet that you have to follow.

Tom… :grinning: :+1: :coffee: :australia: