two wheeled self balancing robot with stepper motor.

Robot wirth stepper motor via microstepping, digital motion processing, auto tuning, cascaded PID controller and now with Joy Stick Control.

Jan 30, 2019

40466 views

21 respects

Components and supplies

1

RGB Backlight LCD - 16x2

2

NEMA 17 Stepper Motor

1

HC-05 Bluetooth Module

2

MP6500 Stepper Motor Driver Carrier

1

Joystick Shield

1

7.4V 2S 3300mAh 35C Li-Polymer Lipo

1

SparkFun Triple Axis Accelerometer and Gyro Breakout - MPU-6050

1

Arduino Mega 2560

1

Arduino Due

Project description

Code

Battery.h

c_cpp

PidControl.h

c_cpp

DuePWMmod.cpp

c_cpp

DuePWMmod.h

c_cpp

LCD.ino

c_cpp

PidControl.cpp

c_cpp

Motor.h

c_cpp

Twiddle.cpp

c_cpp

DueTimer.h

c_cpp

JoyStick.ino

c_cpp

SBRobotDueDP6500_NewPWM_55.ino

c_cpp

Twiddle.h

c_cpp

Vehicle.cpp

c_cpp

JoyStickSlave01.ino

c_cpp

LCD.ino

c_cpp

PidParameter.h

c_cpp

DueTimer.cpp

c_cpp

JoyStick.ino

c_cpp

Vehicle.h

c_cpp

DuePWMmod.h

c_cpp

Twiddle.h

c_cpp

Battery.cpp

c_cpp

Motor.cpp

c_cpp

Config.h

c_cpp

MyMPU.ino

c_cpp

Motor.h

c_cpp

DueTimer.h

c_cpp

Vehicle.h

c_cpp

PidControl.h

c_cpp

MyMPU.ino

c_cpp

JoyStickSlave01.ino

c_cpp

Plotter.ino

c_cpp

Vehicle.cpp

c_cpp

Twiddle.cpp

c_cpp

SBRobotDueDP6500_NewPWM_55.ino

c_cpp

PidControl.cpp

c_cpp

PidParameter.h

c_cpp

DueTimer.cpp

c_cpp

DuePWMmod.cpp

c_cpp

Battery.cpp

c_cpp

Battery.h

c_cpp

Motor.cpp

c_cpp

Config.h

c_cpp

Downloadable files

SB Robot

SB Robot

SB Robot

SB Robot

Comments

Only logged in users can leave comments

DaveX

10 months ago

How does the Kx term work any differently than a plain Ki term? It looks like they'd combine to be: `Kboth = Kx +Ki/1000` (or `Kboth = Kp*Kx +Ki/1000` depending whether the code or the written formulas are the used), and work exactly like `Kboth * integrated_error`.

bobfound

2 years ago

Rolf, why did you change from a Mega to a Due? I know the Due is faster, more memory...but was it needed?

Anonymous user

2 years ago

Hello my friend, how are you? Your job is fantastic. Could you send me the step-by-step? I would like to do this work for a science fair. Can you help me? Please.

Anonymous user

2 years ago

Nice project! Did you ever try to make it turn left or right?

RolfK

2 years ago

Hello, now the robot is moving in all directions. As usual it was a bit more elaborate as expected. Have a look at the new video. Many greetings from Germany. Rolf

RolfK

2 years ago

Hello , That's next. It's prepared. Viele Grüße Rolf  

Anonymous user

2 years ago

Where is Filter.h that appears in config.h? I found the others and coverted XXX_ino.c to XXX.ino and most of main file compiles except for that error.

Anonymous user

2 years ago

I've been struggling trying to get this code to compile. There is an Include <duepwmmod.h> that I can't find anywhere on the Internet. The program name ends with xxx_ino.c. What is that about? Is it an Arduino "ino" file or a C file, or both? I've been removing the C as extension and using .ino but not sure if this works. This version on this site is different from two other versions but there is no version history, just that the file was created in 2019. This version here seems to have more "stuff", like Megunalink codes, but it still has the <duepwmmod.h> library which cannot be found. My robot is BUILT...I just need some help with the coding and Rolf's work is the best so far.

Anonymous user

2 years ago

Where is Filter.h that appears in config.h? I found the others and coverted XXX_ino.c to XXX.ino and most of main file compiles except for that error.

Anonymous user

2 years ago

I've been struggling trying to get this code to compile. There is an Include <duepwmmod.h> that I can't find anywhere on the Internet. The program name ends with xxx_ino.c. What is that about? Is it an Arduino "ino" file or a C file, or both? I've been removing the C as extension and using .ino but not sure if this works. This version on this site is different from two other versions but there is no version history, just that the file was created in 2019. This version here seems to have more "stuff", like Megunalink codes, but it still has the <duepwmmod.h> library which cannot be found. My robot is BUILT...I just need some help with the coding and Rolf's work is the best so far.

bobfound

2 years ago

Rolf, why did you change from a Mega to a Due? I know the Due is faster, more memory...but was it needed?

Anonymous user

3 years ago

Cool. Any chance this can run on an Arduino Uno as well? What would it take to modify?

Anonymous user

5 years ago

Hello my friend, how are you? Your job is fantastic. Could you send me the step-by-step? I would like to do this work for a science fair. Can you help me? Please.

Anonymous user

6 years ago

Nice project! Did you ever try to make it turn left or right?

RolfK

2 years ago

Hello, now the robot is moving in all directions. As usual it was a bit more elaborate as expected. Have a look at the new video. Many greetings from Germany. Rolf

RolfK

2 years ago

Hello , That's next. It's prepared. Viele Grüße Rolf