LogoLogo
  • Welcome!
  • Mission Statement
  • Contributing Guidelines
    • Embed CADs in Wiki Articles
  • VEX Worlds Livestream Archive
    • VEX U
    • V5RC High School
    • V5RC Middle School
    • VIQRC Middle School
    • VIQRC Elementary School
    • JROTC
  • ⚙️Hardware
    • Design Fundamentals
      • Gear Ratios
      • Internal Forces (Stress)
      • Torque
      • RPM
      • Center of Mass
    • Introduction to VEX Parts
      • Structure
        • C-Channels and Angles
        • Fasteners
        • Retainers
        • Gussets and Brackets
        • Bearings
        • Plate Metal and Flat Bars
      • Motion
        • High Strength Components
        • Gears and Sprockets
        • Traction Wheels
        • Mecanum Wheels
        • Omnidirectional Wheels
        • Flex Wheels
    • Robot Decorations
      • Part Dyeing
      • Metal Coloring
      • License Plate Holders
    • Lifts
      • Double Reverse Four Bar (DR4B or RD4B)
      • Four Bar
      • Scissor Lift
      • Six Bar
      • Other Lifts
      • Best Practices
    • Shooting Mechanisms
      • Catapult
      • Flywheel
      • Linear Puncher
    • Drivetrains
      • Tank Drive
      • Mecanum Drive
      • Holonomic Drive
      • Designing a Drivetrain
      • Best Practices
    • Pivots & Joints
    • Pneumatics
      • Best Practices - Pneumatics
    • Intakes
    • Flip Out Mechanisms
    • Defensive Mechanisms
    • Misc. Building Techniques
    • VexU
      • Common Manufacturing Techniques
        • 3D Printing
        • Laser Cutting
      • Custom Manufactured Parts Library
      • Commercial Off The Shelf Parts Library
  • 👑Team Administration
    • New Team Resources
      • Creating The Team
      • Gaining Interest for Robotics Teams
      • Attending Competitions
        • Elimination Bracket
    • Team Dynamics
      • Organization Structure and Longevity
      • Member Allocation and Management
      • How *Not* To Run a Team
    • Team Finances
      • One-Year Team Financial Breakdown
      • Funding Your Teams
    • Hosting Competitions
      • Live Streaming
      • Tournament Manager
        • Competition Electronics
        • Creating a Tournament
        • Tools
          • Field Set Control
          • Connecting Mobile Devices
          • Connecting Raspberry Pis
        • Match Control
          • Inputting Match Scores
          • Inputting Skills Scores
          • Inputting Scores on TM Mobile
        • Displays
        • Alliance Selection
      • Additional Event Partner Resources
    • VexU Organization Management
      • Getting Started in VexU
      • Team / Personnel Management
      • Volunteering At Local Events
  • 📚The Judging Process
    • The Engineering Design Process
      • Test and Refine
    • The Engineering Notebook
      • Segments of the Notebook
      • BLRS2 '23-'24 Engineering Notebook
      • Integrating Inventor Models into Documentation
      • Engineering Notebook Rubric Breakdown
    • The Interview
      • Interview Rubric Breakdown
    • Using Notion for an Engineering Notebook
      • How to Setup a Notebook
      • How to Create Entries
      • How to Export a Notebook
      • Purdue SIGBots Notion Template
        • Game Analysis
        • Identify The Problem
        • Brainstorm Solution
        • Select Best Approach & Plan
        • Build Log
        • Programming Log
        • Testing Solution
        • Tournament Recap
        • Innovative Feature
  • 🖥️VEX CAD
    • CAD Programs
      • Inventor
      • Fusion 360
      • Solidworks
      • OnShape
      • Protobot
    • Making a Chassis
      • Inventor Chassis: The Basics
        • Installation
        • User Interface Overview
        • Dark Mode
        • Assemblies
        • Placing Parts
        • Navigating CAD
        • Changing Visual Style
        • Grounding
        • Connecting Two C-Channels
        • Modifying Existing Constraints
        • Toggling Visibility on Existing Parts
        • Completing Half of the Chassis
          • Inner Drive Channel
          • Bearing Flats
          • Motors
          • Wheels
          • Sprockets
          • Spacers, Washers and Standoffs
          • Spacers Cont.
        • Creating Mid-Plane
        • Mirroring
      • Inventor Chassis: Best Practices
        • File Structure
        • Subassemblies
        • Wheel Subassembly
        • Origin Planes
        • Cross Brace
        • Drive Channels
        • Simple Motor iMates
        • Replacing Simple Electronics
        • Completing Half of the Drive
          • Bearing Flats (Best Practice)
          • Wheels
          • Powered Gear
          • Spacer Boxing
          • Spacers, Washers and Standoffs (Best Practice)
        • Model Browser Folders
        • Mirroring (Best Practice)
        • Model Browser Folder (Right)
        • Main Assembly
      • Fusion 360 Chassis
      • Solidworks Chassis, Chain, and Custom Plastic
    • Remembering The Best
      • 62A Skyrise
      • 400X Nothing But Net
      • 2587Z Nothing But Net
      • 365X Starstruck
      • 62A In The Zone
      • 202Z In The Zone
      • 5225A In The Zone
      • 169A Turning Point
      • 929U Turning Point
      • 7K Tower Takeover
      • 5225A Tower Takeover
      • 62A Change Up
    • Scuff Controller
  • 💻Software
    • Odometry
    • Path Planning
    • Robotics Basics
      • Arcade Drive
      • Tank Drive
      • Joystick Deadzones
      • Curvature (Cheesy) Drive
      • Subsystem Toggling
    • Organizing Code
      • Code Style
      • Code Styling Guide
      • Writing Good Comments
      • Version Control
    • Control Algorithms
      • Bang Bang
      • PID Controller
      • Basic Pure Pursuit
      • Flywheel Velocity Control
      • Kalman Filter
      • Take Back Half (TBH) Controller
      • RAMSETE Controller
    • Competition Specific
      • Operator Control
      • Autonomous Control
    • C++ Basics for VEX Robotics
      • Basic Control Flow
      • Enumerations
      • Namespaces (::)
      • Multiple Files (C/C++)
    • VEX Programming Software
      • PROS
        • OkapiLib
      • vexide
      • Robot Mesh Studio (RMS)
      • EasyC
      • RobotC
      • VEXcode
      • Midnight C
    • General
      • Stall Detection
      • Register Programming
      • Sensors and Odometry in Autonomous
      • Embedded Programming Tips
      • Debugging
      • Bit Shift
      • Bit Mask
      • Autoformatting
      • Finite State Machine
      • Data Logging
    • Object Recognition
      • Red Green Buoy
      • AMS
      • OpenCV
      • OpenNI
    • 🤖AI in VRC: Pac-Man Pete
  • ⚡VEX Electronics
    • V5 ESD Protection Board
    • VEX Electronics
      • VEX V5 Brain
        • V5 Electronics Observations and Issues
      • VEX Controller
      • VEXnet and V5 Robot Radio
      • VEX Battery
      • VEX Motors
    • VEX Sensors
      • 3-Pin / ADI Sensors
        • Encoder
        • Potentiometer
        • Limit Switch
        • Bumper Switch
        • Accelerometer
        • Gyroscope
        • Ultrasonic
        • Line Tracker
        • LED Indicator
      • Smart Port Sensors
        • GPS Sensor
        • Rotation Sensor
        • Vision Sensor
        • Optical Sensor
        • Distance Sensor
        • Inertial Sensor (IMU)
        • 3-Wire Expander
    • V5 Brain Wiring Guide
    • Legacy
      • VEX Cortex
      • Power Expander
      • VEX Motor Controller
      • VEX Cortex Wiring Guide
  • General Electronics
    • General Topics
      • External Boards
        • ASUS Tinker Board S
        • Arduino
        • Beagleboard
        • Leaflabs Maple
        • LattePanda
        • Meadow F7 Micro
        • Netduino
        • ODROID-XU4
        • Pandaboard
        • Raspberry Pi
      • Analog-Digital Converter (ADC)
      • Bit-Bang
      • GPIO
      • I2C
      • Jitter
      • Line Noise
      • List of Tools
      • Output Drive
      • Power Consumption
      • Radius Array
      • Resettable Fuse (PTC)
      • SPI
      • Slew Rate
      • Stalling
      • USART
      • UART
      • 5 Volt Tolerant
      • DC Motor Basics
