Author Topic: Lack of Input Pins  (Read 4291 times)

0 Members and 1 Guest are viewing this topic.

Offline rbtyingTopic starter

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Lack of Input Pins
« on: April 30, 2010, 06:48:59 PM »
I'm currently working on a robot utilizing the Arduino Duemilanove as its microcontroller.  However, I seem to have run out of input/output pins. 

Input:
8 reflectance sensor array
3 sharp 10cm distance sensor
1 sharp analog distance sensor (20 to 150cm)
2 quadrature encoders

Output:
Two motors on an TI SN(something number) motor driver
Pololu Servo Controller

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Lack of Input Pins
« Reply #1 on: April 30, 2010, 06:52:03 PM »
Your question to us is?
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Lack of Input Pins
« Reply #2 on: April 30, 2010, 06:56:49 PM »
Use a demultiplexer for expanded inputs. Shift registers are great for additional outputs.

Offline rbtyingTopic starter

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Lack of Input Pins
« Reply #3 on: April 30, 2010, 08:37:02 PM »
Thanks Razor for the info.  @SmAsH, the question was how to solve the "run out of IO pin" problem. 

EDIT:  I'm looking for something like http://www.sparkfun.com/commerce/product_info.php?products_id=9056 right? 
« Last Edit: April 30, 2010, 08:39:03 PM by rbtying »

Offline corrado33

  • Supreme Robot
  • *****
  • Posts: 611
  • Helpful? 11
Re: Lack of Input Pins
« Reply #4 on: April 30, 2010, 09:28:39 PM »
Wouldn't it be cheaper either to A. buy a MCU with more inputs, or B. but another one of the same MCU and have them communicate with each other?  MCUs are only a couple of bucks anyway...

This is in my limited experience of course...

Of course, if you already have a board built, and you really do need to simply add more inputs, then I'm sure you can find the right solutions.

Offline rbtyingTopic starter

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Lack of Input Pins
« Reply #5 on: April 30, 2010, 11:59:49 PM »
I'm using an Arduino as the MCU, so adding another ATMega328 would be beyond my experience as of now.  Also, the project board has very little space, and using a decent portion to fit another MCU could prove difficult. 

Another MCU with more inputs would not fit in the Arduino board, causing me to have to buy many of the other parts like the oscillator, capacitors, power regulators, etc etc, therefore not being cost-effective. 

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 32
  • Your success is in your hands.
Re: Lack of Input Pins
« Reply #6 on: May 01, 2010, 12:35:47 AM »
You may switch to this Seeeduino Mega is about the same size as your Arduino but have 70 I/O pins and it cost USD$49.50
and it save your trouble to build demultiplexer or Shift registers.

Seeeduino Mega

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Lack of Input Pins
« Reply #7 on: May 01, 2010, 11:47:36 AM »
Of course, there are better solutions than using bigger/more chips for more stuff. I really need to take a picture of this senior project at my school, it explains it all  :P

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
    • Ro-Bot-X Designs
Re: Lack of Input Pins
« Reply #8 on: May 01, 2010, 12:12:05 PM »
Soon after I started my MiniEric robot using Roboduino I ran out of pins too. So, my first thought was to add another I2C slave board and move some things there. I was surprised how easy it was to do with Arduino, no special coding needed to use the Wire library. Since then, I designed my own board called R-Dev-Ino and I'm using 4 of these boards on my robot. For more info and code take a look here:

http://www.societyofrobots.com/robotforum/index.php?topic=7106.0
http://letsmakerobots.com/node/11353
Check out the uBotino robot controller!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Lack of Input Pins
« Reply #9 on: May 01, 2010, 12:32:27 PM »
Hi,

I'm currently working on a robot utilizing the Arduino Duemilanove as its microcontroller.  However, I seem to have run out of input/output pins. 
You can use PCF 8574 or PCF8575, which is 8 and 16 bit expanders with IIC interface. Each input can be used to generate an interrupt signal if needed.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline rbtyingTopic starter

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Lack of Input Pins
« Reply #10 on: May 01, 2010, 05:12:07 PM »
Thanks everyone for the help, I'll look into the I2C stuff in a week or so, most likely, when I get time after AP tests to learn how to use the I2C protocol.  In the meanwhile, I think I'll just hook up adjacent sensors in the reflectance array in parallel, so it'll only use 4 ports and I'll have a couple extra. 

Offline blackbeard

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: Lack of Input Pins
« Reply #11 on: May 03, 2010, 06:58:01 PM »
Use a demultiplexer for expanded inputs. Shift registers are great for additional outputs.

excuse my ignorance but is there a way to do this whithout a bunch of nand gate latches? preferably a single chip? i know i'll look like an idiot for asking. although having a bunch of logic gate chips on a home soldered breadboard makes the untechnicly inclined think i'm a genious :P
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Lack of Input Pins
« Reply #12 on: May 03, 2010, 07:07:30 PM »
Hi,

Use a demultiplexer for expanded inputs. Shift registers are great for additional outputs.

excuse my ignorance but is there a way to do this whithout a bunch of nand gate latches? preferably a single chip? i know i'll look like an idiot for asking. although having a bunch of logic gate chips on a home soldered breadboard makes the untechnicly inclined think i'm a genious :P
See:
http://www.societyofrobots.com/robotforum/index.php?topic=11040.msg83793#msg83793
for a better solution.

Shift regs can be used as a sort of mux/demux, for bidirectional lines, but the IIC chips are easier to use and takes a lot less real estate.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: Lack of Input Pins
« Reply #13 on: May 04, 2010, 08:34:36 PM »
You *know* you just want to buy an Axon, hehe :P

Offline Cristi_Neagu

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 5
Re: Lack of Input Pins
« Reply #14 on: May 04, 2010, 09:46:28 PM »
You *know* you just want to buy an Axon, hehe :P

I know i did  :P
I'm building a robot arm using an Axon I, and after connecting everything to it, i only have 4 I/O pins free (except UART). But i did connect a lot of stuff to it....

 

SMF spam blocked by CleanTalk