Studio Contrechoc

design & textile & technology entries

Monthly Archives: July 2010

A t-shirt with a gadget

Month ago we had bought a toy gadget making music on touch buttons and even a scratch.

Then we found a t-shirt with a print of an old fashioned cassette deck player and its buttons.

We could not resist bringing these beauties together! A nice simple example of modifying, and customizing.

For the buttons we used magnetic sensors, so you don’t have to push on anything, just magically wipe your hand with a small magnet hidden in it and the music and scratch samples are played!

instead of a button, a magnetic reed switch

positioning the speaker and the chip, the inside must correspond with the outside…

the inside, using thin wire and protecting the reed switches, the chip and the speaker

at the outside, you don’t see anything unusual, oh, maybe the two wires?

Of course, with the other t-shirts and the “talking” sleeves around, we got ideas of wireless scratch command communications….:-)

Connect a Liquid Crystal Display

The Arduino has a liquid crystal library. This is fun to play with

In the declaration you have to mention the pins yous are using:
LiquidCrystal(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7)
So you are using 8 + 3 pins of your board. (There is also an option to use only 4 datalines.)

front side, lots of wires!

Still this occupies your pins quite a bit.

backside 8 + 3 + 2 wires makes 13! But no further board.

So we tried to reduce this using an I2C chip, PCF8574, and we needed 2 wires instead of the 8 datalines, which was ok for the recycling sleeve. I2C or twi uses a standard protocol in the ATmega168 (or328) using the pins PC4 and PC5.
But since we did a Liquid Crystal command using the I2C, or Wire library of the Arduino, we had to make our own Liquid Crystal-I2C library, which can be found here.

using an I2C chip

I2C reduces the wires to 2 + 3 + 2, using a board

But finally somebody told us a ATtiny2313 was cheaper than the PCF8574, and we realized it had even more pins available, so we could reduce the wires to only 1! (With the voltage and ground, this makes 3, but we needed that in the other experiments too.)

Of course we needed again a different library now using UART. We programmed this bit of code first in AVR, and then did a rewriting (just a bit) for the Arduino library.

using an ATtiny2313, with its own crystal

the ATtiny2313, has a port on one side and so the connections can be directly connected to the LCD pins. There are even some pins left!