Can i connect all of them to my arduino Uno R3 ?

Hello , i want to start a new project and i will need:

1x LCD (16x2 - characters and numbers) 1x Keypad (1-9 only) 1X GSM Shield 2x Fan 1x temperature sensor 1x water sensor 1x co2 sensor 40x leds

Are there enough ports on arduino UNO R3 for my project ? Thanks...

SInce each of these could take anywhere from 1 to 40 pins, I don't see how we could answer. But this looks like a lot for an Uno.

KeithRB:
SInce each of these could take anywhere from 1 to 40 pins, I don’t see how we could answer. But this looks like a lot for an Uno.

if i post links to my products can you tell me if its enough ? which arduino do you recommend ?

Mega is the next choice. It really depends how much intelligence is in the peripherals.

You might want two Unos, one for sensing/controlling and one for displaying/keyboard input.

KeithRB: Mega is the next choice. It really depends how much intelligence is in the peripherals.

You might want two Unos, one for sensing/controlling and one for displaying/keyboard input.

Or 1 Uno with this ? ??

invader7: Hello , i want to start a new project and i will need:

1x LCD (16x2 - characters and numbers) 1x Keypad (1-9 only) 1X GSM Shield 2x Fan 1x temperature sensor 1x water sensor 1x co2 sensor 40x leds

Are there enough ports on arduino UNO R3 for my project ? Thanks...

The LCD needs 6 pins, but 5 of these can be shared with other devices. The keypad is probably a 3x3 matrix, so it will need at least 3 input pins, which can't be shared because you have no other push buttons or switches etc. The fans may need PWM output pins if you want to control their speeds. The temperature sensor, water sensor and CO2 sensor can probably be done with 1 input each.

For the 40 LEDs, it depends on how you need to control them. A 5x8 matrix is probably the way to go, if you are prepared to write the multiplexing software.

So we're left with:

1 LCD enable pin (even if you can share the other 5 LCD pins with the LEDs) 3 keypad input pins (the other 3 pins can be shared with either the 5 remaining LCD pins or the LED pins) 2 fan output pins 3 input pins (CO2 sensor, temperature, water) 13 LED control pins ? GSM shield pins

That comes to a minimum of 21 pins plus however many the GSM shield needs. This is more than a Uno has. It will be much simpler to use an Arduino Mega than expand the outputs of a Uno with shift registers or other devices.

Thanks for GREAT answer !!!

--LCD http://www.futurehouse.gr/index.php?main_page=product_info&products_id=3142

--Keypad http://www.futurehouse.gr/index.php?main_page=product_info&products_id=3715

--2 Fans (no speed control , only on/off) http://www.futurehouse.gr/index.php?main_page=product_info&products_id=4448

--3 input pins (CO2 sensor, temperature, water)

--LED , i will have 3 groups , 15 + 15 + 10 , i will light each group separately

--GSM shield http://www.futurehouse.gr/index.php?main_page=product_info&products_id=4421

You have some better choices, I think...

http://www.futurehouse.gr/index.php?main_page=product_info&products_id=3142

This uses a LOT of pins.

One of these only uses 2 pins: http://goo.gl/KRGbf

Check for alternatives to other interfaces and LIST all the pins they need...

DISCLAIMER: Mentioned stuff from my own shop...

terryking228: Check for alternatives to other interfaces and LIST all the pins they need...

let me try... im very new to arduino...

--LCD needs 7 digitan pins

--Keypad needs 7 digital pins

--2 Fans (no speed control , only on/off , will work together) needs 1 digital pin

--3 input pins (CO2 sensor, temperature, water) needs 3 analog pins , 1 each

--LED , i will have 3 groups , 15 + 15 + 10 , i will light each group separately , needs 3 digital pins , 1 each group

--GSM shield needs....i have no idea...

So to sum up , i need 7+7+1+3+3 = 21 pins... At least...

18 Digital and 3 Analog...

Arduino uno has 14 Digital I/O , so it's not good for me.... Arduino mega 2560 has 54 Digital I/O , so its good for me !

Is this correct ?

I haven't worked with any cellular shields, but I'd guess they have an SPI interface, which requires 4 pins (3 of which are shared with other SPI devices).

Getting a Serial LCD is much easier to work with both from a pin # and wiring perspective.

Arrch: Getting a Serial LCD is much easier to work with both from a pin # and wiring perspective.

Thanks for the advice about the lcd , i found that a serial lcd is more expensive and i think the code is complicated comparatively to other lcd http://www.arduino.cc/en/Tutorial/LiquidCrystal ... But it's much easier at wiring you are right !

Anyway , it doesn't make any sense because if i completely remove the 7 digital pins of the LCD (if i was right at my last post) my pins will be 18 - 7 = 11 , but i need an lcd and i have only 3 digital pins left (UNO has 14) , so i have to go with MEGA.... i think...

Analog pins can be used as digital pins too

Arrch: Analog pins can be used as digital pins too

O thanks i didn't knew that , im new to arduino , it has 6 analog pins , the 3 pins will be my 3 sensors so i will have another 3 free analog pins to use as digital , do you believe it's a risk to go with so little free pins or i will make it ?

I think arduino mega will be more "safe" in order to be sure i could connect all of them...

You can drive that LCD display with 6 pins (EN + RS + D5-D7). Ground the RW pin.

invader7: anks i didn't knew that , im new to arduino , it has 6 analog pins , the 3 pins will be my 3 sensors so i will have another 3 free analog pins to use as digital , do you believe it's a risk to go with so little free pins or i will make it ?

I think arduino mega will be more "safe" in order to be sure i could connect all of them...

It's your budget.

There are tricks to getting more input/outputs with additional hardware, but if you want to play it safe and you have the budget for it, go for a Mega.

The only think that bothers me its that im at very beginning , every tutorial so far is for UNO , and i will not have much time to search "how this and how that works" so i think UNO is safer.... etc the gsm shield , i dont know if it is working good and easy with the mega as with UNO...

To summarise :

--LCD https://www.sparkfun.com/products/9395 - 1 pin --Keypad http://www.instructables.com/id/Analog-Keypad-Backpack/ - 1 pin --GSM shield https://www.sparkfun.com/products/9607 - 2 pins (as they said to me , i dont know for sure) --2in1 sensor https://www.sparkfun.com/products/10167 - 1 pin --CO2 sensor (still dont know which one) - 1 pin (i think) --2 fans https://www.sparkfun.com/products/9648? - 1 pin , they will start and stop together, no speed control --4 shift registers https://www.sparkfun.com/products/733? - 3 pins per 2 shifts , sum 6 pins (they will control 30 leds , 15leds/2shifts)

1+1+2+1+1+1+6 = 13 pins !

Finally i will need something to open and close some very light cardboard windows... something that will go from A to B and from B to A , not continuously , only when i will tell it to do so... like cd rom tray ! (maybe a servo?) I think it will have 1 pin... i dont know... so i have 14 pins

Can you "see" something wrong in my thoughts ? UNO seems good to handle them and will have some pins free just in case...

Thanks for the help so far , great community !

We sell a GSM shield http://store.open-electronics.org/GSM_GPRS_GPS_SHIELD and the library works also with the mega. http://code.google.com/p/gsm-shield-arduino/