Arduino Forum

Forum 2005-2010 (read only) => General => Exhibition => Topic started by: macegr on Nov 08, 2009, 10:26 am

Title: Centipede Shield - also a contest!
Post by: macegr on Nov 08, 2009, 10:26 am
Finally put together a prototype of a board idea I've had kicking around for a while:

(http://farm3.static.flickr.com/2493/4084551286_c3d289a30c_m.jpg) (http://flickr.com/photos/macetech/4084551286/in/photostream)

(http://farm3.static.flickr.com/2573/4084880398_cc349acfa6_m.jpg) (http://flickr.com/photos/macetech/4084880398/in/photostream)

(http://farm3.static.flickr.com/2791/4084771807_f969869650_m.jpg) (http://flickr.com/photos/macetech/4084771807/in/photostream)

It provides 64 bidirectional I/O using I2C on analog 4 and 5...you can have 64 outputs, or 64 inputs, or any mix of the two. There are programmable pullups, bitmasks, and other functions. The I/O are wired to 2x10 headers, with a ground channel and a common channel that can be wired to a custom voltage. The chips themselves can also be switched over to an external power source. This might be necessary if the attached circuits will drain more power than the Arduino can supply.

The funny thing is that while this board seems pretty useful, I don't have an immediate application for it. I can make a few more prototype shields, but probably won't want to sell those directly. However, here's an idea!

If you have an existing, immediate use for this shield, please post your idea below by Friday, November 13th, 2009. I'll pick two ideas that I like, and contact the winners in PM to get a shipping address and send you a free Centipede Shield and operating instructions.

I'll be looking for ideas that are exciting and/or very useful, are something you plan to build immediately, are described in excellent detail, exhibit your knowledge and ability to complete the project, are accompanied by any necessary diagrams, and written in a readable manner.

Basically, impress me.

If I get only one suitable entry by the 13th, I'll go ahead and announce that winner, and extend the contest by another week for the second shield.

Feel free to spend time on your idea...this isn't a first-post contest. Any entry posted up to the 13th will be considered equally.

Please keep the entire entry in this forum, not sent via private message, or written on another site and linked here. Thanks!
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 08, 2009, 11:53 am
Hi

What is the price of this going to be?

Are you aware that you have competition already from the new MUXshield which also has lots of i/o pins (only 48 but when are you going to need 64?) and it is also stackable.

http://mayhewlabs.com/arduino-mux-shield

Why did you chose male instead of female headers? Is there a specific cable you can buy cheap for that size? I think that it would be good to have an option, so it can be used for quick prototyping or more permanent installation like yours would be best for at the moment.

I have a project though, more info about that later :D

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Nov 08, 2009, 01:11 pm
Haven't worked out pricing but aiming for the sub-$20 range.

I saw the MUXshield pop up a while ago but didn't even really associate it with the Centipede Shield, they do totally different things. The Centipede Shield is just good old true bidirectional I/O while the MUXshield is...a MUX, not surprisingly. The Centipede Shield is useless for analog and in fact steals two of the Arduino's analog inputs, while the MUXshield is insanely useful for expanding the possible analog inputs. However the MUXshield is not too hot with digital I/O, since you can't just tell an output to be a certain value and have it stay at that level. The Centipede Shield is fire and forget, no multiplexing or strobing. It's more like a row of shift registers, except you can set input pins and software pullups and do interrupts on a pin change, etc.

So you see the two shields are very different and will probably be used for different things, and therefore not "competition."

I'm not planning to supply the shield with headers installed, but the plan is to use 2x10 IDC headers and ribbon cable to make it very easy to break out all the connections to external devices.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 08, 2009, 01:26 pm
Ok, yes sorry.

I see, indeed they are completely different products and that pricing sounds good.

Gives me a reason to buy your board as well :D

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: tep on Nov 08, 2009, 03:55 pm
Hi!

So if I understand, you can set the number of pins you want as input and outputs, analog or digital? I mean like an Arduino pin?

If yes, I would be interested (especially at that price!) !
Thats the limit of a mux, the 16 pins have all to have to be input or output.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 08, 2009, 04:08 pm
Quote
The Centipede Shield is useless for analog


This is where the mux shield comes in:

Quote
48 analog inputs/digital inputs/digital outputs (in combination)


Because there are 3 chips you can have some input and some output and some analog/digital etc but you can't have all but 3 digital or something as I understand it.

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: pcairic on Nov 08, 2009, 05:43 pm
Hi!

The Centipede Shield would be perfect for my project!

I am trying to build a clock with two bi-color 8x8 led matrices.
It doesn't seem very original, until I tell you that the matrix is covered with a black film with the shape of a letter on each led.
The letters compose words and tell you the time in text.

The idea came with the World Clock Arduino version on Instructables (sorry, not allowed to post a link yet), only my solution is more compact (letters are reused between words) and hopefully more colorful :)

I created two different films, one in English and the other in French (I am a true Canadian, what can I say ;D)

Alas I need at least 40 I/O's and that's without the RTC chip or the buttons...
Title: Re: Centipede Shield - also a contest!
Post by: zhanx on Nov 08, 2009, 06:28 pm
i could use this for my 8 legged freak (octopod robot) to add all the sensors i want for everything.

Wind speed.
Whiskers
Contact sensors for each of the 3 joints in all 8 legs.
Foot Sensors

the list goes on. I am trying to put as many sensors on a robot as the arduino can handle  ;D
Title: Re: Centipede Shield - also a contest!
Post by: ubuntuguru on Nov 08, 2009, 08:31 pm
I'm working on making a robotic lawnmower to mow my lawn.  It will require many sensors to navigate correctly without causing havoc.  I think this will help me on my project to provide the input that will be needed.  
Title: Re: Centipede Shield - also a contest!
Post by: The_Bongmaster on Nov 08, 2009, 08:51 pm
this sounds a good board for a midi keyboard idea i am working on :)
Title: Re: Centipede Shield - also a contest!
Post by: rupin.chheda on Nov 08, 2009, 09:21 pm
Hi,
I have a project which I am currently working on, wherein it requires me to test a cable with 60 pins on either side for connectivity.
The current process of testing involves 2 people using a multimeter to test each pin one after the other.The problem is , the wires within the cable can be broken at either end, or can be shorted on the same side to each other.I have already programmatically created about 2000 test cases for each side of the cable.
The solution for this is simple, there is a box kinda thing with opposite connectors and LED's on both side, the attendent who is testing connects the cable, and runs the test.There are a few status LED's that denote cable good/no good
This solution reduces the amount of time it takes to make and quality test a single cable by about 60%(calculated)
.
Rupin

Title: Re: Centipede Shield - also a contest!
Post by: error32 on Nov 08, 2009, 10:03 pm
I would imagine this could be a handy shield if you'd like to build a big led cube, maybe even using rgb LEDs. Though that would be a bit more tough to have a pwm like way to control the exact colors.
Title: Re: Centipede Shield - also a contest!
Post by: gianteye on Nov 08, 2009, 10:06 pm
I'm actually working on a project called the Anywhere Organ. The idea is to create a mobile, modular pipe organ that can stealthily be set up in any building/park/alley/office foyer turning the space into a giant musical instrument.

I'm buying up old organ pipes off of ebay and was planning on using an arduino multiplexed to deliver outputs to the solenoid valves that deliver air to the pipes. Having access to 60 I/O pins would be incredible.
Title: Re: Centipede Shield - also a contest!
Post by: tep on Nov 08, 2009, 10:36 pm
Hi!

Thanks for the reply. I understand that it is only digital, and that's ok like this!

I'm working on a OSC-I2C "router" for creating easily OSC/MIDI interfaces.
Easily means:
- Standard parts, just have some extensions the number you need and set them up via a DIP-Switches.
- Standard code
- Advanced settings via Ethernet

64 I/O? That would be... the standard extension for a 16 Pad matrix with RGB Leds!

:)
Title: Re: Centipede Shield - also a contest!
Post by: kokuma on Nov 09, 2009, 12:00 am
I'm developing some kind of musical instrument for a friend who sings in a band and now wants to play a "soundless" instrument. It uses twelve keys (push-buttons), each one lightens up a shiftbrite, and you can have as many keys pressed as you like. Also, there is a special button which allows to change the colour set, so with 13 buttons + 4 outputs for the Shiftbrite strip. A centipede shield would let me add more keys (another octave) and also control a couple of 7-segment displays to show the current scene. Also... it may be the push I need to add MIDI to the soundless instrument.

