instructables.com - rideable segway clone - low cost and ...€¦ · with the segway clone leaning...

38
http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/ Food Living Outside Play Technology Workshop Rideable Segway Clone - Low Cost and Easy Build by ihart on February 11, 2014 Table of Contents Rideable Segway Clone - Low Cost and Easy Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: Rideable Segway Clone - Low Cost and Easy Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Step 1: Introduction Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 2: How to Ride the Segway Clone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 3: How to Build the Segway Clone Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 4: Electrical Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Step 5: Parts List, Cost and Tools Needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Step 6: Tools Needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Step 7: Plans and Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Step 8: The Arduino Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Step 9: Step by Step Instructions Start Here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Step 10: Lawyer Stuff and Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Step 11: Cut and Prepare Wood Riding Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Step 12: Cut and Drill Brackets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Step 13: Mount Brackets Under Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Step 14: Mount Motors to Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Step 15: Crimp on battery wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Step 16: Connect Motor Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Step 17: Install Galvanized Floor Flange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Step 18: Cut the PVC Pipe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Step 19: Cut PVC for Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Step 20: Harvest the Wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Step 21: Prepare PVC Switch Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Step 22: Optional: Epoxy PVC reducer into Floor Flange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Step 23: Install Switches in PVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Step 24: Glue PVC Parts Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Step 25: Mount Electronics Box to Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Step 26: Install Batteries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Step 27: Install the Bi-Color LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Upload: others

Post on 07-Jul-2020

10 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Food      Living       Outside        Play        Technology       Workshop

Rideable Segway Clone - Low Cost and Easy Buildby ihart on February 11, 2014

Table of Contents

Rideable Segway Clone - Low Cost and Easy Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro:   Rideable Segway Clone - Low Cost and Easy Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 1:   Introduction Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 2:   How to Ride the Segway Clone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 3:   How to Build the Segway Clone Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4:   Electrical Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 5:   Parts List, Cost and Tools Needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 6:   Tools Needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 7:   Plans and Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 8:   The Arduino Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 9:   Step by Step Instructions Start Here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 10:   Lawyer Stuff and Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 11:   Cut and Prepare Wood Riding Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 12:   Cut and Drill Brackets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Step 13:   Mount Brackets Under Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Step 14:   Mount Motors to Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Step 15:   Crimp on battery wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Step 16:   Connect Motor Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Step 17:   Install Galvanized Floor Flange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Step 18:   Cut the PVC Pipe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Step 19:   Cut PVC for Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Step 20:   Harvest the Wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Step 21:   Prepare PVC Switch Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Step 22:   Optional: Epoxy PVC reducer into Floor Flange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Step 23:   Install Switches in PVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Step 24:   Glue PVC Parts Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Step 25:   Mount Electronics Box to Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Step 26:   Install Batteries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Step 27:   Install the Bi-Color LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Page 2: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 28:   Install the Charging connector and Power Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Step 29:   Drill Project Box Holes and Pass Through Wires. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Step 30:   Tack Down Wires and Connect Battery Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Step 31:   Get Wires Ready . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Step 32:   Install Batteries and Quick Meter Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Step 33:   Install Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Step 34:   Test! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Step 35:   Optional: Debug with Arduino Serial Monitor or Oscilloscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Step 36:   Optional: Chain Tensioning Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Step 37:   Final Notes: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Step 38:   Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Page 3: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Author:ihartI'm an Electrical Engineer with "engineer disease." I need to always be making, fixing or learning about something.

Intro:  Rideable Segway Clone - Low Cost and Easy BuildThis Instructable will show you how to build a ride-able Segway clone. Here are its features:

Easy to build with no welding, no complicated steering linkage and minimal soldering.Uses a readily available $3 digital MPU6050 accelerometer/gyro IMU board.Total parts cost is under $400 (including shipping). A real Segway is $5000!No salvage, dumpster diving or Craigslist parts.A detailed parts list and ALL purchasable sources are included.Well documented with over 50 minutes of HD how-to video, pictures and a detailed plan.Uses the very common Arduino UNO processor board.All Arduino processor code is included. NO additional Arduino libraries need to be installed.

This is a great learning project. It involves:

wood workingmetal workingplumbing techniqueswiring from schematicsmicro controller (Arduino) C like codingaccelerometer/gyro basics

I would say that a motivated middle schooler (12+ year old) with a parental figure could tackle this project. If the motivation isn't in the technical learning and assembly, itwill be in the riding fun!

Page 4: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 1: Introduction VideoThis video shows some action shots of the Segway clone!

Step 2: How to Ride the Segway CloneWith the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on.The LED will glow red. Wait about 8 seconds for the MPU6050 Accelerometer/gyro to calibrate.Lift up the board so it is parallel to the ground.Hold in the deadman switch.Step on the board.Lean forward to go forward and lean back to go backward.While you are moving, you can press the rocker switch to go left or right.You can press the tilt switch to adjust the neutral balancing position of the board.

Step 3: How to Build the Segway Clone VideoThis video is over 50 minutes long and includes detailed instructions on how to build this Segway clone:

Step 4: Electrical SchematicsThis is the electrical wiring schematic. It was drawn in MS Visio and saved as a .PDF here.

Page 5: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

File Downloads

segway_schematic.pdf (176 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'segway_schematic.pdf']

Step 5: Parts List, Cost and Tools NeededParts List and Cost BreakdownThe parts cost is under $400. The attached .PDF file below includes the sources, cost and HTML links.

Page 6: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Page 7: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

File Downloads

segway_parts_list.pdf (52 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'segway_parts_list.pdf']

Step 6: Tools NeededTools Needed:Wood saw, hack saw, drill, drill bits, hammer, screwdrivers, wrenches, wire strippers, soldering iron, files, metal punch

Optional tools:table saw, drill press, Dremel tool, VOM (Voltage Ohm Meter), WD40 (for drilling)

Step 7: Plans and DimensionsThese are the mechanical plans. I designed this in MS Visio and saved off the .PDF here.

Page 8: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

File Downloads

