Adding External Components to Arduino

Hello,

I am currently undertaking my first robotics project using the Arduino Uno, and I was wondering how many external components I could feasibly connect to the Arduino?

At the moment, I have an Arduino Uno with the Arduino motor shield mounted on it controlling two motors. I would like to connect an HC-SR04 ultrasonic sensor to the Arduino for object detection as well.

My question is as follows: If I wanted to add an extra, say, four more HC sensors, would I be able to do it? Is there even a limit? This may be a silly question, but I don't have much experience so any help would be appreciated. :slight_smile:

If you add a screw shield, you could plug on the motor shield, and have screw terminals to connect the wires to the sensors.
http://wwww.crossroadsfencing.com/BobuinoRev17/

Would there be any way of doing it without buying a screw shield. Could I use something like a breadboard to achieve the same thing?

You can connect as many sensors as you have free I/O pins. How you do that, on a breadboard, development shield, or by flying wires, is your choice.

Many sensors require additional power supply lines, and a ground line, of course, which also must be connected. You'll end up with many more wires than sensors. A breadboard with power rails looks good for cabling stationary models, but not always with a mobile robot.

marximus:
Hello,

I am currently undertaking my first robotics project using the Arduino Uno, and I was wondering how many external components I could feasibly connect to the Arduino?

At the moment, I have an Arduino Uno with the Arduino motor shield mounted on it controlling two motors. I would like to connect an HC-SR04 ultrasonic sensor to the Arduino for object detection as well.

My question is as follows: If I wanted to add an extra, say, four more HC sensors, would I be able to do it? Is there even a limit? This may be a silly question, but I don't have much experience so any help would be appreciated. :slight_smile:

You are limited by pins, but there's ways around that at other costs.
You are limited by RAM, but there's ways and ways to stretch that.
You are limited by flash, may you learn to code tight for when you want speed via lookup tables.
You are limited by clock speed, but without an OS to slow you down you have to write your own bloat.

Good subjects to read up on are shift registers and SPI bus. Shift register chips run on high speed 4-wire SPI bus lines (AVR's have a hardware SPI port that uses pins named MOSI, MISO, SCLK and SS) to change serial data and parallel data, depending on the chip.
Output shift registers read serial from your device and and put it out on the register pins. Input registers read their pins and shift that data out as serial to the device. And then there's bi-directionals that can switch and cost a lot more. I got output registers from Yourduino 5/$1, along with other chips&bits.

The have the feature of being able to take external power and distribute enough to power a led on each pin.
And you can daisy-chain them on SPI bus to literally add 100's of pins. If you chain input chips at the end of a line out output chips, it will read the input data -as- it sends the output because SPI is circular.

If you don't need so much speed, look into I2C and Dallas 1-Wire and the devices made for those.

These are controller chips. Of course you add external components!

It might be wise to start off by thinking of NOT using any shield. Figure out how you wold make all the connections using a breadboard. Then decide if a shield would simplify life.

...R