Hi,
I am trying to control 32 solenoids through four shift registers (74HC595 plus one Tip120 for every solenoid). Therefor I started using the example for two shiftregister by Tom Igoe
It also works super fine for two shift registers, I only modified it a bit in order to control them individually through the serial.read() function:
void loop() {
if (Serial.available() > 0) {
int thisLed = Serial.read()-48;
registerWrite(thisLed, HIGH);
delay(500);
// if this is not the first LED, turn off the previous LED:
if (thisLed > 0) {
registerWrite(thisLed - 1, LOW);
}
// if this is the first LED, turn off the highest LED:
else {
registerWrite(31, LOW);
}
// pause between LEDs:
delay(250);
}
}
NOW the problem is as soon as I attach four shift registers it seems that it works still fine with the first two, but instead of controlling the two following separately they also go off when the first two are addressed. As if mirrored...
Meaning when I address the first pin of the first shift-register the signal also goes to the first pin of the third shift register.
I open the Serial Monitor and input from "0" to "7" in order to address the first 8 outputs of the shift-register (Hope this makes sense?) the "8" to "?" for the next 8 following the asciitable:
The same happens with the others (when the first pin of the second register is addressed, the solenoid attached shoots once and at the same time the one attached to the first pin of the fourth register starts to go off in a frequent way)
THANKS for any suggestions to this issue.
Best,
PJ