Visio-segway_plans.pdf (42 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Visio-segway_plans.pdf']

Step 8: The Arduino Code

The Segway Clone Arduino code is below:

The Arduino code development took the longest amount of time to get right in this Instructable. It could still be improved. Any ideas would be appreciated. It wasinfluenced by the following authors of self balancing device projects and MPU6050 development:

Jeff Rowberg: https://github.com/jrowberg/i2cdevlibXenonJohn: http://www.instructables.com/id/Self-balancing-skateboardsegwy-project-Arduino-S/ScitechWA: http://www.instructables.com/id/Self-Balancing-Scooter-Ver-20/Geekmom: http://www.geekmomprojects.com/mpu-6050-dmp-data-from-i2cdevlib/Julian Arnott: https://www.youtube.com/watch?v=q29MMfLRFYMand Eric Wang

Installation:

Install the Arduino software (http://arduino.cc/en/Main/Software#.UxiP2BCmZU0)Download the .zip file BELOW with all the code (note that Instructables MAY corrupt the name)Unzip the file (this is a good freeware unzip program: http://www.7-zip.org/download.html)Open the Arduino softwareConnect a USB cable to the Arduino boardTo ensure your Arduino is working, get your Arduino to "load" the "blink" program (file->examples->basics->blink)Open the file hartway_digital.inoCompile and "load" to the Arduino board

You can search on YouTube to learn about the Arduino. This guy does a good job explaining everything about Arduinos:http://www.youtube.com/watch?v=fCxzA9_kg6s

note: There is a bug in the code that will show up if you hit and release the deadman switch about 250 times. User rtreffkorn reported this and suggested the followingsolution:"The fix is to make set_motor() from void to int.In the normal case return 0. When the deadman button was released return 1;Then in loop() do: "if (set_motor()) break;" "I have not tested it but it sounds reasonable.

The Segway Clone Arduino code is below:

File Downloads

hartway_digital.zip (1 MB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'hartway_digital.zip']

Page 9: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 9: Step by Step Instructions Start HereThe following are step by step instructions of how I built this Segway clone. You may decide to copy this exactly or just use this for inspiration in your own variation.

Step 10: Lawyer Stuff and SafetyThis project includes cutting, drilling and soldering. Please wear safety gear and be careful.Riding on a 2 wheel device that is inherently unstable is dangerous. You will fall off it and crash into things. You are responsible for your own safety. Wearprotective gear.The real Segway device can be dangerous even though it has safety shutoffs and error detection. This Segway clone has NO safety detection or elegantshutdown. Ride at your own risk.This Segway corporation video clip shows some of the dangers riding the real Segway device may have. I found it useful to watch before riding this Segway clone:http://www.segway.com/flash/video/safetyvideo.phpPutting your fingers inside a chain and gear drive while the motor is running will remove your fingers.Lead Acid batteries should be recycled and not thrown in the trash.

Step 11: Cut and Prepare Wood Riding PlatformWe'll start this by cutting our plywood base. I used birch plywood. Any 3/4" plywood piece that can finish to 29" by 17 1/4" will do. I cut the piece on a table-saw. If you dothis, use eye protection and watch your hands.

You can use a hand saw as well. Accuracy in cutting is not critical but if you applying plywood edge tape, it needs to be smooth.

Optional: Use a coffee can or something with around a 3" radius to mark curves on the corners. See video. A compass set to 3" will work as well. Cut the corners with ajigsaw or a coping hand saw.

Optional: Sand and then apply iron on edge tape to the edges.

Optional: Sand top and bottom of board.

Image Notes1. Do not put your hands here!

Page 10: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 12: Cut and Drill BracketsNOTE: this step is not shown in the how to make video clip. Sorry. See plans and read this text.

Get the four 8" x 8" x 2" angle brackets. Two of them will be outside brackets. Two of them will be inside brackets. See the .pdf file of the plans for a drawing of thebrackets.

To make the 2 outside brackets, do this twice:

Use a hacksaw to cut off 1.5" from the end of a bracket arm. Length should be 6.5" when done. Clean up with a flat file.Use a hacksaw to cut off 2 1/4" off the end of the other bracket arm. Length should be 5 3/4" when done. Clean up with a flat file.Use a metal punch to make a mark centered between the end 2 holes of the 6.5" bracket arm.Drill this hole out with a 3/8" or .375" drill bit. This will hold the wheel axle. Use a drill lubricant when drilling metal.Widen this drilled hole with a Dremel or round file to make it 0.40" and test that it will fit the wheel axle.Punch and drill four 1/4" holes in the bottom of the 5 3/4" bracket arm. See drawing for position. It is not critical.

To make the 2 inside brackets, do this twice:

Use a hacksaw to cut off 1.5" from the end of a bracket arm. Length should be 6.5" when done. Clean up with a flat file.Use a metal punch to make a mark centered between the end 2 holes of the 6.5" bracket arm.Drill this hole out with a 3/8" or .375" drill bit. This will hold the wheel axle. Use a drill lubricant when drilling metal.Widen this drilled hole with a Dremel or file to make it 0.40" and test that it will fit the wheel axle.Punch and drill four 1/4" holes in the bottom of the 8" bracket arm. See drawing for position. It is not critical.

tips:

When drilling into metal, it's better to use a drill press if you have access to one. It goes faster and the hole will be straighter.When drilling into metal, it helps to use a lubricant between the metal and the drill bit. The lubricant takes the heat away from the hole. WD-40 is a great lubricant.Don't run the drill bit too fast. Stop and let the hole cool off occasionally.

Image Notes1. Drill 1/4" holes here2. drill 1/4" holes here

Image Notes1. drill these 1/4" holes.2. Drill this 3/8" hole and then widen to 0.40" with a file or dremel.3. Cut bracket for wheel clearance.4. Cut bracket here for wheel axle spacing.

Step 13: Mount Brackets Under PlatformGrab the 8x8x8 brackets, wheels, chain, 1/4-20 x 1-1/4 in. Zinc-Plated Hex Flange Bolts, nuts and washers.

Measure 4.5" in from an edge and mark a line. This will be the outer line that the bracket will rest on. See drawing.Place brackets on board bottom as shown in drawing, pictures and video.Mark 4 1/4" holes per bracket with a pencil. See video.Remove brackets and punch center of each hole lightly. This is to center the drill bit.Drill holes with a 1/4" drill bit.Remove brake assemblies from the wheels if they are on still. See picture above.Attach brackets with wheels and chain to board with (16) 1/4-20 x 1-1/4 in. Zinc-Plated Hex Flange Bolts, nuts and washers.

Page 11: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Image Notes1. Drill 1/4" holes here2. drill 1/4" holes here

Image Notes1. Remove this brake assembly.

Page 12: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 14: Mount Motors to PlatformThe motor has a bracket attached to it with 4 pre-threaded metric screw holes.

Set motor up so chain is straight and motor gear is perpendicular to the wheel brackets.Pull gently on motor away from the wheels and mark the 4 holes.Note that you may want to use a short piece of pencil lead to mark the motor holes.Repeat for the other motor.Punch the 8 holes and drill with a 7/32" drill bit.Insert a washer and an M6 1.0x30mm bolt into each hole and tighten it.

Step 15: Crimp on battery wiresFind an extension cord to cannibalize or use speaker wire for this step.

Cut 2 lengths per the drawing.Mark the bumpy ridged side of all ends of the cords with a black Sharpie pen. This will indicate our negative side.Separate the end of one side on each wire and strip it 1/4".Crimp on a Battery Terminal connectors (16-14 AWG, .250 Series) to each wire.Use 4 Battery Terminal connectors total.

Page 13: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Image Notes1. Crimp these on the ends of these wires.

Step 16: Connect Motor WiresFind an extension cord to cannibalize or use speaker wire for this step.

Cut 2 lengths per the drawing.Mark the bumpy ridged side of all ends of the cords. This will indicate our negative side.Separate the end of one side on each wire and strip it 1/4".optional: slide small pieces of heat shrink tubing to each extension cord wire.Twist on the black motor wire to the bumpy ridged marked extension cord wire. Do the same with the red wire to the other extension cord wire.Heat shrink tubing OR cover with electrical tape.

Image Notes1. Seal wire connections with heat shrink tubing or electrical tape.

Page 14: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 17: Install Galvanized Floor FlangeThe 1-1/2 in. Galvanized Floor Flange is used to connect the PVC handle bar assembly.

Mark the center line of the 29" long side of the board.Center the Floor Flange in this line about 1/4" away from the edge of the board. see pics, drawing and video.Mark all 5 holes.Drill 4 1/4" holes for the screws.Drill 1 1 1/8" hole (using a spade bit) for the wires to pass through this 1-1/2 in. Galvanized Floor Flange.Install Four 1/4" 20 x 1-1/2 in. Flat Head Phillips Machine Screws with washers and nuts.

Step 18: Cut the PVC PipeGet your 10' section of 1 1/4" schedule 40 PVC pipe.

Measure 31.5" and cut. This is the main vertical pipe.Measure 10.25" and cut. This is for the right horizontal hand hold pipe.Measure 10.25" and cut. This is for the left horizontal hand hold pipe.Take all the parts and "dry-fit" assemble them per drawing and video.

Page 15: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 19: Cut PVC for SwitchesGet the circular "deadman" switch and the 2 rocker type switches. You should hold these switches on the dry fit to see where you want them. The measurements I givehere are for what I did. Get switches to fit in this step. We'll add the wires later.

Deadman circular switch

Mark a hole on one of the 10.25" PVC pieces 4" from the end.Drill a hole in the center with a 3/8" drill bit. Reverse the bit for a while to start the hole if need be.File the hole or use a dremel tool to widen the hole to about 0.45" to allow switch to fit in the hole. It should be snug and NOT use glue.

You may want to practice the following rocker switch hole cutting on scrap PVC first. Also, watch the vid.

Steering Rocker switch

Mark a hole on one of the 10.25" PVC pieces 6" from the end.around the center of the hole, mark a rectangle that is 1 1/16" by 9/16".Using a small 1/16" drill bit, drill many holes INSIDE the rectangle EDGE. Use the drill bit to "cut" through the PVC, connecting the holes you drilled to cut out therectangle. An alternative method is to use a Dremel tool for this with a cutter bit.File the hole or use a Dremel tool to widen the hole to allow the switch to fit in the hole. It should be snug and NOT use glue.

Steering Tilt switch

Mark a hole on one of the 31.5" PVC piece 4.5" from the end.around the center of the hole, mark a rectangle that is 1 1/16" by 9/16".Using a small 1/16" drill bit, drill many holes INSIDE the rectangle EDGE. Use the drill bit to "cut" through the PVC, connecting the holes you drilled to cut out therectangle. An alternative method is to use a Dremel tool for this with a cutter bit.File the hole or use a Dremel tool to widen the hole to allow the switch to fit in the hole. It should be snug and NOT use glue.

Page 16: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 20: Harvest the WireIf you are using Cat5 cable, you can "harvest" or remove the wire pairs like this.

Strip the end of the cable to remove the outer plastic insulation.Put the 8 wires in a vice.Go to the other end and pull on the insulation.Go back to the beginning of the cable near the vice and slowly pull the insulation down.It will come off a little at a time. See video.

Better way from another Instructables user!:Mar 19, 2014. 1:59 PM rmelchiori says:There is an easier way to strip the outer jacket of cat5 cable. If you pull down on the thin nylon floss, it will cut the jacket and open it up like pulling a zipper.

Step 21: Prepare PVC Switch WiresMeasure out the switch wires.

Use electrical phone type wire that is about 6' long. I used CAT5 Ethernet cable which has 4 twisted pairs of conductors.One pair is for the deadman switch.To make the 3 conductor tilt and steer cables, separate out one pair into 2 individual wires:A fast way to do this is to put one end in a in a drill chuck, attach the other end to a vice or have a buddy hold it. Spin the drill to loosen the wires so you get 2 non-twisted individual wires.Now, take one individual wire and add it to a twisted pair. You will have 3 wires. Put one end in a in a drill chuck, attach the other end to a vice or have a buddyhold it. Spin the drill to tighten the spin of the wires together.Repeat for the other 3 wire cable.

Page 17: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 22: Optional: Epoxy PVC reducer into Floor FlangeThis step is optional but recommended so the handle bars don't twist while you are riding.

Take the epoxy tubes. Squeeze out about 3/4" of each the resin and hardener on a piece of scrap paper.Mix the 2 gels together until its a consistent dark grey color.Apply the mixture to the white PVC threads of the PVC 1.5" to 1.25" reducing male adapter.Screw this PVC 1.5" to 1.25" reducing male adapter into the Floor Flange on the board. Hand tighten.Wait 10 minutes for the epoxy to dry.

Page 18: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 23: Install Switches in PVCGet the 2 rocker switches and deadman switch.

Solder the 2 wire cable to the deadman switch.Solder a 3 wire cable to the steer rocker switch.Solder a 3 wire cable to the tilt rocker switch.Write down all the colors of the switches for reference later when you connect them to the Arduino.Snake in the switch wires through the switch holes. See picture and video.Push in switch to friction fit.

Step 24: Glue PVC Parts TogetherGet the PVC Cleaner and Glue. An alternative to PVC glue is to use epoxy. You are working around the snaked wires so lay it out on a table.

Do it in this order:

End capsHandles to Tee. (watch the switch positions!)Tee to main pipe.Main pipe to Reducer PVC (floor flange) For this last step. Make sure the Segway board is lying flat on the table. Quickly step back and look at the handle barassembly to make sure you twist them parallel to the table while the glue has not dried.

How to Glue PVC:

Use the PVC cleaner wand (purple) to wipe cleaner on both parts to be bonded.Apply glue (clear color) to both sides.Push pieces together and twist to spread the glue. The working time for the PVC glue is about 10 seconds. Make sure the switch is where you want it!

Page 19: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 25: Mount Electronics Box to PlatformUse the 1/2" #4 wood screws:

Line up the box as shown in the picture.Mark the holes with a punch (or screw) by tapping with a hammer.Drill holes with a 1/16" drill bit.Using a hand held screwdriver, attach box with #4 1/2" screws.

Step 26: Install BatteriesMark Battery lines at 3/4" in from long edge of board.Mark battery line 1" in from short end of board.Trace rectangle around each battery.Mark 4 holes outside battery rectangle for zip ties to go through. See pictures and video.Drill a hole for each battery power wire to go through.Make sure the batteries will fit but dont lock the zip ties now!

Step 27: Install the Bi-Color LED

Grab the bi-color LED and the 300ohm resistor. Watch the video.

Trim the LED center conductor.Trim and solder on the resistor to the LED center conductor.Solder an 8" long piece of 3 conductor wire cable to the LED assembly.Insulate all wires with electrical tape.Drill a 3/32" hole in the project box.Insert the LED into the hole.Hot glue or epoxy it in.

Page 20: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 28: Install the Charging connector and Power SwitchGet the 3pin charging connector and circular rocker power switch. see video.

Drill a 5/8" hole with a spade bit in the end of the project box.Insert the 3 pin charge connector and put on lock nut.Drill a 13/16" hole with a spade bit centered in the top of the project box for the power switch.Press fit switch in.

Optional : Add a hole for USB access to the Arduino. You can see white electrical tape covering mine in the pic above.

Place the Arduino with shield in the box aligned with the side away from the connector.Mark the USB connector position on the inside of the box.Transfer the center of the marks to the outside of the box.Use a large drill bit to make a hole for the USB.Try to connect a USB cable to the Arduino.Trim to fit using a Dremel tool or file.

Page 21: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 29: Drill Project Box Holes and Pass Through Wires.I didn't shoot video of this step so look at this picture.Get your Arduino and your Dimension Engineering Motor Driver boards.

Place both boards in box for test fit. Mark edges of board to ease hole placement.Mark and drill 1/4" holes for power wires on side closest to batteries. Be sure not to hit the rubber wheels below!Use a Dremel tool or files to widen holes. An alternative is to use a bigger drill bit so wires will fit through more easily.Drill a 1/4" hole 2.5" from these power wires hole. This hole is for the control wires.Push through all available wires now. Make sure that the boards still fit in with wires in place.

Step 30: Tack Down Wires and Connect Battery WiresGet the 1/4" wire tacks and a short piece of extension cord.

Flip over the segway on a few 2x4's or a small bucket so you can work on the bottom.Tack down wires that are loose by hammering in the small tacks.Snake the previously crimped battery cables through the battery holes.Measure and tack the battery cables to arrive under the Project box. Strip ends.Make a small (8") piece of extension cord cable to pass through hole into project enclosure. Strip all ends.Twist together the batteries in "series" per the schematic under the Project box location.Twist in the connector cable per schematic.Add in short 8" cable per schematic.Secure with 3 wire nuts or just solder and electrical tape.

Step 31: Get Wires Ready

With all the wires sticking up from the project box:

Solder a short extension cord wire to the power switch as shown in the schematic and pictures.Put electrical tape over the power switch to avoid any shorting.Place the motor controller and Arduino boards in the enclosure temporarily.Find a good final length for the wires and cut them.Strip the wire ends.Using a soldering iron, "tin" all the wires

Optional: Attach small terminals to the control wires.You can use the straight terminals that came with the MPU6050.Break them apart.Use a hemostat or cardboard to hold them while soldering.

Page 22: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

IMPORTANT NOTE:This is from the Dimension Engineering web .pdf for the Saber controller :"Warning! Be very careful to wire and plug in the battery and connector correctly.Connecting the battery backwards will destroy the Sabertooth and will void the warranty."

Step 32: Install Batteries and Quick Meter CheckGet the batteries and zip-ties.

Put the batteries on the board.Thread the zip ties through the holes and around the batteries.Pull tight on the zip ties so the batteries are secure.Trim off the ends of the zip ties with wore cutters.

IMPORTANT NOTE:This is from the Dimension Engineering web .pdf for the Saber controller :"Warning! Be very careful to wire and plug in the battery and connector correctly.Connecting the battery backwards will destroy the Sabertooth and will void the warranty."

Page 23: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Image Notes1. Crimp these on the ends of these wires.

Step 33: Install ElectronicsGet the motor driver board, the Arduino and the Arduino shield.

Place each board into the box as shown in the picture.Secure each board with screws through the plastic and into the wood.Connect the battery wires.Connect the power wires to the motor controller as shown in the schematic.BE SURE THE BATTERY WIRE POLARITY IS CORRECT. If the + and - are swapped, you will burn out the expensive motor driver board.Install the Arduino shield boardConnect the control wires to the Arduino shield as shown in the schematic.Solder on the MPU6050 GY521 accelerometer/gyro board right angle pins that came with the board.Insert the accelerometer/gyro right angle pins as shown in picture. Make sure that the component side faces the back of the board.Wire up the pull up resistors, Vcc, GND, and I2C lines as shown in the schematic. Use twisted pair wiring for the I2C wires and keep them very short.Connect the wires from the saber to the Arduino.Use twisted pair wiring and keep them very short.

Check Saber dip switches match the picture for 9600 baud. This is to match the serial communication rate set in the Arduino code for communication between theArduino and the Saber. This is the Saber 2x12 Data sheet for your reference: http://www.dimensionengineering.com/products/sabertooth2x12

Page 24: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 34: Test!At this point, you should be ready to test out your Segway Clone!

I would recommend setting the board up on a bucket so the wheels CAN'T touch the ground.Turn on the power switch. Wait 8 seconds.Hold the deadman switch down and move the board forward and backwards.You should see the wheels spin in each direction.If you see the red Error LED on the Saber flashing and the motors start to shake, you have low battery voltage. You either need to charge your batteries ORreplace them because they cant hold a full charge anymore.

When this works:

Try out the board on the ground.If forward and backward tilt are reversed, flip the pins in the Arduino code.Try out the steering and tilt.Pop out and flip the steering and tilt switches if they are reversed.If you see the red Error LED on the Saber flashing and the motors start to shake, you have low battery voltage. You either need to charge your batteries ORreplace them because they cant hold a full charge anymore.

Page 25: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

CONGRATS!

Step 35: Optional: Debug with Arduino Serial Monitor or OscilloscopeThis is optional for debug

Arduino Serial Monitor

Open the Arduino Serial Monitor. Set it for 115,200 baud

The code has this line in it:

Serial.begin(115200); // initialize I2C and serial monitor to 115,200 baud

To enable printing to the serial monitor, set this to a 1:

#define DEBUG_ENABLE_PRINTING 0 //normal

If you are up on a bucket, to avoid holding the deadman switch, set this to a 1:

#define DEBUG_FORCE_DEADMAN_SWITCH 0 //normal

To just look at the serial monitor and not have the motors running, set this to a 1:

#define DEBUG_DISABLE_MOTORS 0 //normalrecompile.

Oscilloscope:

if you want to observe the "loop time" of the Arduino code, you can use an oscilloscope to do this. It should be around 10Hz or 10 times per second.

Hook a scope probe to Arduino pin 3. Connect the ground as well.Un-comment this lines in the code: // digitalWrite(oscopePin, HIGH);recompile.

Page 26: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 36: Optional: Chain Tensioning BlockIf your chain is coming off or it's loosened up, you can add chain tensioning blocks as shown in the above pics.

Cut out a pice of 2" x 4" plywood.Drill a 1/4" hole 1 1/8" from one end.Drill a 13/16" hole 1 3/8" from the other end.Press fit a 2 1/4" piece of 1/2" PVC into the larger hole.Secure the other hole with a 1/4" nut, washer and bolt to each bracket as shown in the picture.

Page 27: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 37: Final Notes:

Low Cost Goal:My main goal in this project was to make it low cost and easy to build. A number of design decisions would have been different if the goal was long term reliability, range,power etc.

Batteries:The 12V sealed lead acid batteries used in this project were ONLY chosen because they are very low cost. They are really made for starting gas motors. They are not thebest choice for a long life, deep discharge, rechargeable battery. They are prone to failure if they are discharged below 20% capacity. They must be charged after use tokeep them from failing. I went through 2 sets of batteries before I learned this.Some reading on batteries:http://batteryuniversity.com/learn/article/can_the_lead_acid_battery_compete_in_modern_timesDeep discharge batteries will work better but cost more.http://auto.howstuffworks.com/question219.htm

Weak Point:I have found that one weak point of the design is at the interface between the PVC and the board. If you push too hard on the PVC handle bars let's say in a crash, thePVC at that fulcrum may crack. A design improvement would be to use a threaded metal pipe coming up from the board. The top threaded metal pipe would join the PVCat the handlebars. The PVC would have the switches in it.

Motor Controller :The Dimension Engineering Saber motor controller was one of the most expensive parts of this project. I tried two cheaper ebay motor controllers using PWM driven bythe Arduino. They both failed to work well and so we needed to use the Saber part. It would be great to find a lower cost alternative to the Saber which is very welldesigned.

Future Enhancements (as of 3/2014):Here are some future enhancement ideas I would like to see made to this Segway clone:

Voltage monitor circuit. This would be a pair of resistors set up as a voltage divider. They would bring the 24V range down to a 5V range and be monitored by an1.ADC input on the Arduino. If the voltage dropped below a preset threshold for a certain period of time, the LED would flash at a 2Hz rate to let you know torecharge the battery.More work to smooth the control algorithm. This Segway clone control is just OK. I think there could be more refinement to the gain adjustment and steering.2.Battery research to replace the $32 lead acid batteries with cheap LIPO or LiFePO4.3.Replacement of the vertical PVC pipe with a threaded iron pipe for increased strength.4.Find cheap encoders and add them to the wheels.5.

Page 28: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Step 38: ConclusionI hope you enjoyed this Instructable. This Segway clone could not have been done without the work of others in the Instructable community.

If you make one of these Segway clones, please add a picture or video clip to the comments!

I will end this Instructable with a final safety warning:

Riding on a 2 wheel device that is inherently unstable is dangerous. You will fall off it and crash into things. You are responsible for your own safety. Wearprotective gear.The real Segway device can be dangerous even though it has safety shutoffs and error detection. This Segway clone has NO safety detection or elegantshutdown. Ride at your own risk.This Segway corporation video clip shows some of the dangers riding the real Segway may have. I found it useful to watch before riding this Segway clone:http://www.segway.com/flash/video/safetyvideo.php

Page 29: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

Related Instructables

2-Wheel SelfBalancingRobot by usingArduino andMPU6050 byUfactory

ElectricunicycleArduino DIY byMarkula

BalancingInstructableRobot byNaren_Murali

Google Earthcontrolled byAccelerometer(MPU-6050) by mikilabo

Self BalancingRobot with LCDby ferasf

How do I usethe RFduinowith a 6 Axisaccelerometerby RFduino

Advertisements

Comments

50 comments Add Comment view all 387 comments

 KlausH says:  Oct 13, 2014. 3:09 PM  REPLYHello ihart,

to begin: sry for my bad English I'm from Germany and i know that my English are bad. But now to the Project :)

I would like to build a Segway clone. I have order two 24V motors, but i don't know how i can charge 12V batteries. Until now, I don't have Batteries, but youhave two 12V Batteries and the most E-Scooter or Chairwheeler has 12V Batteries and 24V are very expensive. I know, that I must connect the Batteries inseries, that means Plus-Pole from Batterie A to the Minus-Pole from the Batterie B, but how do you charge your Batteries? Every Batterie alone?

Thanks and best regards,Matthias

Page 30: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

 ihart says:  Oct 14, 2014. 12:06 PM  REPLYHi Mathias,

Yes, you have described the battery connection correctly. Please download the schematic in the instructable to see how to connect things. Googletrasnlate may help with English to German. THe batteries are charged with a 24volt charger taken from Razor scooters. See the schematic.

 KlausH says:  Oct 15, 2014. 11:52 AM  REPLYHello ihart,

oh sry. I didn't see the connector (3 Pin charge connector) thats realy clever :)

 area36 says:  Oct 15, 2014. 10:22 AM  REPLYGreat project. I really enjoyed seeing it all be put together! When loading the code verifying the code in arduino I keep getting this error...

"Error Compiling SPI not defined" etc..

so I logically

#include <SPI.h>

But this ends up giving me a whole new set of problems that have something to do with the MPU6050.cpp. Any ideas as to what could be causing this problem?Cheers!

 Charc says:  Oct 2, 2014. 1:01 PM  REPLYTHANK YOU, I can REDESIGN MY PROTOTYPE FOR Instructable build.

MY COMPONENTES ARE: TWO MOTORS 24V 450WATTS, IMU MPU6050, DRIVER POLOLU VNH5010, ARDUINO DUE, TWO BATTERIES 12V, THISIS MY DESING:

 ihart says:  Oct 6, 2014. 1:06 PM  REPLYThe chassis design looks good. Some thoughts:

You should use the Arduino Uno and not the Due if you are switching to the Saber controller. The Due is a 3.3V only part. The saber uses 5v and theserial line is 5v swings.

I don't know anything about the Pololu controllers. This Instructable and Arduino code only use the Saber. You could switch to the 25A saber controllerfor your bigger motors.

 Charc says:  Oct 2, 2014. 8:41 AM  REPLYno, I have not based on instructables

http://www.instructables.com/file/F72VD3GI0RYRMV9/

iseiway.wmv(516x290) 15 KB

 ihart says:  Oct 2, 2014. 9:56 AM  REPLYThat file wont play for me either. Try uploading to Youtube and send a link. I'm not sure I can help you with your design since it is not based on work Ihave done. I will look at the video if you put it on Instructables and I may have a suggestion...

Page 31: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

 Charc says:  Oct 2, 2014. 7:46 AM  REPLYThis is my prototype, thank you!

iseiway.wmv(516x290) 15 KB

 ihart says:  Oct 2, 2014. 8:09 AM  REPLYThat file wont play for me. Try uploading to Youtube and send a link. Also, is this design of yours based on this Instructable??

 Charc says:  Oct 1, 2014. 9:01 PM  REPLYHi ihart!

I have trying build an segway but i can't relationship the gyro and accelerometer, i defined a point of equilibrium and my segway begin to decrease this pointand fall to way fast, sorry but my English is really bad, can you help me? thank you for time.

 HollywoodGinosa says:  Sep 28, 2014. 10:16 AM  REPLYHello ihart,

I've just completed the electronic part of segway following your instructable step by step also with components. But the cicle doesn't start. I've also tested all thecomponents by simply progam with positive results (except the gyroscope that I have not tested). Could you help me?

 ihart says:  Sep 29, 2014. 9:15 AM  REPLYI am having a hard time understanding you. What have you tested? You need the "gyroscope" working for the segway. Did you try the items in the debugsection of the Instructable? Can you get the Arduino to print out as shown in the debug section and post here? Can you shoot a video of what is broken?

 HollywoodGinosa says:  Sep 27, 2014. 3:38 AM  REPLYGood morning iHart,

I've just completed all the electronic part of segway but it doesn't work with your program. For testing i've uploaded this program:

#include <Servo.h>

Servo myservo;

void setup () {

myservo.attach(13); // Use PWM pin 14 to control Sabertooth.

Page 32: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

}

void loop() {

// 0 means full power in one direction.

// Actually the minimum value for me is around 30.

// A smaller value won't drive the motor.

myservo.write(90);

delay(2000);

// 90 means stopping the motor.

myservo.write(90);

delay(5000);

// 180 means full power in the other direction.

// Actually the maximum value for me is around 160.

// A larger value won't drive the motor either.

myservo.write(100);

delay(2000);

}

I've also changed the sabertooth switches and works all.

Could you help me please?

 ihart says:  Sep 29, 2014. 9:13 AM  REPLYThat's great that you are working on this.

Questions:

-Why are you using servo code? The segway does not do anything with a servo.

What does this mean? "I've also changed the sabertooth switches and works all."

 peraz91 says:  Sep 21, 2014. 5:43 AM  REPLYArduino: 1.5.4 (Windows 7), Board: "Arduino Uno"

C:\Program Files\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readBytes(bool, uint8_t, uint8_t, uint8_t, uint8_t*,uint16_t)':C:\Program Files\Arduino\libraries\I2Cdev\I2Cdev.cpp:217: error: 'SPI' was not declared in this scopeC:\Program Files\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readWords(bool, uint8_t, uint8_t, uint8_t, uint16_t*,uint16_t)':C:\Program Files\Arduino\libraries\I2Cdev\I2Cdev.cpp:299: error: 'SPI' was not declared in this scopeC:\Program Files\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static bool I2Cdev::writeBytes(bool, uint8_t, uint8_t, uint8_t, uint8_t*)':C:\Program Files\Arduino\libraries\I2Cdev\I2Cdev.cpp:488: error: 'SPI' was not declared in this scopeC:\Program Files\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static bool I2Cdev::writeWords(bool, uint8_t, uint8_t, uint8_t, uint16_t*)':C:\Program Files\Arduino\libraries\I2Cdev\I2Cdev.cpp:549: error: 'SPI' was not declared in this scope

WHY?????? thanks

 ihart says:  Sep 21, 2014. 8:53 AM  REPLYRead section 8 about installing the Arduino sw. Run with the files that are there that you download and not the ones in your library. I have no idea whyyour I2CDev would be referencing SPI.

 lamberto.rengucci says:  Sep 17, 2014. 1:20 PM  REPLYhelp, sorry I write from Italy do not speak English use google translator, mechanics ok, same as his wood, electronics are in trouble, how do I program thearduino, my email, [email protected] ask in a private message to give clear explanations more

 ihart says:  Sep 18, 2014. 5:21 PM  REPLYI'm not sure I understand where you are in your project. Are you saying that you have everything built but you cant get the Arduino running? If so, you'rein luck because the Arduino was developed in Italy! http://en.wikipedia.org/wiki/Arduino There should be a lot of information in Italian if you search for it.You should start with loading and running the blinky example. If you have a specific question let us know. Good Luck.

Page 33: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

 maxtor.yau says:  Aug 5, 2014. 2:13 AM  REPLYHI @ihart

My setup everything is done.

But when I try to move fast the motor is shaking and won't run anymore.

Any idea about it ?

 ihart says:  Aug 9, 2014. 5:32 AM  REPLYHave you read through the debugging tips in the electronics section? Try these things. Read through other comments here. If all this fails, post the detailsof your setup. Did you exactly implement this instructable or did you try some kind of new/different configuration or parts?

 maxtor.yau says:  Sep 11, 2014. 3:20 AM  REPLYlook my mpu6050 is going crazy after a minutes

ang_X: 146.50 ang_Y: 35.10 ang_Z: -0.98 ang_rate_X: 0.00 ang_rate_Y: -0.44 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.49 ang_Y: 35.09 ang_Z: -0.98 ang_rate_X: -0.44 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: -0.44 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.51 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: -0.44 ang_rate_Y: 0.00 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: -0.44 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.51 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: 0 Mot2%: 0

ang_X: 146.51 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: -0.44 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 146.50 ang_Y: 35.09 ang_Z: -0.97 ang_rate_X: 0.00 ang_rate_Y: -0.44 ang_rate_Z: -0.44 Mot1%: 0 Mot2%: 0

ang_X: 48.70 ang_Y: -24.42 ang_Z: 21.08 ang_rate_X: -8276.83 ang_rate_Y: 14135.00 ang_rate_Z: 708.54 Mot1%: 0 Mot2%: 0

ang_X: -61.99 ang_Y: 12.34 ang_Z: 24.14 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: 45.70 ang_Y: -15.09 ang_Z: 36.48 ang_rate_X: -1686.95 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: -62.30 ang_Y: 57.58 ang_Z: 3.54 ang_rate_X: -1686.95 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: -8.18 ang_Y: 21.35 ang_Z: 67.92 ang_rate_X: -1686.95 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: 19.83 ang_Y: -15.86 ang_Z: 17.39 ang_rate_X: -1686.95 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: -12.64 ang_Y: -29.13 ang_Z: -60.87 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: -50.91 ang_Y: -30.74 ang_Z: -9.44 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: 178.08 ang_Y: -3.70 ang_Z: 20.10 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: 13.92 ang_Y: 29.07 ang_Z: -25.51 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: 31.78 ang_Y: 46.12 ang_Z: -34.94 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.05 Mot1%: 0 Mot2%: 0

ang_X: -25.58 ang_Y: -39.04 ang_Z: -50.27 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.49 Mot1%: 0 Mot2%: 0

ang_X: -14.71 ang_Y: 18.97 ang_Z: 66.61 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.05 Mot1%: 0 Mot2%: 0

ang_X: 14.84 ang_Y: 26.74 ang_Z: -47.13 ang_rate_X: -1686.51 ang_rate_Y: -6620.94 ang_rate_Z: -471.05 Mot1%: 0 Mot2%: 0

 ihart says:  Sep 11, 2014. 6:35 AM  REPLYHave you read through the debugging tips in the electronics section?Try these things. Read through other comments here. If all thisfails, post the details of your setup AND a picture or video. Did you exactly implement thisinstructable or did you try some kind of new/different configuration orparts?

Page 34: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

 docileroo says:  Sep 3, 2014. 6:50 PM  REPLYWhat a great instructable!! I built it using (mostly) the parts you specified, except I used the Sabertooth dual 25A driver and 350W motors and I made theentire chassis out of chipboard on a router table. When I power up the clone, it appears to "think" it needs to go full speed forward. I have not changed thecode in any way. the gyro board has the components facing the rear. Tilting the device produces no change on the serial output or the motor speed. Theserial output is below. Any thoughts on where to go from here?

#define DEBUG_FORCE_DEADMAN_SWITCH 0 //normal#define DEBUG_ENABLE_PRINTING 1 //normal#define DEBUG_DISABLE_MOTORS 1 //normal(press the deadman switch, LED turns red, and motors don't run)

Initializing I2C devices...Testing device connections...MPU6050 connection failedInitializing DMP...DMP Initialization failed (code 1)ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: 0 Mot2%: 0ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: 0 Mot2%: 0ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: 0 Mot2%: 0ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: 0 Mot2%: 0

#define DEBUG_FORCE_DEADMAN_SWITCH 0 //normal#define DEBUG_ENABLE_PRINTING 1 //normal#define DEBUG_DISABLE_MOTORS 0 //normal(press the deadman switch, LED turns red, and motors run)

Initializing I2C devices...Testing device connections...MPU6050 connection failedInitializing DMP...DMP Initialization failed (code 1)ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -8 Mot2%: -8ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -19 Mot2%: -19ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -33 Mot2%: -33ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -48 Mot2%: -48ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -59 Mot2%: -59ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -71 Mot2%: -71ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -82 Mot2%: -82ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -93 Mot2%: -93ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -100 Mot2%: -100ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -100 Mot2%: -100 (release)ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -6 Mot2%: -6ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -16 Mot2%: -16ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -29 Mot2%: -29 (release)ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -2 Mot2%: -2ang_X: 0.00 ang_Y: 0.00 ang_Z: 0.00 ang_rate_X: 0.00 ang_rate_Y: 0.00 ang_rate_Z: 0.00 Mot1%: -12 Mot2%: -12 (etc.)

 ihart says:  Sep 4, 2014. 8:18 AM  REPLYThe picture and build looks great! Here are a few things I noticed:

Your MPU6050 is not being initialized. It says that in your printout: "MPU6050 connection failed"

You are missing the ground connection to the MPU6050!

It looks like there is an extra ground going to the saber (the black wire near the Saber capacitor) The Saber should be connected to the electronics withONLY one wire as shown in the schematics or you will get a ground loop.

The control wire S1 from the Arduino to the Saber should be in a twisted pair wire with the ground.

I assume that your component side of the MPU6050 is facing the back of your board. It needs to be that way or the tilt will be backwards.

Let us know how it goes.

Page 35: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

 docileroo says:  Sep 4, 2014. 7:20 PM  REPLYOh, and regarding the single ground wire to the Saber, the schematic shows one to gnd on one side of the board and one to B- on the other side ofthe board. Is this incorrect? I have it wired in that way (to B-) and that is the wire you see going past the big capacitor.

 ihart says:  Sep 5, 2014. 7:18 AM  REPLYThe B- connection on the Saber should only go to the battery- and the charge_connector-. My schematic should show that.

 docileroo says:  Sep 5, 2014. 6:43 PM  REPLYI just checked and see that I have a schematic dated 2/2014 with the ground all connected. I'll fix that. Any thought on the 19FIFO overflowthat I see in the output below?

I took it in to the office where I would have more witnesses who could testify that I didn't kill myself intentionally so my wife could collect theinsurance. And... the handle upright snapped off. So, I'll have to redesign that.

Before that happened, I realized that "neutral" balance for my device is quite a few clicks backward on the tilt control. And after I power itdown, I have to readjust it the next time I turn it on. Does this indicate that the MPU is not perfectly vertical or can I adjust this in code so thatat the time of initialization it is something closer to neutral for my device?

Thanks again ihart!

 ihart says:  Sep 6, 2014. 8:07 AM  REPLYThe schematic changed in June to remove that potential ground loop. I'm not sure it would cause a problem but it was wrong in the schemfrom 2/2014 and I didn't do it that way.

re; the "19FIFO overflow!" issue, It is not a real problem. It is caused by having the print statement enabled. Printing out to serial I/O fromArduino to computer display is slow. The Arduino cant keep up with reading the MPU6050 FIFO when it's printing so occasionally theFIFO will overflow.

I suggest that you disable the printing debug (the default) for normal operation.

re: the neutral position, you can modify that in the code. Look for this line and change the 80 number to get the position you want:

x_accdeg = (float)((SG_filter_result - (80 + balancetrim)) * (1.0));

Send a pic and video when you can ride it!

 docileroo says:  Sep 4, 2014. 7:16 PM  REPLYihart, you are more than generous with your time and you rightly diagnosed my oversight. I was missing a little jumper wire over the breadboarddivide (oops)! I've twisted the ground and S1 wire as well. The output is below and leaves me with one question about the "...19FIFO overflow!" Anyidea what that is and if it indicates a problem?

Initializing I2C devices...Testing device connections...MPU6050 connection successfulInitializing DMP...Enabling DMP...Enabling interrupt detection (Arduino external interrupt 0)...DMP ready! Waiting for first interrupt...fifoCount: 1024 mpuIntStatus: 19FIFO overflow!

ang_X: 133.65 ang_Y: 77.27 ang_Z: 0.55 ang_rate_X: -0.44 ang_rate_Y: -0.44 ang_rate_Z: 0.00 Mot1%: 1 Mot2%: 1ang_X: 133.65 ang_Y: 77.27 ang_Z: 0.55 ang_rate_X: 0.00 ang_rate_Y: -0.44 ang_rate_Z: 0.00 Mot1%: 2 Mot2%: 2

I'll probably try to ride the thing tomorrow and I'll post detailed pictures (hopefully before I break it). This is an awesome instructable and veryadaptable. Kudo's ihart!

Page 36: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

 Bixnu says:  Sep 3, 2014. 7:36 PM  REPLYsir,

I've been trying to create a segway as per your instructions.Main problem is i couldn't get sabertooth motor driver,instead i've tried using a different driver.

Here's its datasheet http://robokits.co.in/shop/index.php?main_page=pro...

I've tried to make basic changes to the hartway code you've provided but it's nerve recking experience for me.

Area of code i'm facing problems are

1.declaration of

#define SABER_MOTOR1_FULL_FORWARD 1

#define SABER_MOTOR1_FULL_REVERSE 127

#define SABER_MOTOR2_FULL_FORWARD 128

#define SABER_MOTOR2_FULL_REVERSE 255

as sabertooth runs in serial transmission mode so i wont need software serial and the driver i'm using runs in point to point mode.Above written value doesn't gowith my driver.

I've to use logic LOW for forward operation and HIGH for reverse.

and have to feed analog value in PWM pin for motor speed.

2.

cSpeedVal_Motor1 = map (

Motor1percent,

-100,

100,

SABER_MOTOR1_FULL_REVERSE,

SABER_MOTOR1_FULL_FORWARD);

cSpeedVal_Motor2 = map (

Motor2percent,

-100,

100,

SABER_MOTOR2_FULL_REVERSE,

SABER_MOTOR2_FULL_FORWARD);

SaberSerial.write ((byte) cSpeedVal_Motor1);

SaberSerial.write ((byte) cSpeedVal_Motor2);

i'm unable to convert Motor1percent and Motor2percent in -100 to 100 range.

plz help me.

thank you

 ihart says:  Sep 4, 2014. 7:47 AM  REPLYI doubt that that board will drive the motors without frying/smoking up. I mentioned in the Instructable that I wrote PWM code and tried 2 PWM boards likethat and they both died. I settled on the Saber boards which seem to work for everyone. You can get the Saber in your country. Buy it from one of theInternational dealers listed here:

http://www.dimensionengineering.com/dealers/list

See comments below. If you decide to proceed with your own PWM, you can use the map() function in Arduino code to convert or "remap" values.

 HollywoodGinosa says:  Sep 2, 2014. 7:57 AM  REPLYCan I put one potentiometer instead of a momentary switch?

I would to replicate segway steering.

Thank you. Lucio.

Page 37: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

 ihart says:  Sep 2, 2014. 8:56 AM  REPLYHi Lucio,

You would have to modify the code to do this. I would build the Instructable exactly as is first and then later modify it to add the potentiometer.

 HollywoodGinosa says:  Sep 3, 2014. 10:44 AM  REPLYOh yeah U R the best!Now I've all the materials to build my segway, when I will arrive to this step I think that you'll make modified code.

Thanks a lotLuciano.

 ihart says:  Sep 3, 2014. 12:45 PM  REPLYLuciano,

I think we have a language issue here. I am not planning to modify the code to use a potentiometer. Build the instructable as is first. You maychoose to modify it for a potentiometer later. I would be happy to discuss the code changes needed at that time but you would have to makethem.

 ihart says:  Sep 3, 2014. 12:45 PM  REPLYLuciano,

I think we have a language issue here. I am not planning to modify the code to use a potentiometer. Build the instructable as is first. You maychoose to modify it for a potentiometer later. I would be happy to discuss the code changes needed at that time but you would have to makethem.

 brianmcm says:  Sep 1, 2014. 2:07 PM  REPLYHi Jared, very informative instructable and it got me to try my hand at building one myself. Before mounting the electronics to the platform I decided tobreadboard the electronics to ensure I had the wiring straight. I'm running the same motors and batteries as your setup, but instead of a Sabertooth 2x12 I'musing a 2x25. It shouldn't make a difference correct? Anyway when I run the code I get a variety of results. Sometimes the motors go immediately into ashutter; releasing the deadman switch and pressing it again only interrupts the shutter. Sometimes the minute I release the deadman, the motors ramp up tofull speed. After several restarts I've only had the system begin to respond as I hoped only to go into the full speed mode. All my wires are twisted pair asinstructed. Any suggestions? Thank you.

 ihart says:  Sep 2, 2014. 9:02 AM  REPLYHi Brian,

That's great that you are building this. It sounds like you're getting close. The 2x25 should be fine. In my experience, those kind of problems are causedby motor noise. One experiment if you want to use your breadboard setup is to use very little cheap motors like this. Hook up 3 AA batteries for power. Itshould work well because the noise is low.

Otherwise, shorten all your wires and make sure your power wires are very short as well. Try to follow the pictures in the Instructable exactly.

Also, make sure the pullup resistors are on the I2C lines.

 brianmcm says:  Sep 3, 2014. 9:44 AM  REPLYThank you for the suggestions!! A big help!!!As you said getting close:)

 brianmcm says:  Sep 2, 2014. 9:46 AM  REPLYI just realized my question was directed to the wrong person. Sorry about that. iHart I meant it to go to you. I apologize Jared for the confusion. Greatinstructable as I said.

 Jared_Reabow says:  Jun 12, 2014. 2:27 AM  REPLYhey there, i am having an issue, i have built the basic platform but get some serious issues with the segclone. it will start shuttering like mad and output fifoerror but if i release the button it stops shuddering, if i press it , it continues shuddering until i reset the arduino.

here is the video

 Akbar13 says:  Aug 27, 2014. 12:08 PM  REPLYI've got the same problem with 7AH batteries. I tried 20AH today and I still have the same problem. I switch on the power supply, wait about 5 seconds,then i hold IMU in vertical position (with respect to ground) and press deadman switch motors dont move at all, then i move it a little forward or a littlebackward motors turn accordingly in forward or reverse directions (meanwhile my bicolored LED turns green when i push deadman and turns red when irelease deadman). Everything seems to be all right but it doesn't last long enough (only for 1 min. or may be sometimes 2 minutes in this time i tryreleasing and pressing deadman a few times). At some moment usually when change of direction happens or when i release deadman and press again,red LED on saber flashes once or twice with status 2 LED, after that flash occurs motors start jerking exactly like in the video above. In this case i releaseand push deadman again and in this case motors turn at full speed, bicolor turns off completely. Sometimes to find the point where change of directiontakes place i change the angle of IMU to 180 ) degrees (sometimes 90 degrees) than before.