(http://farm3.static.flickr.com/2645/4086933067_7e47a6dcc7.jpg)
Title: Re: Centipede Shield - also a contest!
Post by: kyndal on Nov 09, 2009, 12:53 am
i'm working on a multifunction Alarm system
that needs a loot of  I/O

"HID"
2x   keypad.LCD,Speaker,key,RFID type "door units"
      Separate micro  "Serial protocol"

1x   www, email, IM, text message  
     alarm indication and remote control interface "Serial protocol"
     Embedded linux,  "dd-wrt, NSLU2"  

"Inputs"
16x window sensors
4x   glass break sensors (analog piezos)
4x   PIR motion sensors (on/off)
4x   Smoke/Fire alarm inputs (on/off)
1x   powerfailure sense  (Tamper, Fridge, freezer )
      (on/off maby analog Temp)
2x   "Guest" "door bell"  zones (mailbox and driveway visitor sensors)

"outputs"
2x   outdoor siren, Beacon light (on/off)
2x   indoor alarm siren (on/off)
4x   indoor lights interface (on/off)
2x   outdoor floodlight  (on/off)
1x  SD-Card  for Storage of "event log"  

All of the units need a "TAMPER" sensor, but this can be as simple as just one wire through them all in serial (if broken)

interface to camera server (unknown.  Rs232?)


so yea.. looks like i need Some additional I/O's for the Arduino.
or maby just something bigger ;)

