Go Down

Topic: Arduino Pin Limits (Read 937 times) previous topic - next topic

Jessestr

Hello

I am considering to get into a new project. I want to make my own controller like here.. http://www.kickstarter.com/projects/1757054094/xbee-handheld-controller

It's a controller with an xbee, some 2-axis gimbals, some knobs, switches and buttons & lcd. But I'm afraid when I attach and LCD to the arduino pretty much every pin is used.. Is there any way to connect all those things to one arduino?

Thanks

Jesse

retrolefty

Quote
Is there any way to connect all those things to one arduino?


Did you know that there is more then one model of 'arduino board'? The basic arduino Uno board has 19 I/O pins, a arduino mega board has I believe 70 I/O pins. Just match the board's resources to the resource requirements of the specific project.

Here is a  link page of all the 'official' arduino boards. And there are many many other 3rd party arduino comparable boards available with varying resources.


http://arduino.cc/en/Main/Products

Lefty



dc42

You can save pins by multiplexing. For example, 5 of the 6 pins used to interface a character LCD can be shared with other devices. One example is to use those pins to connect up to 5 push buttons to just one Ardunino input, or up to 5 rotary encoders to just 2 inputs. You need to connect diodes in series with the pushbuttons or encoders. I frequently multiplex inputs in this way in order to keep within the pin count of an atmega328p.

Another approach is to use a serial LCD that needs fewer wires to control it, for example a 128x64 graphic LCD using the ST7920 controller needs only 2 pins.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Jessestr

Thanks both.

Yes I know there are more boards out there. I was just aiming for a Leonardo to do the job. Might go with the Due or another platform. Will have to find out.

Thanks for the tip about the other LCD. I also heard about the multiplexing but will go into research on that topic. Seems doable but again. Has to be a reliable system which may not fail.


fungus

You can get LCDs that only need two wires.

OLED screens are good, too. Much easier to read than LCDs IMHO.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

tkbyd

Quote
You can get LCDs that only need two wires.



... and they are simpler to program. They cost a LITTLE more... but this is a wheel you DON'T have to reinvent, chores you can pay someone else (a little) to Deal With...

http://sheepdogguides.com/arduino/art8lcd117.htm

Your subject... "pin limits" made me think you might be interested in current limits, so, for anyone checking the thread for that, here's a neat little "gotcha"...

Each pin must not be asked to carry more than a certain current.

BUT! Even if you keep the current in every pin below that safe maximum, you can STILL get in trouble if you have too many pins near the per-pin maximum at once. There's a total-current-through pins, too, which is LESS than "number of pins TIMES max per pin"

Grumpy_Mike

Remember you can use the analogue input pins as normal digital I/O.
You can drive the LCD so it only needs 4 data pins instead of 8.
You can add an I2C PCF8574 port expander and drive a regular LCD from those pins as well as driving other stuff from the I2C bus at the same time.

Go Up