Electronics and gadgets - reviews, opinions, analytics
Electronics and gadgets - reviews, opinions, analytics
Creating your own DC motor control library
Article-series: Arduino, using DC motors #4
We have developed a class that can manage a DC motor, but if we intend to use it in multiple projects, we will have to duplicate the same code for each project. To avoid this, it would be wise to extract all the repetitive code and place it in a separate library. This library will then be connected to the project in the same way as the standard Arduino libraries.
Soft starting a DC motor using timers
Article-series: Arduino, using DC motors #2
When it comes to controlling DC motors, there are times when you may need to make sudden changes in speed, such as going from 0% power to full power or changing direction. However, this type of operation requires very high currents, much more than simple movement. To address this issue, it's possible to implement a smooth start for the motor by utilizing both the standard delay function delay()
and timers.
Connect a DC motor. Microcircuit L298P
Article-series: Programming Arduino from scratch #7
Article-series: Arduino, using DC motors #1
Consider the option of connecting a conventional DC motor to the controller, which can be used, for example, to move the robot or perform useful work. To do this, we will use a motor controller based on the common L298P microcircuit.
Moving speed regulation, servo control class
Article-series: Arduino - using_servos #5
We expand the functionality of the class for controlling a servo drive - we add the ability to regulate the speed of movement of the servo drive
Independent control of multiple servos. Timers
Article-series: Programming Arduino from scratch #5
Article-series: Arduino - using_servos #2
We have learned how to change the position of the servo, but this control has several disadvantages. Let's try to connect two servos in parallel and achieve their synchronous movement. Let's try using timers instead of the delay()
function.
Creating a class to control a servo drive
Article-series: Programming Arduino from scratch #6
Article-series: Arduino - using_servos #3
Connecting one or two servos may not be challenging. However, if you need to use a lot more of them, it is advisable to create your own class for a servo drive. This way, you can register all the necessary variables and functions once, which will simplify the process.
Software limitation of servo movement
Article-series: Arduino - using_servos #4
Sometimes, a servo drive may not be able to rotate to a specific angle due to certain limitations such as a manipulator being attached to it which may rest against the body, or a hinge having a small possible angle of rotation. To avoid any issues, it is recommended to limit the movement programmatically beforehand.
Connecting the servo drive to Arduino
Article-series: Programming Arduino from scratch #4
Article-series: Arduino - using_servos #1
Let's explore the possibility of performing basic actions using a physical controller instead of a computer screen. We'll take a closer look at servo drives, learn how to connect them to an Arduino controller, and review the fundamentals of control using the standard Servo library.
Power supply for Arduino
Article-series: Programming Arduino from scratch #3
One of the first questions that a novice controller programmer may have is how to power their project. Let's explore the options for proper power connection.