Title: Re: Centipede Shield - also a contest!
Post by: acw1990 on Nov 09, 2009, 03:36 am
im working on a project for a friend. what i call a "magic" hallway. using a sonar sensor, many pir sensors and a ton of led lights.  as one walks through the hallway, the light follows them. get brighter as they get closer and the gradually dimishes as the move away from the light. funny, i was looking into i2c protocol for this project, and then you come out with a shield that would be perfect
Title: Re: Centipede Shield - also a contest!
Post by: sterling976 on Nov 09, 2009, 04:03 am
I'm working on building a custom control interface for a model train set my dad is building.  He's gotten pretty ambitious with the track layout, and I know I'm going to need more than 20 i/o pins on the arduino for all the electrical elements I'm going to have to control.

Essentially, we're going to be using multiple arduinos (or maybe just one with a centipede shield) communicating with a touchscreen UI running on some sort of embedded device to control all of the track elements (turnouts, forward/reverse, engine speed, turntables, sound effects), lighting effects (buildings and such), and some safety systems (the layout includes a couple turnaround loops and it's conceivable we'd have two trains on the same loop at the same time - the arduino could shut down an entire loop automatically if it detects a problem).

I originally submitted this for the Nokia n900 push project.  Sadly, it was rejected.  We're moving forward with the build, though.  I'm probably going to re-purpose a TI Beagleboard for the user interface, since it's silent and the serial USB connection with the arduino should be trivial to set up.  Either that or a Nokia N810 or a Pandora handheld -- haven't decided which one I think I can spare yet.  :D

Some of the technical considerations for this project can be reviewed at rootaction.net/~boltonc/train.pdf  Ignore the prototype track; we're skipping that step and working directly with the final track layout.

We're also looking into what kind of stepper motor we would need to build our own custom turn-table, and whether it would be more cost-effective than purchasing one at retail.

The project is long-term, but is already under way.  We finished building the table top this afternoon.  It's sectional in 6 pieces since the overall layout is 10x12 feet.  We'll be getting together in another week or two to finish the structural build (assemble legs and casters on each section and bolt them together), after which we'll be working independently; he'll lay the track while I start prototyping circuits.  It'll take us a month or two before we're ready to put it all together.  I'm not sure if that meets your requirement for 'something plan to build immediately' or not, but I do know the centipede shield will save me some coding and cash.

Even if you don't decide to throw a freebie my way, I'm interested in purchasing one when you're ready to start selling them.  Do you know yet when that might be and/or where you'll make them available?
Title: Re: Centipede Shield - also a contest!
Post by: frollard on Nov 09, 2009, 04:32 am
I would like to interface with a relay board - probably dead-bug style - to switch line current to many several channels of animated christmas lights.

I foresee needing near 50 channels to have a truly explosive experience.  So far my plan involves using shift registers - which I'm quite comfortable with working on, but this board would simplify things greatly...That, or I pick up an arduino mega.

