Here the banding is happening mechanically, we decided to make this process automatized. So we will have a wooden table-base and two other pieces of the wood connected together. In the middle there will be a hot wire, which will heat the plexiglass and help us to band it. One is static and the second one will be lifted using a DC motor. We will set up the angle manually and will have a protractor to set the desired angle properly.
We will use limit switches, to detect that the dynamic plane reached its destination points and a push button, to start the process. Basically, when we press the start push button, the machine will start working, if it’s in the start position(it will be detected by the first limit switch). When the dynamic plane reaches the desired angle (it will be detected by the second limit switch), the motor will stop for a while and start rotating to the opposite direction bringing the plane to the start position. This is the minimum that the machine requires but we were thinking that it would be nice to have a sound signal as well and an LED screen for some feedback from the machine.
After having the model sketch, we have divided the work in the following way:
If everything works well we can develop the machine in a way that the setting of the angle can be automatized as well. Another implementation that can be done is changing the motor speed by using potentiometer. It is possible to implement the idea and have multiple bandings as well.
I got a brief information about the motors and drivers in Arduino Project Hub page
Basically, it says :
On Dronebot Workshop website (which I would highly recommend) I found more detailed information about the working principles of the DC motors. According to the information there, you can’t just connect a DC motor to one of the output pins of your Arduino and expect it to work. DC motors have current and voltage requirements that are beyond the capabilities of your microcontroller or microcomputer. It is necessary to use some external electronics to drive and control the motor, and you’ll probably need a separate power supply as well.
In a simple DC motor there are two main components, the “stator” and the “armature”. The stator is a permanent magnet and provides a constant magnetic field. The armature, which is the rotating part, is a simple coil.
The armature is connected to a DC power source using a 2-piece ring installed around the motor shaft, these ring sections are called “commutator rings”. The two pieces of the commutator rings are connected to each end of the armature coil. Direct Current of a suitable voltage is applied to the commutator rings via two “brushes” that rub against the rings.
When DC is applied to the commutator rings it flows through the armature coil, producing a magnetic field. This field is attracted to the stator magnet (remember, opposite magnetic polarities attract, similar ones repel) and the motor shaft begins to spin.
The motor shaft rotates until it arrives at the junction between the two halves of the commutator. At that point the brushes come into contact with the other half of the commutator rings, reversing the polarity of the armature coil (or coils, most modern DC motors have several). This is great because at this point the motor shaft has rotated 180 degrees and the magnetic field polarities need to be reversed for the motor to continue rotating. This process repeats itself indefinitely until the current is removed from the armature coils. (image credits https://dronebotworkshop.com/dc-motors-l298n-h-bridge/)
Better quality DC motors are the brushless variety. Brushless motors use a more complex arrangement of coils and do not require a commutator. The moving part of the motor is connected to the permanent magnet. Because they do not contain brushes these brushless motors will last longer and are also much quieter than brushed DC motors. Most quadcopter Motors are brushless motors.
To reverse the direction in which the DC motor rotates you simply reverse the polarity of the DC current that you apply to it.
Now that we know how DC motors work, how you can reverse their direction by changing polarity. There is an easy way to do this using a very common circuit configuration called an “H-Bridge”. An “H-Bridge” is simply an arrangement of switching the polarity of the voltage applied to a DC motor, thus controlling its direction of rotation using transistors. Using transistors also allows you to control the motor speed with PWM.
In the first diagram we can see four switches which are all in the open or “off” position. In the center of the circuit is a DC motor. If you look at the circuit as it is drawn here you can distinctly see a letter “H”, with the motor attached in the center or “bridge” section – thus the term “H-Bridge”. If we close (i.e. turn on) two of the switches you can see how the voltage is applied to the motor, causing it to turn clockwise. If you open those switches and close the other two, this causes the polarity of the voltage applied to the motor to be reversed, resulting in our motor spinning counterclockwise. (image credits https://dronebotworkshop.com/dc-motors-l298n-h-bridge/)
Luckily, I didn’t have to use an H-bridge, because the Arduino motor shield has built-in H bridges, which can drive several motors. You have to connect the DC motor to one of the channels (A or B) and by addressing special pins you can select a motor channel to initiate, specify the motor direction (polarity), set motor speed (PWM), stop and start the motor, and monitor the current absorption of each channel. Here are the assigned pins and their functions
The next component, which was new for me, is the limit switch or microswitch. The video below is explaining how it works.
I have used an LCD and a piezo transducer during the output devices week. This time I will use a buzzer instead of the piezo transducer, but the working principles are very similar for both of them. Here you can find the information about their similarities and differences.
And the last thing is to connect the LCD to the circuit. As we have and LCD display module with 4 pinouts, it was easy to connect to the motor shield: VCC to the 5V, GND to GND, SCL to SCL, SDA to SDA
After doing all the connections, I uploaded the following code to the arduino board and it worked..
Of course, this code was written and checked step by step. First of all I have checked the response of the motor to the switches. Then I have added the LCD and buzzer part.
The only new command that I have used, was the do…while loop. By using this we are asking to do commands until the statement in the argument of while is true.
We decided to add our names on the board as well, so using the
And here is the trial video of the electronics with the Arduino shield
February 3, 2022