The trouble with my UNL2003APG

discussion of magnetic volume control design for both line and speaker levels.

Post Reply
April155
Posts: 10
Joined: Fri Jul 29, 2016 8:33 am

The trouble with my UNL2003APG

Post by April155 »

'm a beginner with Arduino. I managed to grasp the basic understanding and try to use each component/shield that came with my Arduino kit.

I'm unable to use the following component:

Step Motor 28BYJ-48
Step Motor controller board ULN2003APG
I connected the Arduino to the ULN2003APG and put some coding such that I can see that the ULN2003APG's LED turned on from 1, 2, 3, 4, 1, 2, 3, 4, and so on. So this is as expected as per programming below.

My issue:

I noticed the LED in the ULN2003APG is not as bright as a regular LED.
Once I plugged in the 28BYJ-48 to the ULN2003APG, the ULN2003APG's LED all off.
The motor (28BYJ-48) doesn't spin - at all.
I tried to spin the motor with my 2 fingers, it seems pretty heavy - is this normal?
Is this a faulty ULN2003APG or is it a faulty 28BYJ-48 or is it a faulty programming? please help.

Program:

Code: Select all

#include <Stepper>

int pin1=8;
int pin2=9;
int pin3=10;
int pin4=11;
int _step=0;
void setup&#40;&#41; &#123;
    Serial.begin&#40;9600&#41;;
    pinMode&#40;pin1, INPUT&#41;;
    pinMode&#40;pin2, INPUT&#41;;
    pinMode&#40;pin3, INPUT&#41;;
    pinMode&#40;pin4, INPUT&#41;;
&#125;

void loop&#40;&#41; &#123;
  switch &#40;_step&#41;&#123;
    case 0&#58;
      digitalWrite &#40;pin1, HIGH&#41;;
      digitalWrite &#40;pin2, LOW&#41;;
      digitalWrite &#40;pin3, LOW&#41;;
      digitalWrite &#40;pin4, LOW&#41;;
      break;
    case 1&#58;
      digitalWrite &#40;pin1, LOW&#41;;
      digitalWrite &#40;pin2, HIGH&#41;;
      digitalWrite &#40;pin3, LOW&#41;;
      digitalWrite &#40;pin4, LOW&#41;;
      break;
    case 2&#58;
      digitalWrite &#40;pin1, LOW&#41;;
      digitalWrite &#40;pin2, LOW&#41;;
      digitalWrite &#40;pin3, HIGH&#41;;
      digitalWrite &#40;pin4, LOW&#41;;
      break;
    case 3&#58;
      digitalWrite &#40;pin1, LOW&#41;;
      digitalWrite &#40;pin2, LOW&#41;;
      digitalWrite &#40;pin3, LOW&#41;;
      digitalWrite &#40;pin4, HIGH&#41;;
      break;
  &#125;
  _step ++;
  if &#40;_step == 4&#41;&#123;
    _step = 0;
  &#125;
  Serial.println&#40;_step&#41;;
  delay&#40;250&#41;; 

&#125;
Post Reply