Project 16:Motor

1. Description

The Keyestudio 4WD Mecanum Robot Car is equipped with 4 DC reduction motors, also called gear reduction motor, which is developed on the ordinary DC motor. It has a matching gear reduction box which provides a lower speed but a larger torque. Furthermore, different reduction ratios of the box can provide different speeds and torques.

Gear motor is the integration of gearmotor and motor, which is applied widely in steel and machine industry

Micro:bit motor driver shield comes with a DRV8833 chip. In order to save the IO port resource, we control the rotation direction and speed of 4 DC gear motors with the DRV8833 chip.

Img

Front

Back

STC8G1K08 Chip circuit

HR8833 Motor driver circuit

2. Preparation

  • Insert the micro:bit board into the slot of keyestudio 4WD Mecanum Robot Car V2.0

  • Place batteries into battery holder

  • Dial power switch to ON end

  • Connect the micro:bit to your computer via an USB cable

  • Open the Web version of Makecode

3. Test Code1

Click“JavaScript” to view the corresponding JavaScript code:

4. Test Result1

Download code 1 to micro:bit board, dial POWER switch to ON end. Smart car goes forward for 2s and stops for 2s.

5. Test Code2

Img

Click“JavaScript” to view the corresponding JavaScript code:

6. Test Result2

Download code 2 to micro:bit board, the car goes forward for 2s, turns back for 2s, turn left for 2s, turn right for 2s and stops for 2s and repeats this pattern.