Powered by GitBook
LogoLogo

This work is licensed under a Attribution-ShareAlike 2.0 Generic License

On this page
  • Prerequisites
  • Velocity
  • Torque
  • Combining the Two
  • Determining the Constants
  • Torque Constant (K_t)
  • Resistance (R)
  • Velocity Constant (K_v)
  • Converting Constants for Other Gearsets
  • Contributing Teams to this Article

Was this helpful?

Edit on GitHub
Export as PDF
  1. General Electronics
  2. General Topics

DC Motor Basics

The physics behind VEX motors

Previous5 Volt Tolerant

Last updated 1 year ago

Was this helpful?

Direct Current (DC) Motors like the move in accordance with a few physics equations. An understanding of these equations will help clarify the relationship between the values commanded to the motor from software and the physical movement of the motor.

Prerequisites

  • A basic understanding of electronics (really just )

Velocity

The velocity of the motor roughly correlates to the voltage that is commanded to it.

The full equation is:

ω=Kv∗(V−I∗R)\omega = K_v * (V - I * R)ω=Kv​∗(V−I∗R)

The angular velocity of the motor, or ω\omegaω, is equal to the motor's velocity constant, KvK_vKv​, multiplied by the difference between the voltage commanded to the motor, VVV, and the actual voltage drop across the motor, I∗RI * RI∗R.

