Lab #2 focused on learning how to control physical electronic components using the Arduino Mega through digital input and output signals. Across multiple circuits, I programmed the Arduino to turn LEDs and a DC motor ON and OFF, read button states, send messages to the Serial Monitor, and visualize voltage changes on an oscilloscope.
The first circuits demonstrated simple digital output behavior, blinking an LED at set time intervals using the digitalWrite() and delay() commands. Next, input control was introduced using a pushbutton connected to a digital input pin. By reading the button’s state with digitalRead(), the Arduino could make decisions in real time and print its logic to the Serial Monitor as proof of operation.
Later sections expanded from LEDs to a DC motor using a 2N2222 BJT transistor. The Arduino pin supplied a small control signal to the transistor’s base, and the transistor acted like a digital switch to power the motor from an external voltage source. A flyback diode was added across the motor terminals to protect the circuitry from voltage spikes. Additional wiring allowed the motor to reverse direction and respond correctly when the pushbutton was pressed or released.
The oscilloscope helped visualize electrical behavior by showing square waves, duty cycles, and voltage transitions when the Arduino switched the LED or motor. Serial Monitor messages confirmed every state change, making the results easy to verify.
Lab 3 focused on understanding and applying analog inputs and PWM outputs using an Arduino through a series of hands-on experiments involving potentiometers, LEDs, and a joystick. Throughout the lab, four different circuits were built to demonstrate how varying analog voltages are read by the Arduino, converted into digital values, and then mapped to PWM outputs that control LED brightness and behavior. By using functions such as analogRead(), analogWrite(), and map(), the lab connected physical input directly to software-based control.
The lab emphasized the differences between hardware-driven control and code-controlled behavior, showing how software adds flexibility, automation, and precision. Using the Serial Monitor and oscilloscope helped verify correct operation and made it easier to understand how duty cycle, timing, and resolution affect output signals. One of the highlights of the lab was the joystick circuit, where moving the joystick in different directions caused distinct LED responses, clearly illustrating how two-axis analog input can independently control multiple outputs.
Building four circuits within a limited time frame was challenging, but it reinforced important skills such as efficient wiring, quick troubleshooting, and teamwork. Overall, Lab 3 provided practical experience with embedded systems by combining hardware, programming, and measurement tools, resulting in a clearer and more intuitive understanding of how analog signals and PWM outputs are used in real-world applications.
Lab 4 focused on learning how to control DC motors using the Arduino Mega through PWM signals, transistor switching, and H-bridge motor-driver circuits. Through three progressively more advanced circuits, we explored how software-generated PWM duty cycles translate into real motor behavior and how different hardware configurations determine whether a motor can change speed, direction, or operate independently from others.
In Circuit One, we used a single 2N2222 NPN transistor to apply PWM to a DC motor, allowing us to observe smooth speed changes but no ability to reverse rotation. Circuit Two introduced a discrete H-bridge built from individual transistors, which allowed full directional control by electronically reversing the polarity across the motor. Circuit Three used the L293D motor-driver IC, making the setup more compact and reliable while enabling safe and efficient control of two motors with built-in protection diodes.
Throughout the lab, we monitored PWM values and motor behavior using the Serial Monitor and confirmed proper operation through visible acceleration, deceleration, and direction changes. We also adapted our equipment due to hardware limitations. Since my own Arduino setup is embedded in another project, we used Ariana’s Arduino kit during the November 5 session and Ibrahim’s kit on November 12 when Ariana was absent. The group continued the lab with Ibrahim that day and completed all required circuits successfully.
Overall, Lab 4 strengthened our understanding of how PWM works, how H-bridges control motor direction, and how integrated motor-driver ICs simplify and stabilize real-world motor-control systems.
Lab 5 focused on the control and analysis of two electromechanical actuators: a positional servo motor and a stepper motor, using an Arduino microcontroller as the control interface. The lab emphasized the relationship between software-generated control signals and the resulting mechanical motion, reinforcing concepts from electronics, digital control, and instrumentation.
In the first part of the lab, a positional servo motor was controlled using a potentiometer connected to an analog input pin on the Arduino. The analog input value (0–1023) was read using the ADC and mapped to a servo angle range of 0°–180° using the map() function. Real-time feedback was observed through the Serial Monitor, allowing direct verification of how changes in resistance, voltage, PWM pulse width, and duty cycle affected the servo’s angular position.
In the second part of the lab, a stepper motor was controlled using a driver module and the Arduino Stepper library. The stepper motor was programmed to rotate a full revolution based on a defined number of steps per revolution and a specified RPM. This portion of the lab demonstrated discrete rotational control, timing, direction, and speed control using step-based motion instead of continuous position mapping.
Due to time constraints and limitations in the original lab manual schematic, a simplified and revised circuit layout was used—based on the professor’s diagram—to successfully complete the experiment without unnecessary or missing components. Despite these constraints, the core objectives of the lab were achieved, and the observed results aligned with theoretical expectations.
Overall, Lab 5 served as a practical and cumulative exercise that connected microcontroller programming, circuit construction, motor control theory, and real-world troubleshooting, reinforcing key skills developed throughout the course.
Lab 7 focused on exploring serial communication—both hardware and software—by using Arduino boards and HC-05 Bluetooth modules to create a functional two-way wireless messaging system. Each student pair built two independent circuits, one on each computer, and programmed the Arduino Mega to send and receive text through SoftwareSerial. The goal was to understand how data moves between devices, how baud rates affect communication, and how to configure Bluetooth hardware so messages can be transmitted cleanly between two separate systems.
In this lab, Ariana and I divided the work efficiently: each of us built our own HC-05 + Arduino circuit while testing communication between my MacBook Pro M1 and her Lenovo laptop. We analyzed the wiring, configured Bluetooth connections, and updated the code to handle input and output across the SoftwareSerial interface. Early attempts produced unreadable, garbled characters due to mismatched settings, but after debugging both circuit wiring and baud rate values, the system finally transmitted readable text.
By the end of the experiment, we successfully achieved a working wireless chat demonstration, where anything typed on one computer appeared on the other in real time through Arduino. This lab strengthened our understanding of serial protocols, Bluetooth communication, and the differences between HardwareSerial and SoftwareSerial. Most importantly, it showed how Arduino can move beyond standalone sketches and act as an actual communication device bridging multiple systems wirelessly.
Lab 8 centered on exploring Arduino tutorials from the Elegoo starter kit and transforming them into functional, customized circuits that demonstrated both understanding and creativity. The lab allowed us to choose freely from multiple example files, giving each student the flexibility to pursue the circuit that interested them most. My lab partner, Adriana, and I split the workload for efficiency and due to limited class time: she focused on the passive buzzer tutorial, while I worked on the LCD display tutorial. Despite dividing tasks, we each independently built the full circuits on our own Arduino Mega boards and tested the corresponding code, ensuring that both partners gained hands-on experience with wiring, debugging, and running the sketches.
From the buzzer side, Adriana successfully implemented a circuit that played a musical scale and later modified it by adding a button and LED to make the buzzer interactive. From my side, I took the original “Hello World” LCD script and expanded it in stages—first customizing the message to “Hello my name is Ramses,” then finally developing a fully interactive LCD system where the Arduino reads up to 32 characters from the Serial Monitor and displays them dynamically like a small teleprompter. These two projects demonstrated how simple tutorials can evolve into meaningful user-controlled systems.
In addition to the circuit work, the lab required answering conceptual questions on servo motors, PWM, stepper motors, RPM, and angle calculations, reinforcing the electrical and mechanical theory behind common actuators even if they were not used directly in our chosen circuits. This helped bridge the gap between the tutorials and broader robotics applications.
Overall, Lab 8 achieved its purpose by helping us practice reading hardware documentation, wiring circuits accurately, understanding example code, and extending those examples into more complex and practical variations. It strengthened our ability to troubleshoot, collaborate, and present our work clearly using the organized, color-coded “MESA format” that keeps each section readable and visually structured. The lab was a complete success, both technically and educationally, and prepared us for more advanced Arduino and sensor-based projects.
Lab 9 focused on controlling and analyzing the operation of a servo motor using a potentiometer and an Arduino microcontroller. By varying the input voltage and resistance of the potentiometer, a corresponding change in PWM signal duty cycle was produced, allowing precise control of the servo’s angular position. Measurements from the serial monitor and oscilloscope were used to verify the relationship between input values, pulse width, duty cycle, and servo position.
Due to missing and unnecessary components in the original lab manual diagram, a revised circuit layout provided by the professor was used. This streamlined design achieved the same functional results and allowed the experiment to be completed successfully. Overall, the lab reinforced concepts of electromechanical control, signal analysis, and practical troubleshooting, serving as a comprehensive final exercise for the course.