Page 38: Instructables.com - Rideable Segway Clone - Low Cost and ...€¦ · With the Segway clone leaning forward, it's front edge touching the ground, toggle the power switch on. The LED

http://www.instructables.com/id/Rideable-Segway-Clone-Low-Cost-and-Easy-Build/

 ihart says:  Aug 30, 2014. 5:51 AM  REPLYHi Akbar,

Welcome back. One thing that we have found if you look through the comments since your school break is that using short wires and twisted pairwires helps. There is magnetic coupling from the motors into long parallel wires (mutual inductance) that will cause problems. Please follow theInstructable and make your wires very short and use twisted pair wiring for all interconnect except for the power (extension cord) wiring. Try toduplicate what the Instructable shows exactly.

 ihart says:  Jun 12, 2014. 6:39 AM  REPLYIt looks like you are using different motors than I did. It seems like many people are using wheel chair motors which require much higher currents tooperate than the 280W motors I used. What size in Amp Hours (AH) are your pair of 12V batteries? The saber will flash a red error LED and stutter themotor like that when it senses over current. I believe you have to reset it to clear the error. Is your saber flashing an error light when this happens?

 Jared_Reabow says:  Jun 12, 2014. 10:43 AM  REPLYthing is i build multirotors, so i have lithium polymer batteries to spare, i use two 12v packs in series, the motors are from a small 24v mobility scooterso i am unsure it is over current?

 ihart says:  Jun 12, 2014. 12:31 PM  REPLYDoes the RED error led on the Saber board flash when it is shuttering?

 Jared_Reabow says:  Jun 12, 2014. 2:54 PM  REPLYyes but only at the exact point where the motors changes direction.

