Interest in using motorised elements within my work
Arduinos can be used to create more complex mechanism such as controlling lights as well as the speed of motors
Looking at how these microcontrollers will allow me to create randomised sequences, control motors in interesting ways such as delay sequences or change of diraction.
I found implementing microcontrollers into my work very challenging and not easily approachable.
Through using a variety of video tutorials as well as consulting the Arduino user manual I began a slow process of learning the functions of various electronic components, basic physics and how to create circuits.
Learning Basic circuits:
Basic circuit to power LED
In this example I followed some basic tasks from the user manual to gain an understanding of key processes.
This circuit demonstrated how to transfer 5 volts of current from the Arduino into the breadboard to power an LED.
This allowed me to become familiar with how to construct basic coding, including how to name the specific pins that draw energy.
I also learnt how the breadboard functions, which is a solderless board that allows components to be held into (this was very helpful for testing but when installing work I have found that they can be challenging and components can easily fall out - if works were installed for a long period it would be beneficial to solder my own electronic motherboards.
Page from the Arduino User Manual
In this second process the coding became slightly more challenging.
I learnt how to construct a circuit that draws power from the Arduino to control a switch and then has a second battery to power the motor.
I learnt how using resistors and transistors were able to help regulate and resist the 5 V current so that it did not damage any of the circuit.
Unfortunately the pre-set example code did not allow the piece to be automated or include delays.
To help me work through this coding I used AI chatbot ChatGBT - this allowed me to talk through with the AI, making it act as a coder developer, feeding code into the system, asking it to modify based on my preferences. This quickly allowed me to learn how to create 'if statements' - which meant that I could create timed actions that causes the microcontroller to check whether if certain actions (like a button being pressed) have been made so that it will cause another function (like the motor running).
Understanding how to create timers by signifying them in milliseconds allowed me to copy across code and readjust to my desired sequences.
I also learnt that motors when spinning act as their own generators and produce a current. When the motor stops the inertia still continues to generate a current. Using a diode meant that the current was only allowed to move in one direction so that it did not damage any components.
Example code creating if statements and loops
Example Arduino circuit to control DC motors
Example H-bridge circuit to control speed and direction
To further develop my skills I explored more advanced circuits.
What I learnt:
Using an H-bridge component which allows current to be flipped, changing the direction of the motor.
The science behind DC motors - how they create their own magnetic field and how the direction of current controls the direction that it spins
How to use a Potentiometer which allows me to control the speed the motor runs by limiting or increasing the amount of voltage (however, this became an issue as the component would not fit into the laser cut box I had created - this means depending on the circuits I will have to recreate containers accordingly).
This also showed me how to use multiple buttons to control when the motor is turned on and off and also when to change the direction.
Again using AI, I was able to work with modifying the code to allow the processes to be automated, meaning that when the button is pressed the motor will run on a timed sequence - changing direction over time.
Unfortunately, this was very difficult and I was unable to correctly code longer timing duration.
I plan on further learning more advanced circuits to control other components such as LCD screens and light sequences. I need to develop more of an understanding of the specifics of coding in order to find any bugs and make the correct changes.
References and links:
Tutorials Point - resource for electronics