Shift register to four ULN2003 motor drivers having trouble

I have my 2 shift registers connected similarly to this


but 14 and 14 are connected the 9th pin left is connected to nothing.
I've connected those strait to 4 ULN2003 IC's but im getting no response I didn't put it in my sketch but i put a 1n5819 diode in line with the unregulated power coming in from the batterie.

sorry for my awful schematic I hope you can read it.

how can I post photos's from my phone? I need to post the schismatic.

thanks

Sorry not enough information by a long way. The diagram is incomplete it shows no power and ground nor any way it is connected to the ULN2003 and nothing about the connection of the Motors to this chip. Also you don't seem to have wired the output enable to anything.

Then you have posted no code.

We can only help if you tell us what you have done and the best way to do that is with a schematic not that sort of thing you posted.

the red and black represent power and ground.
the real problem is the picture of my schismatic is too large.

so im not sure how to give you enough information.

sorry
any help would be greatly appreciated .

int delayTime;
byte data = 0;
int sensorPin_2 = 2; //knob style pot
int sensorPin = 1; //knob style pot
int datapin = 2; // D8 in picture provided
int clockpin = 3;// D9 
int latchpin = 4;//D10

void setup()
{
  pinMode(datapin, OUTPUT);
  pinMode(clockpin, OUTPUT);  
  pinMode(latchpin, OUTPUT);
}

void loop()
{ 
  oneOnAtATime();       
}

void shiftWrite(int desiredPin, boolean desiredState)

{
  bitWrite(data,desiredPin,desiredState);

  shiftOut(datapin, clockpin, MSBFIRST, data);

  digitalWrite(latchpin, HIGH);
  digitalWrite(latchpin, LOW);
}

void oneOnAtATime()
{ 
  int index;
  int index_2;
  int sensorValue;
  int sensorValue_2;
  sensorValue = analogRead(sensorPin);
  sensorValue_2 = analogRead(sensorPin_2); 
 
if ((sensorValue > 501) && (sensorValue_2 < 501) &! (sensorValue_2 < 401))
{
    for(index = 0; index <= 3; index++)
  {
    shiftWrite(index, HIGH);
    shiftWrite(index+4, HIGH); 
    delay(delayTime);   
    shiftWrite(index, LOW);
    shiftWrite(index+4, LOW); } // action A

  if ((sensorValue >= 501) && (sensorValue < 551)) {
 delayTime = 27;}
  if ((sensorValue >= 552) && (sensorValue < 602)) {
 delayTime = 22;}
  if ((sensorValue >= 603) && (sensorValue < 653)) {
 delayTime = 20;}
  if ((sensorValue >= 654) && (sensorValue < 704)) {
 delayTime = 18;}
  if ((sensorValue >= 705) && (sensorValue < 755)) {
 delayTime = 16;}
  if ((sensorValue >= 756) && (sensorValue < 806)) {
 delayTime = 14;}
  if ((sensorValue >= 807) && (sensorValue < 858)) {
 delayTime = 12;}
  if ((sensorValue >= 859) && (sensorValue < 909)) {
 delayTime = 10;}
  if ((sensorValue >= 910) && (sensorValue < 960)) {
 delayTime = 8;}
  if ((sensorValue >= 961) || (sensorValue > 1020)) {
 delayTime = 6;}
}
else if((sensorValue < 401) && (sensorValue_2 < 501) &! (sensorValue_2 < 401))
{
    for(index = 3; index >= 0; index--)
  {
    shiftWrite(index, HIGH);
    shiftWrite(index+4, HIGH); 
    delay(delayTime);   
    shiftWrite(index, LOW);
    shiftWrite(index+4, LOW); }  

  if ((sensorValue <= 401) && (sensorValue > 360)) {
 delayTime = 27;}
  if ((sensorValue <= 359) && (sensorValue > 320)) {
 delayTime = 22;}
  if ((sensorValue <= 319) && (sensorValue > 280)) {
 delayTime = 20;}
  if ((sensorValue <= 279) && (sensorValue > 240)) {
 delayTime = 18;}
  if ((sensorValue <= 239) && (sensorValue > 200)) {
 delayTime = 16;}
  if ((sensorValue <= 199) && (sensorValue > 160)) {
 delayTime = 14;}
  if ((sensorValue <= 159) && (sensorValue > 120)) {
 delayTime = 12;}
  if ((sensorValue <= 119) && (sensorValue > 80)) {
 delayTime = 10;}
  if ((sensorValue <= 79) && (sensorValue > 40)) {
 delayTime = 8;}
  if ((sensorValue <= 39) || (sensorValue < 2)) {
 delayTime = 6;}
}
else if((sensorValue_2 > 501) && (sensorValue < 501) &! (sensorValue < 401))  //Rotate Right
{
  shiftWrite(index, HIGH);
    shiftWrite(index+7, HIGH); 
    delay(delayTime);   
    shiftWrite(index, LOW);
  shiftWrite(index+7, LOW);
     shiftWrite(index+1, HIGH);
    shiftWrite(index+6, HIGH); 
    delay(delayTime);   
    shiftWrite(index+1, LOW);
  shiftWrite(index+6, LOW);
     shiftWrite(index+2, HIGH);
    shiftWrite(index+5, HIGH); 
    delay(delayTime);   
    shiftWrite(index+2, LOW);
  shiftWrite(index+5, LOW);
     shiftWrite(index+3, HIGH);
    shiftWrite(index+4, HIGH); 
    delay(delayTime);   
    shiftWrite(index+3, LOW);
  shiftWrite(index+4, LOW); } // action A

  if ((sensorValue_2 >= 501) && (sensorValue_2 < 551)) {
 delayTime = 27;}
  if ((sensorValue_2 >= 552) && (sensorValue_2 < 602)) {
 delayTime = 22;}
  if ((sensorValue_2 >= 603) && (sensorValue_2 < 653)) {
 delayTime = 20;}
  if ((sensorValue_2 >= 654) && (sensorValue_2 < 704)) {
 delayTime = 18;}
  if ((sensorValue_2 >= 705) && (sensorValue_2 < 755)) {
 delayTime = 16;}
  if ((sensorValue_2 >= 756) && (sensorValue_2 < 806)) {
 delayTime = 14;}
  if ((sensorValue_2 >= 807) && (sensorValue_2 < 858)) {
 delayTime = 12;}
  if ((sensorValue_2 >= 859) && (sensorValue_2 < 909)) {
 delayTime = 10;}
  if ((sensorValue_2 >= 910) && (sensorValue_2 < 960)) {
 delayTime = 8;}
  if ((sensorValue_2 >= 961) || (sensorValue_2 > 1020)) {
 delayTime = 6;} 
else if((sensorValue_2 < 401) && (sensorValue < 501) &! (sensorValue < 401))  //Rotate Left
{
 shiftWrite(index+3, HIGH);
    shiftWrite(index+4, HIGH); 
    delay(delayTime);   
    shiftWrite(index+3, LOW);
  shiftWrite(index+4, LOW);
     shiftWrite(index+2, HIGH);
    shiftWrite(index+5, HIGH); 
    delay(delayTime);   
    shiftWrite(index+2, LOW);
  shiftWrite(index+5, LOW);
     shiftWrite(index+1, HIGH);
    shiftWrite(index+6, HIGH); 
    delay(delayTime);   
    shiftWrite(index+1, LOW);
  shiftWrite(index+6, LOW);
     shiftWrite(index, HIGH);
    shiftWrite(index+7, HIGH); 
    delay(delayTime);   
    shiftWrite(index, LOW);
  shiftWrite(index+7, LOW); }
 if ((sensorValue_2 <= 401) && (sensorValue_2 > 360)) {
 delayTime = 27;}
  if ((sensorValue_2 <= 359) && (sensorValue_2 > 320)) {
 delayTime = 22;}
  if ((sensorValue_2 <= 319) && (sensorValue_2 > 280)) {
 delayTime = 20;}
  if ((sensorValue_2 <= 279) && (sensorValue_2 > 240)) {
 delayTime = 18;}
  if ((sensorValue_2 <= 239) && (sensorValue_2 > 200)) {
 delayTime = 16;}
  if ((sensorValue_2 <= 199) && (sensorValue_2 > 160)) {
 delayTime = 14;}
  if ((sensorValue_2 <= 159) && (sensorValue_2 > 120)) {
 delayTime = 12;}
  if ((sensorValue_2 <= 119) && (sensorValue_2 > 80)) {
 delayTime = 10;}
  if ((sensorValue_2 <= 79) && (sensorValue_2 > 40)) {
 delayTime = 8;}
  if ((sensorValue_2 <= 39) || (sensorValue_2 < 2)) {
 delayTime = 6;}
}