If i stop the shuddering by releasing the button and then press the button again, it continues to shudder

 ihart says:  Jun 13, 2014. 7:35 AM  REPLYThat Red error LED should never flash. I believe that you need bigger and higher current batteries to drive the large wheelchair motorsyou are using. Read the Dimension Engineering Saber spec I reference in the Instructable or google it. You should also be in Lithuiumbattery mode if you are using LIPO.

The shuddering may continue after you switch the deadman of and on again if the Saber is in the error shuttering mode. From Dimensionspec:

"Keep in mind that when a lot of current is pulled from a battery, the voltage will drop. The more depleted the battery, the worse thevoltage drop. The Sabertooth will hold the unit in the error state for longer than thebattery voltage drops. This is to stop the unit from stuttering and gives the user enough time to diagnose the flashing LEDs.The red Error LED illuminates if the Sabertooth has detected a problem. It will light if the driver has shut down due to overheating orovercurrent."

 Jared_Reabow says:  Jun 13, 2014. 9:57 AM  REPLYthese batteries are rated at 40Amps continuousIT is in lithium mode and hey are charged.

Perhapse the controller cannot handle the current requirements o the motors rather than the batteries not being able to deliver.

But the thing is, i think it is the arduino at fault not the motor controller because when i reset the arduino it is fine again.

view all 385 comments