Entry 6: Arduino Continued
- Stephanie Sunil
- Feb 23, 2024
- 3 min read
This week was even more exciting and personally a nerve-wracking experience! We practiced making more circuits using the Arduino Starter Kit.
One of the circuits used a push button to switch on/off a built-in LED light and another circuit used a push button.
This week, we also learned about digital input, analog input and output, and serial output. Here are the four circuits that were made during the week:
Circuit 1: Button
This simple circuit was made using a push button, a resistor, wires and the Arduino Development board. When the button is pressed (in HIGH state), the built-in LED light, that is, pin 13, turns on (also becomes HIGH state). When the button is released or not pressed (in LOW state), the light turns off (also becomes LOW state).
Source code:
Circuit 2: Active Buzzer
This circuit was made using a push button, buzzer, a resistor, wires and the Arduino development board. When the button is pressed (HIGH), the buzzer makes a sound (HIGH) and vice versa, when the button isn't pressed (LOW), the buzzer makes no sound (LOW).
Source code:
We also made many more circuits using the servo motor as well as the ultrasonic sensor. These circuits include a circuit that acts as an automatic door(using both the components mentioned above). The physical implementation of the above is as shown in the video below:
The below circuit was made using an LED light, 2 resistors, a light sensor, the arduino board and jumper wires. It works in the following way: When the light sensor detects light, the LED light stays off and when the light sensor is covered or cannot detect light, the LED light turns on.
EXERCISE
Explain the analog to digital converter.
ADCs or Analog to Digital Converters as the name suggests converts analog data (that is, continuous voltage values) to digital data(data understood by computers). These circuits can be embedded into microcontrollers and are useful for processing and transmitting information in various applications.
Which ports in Arduino can be used for ADC?
There are 6 pins/ports in the Arduino UNO board which can be used for ADC and they are A0 to A5. These pins measure voltage and convert this to integer values.
How to write to Serial Port in Arduino?
The Serial.write() function is used to write binary data to the serial port in the Arduino board.
How does a potentiometer work?
A potentiometer is used to manually change the value of something. It is also known as a variable resistor. The potentiometer usually has 3 pins: GND, VCC and OUTPUT connected to Ground pin, VCC pin (5V or 3.3V) and Input pin respectively.
How does the LED dimmer work in Arduino when it can give only 0 or 5V output?
The LED dimmer works in Arduino when it can give only 0 or 5V output by using the feature: Pulse Width Modulation or PWM, which you use to control the average voltage delivered by switching the signal on/off.
References
Components101 (2019) Introduction to Analog to Digital Converters (ADC Converters) Accessed at: What is ADC, Working, Types of ADCs & How to Use an ADC IC? (components101.com) (Accessed: 20 February 2024)
Arduino (2023) Serial.write() - Arduino Reference Accessed at: Serial.write() - Arduino Reference (Accessed: 20 February 2024)
ArduinoGetStarted (2024) Arduino - Potentiometer | Arduino Getting Started Accessed at: Arduino - Potentiometer | Arduino Tutorial (arduinogetstarted.com) (Accessed: 23 February 2024)
Arduino (2023) Basics of Potentiometers with Arduino Accessed at: Basics of Potentiometers with Arduino | Arduino Documentation (Accessed: 23 February 2024)
Comments