High school final project

hello everyone,
i'm new here. i am in my last year of high school (Belgium) so i have to make a final project. i decided to make an automated irrigation system based on an Arduino. to save money i chose for a WeMos D1 R2 Wifi as i wanted to build an wifi based app for it too. i use 5Vdc relays (found on amazon from Keenso) in total i will use 9 of those relays. but i have the question if the Arduino (if needed) can control all 9 at the same time. right now i wanted to use Mosfet enhancement type N-channel as some kind of switch in between the Arduino and the relays. does someone know if the Arduino is able to control all 9 relays at the same time?
kind regards and thank you all for the help

You need relays that have inputs compatible with 3.3V logic. If there are 9 free output pins, then there will be no problem controlling 9 of that type of relay, all at the same time.

I count 9 GPIO's, so you may be lucky. However, some GPIO's are special-purpose on ESP platforms, so you'd have to check if and how you could use them. Also, you'll lose I2C etc. because it's all used for your relays. So no display etc.

Alternatively, you could kludge something with a GPIO expander; MCP23017 is ever popular and does work OK. But maybe it would make sense to purchase a different microcontroller board to begin with. ESP32 has plenty of GPIO's and there are cheap and nice ESP32 boards in spades.

So you have bare relays, not relay modules? Yes, NMOS will work, depending on the type. Throw in some resistors. Google for "mosfet low side switch".

It will not be exactly at the same nanosecond but if you have enough pins and a suitable power circuit then sure, that’s not a problem to control them all

hello,
it are relay modules.
on amazon you can find them under "Keenso 1 Channel Relay Module Relay Board with Optocoupler Low Level Trigger Expansion Board for Arduino 5v/12v/24v (12v) Relay".

A guy named Tim, or Sir Timothy to you and me, invented something called a hyperlink. Please use them!

hello,
it indeed doesn't have to be that specific in time but if it can control at least 2 relays (1 for a valve and one for a valve that function as an common closure of the water circuit (this one will open when any other relay get a signal to be openend)) at the same time it will be enough

https://www.amazon.nl/kanaals-relaismodule-relaisbord-optocoupler-triggeruitbreidingsbord/dp/B07Q1H63D6/ref=sr_1_1_sspa?__mk_nl_NL=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=14XCEQ1VGIDJD&dib=eyJ2IjoiMSJ9.-HnqyHRuTgwySNJyWXHQCdCKfnlauLdQHLUPMDh5n7AhJv5rgfyD9AQctD6oTKwLa86SxAYvswZJi_fyvhycDYF7AogMKObKxJ4j98fyMEXYw4ROMoJbTxtfEsKR7CR85Yjy9lob79zeO5JRY_miW3bymziw16XuZ3Z8azZZGSXPvL6OlVQCm6bHyHjEiY1bCpfNR-MbsOhaIwqncIYr5U__z0gyiflbJAaDX0IhIWz2eWK2oJqIYMUIfDfWv03Fsza1RE7XFBtSFTpjrKx3OD_0RFQsNk_xkixxAYLGa9c.PYBX7x44seo7_7Kg1FRWHPkP06h-GjRnzwhxG2obaSY&dib_tag=se&keywords=keenso+5v+relay&qid=1713981197&sprefix=keenso+5v+relays%2Caps%2C179&sr=8-1-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1

Ok, I wish I had not suggested it now.

Sir Tim didn't invent all that extra c**p at the end of the URL which is not needed, but allows Amazon to spy on everyone.

Everything after the "?" can be deleted:

But I would not recommend buying from this supplier, you don't know what you will get. The title says "5V/12V/24V" but there is no way to select which version you will receive.

1 Like

So no MOSFETs needed. Saves you some trouble.

There are plenty of threads about how to properly connect such modules to an Arduino. Search a bit for "relay optocoupler module arduino" and I'm sure you'll find one or two things. In any case, such modules should work fine with whatever microcontroller board you end up using.

What are you switching with the relays? What voltage are you switching?

hello,
i did buy 1 and i got to choose what input voltage i wanted to use. besides that one works fine but i just wanted to know if i could use more at the same time.

24Vac

hello,
thank you for all the help.

Yes

the valves i'm using are for 24Vac but the relay module works on 5Vdc and that works fine with 1 module.

Profi tip: Use only this text in the link before the "?"...

The result looks like this... and you go to the same, happy, place.

ok, i will remember for next time :slight_smile: .

Ok.

If you were switching 24V DC then the 24V version of the relay would be the best choice. Alternatively you would use power MOSFETs and not use relays.

But with AC, probably the best choice would be the 5V relay.

The Wemos can control 9 relays but it cannot power 9 relays.

So you will need an external 5VDC power supply to power them. This PSU can power the Wemos also.

yes there is an external power source of 5Vdc. but its just that i need to know if the WeMos would be able to give 9 switching signals at the same time to port In1 (on the photo of the relay).