Pages: [1]   Go Down
Author Topic: New to Arduino  (Read 1725 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?) - http://www.gammon.com.au/forum/?id=11473

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 (http://electronics.stackexchange.com/questions/1609/how-many-individual-lights-can-an-arduino-control), but what I am trying to work out is how to add lots and lots of different sensors.
« Last Edit: December 20, 2012, 10:00:00 pm by gggggggg » Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8474
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your help.

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

thanks
Logged

St. Petersburg, FL
Offline Offline
Jr. Member
**
Karma: 1
Posts: 61
Retired physicist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8474
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am also in QLD
Where?

Quote
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.

Quote
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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

St. Petersburg, FL
Offline Offline
Jr. Member
**
Karma: 1
Posts: 61
Retired physicist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

St. Petersburg, FL
Offline Offline
Jr. Member
**
Karma: 1
Posts: 61
Retired physicist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8474
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
« Last Edit: December 30, 2012, 10:32:43 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

St. Petersburg, FL
Offline Offline
Jr. Member
**
Karma: 1
Posts: 61
Retired physicist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Indiana, US
Offline Offline
Full Member
***
Karma: 12
Posts: 204
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

There are not many pin outs on the board (14 is it?) - http://www.gammon.com.au/forum/?id=11473

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.
Logged

There are 10 types of people in the world, those that understand binary, and those that don't.

St. Petersburg, FL
Offline Offline
Jr. Member
**
Karma: 1
Posts: 61
Retired physicist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 525
Posts: 26523
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: December 30, 2012, 12:17:46 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: