By: Jordan Smallwood (Project Manager)
Approved by: Miguel Garcia (Quality Assurance)
One of the requirements of the Pathfinder is to determine whether a no-load condition is present, we needed to define what that condition is. In order to test the characteristics of our motor a simple experiment was conducted. The idea is that we wanted to control the load to the motor under a constant voltage and extract the current from the Arduino.
Appropriate connections were made to interface the Arduino to the VHN 5019 motor drivers so that we could read the output voltage from the onboard current sensors. To communicate with the Arduino through MATLAB we needed to install an add-on package called, “MATLAB support package for Arduino Hardware”. This add-on is very simple to use and eliminates the need for uploading code through the Arduino IDE. It allows for direct control of the Arduino through the serial port and MATLAB has predefined functions that allow for this.
Figure 1: Code for Plotting Motor Current Draw
The code is very simple, it is a while loop that compares the current time with the limited time. While in the loop it reads the analog voltage from the current sensor and then stores that value in a vector that has a corresponding time stamp. After this you can apply some smoothing features to the plot such as an n-point moving average so that we don’t see all the discontinuities.
Figure 2: Results from Motor Mock Up
After applying a 25 point moving average this is the result. I applied a resistance to the wheel with my hand about every 5 seconds or so and as you can see, the spikes are where the load was applied. This is very good information for us since we know that the motor under no-load is about 30 mA. In addition, these motor’s have much less current draw than the previous motors on the Pathfinder. In order to get accurate results when applying this to the final mission, we will need to apply an averaging filter to ensure we don’t turn off the motors when they are actually experiencing a load.