├── 3D Prints ├── Droiid Mini v1.0 (Cut)-bottom-left.stl ├── Droiid Mini v1.0 (Cut)-bottom-right.stl ├── Droiid Mini v1.0 (Cut)-top-left.stl └── Droiid Mini v1.0 (Cut)-top-right.stl ├── Robojax-BTS7960-Motor-driver.zip ├── arduino-wheel-robot-code └── arduino-wheel-robot-code.ino ├── arduino-wheel-robot-diagram.fzz ├── arduino-wheel-robot-diagram.png ├── arduino-wheel-robot-diagram_bb.png └── readme.md /3D Prints/Droiid Mini v1.0 (Cut)-bottom-left.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EbenKouao/arduino-wheel-robot/8f884b2bf529cb0399c274eef574c4a3e11d035d/3D Prints/Droiid Mini v1.0 (Cut)-bottom-left.stl -------------------------------------------------------------------------------- /3D Prints/Droiid Mini v1.0 (Cut)-bottom-right.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EbenKouao/arduino-wheel-robot/8f884b2bf529cb0399c274eef574c4a3e11d035d/3D Prints/Droiid Mini v1.0 (Cut)-bottom-right.stl -------------------------------------------------------------------------------- /3D Prints/Droiid Mini v1.0 (Cut)-top-left.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EbenKouao/arduino-wheel-robot/8f884b2bf529cb0399c274eef574c4a3e11d035d/3D Prints/Droiid Mini v1.0 (Cut)-top-left.stl -------------------------------------------------------------------------------- /3D Prints/Droiid Mini v1.0 (Cut)-top-right.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EbenKouao/arduino-wheel-robot/8f884b2bf529cb0399c274eef574c4a3e11d035d/3D Prints/Droiid Mini v1.0 (Cut)-top-right.stl -------------------------------------------------------------------------------- /Robojax-BTS7960-Motor-driver.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EbenKouao/arduino-wheel-robot/8f884b2bf529cb0399c274eef574c4a3e11d035d/Robojax-BTS7960-Motor-driver.zip -------------------------------------------------------------------------------- /arduino-wheel-robot-code/arduino-wheel-robot-code.ino: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Author: Smartbuilds.io 4 | Description: Build you own Simple Arduino Wheeled Robot 5 | Website: https://smartbuilds.io 6 | 7 | */ 8 | 9 | /* 10 | PWM dictates the angle of turn of the motor 11 | Slow Turn => 60% PWM Duty Cycle 12 | Hard Turn => 95% PWM Duty Cycle 13 | */ 14 | 15 | //Mega PWM Pins (2-13) (44-46) 16 | 17 | #include 18 | 19 | int reserved_BlutoothRX = 0; 20 | int reserved_BlutoothTX = 1; 21 | 22 | // r Motor 1 23 | #define RPWM_L1 3 // define pin 3 for RPWM pin (output) 24 | #define R_EN_L1 11 // define pin 2 for R_EN pin (input) 25 | #define R_IS_L1 10 // define pin 5 for R_IS pin (output) 26 | #define LPWM_L1 2 // define pin 6 for LPWM pin (output) 27 | #define L_EN_L1 12 // define pin 7 for L_EN pin (input) 28 | #define L_IS_L1 13 // define pin 8 for L_IS pin (output) 29 | 30 | // Right Motor 2 31 | #define RPWM_L2 7 // define pin 3 for RPWM pin (output) 32 | #define R_EN_L2 23 // define pin 2 for R_EN pin (input) 33 | #define R_IS_L2 22 // define pin 5 for R_IS pin (output) 34 | #define LPWM_L2 6 // define pin 6 for LPWM pin (output) 35 | #define L_EN_L2 24 // define pin 7 for L_EN pin (input) 36 | #define L_IS_L2 25 // define pin 8 for L_IS pin (output) 37 | 38 | // Left Motor 1 39 | #define RPWM_R1 5 // define pin 3 for RPWM pin (output) 40 | #define R_EN_R1 47 // define pin 2 for R_EN pin (input) 41 | #define R_IS_R1 46 // define pin 5 for R_IS pin (output) 42 | #define LPWM_R1 4 // define pin 6 for LPWM pin (output) 43 | #define L_EN_R1 48 // define pin 7 for L_EN pin (input) 44 | #define L_IS_R1 49 // define pin 8 for L_IS pin (output) 45 | 46 | // l Motor 2 47 | #define RPWM_R2 9 // define pin 3 for RPWM pin (output) 48 | #define R_EN_R2 51 // define pin 2 for R_EN pin (input) 49 | #define R_IS_R2 50 // define pin 5 for R_IS pin (output) 50 | #define LPWM_R2 8 // define pin 6 for LPWM pin (output) 51 | #define L_EN_R2 52 // define pin 7 for L_EN pin (input) 52 | #define L_IS_R2 53 // define pin 8 for L_IS pin (output) 53 | 54 | 55 | #define CW 1 //do not change 56 | #define CCW 0 //do not change 57 | #define debug 1 //change to 0 to hide serial monitor debugging infornmation or set to 1 to view 58 | 59 | int PWM_max = 100; //max speed of the Motor (Wheels) 60 | int PWM_min = 80; //min speed of the Motor (Wheels) 61 | 62 | int delay_motor = 3000; 63 | int motor_high = 750; 64 | 65 | RobojaxBTS7960 motor_L1(R_EN_L1, RPWM_L1, R_IS_L1, L_EN_L1, LPWM_L1, L_IS_L1, debug); 66 | RobojaxBTS7960 motor_L2(R_EN_L2, RPWM_L2, R_IS_L2, L_EN_L2, LPWM_L2, L_IS_L2, debug); 67 | 68 | RobojaxBTS7960 motor_R1(R_EN_R1, RPWM_R1, R_IS_R1, L_EN_R1, LPWM_R1, L_IS_R1, debug); 69 | RobojaxBTS7960 motor_R2(R_EN_R2, RPWM_R2, R_IS_R2, L_EN_R2, LPWM_R2, L_IS_R2, debug); 70 | 71 | void setup() { 72 | Serial.begin(9600);// setup Serial Monitor to display information 73 | 74 | //Initate Motors 75 | motor_L1.begin(); 76 | motor_L2.begin(); 77 | motor_R1.begin(); 78 | motor_R2.begin(); 79 | 80 | } 81 | 82 | void loop() { 83 | 84 | // Debug - Run Robot Test 85 | // motor_test_directions(); 86 | 87 | //Recieve Commands via Serial Comms to control the Robot. 88 | 89 | //Recieve Serial commands to control the Robot 90 | if (Serial.available() > 0) { 91 | String data = Serial.readStringUntil('\n'); 92 | Serial.print("Command Recieved: "); 93 | Serial.println(data); 94 | 95 | //Move Droiid Bot 96 | if (data == "Left") { 97 | motor_Right(60, CW, CCW); 98 | Serial.print("Right"); 99 | } 100 | 101 | if (data == "Right") { 102 | motor_Left(60, CCW, CW); 103 | Serial.print("Left"); 104 | } 105 | 106 | 107 | if (data == "Forward") { 108 | motor_Forward(60, CW, CCW); 109 | Serial.print("Forward"); 110 | } 111 | 112 | if (data == "Reverse") { 113 | motor_Reverse(60, CCW, CW); 114 | Serial.print("Reverse"); 115 | } 116 | 117 | } 118 | 119 | 120 | } 121 | 122 | void motor_Left(int PWM_pcntg, int dir, int dir_ccw) { 123 | 124 | motor_R1.rotate(PWM_pcntg, dir); 125 | motor_R2.rotate(PWM_pcntg, dir_ccw); 126 | 127 | delay(motor_high); 128 | 129 | motor_R1.stop(); 130 | motor_R2.stop(); 131 | 132 | } 133 | 134 | void motor_Right(int PWM_pcntg, int dir, int dir_ccw) { 135 | 136 | motor_L1.rotate(PWM_pcntg, dir); 137 | motor_L2.rotate(PWM_pcntg, dir); 138 | 139 | delay(motor_high); 140 | 141 | motor_L1.stop(); 142 | motor_L2.stop(); 143 | 144 | } 145 | 146 | void motor_Forward(int PWM_pcntg, int dir, int dir_ccw) { 147 | 148 | motor_L1.rotate(PWM_pcntg, dir); 149 | motor_L2.rotate(PWM_pcntg, dir); 150 | motor_R1.rotate(PWM_pcntg, dir_ccw); 151 | motor_R2.rotate(PWM_pcntg, dir_ccw); 152 | 153 | 154 | delay(motor_high); 155 | 156 | motor_L1.stop(); 157 | motor_L2.stop(); 158 | motor_R1.stop(); 159 | motor_R2.stop(); 160 | 161 | 162 | } 163 | 164 | void motor_Reverse(int PWM_pcntg, int dir, int dir_ccw) { 165 | 166 | 167 | motor_L1.rotate(PWM_pcntg, dir_ccw); 168 | motor_L2.rotate(PWM_pcntg, dir_ccw); 169 | motor_R1.rotate(PWM_pcntg, dir_ccw); 170 | motor_R2.rotate(PWM_pcntg, dir_ccw); 171 | 172 | delay(motor_high); 173 | 174 | motor_L1.stop(); 175 | motor_L2.stop(); 176 | motor_R1.stop(); 177 | motor_R2.stop(); 178 | 179 | } 180 | 181 | //Debug Motor Directions 182 | void motor_test_directions() { 183 | motor_Left(60, CCW, CW); 184 | delay(delay_motor); 185 | motor_Right(60, CCW, CW); 186 | delay(delay_motor); 187 | motor_Forward(60, CCW, CCW); 188 | delay(delay_motor); 189 | motor_Reverse(60, CW, CW); 190 | delay(delay_motor); 191 | } 192 | -------------------------------------------------------------------------------- /arduino-wheel-robot-diagram.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EbenKouao/arduino-wheel-robot/8f884b2bf529cb0399c274eef574c4a3e11d035d/arduino-wheel-robot-diagram.fzz -------------------------------------------------------------------------------- /arduino-wheel-robot-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EbenKouao/arduino-wheel-robot/8f884b2bf529cb0399c274eef574c4a3e11d035d/arduino-wheel-robot-diagram.png -------------------------------------------------------------------------------- /arduino-wheel-robot-diagram_bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EbenKouao/arduino-wheel-robot/8f884b2bf529cb0399c274eef574c4a3e11d035d/arduino-wheel-robot-diagram_bb.png -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Arduino Wheeled Robot 2 | 3 | 4 | ## Build a Simple Arduino 4 Wheeled Robot 5 | 6 | This Repo contains the Code, 3D Prints and Schematic to Build your own Simple Arduino Robot. Inspired by Droiid Package Delivery Robot. 7 | 8 | Feel free to contribute to the Repo. More info on: [smartbuilds.io](https://smartbuilds.io) 9 | 10 | 11 | # Part List: 12 | 13 | Motor Parts 14 | - Battery LiPo 11.1V, 3500 mAh 15 | - 4 x 12V DC Geared Motor x6 (High Torque 300 RPM) 16 | - 4 x BTS7960b Motor Driver 17 | - Arduino Mega 18 | 19 | Hardware / Chassis 20 | - Wheels (Stroller Wheels) 21 | - Chassis (3D printed Files) - provided in repo 22 | - M3 Screws 23 | 24 | Sensors (optional) 25 | - Bluetooth (HC-05) 26 | - Ultrasonic Sensors x 2 27 | 28 | *Note:* If you do not have a 3D printer, alternativelly consider a pre-built chassis or creating your own. 29 | 30 | This Robot uses 4 x [BTS7960b Motor Driver](https://www.handsontec.com/dataspecs/module/BTS7960%20Motor%20Driver.pdf) 31 | 32 | | Pin No | Function | Description | 33 | |---|---|---| 34 | |1 |RPWM| Forward Level or PWM signal, Active High | 35 | |2 |LPWM |Reverse Level or PWM signal, Active High | 36 | |3 |R_EN |Forward Drive Enable Input, Active High/ Low Disable| 37 | |4 |L_EN | Reverse Drive Enable Input, Active High/Low Disable| 38 | |5 | R_IS | Forward Drive, Side current alarm output | 39 | |6 | L_IS| Reverse Drive, Side current alarm output | 40 | |7 | Vcc| +5V Power Supply microcontroller | 41 | |8 |Gnd| Ground Power Supply microcontroller| 42 | 43 | ## Robot Control Pins 44 | 45 | Each Motor is represented by X_L1, where RPWM_L1 means is connected on Pin 3. 46 | View the Code for the Pin Wiring. 47 | 48 | Motor Driver Control Pins - Left Motor 1 49 | - RPWM_L1 3 // define pin 3 for RPWM pin (output) 50 | - R_EN_L1 11 // define pin 2 for R_EN pin (input) 51 | - R_IS_L1 10 // define pin 5 for R_IS pin (output) 52 | - LPWM_L1 2 // define pin 6 for LPWM pin (output) 53 | - L_EN_L1 12 // define pin 7 for L_EN pin (input) 54 | - L_IS_L1 13 // define pin 8 for L_IS pin (output) 55 | 56 | 57 | ## Block Diagram 58 | 59 | *Note:* The Block Diagram dosen't show thew Control Pins (Refer to above) 60 | 61 | ![Droiid Block Diagram](arduino-wheel-robot-diagram.png) 62 | --------------------------------------------------------------------------------