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 20 (Feb. 27, 2019): Power Electronics – Battery & Amplifier

Since last week, I have been working on the current amplifier for the induction charger. We decided to abandon using the TPS53313 step down voltage regulator-current amplifier IC (rated at a maximum of 6A continuous output current) because we found that supplying +5V to a 3.7V LiPo battery was possible and safe. Additionally, charging a LiPo battery at 6A was found to be dangerous; the battery should be charged at 25% of the capacity rating (.25 x C), or .25 x mAh. In the case of the 6600mAh battery, it should be recharged at a rate of 1.65A or less. The last reason is that dealing with a surface mount device (SMT) is a bit difficult. I started out using a BJT NPN transistor (model: 2N3904), something I was most familiar with. However, its datasheet states that it has a 200 mA maximum continuous collector current rating. This is a significantly low current. Most, if not all, fast charging adapters today have a 2 A charging rate. While I don’t want to charge the LiPo batteri...

Week 0 (Aug. 23, 2018): Beginning Spartan Superway

Hello, and welcome to my Spartan Superway blog! My name is Patrick Barrera, and I am a senior mechanical engineering student with a focus in mechatronics. Once I graduate, I hope to go into at least one of my areas of interest: electronics, programming, biotechnology, and machine learning. Some of my hobbies include staying in shape by working out and biking, doing DIY electronic and coding projects, and spending time with my family. Working on the Spartan Superway project interests me because I would like to be a part of the future ... the future of transportation, the future of technology, and the future of society. I like working in interdisciplinary teams, especially with focuses in mechanical design as well as mechatronics, because I am able to learn things from outside my areas of knowledge. I would also like to expand my knowledge and skill set into areas that I do not know, such as welding and other machine tools, and to get hands-on experience with the concepts I learned fro...