Hi,

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html
What does your code supposed to do?

Did you write your code in stages?

Have you got code that just feeds data to the shift registers to make sure your procedure is correct.
I see lots of if statements and delay().

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

Thanks.. Tom.. :slight_smile:

I did write my code in stages its for a rover/car.

I haven't been able to get Vcad to download correctly but I have a hand drawn schismatic but my JPEG is too large. any suggestions?

I've made a shift register like this and i know the code works but I've incorporated the motor drivers onto one board and it's not working at all, no response

If your schematic is too large then reduce the size, any photo editing application will do this.

Hi,
Use PAINT to resize.
Try EXPRESSPCB.... https://www.expresspcb.com/free-cad-software/

Tom.. :slight_smile:

Try to add only light load (LED and resistor) instead of the drivers. If it works add drivers and connect light load instead of motors. If it works it is power problem.

thanks I'm drawing it up on cad and will post it.
it may take a while it's my first time using this program it's called smartdraw 2017

im using the program because my hand drawn one is awful

well i made a schematic but it didn't format well the voltage regulator is a 7805 with a 100uf on the input and a 10uf on the output with a common ground. the incoming has a 1n5819 diode inline (i think is the right term)

the rectangular CAP is a 474

I kept the color scheme of the first picture.

I hope you can read it.

sketch__.pdf (622 KB)

I hope you can read it.

Sorry but no fu**ing way can that be read.

  1. All wires must be horizontal and vertical.

  2. See this https://web.ua.es/docivis/magnet/circuit_diagram.html for how to draw wires and symbols. Capacitors and resistors are not drawn like they look.

  3. All connections into a chip must have the pin number and a label as to what that pin is called.

  4. Do not make the schematic look like a physical layout. Arrange the pins around the chip so it minimises the clutter do not make the chip block look like the actual chip pinout.

  5. Positive at the top and negative at the bottom. Use common symbols for ground and Supply voltages to make the diagram less cluttered.

  6. As much as possible have inputs on the left and outputs on the right, with the flow of the signal from right to left.

  7. Do not put physical dimensions on a schematic, they are meaningless.

8 ) Try and minimise the number of wire crossings you have.

We are not being fussy, we need a schematic to see what you have done and if the design is right. That can not be achieved with what you have produced here.

This is what it looks like when converted from the PDF format

Hi,
See post #7

Tom... :slight_smile:

I've tested the shift register and it's working properly so the problems is some where else.

i'm practicing some pcb cad programs

On your picture GND is not connected to the 2 rightmost drivers.