Those familiar with electronics will probably be asking - why wouldn't VVV be equal to I∗RI * RI∗R here, like Ohm's Law says? This is because the commanded voltage is distributed across two outputs of sorts with the motor:

  • The DC voltage drop based on the current, III, and relatedly, the torque provided by the motor (see Torque)

  • The "back-EMF" (ElectroMotive Force). This is the voltage drop accross the motor corresponding to the velocity of the motor. The faster the motor is spinning, the more back-EMF is produced.

We can rewrite the equation above to show the commanded voltage as the sum of these two voltages:

V=I∗R+ωKv=VoltDrop+backEMFV = I * R + \frac{\omega}{K_v} = Volt Drop + backEMFV=I∗R+Kv​ω​=VoltDrop+backEMF

This back-EMF component, interestingly, is also the explanation for how electric generators work. Traditionally a voltage is provided to a motor to make it spin. This relation works in the opposite direction too though - so manually turning a motor will produce a voltage on the motor. The faster you spin the motor, the larger the voltage produced. On the VEX Cortex you could observe this by spinning a 393 motor fast enough to turn on the Cortex LEDS while there wasn't a battery plugged in.

Torque

The second kind of output from a DC motor is torque. Torque is the rotational force provided by the motor. A motor on the drivetrain for a heavy robot will need to produce a lot of torque to get the robot moving, while a motor on a flywheel should produce relatively little.

The torque that a motor produces is directly related to its current draw:

τ=Kt∗I\tau = K_t * Iτ=Kt​∗I

The torque, τ\tauτ, is equal to the current drawn by the motor, III, multiplied by a torque constant, KtK_tKt​.

Combining the Two

If we substitute our torque equation into the voltage/velocity equation, we get:

V=τKt∗R+ωKvV = \frac{\tau}{K_t} * R + \frac{\omega}{K_v}V=Kt​τ​∗R+Kv​ω​

The voltage provided to the motor will become a mix of torque and velocity. If the motor is stuck by some external force and cannot move at any velocity, then all of the provided voltage will go toward providing as much torque to try to get the motor moving.

Determining the Constants

Torque Constant (K_t)

The torque constant of a motor is equal to the torque provided by the motor divided by the current draw of the motor while stuck and under stall.

The following PROS code will find KtK_tKt​:

void motorKt() {
	okapi::Motor m(5);
	m.setGearing(okapi::AbstractMotor::gearset::blue);
	m.moveVoltage(12000);
	while (true) {
		double kt = m.getTorque() / (m.getCurrentDraw() / 1000);
		printf("%f %d %f\n", m.getTorque(), m.getCurrentDraw(), kt);

		pros::delay(10);
	}
}

The KtK_tKt​ value for a motor with a Blue (600RPM) gearset is roughly: 0.198.

Resistance (R)

The motor's resistance, RRR, is equal to the voltage provided to a motor divided by its current draw while under stall.

The following PROS code will find RRR:

void motorR() {
	okapi::Motor m(5);
	m.setGearing(okapi::AbstractMotor::gearset::blue);
	m.moveVoltage(12000);
	while (true) {
		double r = (double)m.getVoltage() / (double)m.getCurrentDraw();
		printf("%d %d %f\n", m.getVoltage(), m.getCurrentDraw(), r);

		pros::delay(10);
	}
}

The R value for a 600RPM V5 Motor is roughly 3.84 Ohms.

Velocity Constant (K_v)

The following PROS code will find KvK_vKv​:

void motorKv() {
	pros::Motor m(5);
	m.set_gearing(MOTOR_GEARSET_06);
	const double r = MOTOR_BLUE_R;
	m.move_voltage(12000);
	while (true) {
		double vel = m.get_actual_velocity();
		double kv = (vel * 0.1047) /
		            ((m.get_voltage() / 1000) - 
		             (m.get_current_draw() / 1000) * r);
		printf("%f %d %f\n", vel, m.get_current_draw(), kv);

		pros::delay(10);
	}
}

A 600RPM V5 Motor has a K_v value of roughly 6.68.

Converting Constants for Other Gearsets

The RRR value is consistent for each gearset -- the RRR value should be roughly the same for a 100RPM V5 motor and a 600RPM motor. The KvK_vKv​ and KtK_tKt​ values, on the other hand, will scale according to the gearset used. A 100RPM motor has 6 times the torque and 1/6 the velocity of a 600RPM motor, so its KtK_tKt​ value will be 6 times as large and its KvK_vKv​value will be 1/6th as large compared to the 600RPM motor's constants.

Contributing Teams to this Article

The velocity constant of a motor can be calculated after finding the resistance. Command a voltage to the motor (while it is not connected to anything or under stall) and measure the velocity and current draw of the motor. Plug those values into the and solve for K_v.

(Purdue SIGBots)

ones used on VEX robots
Ohm's Law
BLRS
combined equation