This project belongs to the series of "Fun Learning with Sumo Robot", this topic focuses on how to make the robot rolling as expected in different scenarios like driving forward, backward, rotation and break, of course speed is always a dynamic factor in consideration in every use scenario. The components involved are DC motor, TM022: DC Motor Driver Module, and KB027: Arduino UNO Boards, in this project the Arduino Nano board is not used yet, so to keep concentration on just the DC motor and how to make it rolling as wanted in a right way., since UNO is the most stable and available board that we are very familiar with. Goals:
Get ready with knowledge and skills of motion parts (DC motor, motor driver) for robotics projects like Sumo Robot
Understand how DC motor is driven, what is H-bridge, why motor driver module is needed, how the power source and wiring are required
Understand how to use program to control dynamic motions, create prototype functions to drive in required speed in forward/backward/rotation, and stop
START A BIT > Projects Library > This page
[ ] Simple: 30-60 minutes
[x] Moderate: 1-2 hours
[ ] Challenging: more than 2 hours
The estimation bases on average situation without unexpected troubleshooting, assuming that the student meets prerequisites. It only indicates rough time needed to complete this project, but not about technical difficulty, not covering discussion and sharing time.
Experience with Arduino UNO and basic programming skills, preferably participated LP2508: Starting Experience of C++ with Arduino, 25w08
2x DC Motor and wheels
1x Education Shield for UNO
Jumping wires
Purpose: Know how to drive DC motor in a straightforward way, understand the polarization of power input affects rotation direction
🎬Show Points:
Use 3V 🪫battery pack to make make 🛞DC motor roll
Switch ➕ and ➖ to show the rotation direction changing
Use 5V 🔋power bank to test again, show the faster speed
Power bank supplies 5V voltage to motor
2xAAA batteries supply 3V voltage to motor
🎬Show Points:
Use Tindercad to simulate a trick to control rotation direction (H-Bridge concept)
🎬Show Points:
Use Arduino signal PIN to drive DC motor does NOT WORK!
💡Conclusions
Key Points:
🔋🪫Voltage affects SPEED, higher voltage → higher speed
🧲The polarity of the battery ➕➖changes the DIRECTION of the motor's rotation
A kind of "H-Bridge" trick is naturally useful to revert rotation direction
Using Arduino signal PINs to drive DC motor is NOT working
Side Notes:
Operating voltage: 3–6 V, starting / stall threshold voltage: 1–2 V
Typical running (loaded) current: 100–500 mA
Arduino I/O pin can supply 20-40 mA current
Arduino 5V pin can supply max 500 mA current
Purpose: Know what is H-Bridge and get a conceptual idea of how it work, not necessarily to be deep
Watch: H-Bridge concept
Try: H-Bridge simulator from everycircuit.com,
Purpose: Get to know this useful electronic part, and get brief idea of how to use
Purpose: Hardware setup and wiring, get idea of how to connect these pieces together in a right way
Purpose: Understand how to program to signal DC Motor Driver Module to control the motor for expected result
Fix red-masked codes and make it working for motor A
Add your code to control motor B
Add Serial.println() for debugging
Fix red-masked codes and make it working for motor A
Add your code to control motor B
Add Serial.println() for debugging
Purpose: Use function to make reusable interface for motion control, prepared for future Sumo Robot prototype
Learn the example codes from https://github.com/ChalmersRobotics/CRF-SumoBot/blob/main/code/sumobot/sumobot.ino
Create your own helper functions, and try some fun tests!
void drive(int speed)
void reverse(int speed)
void rotate_clockwise(int speed)
void rotate_counterclockwise(int speed)
void stop()
Purpose: Enhance basic knowledge understanding, reflect and summarize what we have learnt
How do we reverse the DC motor spinning direction when using a simply battery pack?
How do we speed up the DC motor spinning?
What is H-Bridge, explain in your own way
Why do we need a "Motor Driver Module", but not using the Arduino pin to direct let the motor spin?
Challenging: Image a robot vehicle with 2 wheels, how do we make a rotation motion around a center point of the robot?
Take 1-2 minutes to explore anything on the tools and the making flow, with curiosity, no matter how much prior knowledge you have, you should make
At least 1 interesting finding
At least 1 curious question