1
\$\begingroup\$

This is a newbie question, but how many things an Arduino Uno R3 can control?

My idea is to have Wireless + Ethernet modules and Relays module, be it 8, 16 or 32 relays each.

I saw the Ethernet module goes on top of the Arduino, maybe I'm wrong, but how many pins are left for controlling other things?

Sorry for my newbieness, but I need to buy the items on eBay and I'd like to be sure.

\$\endgroup\$
3
\$\begingroup\$

As many as you can stack, without conflicting dedicated control pins. Devices that use I2C with unique addresses, or SPI with remappable Chip Select pins, are the most ideal.

Even more if you avoid existing shields, and design your own.

|improve this answer|||||
\$\endgroup\$
2
\$\begingroup\$

Best is to take it step by step, make hardware work board by board. Arduino can control many devices, but the default shields may come with intercompatibility issues. If they occur, most of these issues can be solved, but it require a bit knowledge how to change the hard- and software in such a way that it will work again.

Almost every shield has its circuit diagram published and the real answer to your question is in these circuit diagrams. Basically what you need to do is check these circuit diagrams for IO-pins that are used on with every shield and then you need to gain an understanding which pins actually are a problem and which are not. For example, there can be several devices on the same I²C bus no problem. The SPI bus can support multiple devices too, but the trick here is the related select signal that requires a dedicated pin.

And if you have to slightly change the hardware, you'll definitely need to change the related software too. There is lots of support on Internet, but don't make your learning curve too steep that it demotivates you.

Actually this is precisely the reason why I don't really like the Arduino form factor shields, if you need to use alternative pins you have to hack the hardware. There are many break out boards that have similar functionality as Arduino shields, if you don't absolutely need to stack them, I'd go for those. Then again ... those certainly requires some understanding of hard and software.

|improve this answer|||||
\$\endgroup\$
1
\$\begingroup\$

Ethernet uses SPI. Wireless uses a UART. You have plenty of pins left to control things, and even if you didn't, you can always use a I2C expander such as the MCP23017.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Yes, allowing for multiplexing the constraint becomes running out of program and/or data memory (or time) to manage/track everything one is trying to do. \$\endgroup\$ – Chris Stratton Nov 5 '13 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.