Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: rbtying 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
-
Your question to us is?
-
Use a demultiplexer for expanded inputs. Shift registers are great for additional outputs.
-
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 (http://www.sparkfun.com/commerce/product_info.php?products_id=9056) right?
-
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.
-
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.
-
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.
(http://www.seeedstudio.com/depot/images/product/smega5.jpg)
Seeeduino Mega (http://www.seeedstudio.com/depot/seeeduino-mega-fully-assembled-p-438.html?cPath=27&zenid=20f426dd5a31f5d7eace8113a7866fde)
-
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
-
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://www.societyofrobots.com/robotforum/index.php?topic=7106.0)
http://letsmakerobots.com/node/11353 (http://letsmakerobots.com/node/11353)
-
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.
-
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.
-
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
-
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 (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.
-
You *know* you just want to buy an Axon, hehe :P
-
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....