Then it's just a matter of writing sync software.
Title: Re: Centipede Shield - also a contest!
Post by: grindinonyourmom on Nov 09, 2009, 05:58 am
ok macegr,
heres my idea.  I want to make a cheap and fast motor control system for robotics.  something like the sony aibo used to use...1 brain with tons of sensor in and coordinated servo control with balance...something that stabilizes my robotics platforms as a standard.  then others can implement my code base and control system for their robots.  If every one of us makin robots has to teach them all how to balance and self correct, this will take forever.  If i make a fast atmega328 program and a custom app for motor control,  i can create a standard kit for robotics platforms that is cheap and EASY....so hook me up bro... i need that shield for some serious I/O.  awaiting that PM.  Legion.
Title: Re: Centipede Shield - also a contest!
Post by: efluon on Nov 09, 2009, 02:31 pm
great! this will make it easy for me to build a (hardly original nowadays) stepsequencer for drums. sort of like monome but 4 rows with 16 steps (using something like the sparkfun 4x4 button pads (not allowed to post that here)). there will be 16 rotary encoders, how to use them is something i'll still have to figure out for myself, but i guess it should even be possible using two of these shields!
Title: Re: Centipede Shield - also a contest!
Post by: gabrielebellini on Nov 09, 2009, 03:05 pm
This shield could be ideal for a fancy wall mounted analog clock: 60 outputs which drive 60 leds (for example, high brightness, white leds). One led for each minute (6 degrees), closing the circle. Leds are soldered in order to project each light beam almost parallel to the wall surface (it's preferable to use very narrow beam leds).
The project is very, very simple, since the software must basically drive in a very clever manner 60 different outputs (2 pushbutton inputs for time setting and/or IR input to do the same job).
The hardware part is also quite simple: if we don't want to rely on Arduino clock settings, we only need to add an RTC to the Arduino in order to keep the time as stable as possible. For the code, it's up to our fantasy to find a way to display the time. Some ideas:
1. All leds are powered off except led (or group of 2, 3, 4 or more) to show the hour; slow blinking led (or group) to show the minutes and optionally fast blinking led (leds) to show seconds;
2. All leds are powered on (pay attention to maximum sink/source current from IC) and 2 different blinking rates to show hours and minutes: this way the clock could be used also as  a very original wall mounted lamp/clock!
3. More ideas, please! (consider that you can find other purposes for this gadget, not only a clock, but: countdown timer, analog thermometer, vu-meter, whichever-physic-environmental-variable-meter...)
Title: Re: Centipede Shield - also a contest!
Post by: tomihofmann on Nov 09, 2009, 07:30 pm
Hi!

I find this perfect for application in driving all the indicators and switches on the overhead panel of a home-built flight simulator for a B373-700 airplane.

Usually you need to run a rats nest (hundreds) of cables to the IO board located elsewhere in the electronics bay.

Using this, with a local power supply, a simple two or three wire cable is all that is needed

All the best
Tom
Title: Re: Centipede Shield - also a contest!
Post by: sburlappp on Nov 09, 2009, 08:55 pm
I have an old electric-air-blower-powered organ, with several octaves and a chord section, which works by opening/closing holes in a large box (picture a saxophone's key mechanisms).

I'd like to retrofit it with lots of solenoids for pushing the buttons, and interface it to MIDI via an Arduino.

Your Centipede Shield should provide enough outputs to do it right, with a few pins left over for control buttons and an LCD display!
Title: Re: Centipede Shield - also a contest!
Post by: zzz_tek on Nov 10, 2009, 03:31 am
I am going to be building a custom EEG/EMG monitor. I need multiple channels so I can monitor the electrical activity of various areas of the brain and muscles I'm studying.

This many I/O inputs would allow me to increase my ability to monitor and interpret the electrical impulses from a variety of sources at the same time.
Title: Re: Centipede Shield - also a contest!
Post by: tomas on Nov 10, 2009, 04:11 pm
I had an idea for a "distributed production" alphanumeric electronic demonstration sign. the idea is demonstrators get a kit in the mail containing precut led strips and wire, and construct a 2X4 foot 14-segment alphanumeric 1-character sign. the wires all go out to a plug at the bottom. Now - one guy comes out with the same sign, but he also has the control board - arduino+centipede, to control all 5 signs (incl. power supply and switching with uln2003) , and end up with a 5-letter, 10X4 foot electronic sign! I know this does not make use of the input and only uses the centipede as an output expansion, and I know that for the same price I can almost get an arduino mega (which is good for 4 1-letter signs) , but I still want it!
I also discussed this with some guys from graffiti research lab (google it) and they were cautiously interested.

diagram will be up soon. thanks for reading!


Title: Re: Centipede Shield - also a contest!
Post by: sburlappp on Nov 10, 2009, 05:09 pm
Tomas: This won't help you in the contest, but you may want to suggest it to the GRL gang....

Instead of LED signs and lots of wires, put the 14-segment displays on the backs of jackets, using EL wire, powered by batteries, uniquely labeled with a QR code patch on the front (where it's harder to see mid-demo), and control it though an iPhone app. Once enough of these are floating around, you could do impromptu flash-mob signage.
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Nov 11, 2009, 05:15 am
Lots of good ideas so far, glad so many of you think this might work for your projects.

Based on the entries so far, I want to clarify a few things.

PWM may be possible, but probably not too accurate over I2C. I would say that if you're controlling LEDs, you should plan to just have them either on or off. The same goes for LED matrix driving...it could work, but there are probably better and more reliable ways.

Since these are general purpose I/O, I'd like to see at least some mixing of functions. Input-only and output-only are valid uses for this board, but don't exploit any advantages this would have over some shift registers.

I am also paying a lot of attention to how the entries are written, and really appreciate the ones with full details and examples of what you've already done to work on the project. From these posts, it's pretty easy to tell when someone knows what they're doing, and has the ability and motivation to follow through. I would really like to get feedback on these and not have them sit on a shelf until the Arduino is obsolete. If any of you want to expand on your project a little more, that's fine. Feel free to post more details, as long as you get them in by Friday the 13th they'll be included in the overall decision.

Thanks to everyone so far....
Title: Re: Centipede Shield - also a contest!
Post by: zhanx on Nov 11, 2009, 06:54 am
Consider mine withdrawn.

I needed more I/O which the Centipede could give me

But i also need more room for my program so i am upgrading to the Maple (http://leaflabs.com/Maple)

and that will give me the I/O needed also. But if i need more i can add your board on later.
Title: Re: Centipede Shield - also a contest!
Post by: overqloker on Nov 11, 2009, 09:19 pm
i'm intending to make a hologram generator using the pesistence of vision concept.

its going to consist of two 256x256 RGB matrices (think big, might get at least a small part of it right  ;) ) mounted on a axel (1800rpm+) as shown in a rough top down sketch.....(gimp is not a friendly alternative to MSpaint, but i not complaining  :-/ )

i intend it to show 3D renders at 30fps min when complete.... so i guess the shift register nature of the centipede wil be useful...

[edit] sketch after break...
Title: Re: Centipede Shield - also a contest!
Post by: overqloker on Nov 11, 2009, 09:20 pm
(http://img266.imageshack.us/img266/6509/topdown.gif)
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Nov 12, 2009, 08:45 am
To make it easier to understand what's going on, I created a simple library for the Centipede Shield. It could also be used as-is to control any MCP23017 chip. Right now it makes the Centipede I/O work like the normal Arduino I/O. More specialized functions are not implemented yet.

Download zipped library here (http://macetech.com/Centipede.zip)


Example code using the Centipede library:
Code: [Select]
// Example code for Centipede Library
// Works with Centipede Shield or MCP23017 on Arduino I2C port

#include <Wire.h>
#include <Centipede.h>

/* Available commands
 .digitalWrite([0...63], [LOW...HIGH]) - Acts like normal digitalWrite
 .digitalRead([0...63]) - Acts like normal digitalRead
 .pinMode([0...63], [INPUT...OUTPUT]) - Acts like normal pinMode
 .portWrite([0...3], [0...65535]) - Writes 16-bit value to one port (device)
 .portRead([0...3]) - Reads 16-bit value from one port (device)
 .portMode([0...3], [0...65535]) - Write I/O mask to one port (device)
 .init() - Sets all register to initial values

 Examples
 CS.init();
 CS.pinMode(0,OUTPUT);
 CS.digitalWrite(0, HIGH);
 int recpin = CS.digitalRead(0);
 CS.portMode(0, 0b0111111001111110);
 CS.portWrite(0, 0b1000000110000001);
 int recport = CS.portRead(0);
*/

Centipede CS; // create Centipede object

void setup()
{
 Wire.begin(); // start I2C

 CS.initialize(); // set all register to default

 CS.portMode(0, 0b0000000000000000); // set all pins on port 0 to output

}


void loop()
{
 
 CS.digitalWrite(0, HIGH); // write A0 high
 CS.digitalWrite(15, LOW); // write B7 low
 delay(150);
 
 CS.digitalWrite(0, LOW); // write A0 low
 CS.digitalWrite(15, HIGH); // write B7 high
 delay(150);
 
}


Centipede.h:
Code: [Select]
// Centipede Shield Library
// Controls MCP23017 16-bit digital I/O chips

#ifndef Centipede_h
#define Centipede_h

#include "WProgram.h"

extern uint8_t CSDataArray[2];

class Centipede
{
     public:
                 Centipede();
           void pinMode(int pin, int mode);
           void digitalWrite(int pin, int level);
           int digitalRead(int pin);
           void portMode(int port, int value);
           void portWrite(int port, int value);
           int portRead(int port);
           void initialize();
     private:
           void WriteRegisters(int port, int startregister, int quantity);
           void ReadRegisters(int port, int startregister, int quantity);
           void WriteRegisterPin(int port, int regpin, int subregister, int level);
};

#endif


Centipede.cpp:
Code: [Select]
// Centipede Shield Library
// Controls MCP23017 16-bit digital I/O chips

#include "WProgram.h"
#include "Centipede.h"
#include <Wire.h>

uint8_t CSDataArray[2] = {0};

#define CSAddress 0b0100000


Centipede::Centipede()
{
 // no constructor tasks yet
}

// Set device to default values
void Centipede::initialize()
{

 for (int j = 0; j < 4; j++) {

   CSDataArray[0] = 255;
   CSDataArray[1] = 255;

   WriteRegisters(0, 0x00, 2);

   CSDataArray[0] = 0;
   CSDataArray[1] = 0;

   for (int k = 2; k < 0x15; k+=2) {
     WriteRegisters(j, k, 2);
   }

 }

}


void Centipede::WriteRegisters(int port, int startregister, int quantity) {

 Wire.beginTransmission(CSAddress + port);
   Wire.send(startregister);
   for (int i = 0; i < quantity; i++) {
     Wire.send(CSDataArray[i]);
   }
 Wire.endTransmission();

}

void Centipede::ReadRegisters(int port, int startregister, int quantity) {

 Wire.beginTransmission(CSAddress + port);
   Wire.send(startregister);
 Wire.endTransmission();
 Wire.requestFrom(CSAddress + port, quantity);
 for (int i = 0; i < quantity; i++) {
   CSDataArray[i] = Wire.receive();
 }

}


void Centipede::WriteRegisterPin(int port, int regpin, int subregister, int level) {

 ReadRegisters(port, subregister, 1);
 
 if (level == 0) {
   CSDataArray[0] &= ~(1 << regpin);
 }
 else {
   CSDataArray[0] |= (1 << regpin);
 }
 
 WriteRegisters(port, subregister, 1);
 
}

void Centipede::pinMode(int pin, int mode) {
 
 int port = pin >> 4;
 int subregister = (pin & 8) >> 3;

 int regpin = pin - ((port << 1) + subregister)*8;

 WriteRegisterPin(port, regpin, subregister, mode ^ 1);
 
}

void Centipede::digitalWrite(int pin, int level) {
 
 int port = pin >> 4;
 int subregister = (pin & 8) >> 3;

 int regpin = pin - ((port << 1) + subregister)*8;

 WriteRegisterPin(port, regpin, 0x12 + subregister, level);
 
}

int Centipede::digitalRead(int pin) {

 int port = pin >> 4;
 int subregister = (pin & 8) >> 3;

 ReadRegisters(port, 0x12 + subregister, 1);

 int returnval = (CSDataArray[0] >> (pin - ((port << 1) + subregister)*8)) & 1;

 return returnval;

}

void Centipede::portMode(int port, int value) {
 
 CSDataArray[0] = value;
 CSDataArray[1] = value>>8;
 
 WriteRegisters(port, 0x00, 2);
 
}

void Centipede::portWrite(int port, int value) {
 
 CSDataArray[0] = value;
 CSDataArray[1] = value>>8;
 
 WriteRegisters(port, 0x12, 2);
 
}

int Centipede::portRead(int port) {

 ReadRegisters(port, 0x12, 2);

 int receivedval = CSDataArray[0];
 receivedval |= CSDataArray[1] << 8;

 return receivedval;  

}
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 12, 2009, 03:28 pm
It does look very simple to control things with.

Now my project.

I am doing a visualiser with the lasers I recently bought off ebay and a load of solenoids.

The lasers are pointed in a line and hinged at one end so that they can move the laser point up and down. They are all sprung so they move back into a line if moved. When audio is inputted, it is analysed and causes solenoids to strike under the lasers, bouncing the laser up, creating an upwards series of lines on the wall/surface.

This will also be implemented with a number of pots (into arduino analog pins) and a load of push buttons for creating your own midi music and altering sounds, settings etc. and of course a load of LEDs for good measure. :D

And another project:

I am looking to sync a load of led bargraph modules (the ones with loads of led bars) for a number of projects, I would like to use some for a visualiser, displays for monitoring my pc (CPU usage, temp, hard drive usage, net download speed etc).

A giant led matrix is something everyone wants to do so I am looking to do one of those as well. Would I need transistors on each line? What is the max current on each pin?

I basically think it would be an infinitely useful board for a whole load of projects.

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Nov 13, 2009, 07:15 am
Liking a lot of the entries so far, but it's still anybody's game...you've got all day tomorrow to post your idea and possibly get a free Centipede Shield!
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 13, 2009, 10:32 pm
I now have another project I would like to use it for:

I am currently in the process of making an iron man suit for children in need (next friday). Due to not thinking of it sooner I am only currently doing the arc reactor and one arm with repulsor/fight stabiliser (lack of time to do more). Afterwards, I would like to make more of it, a second arm, the boots... (all of the internals, not the main body shell) but will run out of i/o pins of the arduino for solenoids/servos/leds etc.

I will be posting up pictures of the arm and arc reactor on the forums in the next week so keep a look out for them! :D

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: The_Bongmaster on Nov 14, 2009, 04:04 pm
well just to elaborate on mine.

I plan to build a midi controller keyboard with more than one octave, probably a full set, and have controls on it like pitch and such on an analogue stick.

the main thing will be the inputs for all the keys, but also led playback on the keys from the pc.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 14, 2009, 04:25 pm
Cheat !  ;D

The contest has finished now...

Who has won? :D

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: grindinonyourmom on Nov 15, 2009, 03:37 am
ok macegr,

i want to make a self balancing robotics platform.  something where i have two legs, sensors for input of gravity/force/tilt/intertia/IR/Vision/Encoder positioning and output motor control for servos or linear actuators.  With the arduino, it would be simple to load different libraries for 2 legs or 4 or hexapod walkers, but we would be able to add enough sensor IO for the system to co-ordinate and 'evolve' a better balance then could be programmed.  Same for walking gates. routines could be loaded and tuned from live sensor data.  Once this is done, it can become a small standarized system for robotics rollouts whether it be with wheels or legs or a virtual body.  they key is plenty of IO channels and some efficient slick coding.  I hope this expansion of details explains a little better what i want to do.
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Nov 16, 2009, 01:51 am
Just an update: checking through all the entries and will be announcing the winners soon!
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 16, 2009, 11:54 am
Sounds good :D

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: tep on Nov 17, 2009, 08:08 pm
macegr, it seems that you got into some trouble, did you connect the ground?
Title: Winners!
Post by: macegr on Nov 18, 2009, 08:20 am
This was really tough to judge...there were a lot of great project ideas! I really would have liked to give out more Centipede Shields, but I just don't have many prototypes yet. I'll send PMs to the winners asking for address information. They'll receive a Centipede Shield without the Arduino headers or 20-pin connectors soldered in place, but will have the headers available if they need them.

Winners:

Rupin
He didn't have as much to say about his project, but it's a pretty straightforward problem. A cable with 60 pins...how do you test each wire for continuity along the cable, and possible shorts between each conductor? A lot of time with a multimeter, or a device that can pass current through each of the 60 pins in turn, and watch all the others for suspicious activity. You need a LOT of general purpose I/O, which means the Centipede Shield is the perfect way to build a test rig for these cables.

_Sterling
The train project idea is great...lots of sensors and things to control, and model train layouts can change a lot over time. It's good to have a controller that can be reconfigured to any mix of inputs and outputs necessary. I'll keep an eye out for this project, sounds like a lot of fun!


Honorable Mention:

Giant Eye
kokuma
kyndal
mowcius

These users all had projects that made it hard to choose the two winners above...if I had more Centipede Shields to give out, you would all get one! Sorry you didn't make it...however, you can still use the Centipede Library above, and rig up something with the DIP version of the MCP23017 on a proto shield.

Thanks to everyone who participated! I may be running another couple contests for other prototypes very soon. One will be very interesting to you LED types, and another will give you wireless junkies the blues.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 18, 2009, 12:15 pm
Sounds good! I will be purchading one then as I unfortunately didn't win but they were good projects that made the top!

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: tep on Nov 18, 2009, 12:23 pm
Congrats to the winners!
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Nov 21, 2009, 03:56 am
I haven't yet received responses to my private message to the two winners. If you read this, please check your PMs and send me your shipping addresses!

If I don't hear back by November 27th I will select new winners from the existing entries.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 21, 2009, 10:06 am
I'm still in luck then :D lol
Title: Re: Centipede Shield - also a contest!
Post by: vputz on Nov 22, 2009, 01:41 pm
Say--I'm a bit slow on this, but do I understand right that this would allow for 64 buttons to be read basically simultaneously, as well as leaving a few analog I/O pins available?  I ask because I'm interested in rewiring a few of the old Thrustmaster FLCS/TQS/Rudder pedals, which would require 6 axes and (count, count) gosh, 30-40 buttons, and I'm trying to figure a way to do it all.  I was looking at shift registers, but I'm not sure how well that will work.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 22, 2009, 02:20 pm
Umm, yeah just about.

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 23, 2009, 03:56 pm
Have the boards being claimed yet? I'm looking forward to seeing those projects  :D

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: gianteye on Nov 27, 2009, 02:28 pm
Let me know if they ever go on sale. I think there'd be a decent market for 'em.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 27, 2009, 07:45 pm
Yeah I am waiting for them :D

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Nov 29, 2009, 10:57 am
Sorry for the delay everyone...the winners I chose never responded to their private messages. I apologize that the new winners had to wait so long for this to come to a conclusion.

New winners:

mowcius
Submitted several project ideas, any of which will work with the Centipede Shield. Leans a bit toward the output-only side of things, but I think mowcius will find some good uses.

kokuma
The musical instrument idea looks really interesting, and could require a lot of inputs and outputs. Definitely looking forward to seeing what this project looks like!

I am sending PMs to the two new winners to request shipping information.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Nov 29, 2009, 05:44 pm
Yeah :D

I will be documenting all my projects with it on my website (when I eventually get it online!)

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: zhanx on Dec 18, 2009, 12:04 pm
You thinking about selling these? guess i am gonna need one after all for my robot... what fun. And this might be a bit cheaper than making one myself.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Dec 18, 2009, 07:08 pm
Has this been sent off yet? I am eagerly waiting for a play with it. My lasers have arrived now. I will have 40 in a few weeks, fun fun!

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Dec 19, 2009, 12:55 am
It should be there already, but with the holiday shipping delays it might be held up. Let me know when you get it...
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Dec 19, 2009, 08:21 pm
Ok brilliant. Yeah everything has been slow recently and that was before we had all the snow!

It'll be sliding its way towards me no doubt  :P

Meanwhile, i've been out on my mountain unicycle in the snow :D

Mowcius

Title: Re: Centipede Shield - also a contest!
Post by: kokuma on Dec 20, 2009, 06:33 pm
My centipede shield arrived three days ago. It's great!
(http://img685.imageshack.us/img685/5600/centipede.jpg)
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Dec 20, 2009, 08:44 pm
Arghh, I want mine! :P

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Jan 01, 2010, 11:49 pm
Did your Centipede shield ever get there, mowcius?
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Jan 01, 2010, 11:52 pm
Still waiting, it was after another package that I am still waiting for that you sent it. My package before that was delayed by about 2 1/2 weeks and royal mail still has a backlog in inports as far as I know. Either that or some serious issue somewhere, anyway hopefully it'll come soon!

I have learnt to be patient recently!  ;)

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Jan 06, 2010, 08:53 pm
Hehe, mine has arrived  ;), and it's brilliant!

(http://farm5.static.flickr.com/4006/4251180027_818208fbf4.jpg)
(http://farm5.static.flickr.com/4016/4251181667_711e5759e7.jpg)

More pictures here:
http://www.flickr.com/photos/mowcius/sets/72157623154190142/

As you can see from the pictures, I used a double right angle socket on the end double row of pins to make it easier for prototyping, especially if it is used in a stack. This can still be used with a cable by using the double pin row as an 'adaptor'.

Just about to try some stuff with it now!  8-)

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Jan 06, 2010, 10:36 pm
It is brilliant but I cannot get it working...

I uploaded the example sketch and nothing...

I tried just running the setup and lighting up LED 13 (on the arduino) in the loop code but it doesn't seem to get to that code...

Anyone got any ideas?

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Jan 06, 2010, 10:50 pm
You installed the Centipede library from here: http://macetech.com/Centipede.zip

And ran the example code from here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257672398/31#31

And nothing?

Do make sure you have a connection between pins 1 and 2 on the PWR jumper...

Are you saying that normal Arduino functions aren't working too?

What Arduino and IDE version are you using right now?
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Jan 06, 2010, 10:57 pm
Normal arduino code is working...
I am running arduino 17
I have downloaded the library and tried your example code.

If I run this:
Code: [Select]
#include <Wire.h>
#include <Centipede.h>

Centipede CS; // create Centipede object
int ledPin = 13;

void setup()
{
 Wire.begin(); // start I2C
 pinMode(ledPin, OUTPUT);
 CS.initialize();
}


void loop()
{
 digitalWrite(ledPin, HIGH);   // set the LED on
 delay(1000);                  // wait for a second
 digitalWrite(ledPin, LOW);    // set the LED off
 delay(1000);                  // wait for a second
}

Then it stalls on the CS.initialize();

if I run it without the CS.initialize(); then I get LED flashy as would be expected...

Chip 1 looked like two or three of the bottom right pins were connected together upon closer inspection of the board. I used a very sharp knife to make sure that none of them are but still no joy to be found. Could it be that that caused some problem to start with and now the chips are bust?

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Jan 06, 2010, 11:18 pm
Nope those are address pins, they are all supposed to be tied together to ground on IC1. If you did manage to separate them, you might want to bridge them together again.

I'm mostly confused with the stalling at CS.initialize(), it really sounds like a software problem at this point. I'll do some more testing tonight.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Jan 07, 2010, 12:11 pm
Any luck? I have not had time to fiddle with the library, is there a way I can check each chip by code?

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Jan 12, 2010, 08:56 pm
The only way I can get the Arduino to freeze during execution is to pull one of the I2C lines to ground. You should carefully check along the I2C lines and make sure nothing is shorted to ground, maybe use a multimeter to verify. The I2C connections are on the bottom left corner of the chip if you look at it with pin 1 on the top left.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Jan 12, 2010, 09:02 pm
Quote
The only way I can get the Arduino to freeze during execution is to pull one of the I2C lines to ground. You should carefully check along the I2C lines and make sure nothing is shorted to ground, maybe use a multimeter to verify. The I2C connections are on the bottom left corner of the chip if you look at it with pin 1 on the top left.

Which way round is the board then?
Chips on the bottom and headers above?

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: macegr on Jan 12, 2010, 10:06 pm
It's easier to identify pin 1 on the chips as the pin nearest the dimple. In your photos I appear to have soldered the chips in the correct orientation, though there may be a solder bridge somewhere. It couldn't hurt to run a soldering iron on the chip leads again.
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Jan 12, 2010, 10:11 pm
Ok, yes I will check all that and report back with an update when I have done that.

Thanks,

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: SoCentral2 on Feb 20, 2010, 01:10 pm
Hi Mr Macegr-Guru,

I'm looking for something that can provide so many inputs and outputs for my next project. Have you made the Centipede shield circuit diagram available?

Paul.
Title: Re: Centipede Shield - also a contest!
Post by: keeper63 on Feb 20, 2010, 11:22 pm
Hmm - wish I knew about this contest way-back-when (I wasn't a member of the forum then, though)...

I have an i-Cybie that absolutely needs a new micro-controller; I found the robot at a local Goodwill (its amazing what you can find at Goodwill). I found that the controller that is in it was never fully reverse-engineered, and the only real way that people found to custom control it was via an interface port for special "cartridges". The problem though was that these cartridges (which were some kind of flash) only came with the "deluxe unit" that had the "walk up" charger; you needed one of these carts to have the proper fingers to interface with the slot, and you had to be running Windows for the little code/hacking that was done...

...and the i-Cybie faded from memory (it was released at xmas when the PS2 was released - that basically killed it).

Which is too bad - it was basically an "el-cheapo" version of the Aibo; sometimes you can find them on Ebay.

I just need a controller with a ton of i/o ports, for all the motors, feedback sensors, etc that are in the device. Then again, I need another project like a hole in the head...

:P
Title: Re: Centipede Shield - also a contest!
Post by: mowcius on Feb 21, 2010, 03:45 pm
Well unfortunately it seemed it was just the thing I needed. I then won the competition (after the issues with the first winners), but probably due to a duff chip, I have never got it working.  :(

Mowcius
Title: Re: Centipede Shield - also a contest!
Post by: pdadio on Mar 29, 2010, 09:57 pm
Is the centipede still available?  I am restoring VW Squareback and will be using an Arduino to automate the electrical system.  I need an I/O extender that can control 40+ inputs and outputs.