NeoSteamLabs
Published © CC BY-SA

Project #12: Robotics - Unmanned Vehicles 1h - Mk12

#DonLuc #Electronics #Robotics #Microcontrollers #Consultant #Arduino #RedBoardQwiic #SparkFun #Pololu #Fritzing #Aphasia #Vlog

IntermediateProtip1 hour366
Project #12: Robotics - Unmanned Vehicles 1h - Mk12

Things used in this project

Hardware components

SparkFun RedBoard Qwiic
SparkFun RedBoard Qwiic
×1
Pololu DRV8834 Low-Voltage Stepper Motor Driver Carrier
×2
SparkFun Electrolytic Decoupling Capacitors - 100uF/25V
×2
Pololu Stepper Motor Bipolar, 2.8V, 1.7 A/Phase
×2
Pololu Universal Aluminum Mounting Hub for 5mm Shaft, M3 Holes
×2
Adafruit Perma-Proto Half-sized Breadboard PCB
×1
SparkFun Wire Solid Core - 22 AWG
×14
SparkFun Cerberus USB Cable - 6ft
SparkFun Cerberus USB Cable - 6ft
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Fritzing

Code

DL2003Mk05Rp.ino

Arduino
// ***** Don Luc Electronics © *****
// Software Version Information
// Project #12: Robotics - Unmanned Vehicles 1h - Mk12
// 03-05
// DL2003Mk05Rp.ino 12-12
// Receiver
// 1 x SparkFun RedBoard Qwiic
// 2 x Pololu DRV8834 Low-Voltage Stepper Motor Driver Carrier
// 2 x Electrolytic Decoupling Capacitors - 100uF/25V
// 2 x Pololu Stepper Motor Bipolar, 2.8V, 1.7 A/Phase
// 2 x Pololu Universal Aluminum Mounting Hub for 5mm Shaft, M3 Holes
// 1 x Adafruit Perma-Proto Half-sized Breadboard PCB

// Include the library code:
// DRV8834 Stepper Motor Driver
#include <BasicStepperDriver.h>
#include <MultiDriver.h>

// DRV8834 Stepper Motor Driver
// Stepper motor steps per revolution. Most steppers are 200 steps or 1.8 degrees/step
#define MOTOR_STEPS 200
// Target RPM for X axis stepper motor
#define MOTOR_X_RPM 800
// Target RPM for Y axis stepper motor
#define MOTOR_Y_RPM 800
// Since microstepping is set externally, make sure this matches the selected mode
// If it doesn't, the motor will move at a different RPM than chosen
// 1=full step, 2=half step etc.
#define MICROSTEPS 1
// X Stepper motor
#define DIR_X 8
#define STEP_X 9
// Y Stepper motor
#define DIR_Y 6
#define STEP_Y 7
// BasicStepperDriver
BasicStepperDriver stepperX(MOTOR_STEPS, DIR_X, STEP_X);
BasicStepperDriver stepperY(MOTOR_STEPS, DIR_Y, STEP_Y);
// Pick one of the two controllers below each motor moves independently
MultiDriver controller(stepperX, stepperY);

// Software Version Information
String sver = "12-12";
// Unit ID information
String uid = "";

void loop() {

   controller.rotate(360, 360);
   
}

getStepper.ino

Arduino
// Stepper
// isStepperSetup
void isStepperSetup() {    
  
  // Set stepper target motors RPM.
  stepperX.begin(MOTOR_X_RPM, MICROSTEPS);
  stepperY.begin(MOTOR_Y_RPM, MICROSTEPS);

}

setup.ino

Arduino
// Setup
void setup() {

  // DRV8834 Stepper Motor Driver
  isStepperSetup();

}

Credits

NeoSteamLabs

NeoSteamLabs

30 projects • 12 followers
IT consultant with over 36 years of experience Instructor: Arduino, Raspberry Pi, Espressif, Robotics, Unmanned Vehicles, etc...

Comments