Microcontroller

The microcontroller we are using is the Arduino MEGA. We decided to use the Arduino Mega because it is within our budget and contains 54 pins with 5V GPIO requirement which will support all of our sensors and other plug-ins. It also posses pulse width modification (PWM) which has capabilities for controlling the motor speed.

The breakdown of pin usage is as follows: two pins per motor for two motors, four pins per sensor for up to ten sensors, one pin per button for four buttons, and for the PWN, one pin per motor for two motors. This comes to a total of fifty needed digital pins out of the fifty-four pins and two needed out of fifteen PWM pins offered on the Arduino MEGA.

Figure 1. Arduino MEGA

We will control the motor using the Qunqi L298N Motor Drive Controller Board Module Dual H Bridge DC Stepper For Arduino. We will use the PWM to control the speed of the motor speed for the rear driving wheels. It can support up to two motors. We will use three Arduino MEGA pins per motor control for a total of six pins for two motors.

Figure 2. Qunqi L298N Motor Drive Controller Board Module Dual H Bridge DC Stepper For Arduino