The main focus of this week was to familiarize with the use of brushless motors so that we can transition our system to use BLDC instead of regular DC motors. First we had to make sure that we can run it using an ESP32. In order to do that, we utilized Adafruit Servo Shield, which allows us to connect 8 brushless onto the ESP32 Feather. The first thing we need to do to move a brushless motor is to calibrate it. This can be done by providing a high input followed by a low input (the process arms the motor). However, we soon realized that unlike a normal servo, we cannot just run the motor in opposite direction. In order to do that, we have to manually reprogram the ESC to allow the motor to move bidirectionally.
More Information on How to Reprogram your ESC
In order to move in 2 direction, we have to define three values between 1000us to 2000us: min PPM, max PPM, center PPM with the values ideally being 1000, 2000, and 1500 respectively. However, the ESCs are not ideal. We had to set the center PPM to be 1600 as the ESC came with a 100 shift by default. Thus, on the C++ code, we can calibrate the low point to be 1500 (and thus the 2 high point being symmetrical at 1000 and 2000 respectively). After testing multiple times, we verified that we can control 4 brushless motors with the ESCs all connected to one battery (thus power distribution is verified to be acceptable). We can observe the motors running simultaneously in the video below:
Initially, the goal of this week was to successfully execute visual processing on the ESP-EYE so that all the processing will be done locally on the blimp. However, due to unforeseen errors, we did not make it in time. As an alternative, we decided to revert back to OpenMV, with this time using the SPI protocol instead of the I2C protocol. The reason we switch it from what was being used previously was because we dont want to use resistors as pullups as that increases weight and complexity of setup.
By looking at the video below, we can see that the OpenMV can we relatively stable and has a high FPS which is beneficial for our system. The only downside on using OpenMV is the fact that it weights 18g and the highest resolution it can run color detection is QVGA.
On the physical side, this OpenMV feeds input into the ESP32 Feather which in turn runs the Horizontal and Vertical PIDs of the system. One problem that came up while we were testing however, the shift value for the center PPM of the brushless motors become more apparent. It shifted by another 50 for a total of 150. Our colleagues from GMU apparently had never faced this kind of problem. In order to fix the situation, we had to reprogram all the ESCs by setting the center PPM to 1650. This works for now but the cause of the problem needs to be identified in the near future.
Finally, we get to test the whole hovering system:
We discovered that there might be a control error as the behaviour is correct for if the green ball is on the LHS of the camera but behave erratically if it is on the right. Due to time limitation, this will be fixed in the upcoming week.