Need more I/O outputs?

Hello!
I recently bought an Arduino, and I'm very new to this, so I apologize if it's a stupid question.

I'm a bit worried about the fact that a single LED bar graph uses 10 of my 13 I/O outputs
I mean, how is it possible to have several displays,servos and sensors connected to the Arduino when a single component uses 10 of 13 outputs?
Do I need more shields or Arduino's to get more outputs, or is there another way to get around this problem?

The LED bar I use is this : 10 Segment LED Bar Graph - Red - COM-09935 - SparkFun Electronics

All help is appreciated

// Andreas

Jellycow:
Hello!
I recently bought an Arduino, and I'm very new to this, so I apologize if it's a stupid question.

I'm a bit worried about the fact that a single LED bar graph uses 10 of my 13 I/O outputs
I mean, how is it possible to have several displays,servos and sensors connected to the Arduino when a single component uses 10 of 13 outputs?
Do I need more shields or Arduino's to get more outputs, or is there another way to get around this problem?

The LED bar I use is this : 10 Segment LED Bar Graph - Red - COM-09935 - SparkFun Electronics

Google for "shift register ic", eg. this one: Shift Register 8-Bit - SN74HC595 - COM-13699 - SparkFun Electronics

Use this tutorial:-

But do not connect the 1uF capacitor to the latch signal, this bit is wrong, connect it to the 5V supply on the chip.

How is it that no one on the Arduino team (or those with access to the site content) has fixed that tutorial yet? It's been like that since the day it was published. Sheesh.

My guess is someone doesn't believe it is wrong.

Hi!
Thanks for the helpful answers!
I will definitely check that out :wink:

Jellycow:
Hello!
I'm a bit worried about the fact that a single LED bar graph uses 10 of my 13 I/O outputs
I mean, how is it possible to have several displays,servos and sensors connected to the Arduino when a single component uses 10 of 13 outputs?
Do I need more shields or Arduino's to get more outputs, or is there another way to get around this problem?

You posted in the right section of the forum. Depending on what inputs and outputs you need, it is often possible to share pins by multiplexing. For example, you could drive 2 of those LED bar graphs using 12 output pins, or 3 using 13 pins. If you have lots of inputs as well, you can multiplex inputs with just a few external diodes. You can even use some of the same pins for multiplexing outputs and inputs

I recently completed a project that had a 16x2 character LCD display (needing 6 output pins), 12 pulse outputs (only one active at a time), a 5-bit amplitude output, 3 PWM outputs, 3 rotary encoders with integral push buttons, 3 separate push buttons, a relay output, an LCD power pin, a piezo sounder output, and a battery monitor input. If they were all connected to separate pins, that would be 42 pins. I used one external demultiplexer chip to generate the 12 outputs from 5 pins, reducing the pin requirement to 35. Then I used multiplexing to bring the pin count down to 20, so that I could run the system on a atmega328p.

If you can't get away from needing more inputs and outputs, then the simplest way to get more is to use the Arduino Mega. Other solutions include shift registers, multiplexers, demultiplexers and I/O expanders. Or you can look for devices that need fewer pins. For example, in designs that need a graphical LCD display, I always use a display with an SPI interface.

Grumpy_Mike:
Use this tutorial:-
http://www.arduino.cc/en/Tutorial/ShiftOut
But do not connect the 1uF capacitor to the latch signal, this bit is wrong, connect it to the 5V supply on the chip.

Just to be clear you advise to connect the 1uf cap between the chip +supply and ground? As close as possible to the +supply too right?

Just to be clear you advise to connect the 1uf cap between the chip +supply and ground?

Yes

As close as possible to the +supply too right?

No as close as possible to the chip.

For a better idea of what is going on see:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Grumpy_Mike:

Just to be clear you advise to connect the 1uf cap between the chip +supply and ground?

Yes

As close as possible to the +supply too right?

No as close as possible to the chip.

For a better idea of what is going on see:-
De-coupling

Fantastic site mate! Very clear explaination. Thanks.
Yeah I meant as close as possible to the chip's +supply or Vin.

another solution is - Centipede Shield V2 - Macetech Electronics Store -