Hi, I'm working on a project which uses thermochromatic inks with fabric and conductive thread to create reactive material surfaces.
I've based the concept on a matrix display, but currently am working with a 5x5 matrix instead of a 8x8.
I've worked through several attempts at a circuit and currently mine looks like this (in the fritzing image I could not find the sunfounder 8 Channel 5V Relay Module,
so I have just put in individual relays):
Here is the entirely more confusing and less attractive real life image:
I was slightly confused as on the sunfounder website, an image they have for wiring a matrix with two 74HC595 shows them wired differently to how other people have them wired—where connections from each 74HC595 are going to both poles.
Most show simply one 74HC595 controlling one side (the v++) and the other 74HC595 controlling the other side (ground), like this:
Anyone know which one is correct—I've tried both but I'm sick of being confused about it?
Hoping to use this method to go about producing letterforms in the fabric—am I on the right track or would there be a better way to go about it (currently I'll have to heat up columns or sections to get a letterform, as intersections would create incorrect forms, for example:
An E
1 1 1 1 1
1 0 0 0 0
1 1 1 0 0
1 0 0 0 0
1 1 1 1 1
If I do this I would have to heat row 1 and 5 with column 1, 2, 3, 4, 5
then heat column 1 with row 1, 2, 3, 4, 5
finally heat row 3 with column 1, 2, 3
Any interest or feedback would be greatly appreciated.
I am then using this code to target areas of the material to heat—
//Pin connected to ST_CP of 74HC595
int latchPin = 8;
//Pin connected to SH_CP of 74HC595
int clockPin = 12;
//Pin connected to DS of 74HC595
int dataPin = 11;
void setup() {
//set pins to output because they are addressed in the main loop
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
void loop() {
byte rowBitsToSend = 0;
byte columnBitsToSend = 0;
digitalWrite(latchPin, LOW);
// HIGH IS OFF
// bitWrite(columnBitsToSend, 0, HIGH); // Gives us 000100001
bitWrite(columnBitsToSend, 1, HIGH); // Gives us 000100001
bitWrite(columnBitsToSend, 2, HIGH); // Gives us 000010001
// bitWrite(columnBitsToSend, 3, HIGH); // Gives us 000001001
bitWrite(columnBitsToSend, 4, HIGH); // Gives us 000001001
bitWrite(columnBitsToSend, 5, HIGH); // Gives us 000001001
shiftOut(dataPin, clockPin, MSBFIRST, columnBitsToSend); // Send the byte to the shift register which passes it to the second shift register
// bitWrite(rowBitsToSend, 0, HIGH); // Adds on to the previous modified bits to give us 00001001
// bitWrite(rowBitsToSend, 1, HIGH); // Gives us 00010001
// bitWrite(rowBitsToSend, 2, HIGH); // Gives us 00001001
bitWrite(rowBitsToSend, 3, HIGH); // Adds on to the previous modified bits to give us 00001001
// bitWrite(rowBitsToSend, 4, HIGH); // Adds on to the previous modified bits to give us 00001001
// bitWrite(rowBitsToSend, 5, HIGH); // Adds on to the previous modified bits to give us 00001001
// bitWrite(rowBitsToSend, 6, HIGH); // Adds on to the previous modified bits to give us 00001001
shiftOut(dataPin, clockPin, MSBFIRST, rowBitsToSend); // Send the byte to the shift register
digitalWrite(latchPin, HIGH); // Tell the shift register we are done sending data so it can enable the outputs
delay(2); // Not really necessary in this example but it will be for lighting up multiple columns
}
Does anyone have any ideas on how to improve this—I looked into using a hex, but got confused as to how to code or program this.
I followed some of the code from this page, and looked at using data ints to get something like this:
Hi, I’m working on a project which uses thermochromatic inks with fabric and conductive thread to create reactive material surfaces.
I’ve based the concept on a matrix display, but currently am working with a 5x5 matrix instead of a 8x8.
I’ve worked through several attempts at a circuit and currently mine looks like this (in the fritzing image I could not find the sunfounder 8 Channel 5V Relay Module,
so I have just put in individual relays):
Here is the entirely more confusing and less attractive real life image:
I was slightly confused as on the sunfounder website, an image they have for wiring a matrix with two 74HC595 shows them wired differently to how other people have them wired—where connections from each 74HC595 are going to both poles.
Most show simply one 74HC595 controlling one side (the v++) and the other 74HC595 controlling the other side (ground), like this:
Anyone know which one is correct—I’ve tried both but I’m sick of being confused about it?
Hoping to use this method to go about producing letterforms in the fabric—am I on the right track or would there be a better way to go about it (currently I’ll have to heat up columns or sections to get a letterform, as intersections would create incorrect forms, for example:
An E
1 1 1 1 1
1 0 0 0 0
1 1 1 0 0
1 0 0 0 0
1 1 1 1 1
If I do this I would have to heat row 1 and 5 with column 1, 2, 3, 4, 5
then heat column 1 with row 1, 2, 3, 4, 5
finally heat row 3 with column 1, 2, 3
I am then using this code to target areas of the material to heat—
//Pin connected to ST_CP of 74HC595
int latchPin = 8;
//Pin connected to SH_CP of 74HC595
int clockPin = 12;
//Pin connected to DS of 74HC595
int dataPin = 11;
void setup() {
//set pins to output because they are addressed in the main loop
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
void loop() {
byte rowBitsToSend = 0;
byte columnBitsToSend = 0;
digitalWrite(latchPin, LOW);
// HIGH IS OFF
// bitWrite(columnBitsToSend, 0, HIGH); // Gives us 000100001
bitWrite(columnBitsToSend, 1, HIGH); // Gives us 000100001
bitWrite(columnBitsToSend, 2, HIGH); // Gives us 000010001
// bitWrite(columnBitsToSend, 3, HIGH); // Gives us 000001001
bitWrite(columnBitsToSend, 4, HIGH); // Gives us 000001001
bitWrite(columnBitsToSend, 5, HIGH); // Gives us 000001001
shiftOut(dataPin, clockPin, MSBFIRST, columnBitsToSend); // Send the byte to the shift register which passes it to the second shift register
// bitWrite(rowBitsToSend, 0, HIGH); // Adds on to the previous modified bits to give us 00001001
// bitWrite(rowBitsToSend, 1, HIGH); // Gives us 00010001
// bitWrite(rowBitsToSend, 2, HIGH); // Gives us 00001001
bitWrite(rowBitsToSend, 3, HIGH); // Adds on to the previous modified bits to give us 00001001
// bitWrite(rowBitsToSend, 4, HIGH); // Adds on to the previous modified bits to give us 00001001
// bitWrite(rowBitsToSend, 5, HIGH); // Adds on to the previous modified bits to give us 00001001
// bitWrite(rowBitsToSend, 6, HIGH); // Adds on to the previous modified bits to give us 00001001
shiftOut(dataPin, clockPin, MSBFIRST, rowBitsToSend); // Send the byte to the shift register
digitalWrite(latchPin, HIGH); // Tell the shift register we are done sending data so it can enable the outputs
delay(2); // Not really necessary in this example but it will be for lighting up multiple columns
}
Does anyone have any ideas on how to improve this—I looked into using a hex, but got confused as to how to code or program this.
I followed some of the code from this page, and looked at using data ints to get something like this:
int letterH[5][5] = {
{1,0,0,0,1},
{1,0,0,0,1},
{1,1,1,1,1},
{1,0,0,0,1},
{1,0,0,0,1},
};
But I’m not sure thats the best option in this case (not using LEDs).
Thanks,
Any interest or feedback would be greatly appreciated.