This project illustrates the two basic movements for a robot car with hobby DC motors. The Cytron Maker Pi RP2040 robotics controller board and a low cost two-wheel robot car kit provide a simple way to understand the principles of DC motor operations when using Pulse Width Modulation techniques.
The linear movement uses equal power to both motors. The angular movement results from unequal power to the motors.
There are four scenarios for the unequal power:
- One motor receives basic power
- The other motor receives reduced power
- The other motor does not receive power
- The other motor receives power that spins the motor in the opposite direction
Each of these scenarios are applicable selectively based on the purpose of the movement.
There are several paths to extend DC motor exercises:
For a given pair of motors and and accompanying wheels, calibration charts can be prepared. For linear movement (assuming forward movement only for this purpose) the distance traveled may be estimated using three parameters are::
- Throttle setting
- Operation duration
- Surface factor
For angular movement, the throttle setting for each motor becomes an autonomous parameter. If the motors spin in opposite direction, the turn will have a shorter radius.
The use of a velocimetry encoder wheel and an opto-interferometer for each motor’s rotation will permit a more precise measurement of the the rotations per minute which, in turn, with wheel geometry will elevate the distance movements with more precision.
The exercises can be extended with telemetry from supplementary sensors such as:
- Ultrasonic
- Passive Infra-Red
- Light Detector
- Accelerometer, magnetometer and gyroscope
One example of the light detector sensor is the planned extension to the robot car to use a line follower adapter with a custom PID algorithm.
Please understand that these exercises are intended primarily for beginners who are always welcome to post questions and comments to enrich their experiences with hobby electronics projects. As mentioned in the video, there are several options for the coding exercises but CircuitPython was used in this demonstration because it is supported by the robotics controller board as the default platform.
Finally, the chosen robotics controller board also supports four servo motors whose use will be illustrated in a future video tutorial.
N.B.Interactive connection at the Raspberry Pi host computer to the robotics controller board requires the conventional mouse, keyboard and monitor components. This project connected to the headless Raspberry Pi computer through VNC (remote desktop app) from another desktop computer. The Raspberry Pi was operated in headless mode using the other desktop's mouse, keyboard and monitor.
Comments