Multiplex the ULN2003

Just a question, can you connect the 5v wire from the ULN2003 through a transistor.
Then multiplex everything, but with the 4 datalines of each ULN2003 connected to 4 arduinopins.
So...
ALL IN1 -> pin 8
ALL IN2 -> pin 9
ALL IN3 -> pin 10
ALL IN4 -> pin 11

Then you just need to connect the transistor to the other pins.

I didn't try this, so it's possible that I am wrong.
(If so, please let me know)

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .

I have suggested to the moderator that this be started as a new thread.

Can you please post a copy of your suggested circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

A tpic6B595 shift register can drive 2 28BYJ-48s (and daisy chained for more) with just 4 wires from Arduino.
Here's a test sketch (for one motor):

/* M28BYJ-48basic_SR.ino
   uses tpic6B595 shift register 

   pin 8 to pin 12 on tpic6B595, pin 4 to pink,   coilA
      12 to pin 13 "      "          5    yellow, coilC
      11 to pin 3  "      "          6    orange, coilB
                          "          7    blue,   coilD
      GND       10 "      "          10, 11, 19, motor supply - 
                                                 motor supply + to motor red wire
                                                                                   

   Type a number in top of serial monitor for steps to go, & press [ENTER].
*/
uint32_t tStart,
         tEnd = 4883UL; // delay between steps, (microseconds),
                        // ~ 6 RPM, higher num, lower speed
const byte stepNr [4] = {0x01, 0x02, 0x04, 0x08},
           latchPin = 8,
           clockPin = 12,
           dataPin = 11;

byte stepCntr = 0;
long stg = 2048; // steps to go
     
bool timing = false;

void setup()
{
  Serial.begin(9600);
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);  
  pinMode(clockPin, OUTPUT);
  shiftOut(dataPin, clockPin, MSBFIRST, 0);
  digitalWrite(latchPin, HIGH);
  delay(100);
}

void loop()
{
  if(micros() - tStart > tEnd)
    timing = false;
  if (!timing && stg != 0)
  {
    stg < 0 ? stepCntr-- : stepCntr++; // sets direction
    bitClear(PORTB,0); //digitalWrite(latchPin, LOW);
    shiftOut(dataPin, clockPin, MSBFIRST, stepNr[stepCntr & 0x3]);
    bitSet(PORTB,0); //digitalWrite(latchPin, HIGH);
    stg < 0 ? stg++ : stg--; // adds to or subtracts from stg
                             // depending on direction
    tStart = micros(); timing = true;
  }
  if (Serial.available() > 0)
  {
    stg =  Serial.parseInt();
    Serial.println(stg);
  }
}

Sion1:
Just a question, can you connect the 5v wire from the ULN2003 through a transistor.

You can, but it won't provide the expected effect. The darlington transistors work even without any power supply, connected collectors form a wired AND, not a multiplexer.

Then multiplex everything, but with the 4 datalines of each ULN2003 connected to 4 arduinopins.

The ULN2003 does not have any data lines, so what chip do you actually have?