top of page

Week 9

  • Nicolo Agostini
  • Mar 11, 2024
  • 3 min read

Updated: Mar 19, 2024

03/04/2024 - 03/11/2024


Nicolo:


Last week, I researched into the circuitry to power the 3.7V DC motor. The initial plan was to use a LM2596 voltage regulator to step down the voltage from 5V to 3.7V and use an H bridge circuit to control the direction of the motor.


After further research, I came across L298N DC motor driver module, which could be used to replace the LM2596 voltage regulator and H bridge circuit.


The L298N module is able to control both speed and direction by using a combination of Pulse-Width Modulation (PWM) and an H-bridge circuit [4].





The speed of a DC motor is controlled by varying the input voltage, while the direction of rotation depends on the direction of the current flow. A widely used technique to accomplish speed control is PWM. In this technique, the average value of voltage across the motor is adjusted by varying the width of the pulses (duty cycle). The higher the duty cycle, the higher the average voltage applied to the DC motor, resulting in an increased in motor speed [4].



The spinning direction of the motor is controlled by changing the polarity of the voltage across its input, and therefore by changing the direction of the current flow.


The L298N includes an H-bridge for this purpose. The following diagrams show the working principle of the H-bridge.















The L298N motor driver can supply 5V to 35V at 2A, therefore is more than sufficient for our application.


Technical Specification:


Motor output voltage: 5V-35V

Input voltage: 5V-7V

Continuous current per channel: 2A

Max Power Dissipation: 25W



Following is the pinout of the L298N as well as the connections necessary for our purpose.




The VS pin (1) is used to power the internal H-bridge, and will be provided 5V.

GND (2) is the common ground pin.

Pins OUT1 and OUT2 (8) are the motor outputs and will be connected directly to the motor.


Pins IN3 and IN4are the direction controls pin and will be connected to the GPIO of the microcontroller. The microcontroller will provide a high or a low to these pins according to the desired direction of the motor.




The PWM pin is used to control the speed of the motor and is connected directly to the GPIO of the microcontroller.


The L298N has a voltage drop of approximately 2V: this is due to the fact that the internal switching transistor have a voltage drop of approximately 1V each when forward biased. This note is important because it allows the output voltage to be close to the 3.7V required by our motor without any additional DC-DC converter.







Ryan:


Last week it was decided to use OpenCV as the image recognition model for the project. After researching similar projects I was able to find a collection of Haar Cascade files that would be able to train our image recognition software.[5]


The first step to understanding OpenCV and how it works was to install the program onto my computer. I encountered a few issues when doing so that will need to be troubleshot further.


In order to run OpenCV in the Spyder IDE an environment must first be created before the OpenCV module can be installed. I chose to use the Miniconda environment creator. Below is a screenshot the Conda terminal where I would be creating the Spyder environment.



Once the environment was created I went ahead and changed the default Spyder IDE environment to reflect the one created by Conda as shown below:




Going forward, steps will need to be taken to properly import OpenCV into this environment and continue troubleshooting the issues as regarding the module installation.


1596494170937.jfif

Nicolo is a 26-years-old student at Valencia College, pursuing a B.S. in Electrical and Computer Engineering Technology. Nicolo is currently an intern at a MEP engineering firm in Orlando, FL, working on a variety of projects including the local theme parks and rocket launch sites. When not in class, Nicolo enjoys working on DIY electrical projects, outdoors activities, and visiting the theme parks. 

image.png

Ryan is a 28-year-old Electrical and Computer Engineering Technology student at Valencia College. When not in class, he enjoys working on DIY projects, repairing cars, and cooking. Ryan recently began a Systems Engineering Internship at Walt Disney Imagineering for the Spring 2024 semester. After graduation, he hopes to continue his engineering career at Walt Disney Imagineering.

bottom of page