Hello Arduino peoples, I wonder if anyone out there might be able to point me in the right direction here.
I've inherited an on-site Arduino installation that runs a series of LED lit perspex panels in our building. A large touch screen with an interactive timeline was built with processing and simply told Arduino to light up any given panel when being used. I replaced the processing timeline with a browser based implementation, and when it came to reconnecting the Arduino board, something got lost in the process and I have been unable to get things running again (I also fried a board).
The setup is a Duemilanove board, with a 12V mains powering the array of LED boards and the Arduino.
The board is currently wired like this (12V power in, data wires. Plus USB going to a mini-PC that isn't pictured): http://i.imgur.com/1mtuwJa.jpg
I think I've got the power in the right pins, but with the data I'm really not sure. What I really need is someone with experience to instinctively tell me what might be wrong or right with this, so I'd really appreciate any advice. Cheers.
Your Arduino sketch is communicating with two sets of devices I2C - having addresses starting at hex20 (8 devices) and hex38 (5 devices).
I don't think that they are likely to be commercial chips with those addresses, so I suspect that each panel is also running on a microcontroller. If you are using Arduino for control then it would make sense to run an Arduino in each panel too. I reckon there is an Ardu' in each panel.
If that's the case then you most likely just need to connect A4 and A5 of the main control Arduino to the same pin on the Arduino within each panel. The code you linked to is acting as "master" and each panel is probably running a simple "slave" code that listens for it's I2C address and goes on or off depending upon one byte received.
Edit - Maybe not!
It seems that this "port expander" uses I2C addresses 0x20 to 0x27:
That suggests that there is a separate LED on each output of this port expander.
clock is pin 1 of the MCP23008, so that goes to A5
data is pin 2 of the MCP23008 so that goes to A4
Not worked out what the devices at 0x38 onwards are yet!
And remove that led on pin 13, without a series resistor it is going to most likely damage the led or the pin 13 output pin or more. There is already a pin 13 led mounted on the board so I don't even see the purpose of the one stuck into the shield connector.
Sorry - hadn't noticed that there was a picture of the board - yes, pull out the LED or twist a 330ohm or higher resistor round one leg & put that in series with it.
You will need a pull-up on the I2C pins - a 2K2 between A4 and +5V and between A5 and +5V should be about right.
For those, assuming the 16-pin package, connect data (A4) to pin 15 of PCF8574 and clock (A5) to pin 14.
I am not too sure what the resistors are doing there on the RX and TX lines. How much of that wiring is known to work? Can the Arduino communicate with the PC?
Well, I've got some time to look at this stuff again at work and I'm still not having much luck.
I've added a couple more photos below, one of the controller for some of the LEDS (panels below left and right of the image) and another of the wiring into the board.
I gather the Red and Blue are probably the I2C wires, which pins are A4 and A5, and can anyone tell which wire is which? Are the green/yellow in the right place?
The blue and red wire is connected to RX/TX pins on the picture. If the code is correct, you have to connect them to A4 and A5 (lower right corner of the Arduino board).
On the picture of your controller I cannot see which wire is going to which pin of the chip. Dr_Ugi already give you the correct wiring, check that, best with a multimeter and not only visually.