28BYJ-48 as a RC Car motor, how to make it faster?

I am using a 28BYJ-48 5V stepper motor with a ULN2003 driver. They are connected to an external power supply. We are tasked with using this setup as a "motor" for our RC car. The current draw at "full" is around 220mA. I am a little new to programming and am having a hard time understanding the different functions of the AccelStepper library. Are these the maximum settings? Thank you for your time.

#include <IRremote.hpp>
#include <LedControl.h>
#include <AccelStepper.h>

#define IR_RECEIVE_PIN A1
#define HALFSTEP 4

void printByte(byte character[]);

int DIN = 12;
int CS = 11;
int CLK = 10;

LedControl lc=LedControl(DIN,CLK,CS,0);

byte forward_left[8]= {0x1F,0x1F,0x18,0x18,0xDB,0x7E,0x3C,0x18};
byte forward[8]= {0x10,0x30,0x60,0xFF,0xFF,0x60,0x30,0x10,};
byte forward_right[8]= {0x18,0x3C,0x7E,0xDB,0x18,0x18,0x1F,0x1F};
byte rotate_counter_clockwise[8]= {0x2E,0x4C,0x8A,0x81,0x81,0x51,0x32,0x74,};
byte smiley_face[8]= {0x08,0x64,0x62,0x02,0x02,0x62,0x64,0x08};
byte rotate_clockwise[8]= {0x74,0x32,0x51,0x81,0x81,0x8A,0x4C,0x2E,};
byte reverse_left[8]= {0xF8,0xF8,0x18,0x18,0xDB,0x7E,0x3C,0x18};
byte reverse[8]= {0x08,0x0C,0x06,0xFF,0xFF,0x06,0x0C,0x08,};
byte reverse_right[8]= {0x18,0x3C,0x7E,0xDB,0x18,0x18,0xF8,0xF8};
byte display_initial[8]= {0x18,0x3C,0x7E,0xDB,0x18,0x18,0xF8,0xF8};

AccelStepper left_stepper(HALFSTEP, 9, 7, 8, 6);
AccelStepper right_stepper(HALFSTEP, 5, 3, 4, 2);

void setup() {
  Serial.begin(9600);
  IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK); 
  lc.shutdown(0,false);
  lc.setIntensity(0,0);
  lc.clearDisplay(0);

  left_stepper.setMaxSpeed(1000);
	left_stepper.setAcceleration(200);
  
  right_stepper.setMaxSpeed(1000);
  right_stepper.setAcceleration(200);

}

void loop() {
  if (IrReceiver.decode()) {
    switch (IrReceiver.decodedIRData.decodedRawData) {
      case 0xE619FF00: // 0
        Serial.println("Pressed: 0 - Display Initial");
        printByte(display_initial);
        left_stepper.setSpeed(0);
        right_stepper.setSpeed(0);
        break;

      case 0xBA45FF00: // 1
        Serial.println("Pressed: 1 - Forward Left");
        printByte(forward_left);
        left_stepper.setSpeed(250); // slower left
        right_stepper.setSpeed(500); // faster right
        break;

      case 0xB946FF00: // 2
        Serial.println("Pressed: 2 - Forward");
        printByte(forward);
        left_stepper.setSpeed(500); // forward
        right_stepper.setSpeed(500); // forward
        break;

      case 0xB847FF00: // 3
        Serial.println("Pressed: 3 - Forward Right");
        printByte(forward_right);
        left_stepper.setSpeed(500); // faster left
        right_stepper.setSpeed(250); // slower right
        break;

      case 0xBB44FF00: // 4
        Serial.println("Pressed: 4 - Rotate Counter Clockwise");
        printByte(rotate_counter_clockwise);
        left_stepper.setSpeed(-500); // backward left
        right_stepper.setSpeed(500); // forward right
        break;

      case 0xBF40FF00: // 5
        Serial.println("Pressed: 5 - Smiley Face");
        printByte(smiley_face);
        left_stepper.setSpeed(0);
        right_stepper.setSpeed(0);
        break;

      case 0xBC43FF00: // 6
        Serial.println("Pressed: 6 - Rotate Clockwise");
        printByte(rotate_clockwise);
        left_stepper.setSpeed(500); // forward left
        right_stepper.setSpeed(-500); // backward right
        break;

      case 0xF807FF00: // 7
        Serial.println("Pressed: 7 - Reverse Left");
        printByte(reverse_left);
        left_stepper.setSpeed(-250); // slower backward left
        right_stepper.setSpeed(-500); // faster backward right
        break;

      case 0xEA15FF00: // 8
        Serial.println("Pressed: 8 - Reverse");
        printByte(reverse);
        left_stepper.setSpeed(-500); // backward
        right_stepper.setSpeed(-500); // backward
        break;

      case 0xF609FF00: // 9
        Serial.println("Pressed: 9 - Reverse Right");
        printByte(reverse_right);
        left_stepper.setSpeed(-500); // faster backward left
        right_stepper.setSpeed(-250); // slower backward right
        break;

      default:
        break;
    }
    IrReceiver.resume(); 
  }

  left_stepper.runSpeed();
  right_stepper.runSpeed();
}

void printByte(byte character []) {
 int i = 0;
 for(i=0;i<8;i++) {
  lc.setRow(0,i,character[i]);
 }
}

This motor is not fast, according to the specification its maximum speed is about 15rpm.

' The maximum speed for a 28byj-48 stepper motor is roughly 10-15 rpm at 5 V .'

Not sure what you mean by this, because a stepping motor draws maximum current when it is stationery.

The way to get a motor to run faster is to supply it with a higher voltage. But this will increase the current and cause overheating. The ULN2003 is rated for half an amp per channel but due to thermal ratings you can't be drawing more than about 650mA at any one time.

The solution is to get a proper stepping motor driver which will chop the voltage of when a set current is exceeded. That way you can power your motors at 24V and it will run faster. You need one stepping motor driver per stepping motor.

Larger diameter wheels (penny-farthing design).
As @flashko already said, this 1:64 geared stepper motor is designed for low speed.
Leo..

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.