Lots of outputs

Hello,

I would like to connect 300+ camera flashes up to an arduino in order to fire them off in different patterns. I've got this way of connecting a flash up to an arduino uno working with two flashes:

http://www.glacialwanderer.com/hobbyrobotics/?p=10

So in order to scale this system up to 300+ flashes I figure I have the following options:

  • Connect multiple boards (i.e. one arduino uno and 6 arduino mega 2560's) using i2c
  • Use one arduino mega 2560 and multiple mux shields
  • Something else

Speed is very important for this system.

Any advice would be greatly appreciated.

Thanks,

Stu

You just a series of pins to go HIGH, LOW? Seems you would only need a series of shift register, clock a 1 in and then 0, move the 1 down the line controlled by when you send the next clock pulse.

You can use 16 bit shift registers http://www.ti.com/lit/ds/symlink/sn54ls674.pdf and I believe one can find multiple optisolators in a package. Design up a PCB to hold a bunch of chips, with the flash connectors needed, and connect the boards in series.

Speed is very important, but what kind of speeds are we talking about?

Let's assume price is no object for the moment....the right answer to me would be a microcontroller with lots and lots of I/O pins. That gives you maximum speed and flexibility (in case, for example, you wanted to trigger multiple flashes at exactly the same time). But if "speed" to you means milliseconds instead of microseconds then a mux-based or star-based solution using I2C for communication would work too.

Worst case, assume you wanted to fire all 300 flashes at once and in a star-based solution could only fire one at a time over 400 kHz I2C. The command to do so would maybe occupy 24 bits (address + 2 bytes for control), which would take 60 microseconds to transmit. Sending this command 300 times would take 18 milliseconds. Allow some overhead for processing and such (let's add 15% just for yuks) and estimate roughly 20ms.

Is that fast enough?

-- Need a custom shield? Let us design and build one for you.

Okay, maybe not that TI part, but here's a real purchasable part from Mouser http://semicon.njr.co.jp/njr/hp/productDetail.do?_isTopPage=false&_productId=513&_moveKbn=PRODUCT_DETAIL_MOVE_SPEC http://www.mouser.com/ProductDetail/NJR/NJU3716M/?qs=sGAEpiMZZMtsbn1GaJysl1Tl4whHY755aYZcowMjcd4%3d

Altho at that price, doubling up on 8-bit parts would be a lot cheaper http://www.mouser.com/ProductDetail/NXP-Semiconductors/74HC164PW118/?qs=sGAEpiMZZMvKM5ialpXrmkfrWQxze6Yv

Use a series of shift registers driven from SPI. 38 will give you 304 outputs to work with. At a 1MHz clock frequency, it would take about 0.3ms to update all of them. That goes down to 30us at 10MHz, but you'll need careful design to compensate for propagation delays.

Or maybe an analog switch like this & skip the optoisolators http://www.maxim-ic.com/datasheet/index.mvp/id/5771

Need to trade off costs in board size, # of components, etc.

I also wonder what your target speed is. 300+ flashes probably means 300+ consumer flashes. Otherwise price would not be that important and rugged circuits could design this for you.

If we are talking about consumer flashes then the shortest durations are ~25 microseconds. Charge times are significantly longer though.

So what is your speed limit?

CrossRoads - Thank you for the info on shift registers and building out using PCB's in series. I will follow this up. Yes, essentially I need a way to fire off any one of 300 flashes in quick succession (based on an input signal). The signal could be coming in as quick as every 363 microseconds.

RuggedCircuits - sending the command 300 times in 20 ms would definitely be fast enough. Having a micro controller with lots and lots of pins would be better though. I assume this means having a custom micro controller built? My background is in software development and I'm still getting up to speed on the electronics side of things. Having a custom board that can still be programed using arduino would be great.

NiHaoMike - thank you for the lead on SPI. I'll look into this further.

Udo Klein - I've tested sending firing flashes sending a high voltage then returning to low (without using any delay in between). This seems to take around 10 to 12 microseconds for one flash. Ultimately I'd like to fire 2750 flashes a second. This means having a lot of flashes or (as you point out) recharging the flashes very quickly and firing them more than once a second. Cost will definitely be a factor but if it seems it may be cheaper to hire flashes than can recycle quickly. In terms of speed this means firing a flash every 363 microseconds but it would be good to be able to go faster than this if we need to (say every 100 microseconds) but I can't see a need to go faster than 25 microseconds.

Thank you for the speedy replies.

Stu

Okay, if you had 20 16-bit shift registers, accessed them in 2 pairs via SPI, could make this with a '328 based board, 3 IOs tied up for SPI, 10 chip select lines, you could be there. Or use something '644/1284 based with 32 IO lines, have 20 chip selects along with the 3 SPI controls. Or go mega, 40 chip selects out to 8 bit shift registers.

SPI feeds the shift registers at 8 MHz, be hard to go much faster.