Skip to main content

Week 23 (Mar. 20, 2019): Driving the Gimbal Motor with the ESC

Today, we finally figured out how to drive the gimbal motor with the ESC (electronic speed controller). As a reminder, the gimbal motor is a brushless DC motor, and brushless DC motors require an ESC to control them. 


We wired the motor connections according to the image below. The Arduino MEGA is connected to the ESC’s control pins, the gimbal motor is connected to the ESC’s motor pins, and the battery is connected to the boost converter, which is then connected to ESC’s battery pins. A potentiometer is also connected to one of the Arduino’s analog pins to control the speed of the brushless motor.

We also found that the ESC can power the Arduino, as it contains a 5V BEC (battery eliminator circuit). As its name implies, it eliminates the need for another battery to power the Arduino, as it regulates the input voltage down to 5V. Thus, we simply have to supply the ESC with 12V with one boost converter, rather than having one boost converter for the Arduino and another boost converter for the ESC.

After connecting everything, we also used the sample code found on the same website to program the circuit. Controlling the brushless motor was actually simple to complete, and was accomplished by:
 - taking in the analog reading from the potentiometer,
 - creating a ratio from the potentiometer reading to the motor speed value using the Arduino map( ) function;
 - and then running the motor at the scaled speed value by simply using the Servo library’s write( ) function.

A snippet of our code is shown below.


With this code, we could run the motor at full speed. The part we ran into issues with was controlling the speed of the motor. Lowering the potentiometer reading did not decrease the speed below the maximum. And lowering the potentiometer reading past a certain point would simply stop the motor. Despite this, we will try to continue using the ESC and find a solution to this.

We also found a way to drive the gimbal motor with the L298 motor driver board, which was used several times in our Introduction to Mechatronics course at SJSU (ME 106). However, using this board, which is not a designated controller for brushless DC motors, causes the motor to vibrate significantly. Thus, we will try to continue using the ESC.

Comments

Popular posts from this blog

Week 30 (May 8, 2019): Prototype Evaluation Day, Final Circuit, Incorporating 3D printed parts, Final Presentation, Posters, & Maker Faire

Today, we held Prototype Evaluation Day. Like the rest of the senior project classes, the advisor walks around the classroom, evaluating the senior project apparatuses, asking the student teams to demonstrate their devices, and explain their design, though processes, and results. Dr. Furman and Ron examined and inspected the Full-Scale model, then the Half-Scale model, and lastly, us, the Small-Scale Team. We had completed our circuit to power one pod car and one of the two induction charging stations prior to Evaluation Day, so we were able to successfully demonstrate the pod car driving around the track as well as the induction charging. While we were still troubleshooting issues with the tablet’s Raspberry Pi communicating with the Arduino, the Arduino is still capable of operating on its own, so we could at least demonstrate the motor driving the pod car around the track and through the offline stations. Depicted below is our final circuit that powers the pod car: Dep...

Week 28 (Apr. 24, 2019): Final motor selection – Mini-Stepper Motor

Since last week, we have been trying to run the new brushless DC motor; however, it is still difficult to control, let alone its speed. Therefore, we had to pursue our alternative motor, the mini-stepper motor that runs at 5V. Found in Arduino starter kits, this mini-stepper motor is accompanied by its dedicated motor driver board, the ULN2003, which is a chip containing a series of Darlington pair transistors. An image of the stepper motor and the ULN2003 board is shown below:   Sources: https://www.adafruit.com/product/858 https://www.amazon.com/gp/product/B01CP18J4A/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1   We were able to successfully run the new mini-stepper motor with the sample code included with the Arduino starter kit. One benefit to using the sample code is that it utilizes the Stepper library’s functions. One use function is the setSpeed( ) function, which allows the user to set the RPM speed of the stepper motor. We found that the ma...

Week 27 (Apr. 17, 2019): ME 195B - Presentation #2 (Prototyping Stage Continuation) Reflection

Today, we completed Presentation 2, which is our 5 th  presentation overall, throughout the entire length of senior project, since last semester. Please refer to our Presentation #2 slides, embedded below. Covering the continuation of our prototyping efforts, we discussed progress on hardware acquisition, integration of components into a working circuit, and programming. Regarding programming, we were still working on the communication between the Raspberry Pi and the Arduino. And while the circuit is also coming together, there was one piece that gave us problems yesterday: the gimbal motor broke and so we had to order another motor that is not a gimbal but is still a brushless DC motor. An image of the new motor is found in our presentation slides below. While this was disheartening at first, we found that the gimbal is not intended for continuous rotation, but instead for precise movement, as they are used for cameras on drones. However, this was still a setback...