New to Arduino

Hi All, I am brand new to this space, so new in fact that Santa has not given me my new Ardunio yet.

At this stage I have only 1 question, but it seems pretty fundamental. There are not many pin outs on the board (14 is it?) - Gammon Forum : Electronics : Microprocessors : Arduino Uno Rev3 pinouts photo

How do I go about adding lots of breakout boards or shields, that use up 15 ports? Or, in its most simple example (I assume), how would I add 20 independently controlled LEDs?

thanks
Greg

Edit: Maybe LETs are a bad example (led - How many individual lights can an arduino control - Electrical Engineering Stack Exchange), but what I am trying to work out is how to add lots and lots of different sensors.

You can use shift registers (eg 74xx595, 74xx165)to get more digital in and outputs. MUXes (eg 4067, 4051) to get more analog inputs.


Rob

Thanks for your help.

By the way, I am also in QLD, where do you get most of your kit from?

thanks

A decoder chip will give you more outputs. For example, the 74LS138 will set eight output lines using only three output pins. Conversely, a 74LS148 will watch eight lines and present the results on three input pins.

There are numerous analog and digital chips to expand and compress signal lines.

I am also in QLD

Where?

where do you get most of your kit from?

I bought a stack of stuff from Jaycar when I got back into electronics about 2-3 years ago, but mostly I buy from Mouser, E14, etc. Not that I buy much as I mostly write code and design things these days rather than actually build anything.

I do have a set of boards coming soon though, all the components were bought from Mouser.

A decoder chip will give you more outputs. For example, the 74LS138 will set eight output lines using only three output pins.

But they can't be latched so normally that's not much use unless you only want a single active output at a time.


Rob

But they can't be latched

That's true. As long as the address lines driving the chip remain set then that particular output is active. There are latch chips that can be used to hold the desired state. I don't have a chip number in mind but it would be something like the set and clear pins on a JK flip-flop.

You could use a 4 - 16 decoder and some JK chips. The lower eight bits( or even bits ) could set a JK and the upper eight( or odd bits ) to clear the same JK. There are probably better choices for chips but this would work.

The CD4043/44 latch will give you four sections. Two of these chips and a 4-16 decoder will then latch eight outputs and use only four input lines.

There are latch chips that can be used to hold the desired state. I don't have a chip number in mind

I think the 4099 will do the job.

It's probably easier (well fewer pins) to use a shift register, but an addressable latch would be faster.


Rob

I looked at that chip but the part that bothered me is that it uses a master reset for all output bits. Individual bits can be set but not reset.

Another idea would be to use two 4-16 decoders( CD4514 ) and four quad latches. One decoder sets the 16 latched outputs and the other clears the outputs. It would take only six digital outputs to control the 16 latches. Four address lines would be common to both decoders, the fifth line would strobe both chips, and the sixth line would enable one chip to set, or the other through an inverter to clear.

Well... It's December 30th now, so I hope Santa brought you an Arduino instead of a lump of coal!

Here are a few thoughts:

gggggggg:
There are not many pin outs on the board (14 is it?) - Gammon Forum : Electronics : Microprocessors : Arduino Uno Rev3 pinouts photo

Keep counting! The 6 analog pins can be used as digital IO also. They are just specialized to provide analog input (they can read voltages between 0 and 5v and return values from 0 and 1023).

As you can see from the detailed responses to your simple question, there are a lot of ways to control a multitude of sensors and outputs. For now, ignore all this and start with something more fundamental like controlling one LED, or 20. Adding multiplexing is theoretically simple, but can be difficult for someone just starting out.

There are a lot of good resources available on this site, and elsewhere online to get you up to speed quickly. you cant beat the "Arduino Cookbook" [2nd Ed.] for a complete set of sketches, from simple LED control to more complex sketches.

Enjoy!
Pat.

Keep in mind that the Due has digital pins D2 through D53 and A0 through A11.

74HC595 is good for shifting in & holding 8 outputs.
TPIC6B595 is much better for the same, use pullup resistors to pull output to whatever voltage you need, (9V, 12V), outputs will sink 150mA continuously.

Only need 3 pins to control can daisy chain many for more outputs, or wire clock/data in parallel to all and use seperate latch signal for each.

Thanks all for the detailed response. Santa was nice to me, and I have been learning to use the soldering iron with much success.

Now to try to get everything to work together. The plan is to put it all in a Weather Balloon.

Greynomad I am near Gatton, just finished 2 years going around Australia myself (though not sure I could do 12), time to settle down as the kids start school. I will give Mouser a try, thanks.