Looking for cheap fast I/O expansion. I understand I2c, SPI extenders, as well as shift extenders, but everything is expensive, whats the cheapest option?
You can get a 74HC595N from eBay for 8.5 cents.
How cheap did you want it? Please specify your price range. Is it 1 cent to 3 cents? Or what?
Admittedly you have to outlay $1.70 to get 20 of them. Is that too expensive?
I think he's taking "io expanders" which are considerably more expensive, but offer you more control over the pins - basically giving you gpio registers accessible over i2c or spi, which control the pins kinda like the gpio registers on a microcontroller. When I looked at io expander I was always like "oh, that's kinda nea.. Aaagh, they want how much? I could get another mcu for that"
A shift register is far less sophisticated - consider if Simple serial in parallel out, or parallel in serial or shift register could do it. As noted, there are dirt cheap
I think he’s taking “io expanders” which are considerably more expensive, but offer you more control over the pins - basically giving you gpio registers accessible over i2c or spi, which control the pins kinda like the gpio registers on a microcontroller. When I looked at io expander I was always like "oh, that’s kinda nea… Aaagh, they want how much? I could get another mcu for that"
Sometimes, another uC is exactly what is needed. It’s not as cheap as a shift register obviously, but depending on exactly what one is doing, connecting two 328P’s via SPI or I2C or Serial only adds the price of the second chip - Newark in qty 10, about $3. The option is especially nice if you can separate the computing logic so that the 2nd chip is actually doing something more than pure I/O; that is, doing some pre-digestion of Input or post processing (formatting, string manipulation, array lookups, etc.) for Outputs.
A logical extension of the above would perhaps be IR input and decoding and subsequently moving just serial numeric over to the main Arduino, or perhaps SD logging of a serial log feed.
TheSoundMan: ... as well as shift extenders ...
The OP mentioned "shift extenders" which I take to mean a shift register like the 595. As I said, under 10 cents. So that is the cheapest. And you can daisy-chain them.
However I agree that for a couple of dollars you could add a second processor (an Attiny or an Atmega328) and connect via I2C or SPI.
Hell, you can get assembled pro mini's for under $3 from ebay... which puts them below the small quantity pricing of most "IO expanders" (but of course, not shift registers, which are way cheaper; the internals are incredibly simple for a shift register)
everything is expensive
Chips are cheap. Manufacturing and selling an arduino-sized board is relatively expensive.
Does anyone actually have code for turning an arduino into an I2C, SPI, or Serial Slave “IO expander”?