How to connect multiple peripheries on arduino

Hi all,

I need help and suggestions how to solve the problem and how to design my project. I got task for school to make little smart house project with Arduino board.

Requirements that project needs to fulfill are:

  • Project need to has display so user can read status of the system

  • Need to uses at least 3 thermometers DS18B20 and measure the temperatures of rooms

  • Should has communication with network and data should be sent to web server and establish controlling of arduino over network

  • Has 4 relays to control lights, air condition, heater

I am very new to this and I don't have much experience so I need a little help to complete this task, learn how to make this and get my diploma.

What confuses me is that I have arduino nano with only 13 digital pins and multiple devices which require multiple pins. Can you help me to overcome this problem?

Also I have got Ethernet module HR911105A, 16x2 LCD display and MicroSD card module. Also, I have 4 relays, 3 DS18B18 thermometers.

Please help me with wiring and coding.

Regards,
Lazar :astonished:

First off, you need to organize the parts. create a simple hand sketch schematic and lay out what pins you need to use for specific things like your I2C connections.

your NANO has 13 DIGITAL pins, and 8 ANALOGUE pins. analogue 4 and 5 are reserved for your I2C serial line.
analogue pins can be used as digital, or one pin can 'see' multiple switches to save a digital pin.

get a serial connector for your LCD to use on I2c. now it is 2 wire.

your Ethernet module uses SPI, so there are 4 digital pins. the SD uses spi, so add 1 more for that card on the SPI bus.

the temp sensors are 1-wire devices. (4 pins)

you can use a shift register for 8 outputs, then connect your relays on that. if you use a shift register, that can go on the I2C bus. no additional pins or the SPI bus for 1 additional pin.

not sure, but I think we are at 9 or 10 pins, plus whatever the Ethernet card needs.

I guess, the real question is with all the un-used pins, are you going to want to add anything else ?

This simple fact that you did not know this is scary. this is the child's play part of the project.

lazarvgd:
Hi all,

Please help me with wiring and coding.

this your project and your work will show that either you know what you are doing, or you need others to do your work for you.

This is a test of your abilities. honestly, if you cannot do this, maybe you need another year of classes.

but, if you find you need help with a specific problem, post your code and we can help you figure out what you need help with.

in the end, you will know if you are worthy of that diploma or if you need to add some names on it for those that did your work for you.

more advise.
get one thing to work
I would offer that you should get the temperature sensors to work first. one first, then the others
then the display
then the relays.
then save that and do the either net as a separate task.
then combine it all.

dave-in-nj:
more advise.
get one thing to work
I would offer that you should get the temperature sensors to work first. one first, then the others
then the display
then the relays.
then save that and do the either net as a separate task.
then combine it all.

Hi, sorry about delay, I was busy last 2 months with business trips.

I have tried to organize things, the first problem that I found is that I cannot make my ethernet shield to work neither with arduino mega 2560 nor with arduino uno. Not sure if the problem is with my router or cables or shield it self.

The second problem is that I have lcd display(touch) and that one does not work due to missing libraries - to be honest did not spent much time working on lcd because it is the least priority part of the system.

The biggest problem here is the fact that I do not know how should ethernet shield and lcd to work together.

Other peripherals are not a problem, I already have system with 4 DHT22 and 3 relays that works just fine.I have tired to use ESP controllers to solve this problem with ethernet, but due to too much wifi noise and expenses I gave up with that approach.

Now I need use ethernet and lcd in order to have control over network, or at least readings.

Thank you for your time and patience. :slight_smile:

lazarvgd:
Hi all,

lazarvgd:
Hi, sorry about delay, I was busy last 2 months with business trips.

Either the Forum software has messed up or it has 2.5 years since your previous Post ?

...R

Which LCD? You don't say if it is wired with lots of wires, Serial or I2C. Or is it a shield?

Strip everything else off and get an LCD library example working. Same for Ethernet. Then work on combining them.

Hi I have something on Ethernet field, here I opened ticket with the problem about my ethernet shield

Also, the lcd is this one.

Thanks

lazarvgd:
Hi I have something on Ethernet field, here I opened ticket with the problem about my ethernet shield

I suggest you click Report to Moderator and ask to have this Thread merged with the other one so that all your project info is in one place.

...R

lazarvgd:

  • Should has communication with network and data should be sent to web server and establish controlling of arduino over network

[...]

Also I have got Ethernet module HR911105A, 16x2 LCD display and MicroSD card module. Also, I have 4 relays, 3 DS18B18 thermometers.

Sounds like a great job for a NodeMCU or WeMOS D1 Mini.
WiFi built in - so you don't need the Ethernet module.
Up to 3 MB of internal file storage - so you may be able to do without the MicroSD card.

That gets you down to 2 pins for the I2C bus (your 1602 LCD); 4 pins for the relays; and one for the three thermometers. No problem, as these boards have 11 digital and I/O and one analog input available.