Mathematical-based patterns
My assignment's idea for this week is to design, simulate, and build Arduino Powered Pattern Making Robot. As an engineer, I love to discover the relation between mathematics and art through patterns. So, I inspired the idea of the assignment from mathematical-based patterns that are found all around us in our daily lives as well as in nature. In this project, i work to develop a simple robot to make beautiful patterns. This Robot uses a cross-shaped structure and two DC motors to create the patterns. The setup is designed to allow for multiple different movement patterns based on the configuration of the motors and the arm joints.
The design is made from cardboard where the plotter arm is controlled by one dc motor, and the plotter based is rotated by the DC motor.
Electronic components:
Arduino UNO is a low-cost, flexible, and easy-to-use programmable open-source microcontroller board that can be integrated into a variety of electronic projects. This board can be interfaced with other Arduino boards, Arduino shields, Raspberry Pi boards and can control relays, LEDs, servos, and motors as an output.
A gear motor is a combination of a DC motor and gearbox. The gears use to reduce the speed of the motor while increasing the torque output.
This driver module is based on L298N H-bridge. It can drive up to 2 DC motors. The driver can control both motor's speed and the direction of rotation. The speed is controlled using PWM input to ENA or ENB pins, while the motor rotation direction is controlled by suppling high and low signal to EN1-EN2 for the first motor or EN3-EN4 for the second motor.
L298 Driver module connection with Arduino tutorial can find here.
4- LCD Module 16 char.x2 lines
A Liquid Crystal Display (LCD) is a form of visual display used in electronic devices, in which a layer of a liquid crystal is sandwiched between two transparent electrodes.
LCD module connection with Arduino tutorial can find here.
5- Keypad 16 Key (Matrix 4x4)
The keypad is a library for using matrix-style keypads with the Arduino.
The keypad connection with the Arduino tutorial can find here
6- 5V DC Adapter
The adaptor converts AC power to 5-volt DC for powering most electronic devices ( in our case the dc motor).
The potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. Potentiometers are commonly used to control electrical devices such as volume controls on audio equipment. In this assignment, I used it to control the speed of the DC motor.
8- Breadboard
A breadboard allows for easy and quick creation of temporary electronic circuits or to carry out experiments with circuit design. Breadboards enable developers to easily connect components or wires thanks to the rows and columns of internally connected spring clips underneath the perforated plastic enclosure.
9- DC Jack to terminal block converter
11 - Crocodile Wires
Materials:
Cardboard: Cardboard is a heavy-duty paper-based product having a greater thickness and superior durability or other specific mechanical attributes to paper; such as foldability, rigidity, and impact resistance. So, I used it to make the prototype of the design.
software:
Arduino IDE 1.8.19: is open-source Arduino Software (IDE) that makes it easy to write code and upload it to the Arduino board. This software can be used with any Arduino board, in this assignment, I use Arduino UNO.
You can find Arduino IDE tutorial for beginners here
Electronics components and the prototype materials.
Arduino IDE 1.8.19.
Wiring diagram
Design and implementation of the Circuit :
1- Start by adding the power supply and 5v power supply to my design.
2- Adding the output action components ( DC motors and LCD ) to the breadboard.
3- Adding the output control components ( L298N Motor Driver ) to the circuit.
4- Adding the input components ( potentiometer, push bottom, and keypad) to the circuit design.
5- Add the Arduino UNO
6- Adding connections between the components, as shown in the Figure.
7- Starting to write the code using Arduino C (Text Code), as shown in the Figure.
The design and implementation process :
1- The crocodile wires and Jumper Wires have been used to connect the components together (as shown in the photos )
2- The DC motors and L298N Motor Driver have been separately powered at first, in order to make sure that they are functional, before putting them together in the circuit.
3- The DC Jack to terminal block converter has been connected to the DC jack of the DC Power adapter to power the motors in parallel.
4- The crocodile wires have been used to connect the potentiometer with the Dc motor to the DC Power adapter, to control the speed of the motor.
5- LCD, push button, and keypad have been connected and fixed on the Arduino board. LCD is used as an output to print messages for the user. The keypad and push bottom are being used as input to start the drawing pattern.
- Push button: for welcome drawing
- keys 1, 4, 7: for drawings no 1, 2 and 3
6- The one DC motor has been attached to the plotter arm, to control its motion based on the code.
7- The Cardboard has been used to make a wheel, which is used as a base to fix the motor.
8- After all connections are completed and ready, the DC power adapter has been plugged into the wall outlet to power the plotter.
9- The video shows the Arduino Powered Pattern Making Robot. while functioning.
Arduino Powered Pattern Making Robot
The device while functioning
Title of Media
I have learned from Midweek Self-Practice when I use the L298N DC Motor Driver Module with Arduino to control the speed of the dc motor, i should removed the pre-attached jumpers and connect the pin with the Arduino because if these jumpers left, this will lead to the motor work with the full speed.
The challenges
after using The DC motors and L298N Motor Driver to control the speed of the motor, the min speed is still a fast little bit.
The solution
To overcome this, I used a potentiometer and fixed it at a specific value, and connect the potentiometer in series with the motor to minimize the speed, as shown in the below figure
The potentiometer connection
Title Password Protected Safe Project Media
This week's assignment was my third step toward the final project and design Arduino Powered Pattern Making Robot, where my final project is drawing robots.
By the end of this week, I learned different skills that will support me in the final project, such as :
- Understand Arduino Code structure and write Arduino C code syntax correctly
- Use Interrupts to do multitasking in Arduino C
- Use Looping (For) for repeating actions in Arduino C
-Create and use Functions in Arduino C
The smart home system was the WOW for this week. Our team worked to program, Build, and control a simple smart home system. This system senses the light in a room, as well as, weather parameters (temperature and humidity) in order to control a DC fan and a DC lamp.
The smart home system
Title of Media