TFDL Makerspace Training
What is Arduino?
Arduino is an open-source electronics platform that consists of a microcontroller, a small programmable chip that can be configured to control various devices such as LEDs, motors, sensors, and displays, for users to build interactive electronics projects.
The Arduino board can be connected to a computer via USB, where users can write and upload programs using the Arduino Integrated Development Environment (IDE), which uses a C-based programming language.
One of the key advantages of Arduino is its accessibility, as it’s designed for people with varying levels of experience, from beginners learning basic electronics to experts developing advanced applications. Arduino has been widely adopted in fields like robotics, automation, Internet of Things (IoT), environmental monitoring, and even in art and design projects. The Arduino community is vibrant and supportive, offering countless tutorials, libraries, and project ideas, making it an ideal tool for prototyping and learning about embedded systems and electronics. Additionally, the availability of various Arduino-compatible boards and shields (expansion modules) allows users to customize their projects with ease.
The Taylor Family Digital Library's Makerspace loans Arduino kits. You can book them here.
Software Setup
Arduino uses a development environment which can be either web based or locally on a personal computer. The web editor IDE is based on the Arduino web page, where you can create a free account to gain access. The local environment IDE (Integrated Development Environment) can be downloaded from the Arduino web page for different operating systems like Windows, Linux or MacOS, and installed on your personal computer. Either one of these is a good way to develop your own sketches.
The development environment is organized with a side bar that has Folder, Examples, Libraries and Reference icons. The rest of the screen is divided in two horizontal sections, the sketch text editor, where you will code your sketch, and a message console, where you will get feedback on your actions and sketches. The web editor version looks like this:
Sketches
Sketches are the computer code (programs) that will manage the inputs and outputs according to your specific instructions. They are written in the text editor of the IDE using a simplified version of C++ and saved into an “.ino” extension file.
These instructions will be uploaded to the Arduino Board through the USB interface and written in the microcontroller, but in order to do that, you first need to select the correct board (Arduino UNO) and port (USB) from the Tools menu. After selecting the correct port and board, the upload can be performed using the upload button on the toolbar. While the sketch is being uploaded an orange LED will blink and a confirmation message will appear at the IDE when finished.
An example of a sketch and circuit setup is shown below, where the circuit setup allows the user to play a pitch that changes based on a changing analog input. In the code you will see that a library called pitches.h that defines the notes is loaded beforehand. This code only uses 3 pitches from the library called NOTE_A4, NOTE_B4 and NOTE_C3, then a FOR loop structure will allow to manage a set of 3 piezo electric sensors (shown on the bottom of the circuit setup) to play a tone through a speaker (shown at the top of the circuit setup).
Hardware Setup
Arduino Board
The Arduino UNO boards at LabNEXT are integrated with a breadboard at its side to make wiring up projects easier. The Arduino board consists of:
- USB to computer: Is used to power up the board and link to the computer, upload sketches to the board and communicate with them.
- Reset Button: Resets the ATMega microcontroller.
- Digital Pins: These include all the pins in the upper part of the board, marked as “Digital“. These pins are used for input or output. The pins for PWM (Pulse Width Modulation) are marked with “~ “, like pin 3, 5, 6, 9, 10 and 11. These digital pins are used with digitalRead(), digitalWrite() and analogRead(). The command analogWrite() only works for the PWM pins.
- TX and RX Leds: These LED’s indicate when the computer board link is being used to transmit (TX) and receive (RX) information.
- ON Led: This LED indicates when the board is powered.
- ATMega Microcontroller: This is the heart of the Arduino board. It stores and processes the information of the sketch.
- 7-12V DC Input: This is a power connector for when the board is not powered by the USB port, it can be used to power up the board with DC voltages from 7 to 12 VDC.
- Power pins: These pins are in the lower center of the board and marked up as “Power”. They are used to ground the circuit and also to provide power of 5 VDC and 3.3 VDC to the circuit board.
- Analog pins: These are located at the bottom left of the Arduino board, marked as “Analog”. They are used to read analog inputs.
Breadboard
The Breadboard setup by the Arduino board, is a plastic board that consists of common points for electrical connection of different electronic components of a circuit. This is used to prototype electronic circuits.
Breadboards work in the following way:
- The long vertical strips at the sides marked with a plus + (usually red) and a minus - (usually black or blue), are continuous electrical connections, so that the full length of plus (+) marked connection points on one side are all electrically connected. The same way for the long minus (-) marked connection points. Take into account that the vertical strip on one side doesn’t connect with the strip on the other side of the board. These side sections are usually setup for providing electrical power to the prototype circuit.
- The center section of the breadboard divides mainly by rows (1-30), so that each row between columns a-e, are electrically interconnected and between columns f-j, as well. Keep in mind that between the two sections a-e and f-j on the same row, and between rows there’s no interconnection, so there’s no electrical continuity between connection points a1 and f1, nor between a1 and a2.
Basic Electronics
Electrical circuits can be formed by different components that perform different functions. Among these components are power sources, resistors, pushbuttons, LED’s, wires, transistors, etc. They can also be connected in different ways in order to perform differently and achieve desired behaviours. The mix between components and arrangements to reach desired behaviours is what the design of electrical circuits is all about.
Components
- Power source: This is the main component of a circuit as it provides the energy required for the circuit to function. It can use alternating current (AC) or direct current (DC). The power source is normally a constant voltage source, which for Arduino is between 3.3V and 12V, depending on the application and connection point.
- Resistors: This component has two terminals and its main function is to impede the flow of electrical current. The higher the resistance, the lower the current flow and vice versa.
- Pushbuttons: Is a switch in the form of a button, which normally requires to be pressed to perform closing or opening of an electrical circuit. The difference between a pushbutton and normal switch is that once you release the push button, it will commute to the original position, which could be closed or open depending on the component configuration.
- LED: Light emitting diodes are the same as diodes but with a built-in light. These two lead semiconductors have a long terminal called “anode” (positive) and a shorter leg called “cathode” (negative). These diodes provide light once they reach a certain voltage between the terminals, so that when this threshold voltage is reached it will behave as an electrical short (continuous wire). Because of this it’s very important to control the current flow with a resistor.
- Wires: These are used at the breadboard to connect the different components between each other and configure an arrangement of components or electrical circuit. It’s a good practice to color code your wires to resemble the power source positive and negative. This helps troubleshoot faulty connections in the setup.
Connections
Nassau National Cable – Resources: https://nassaunationalcable.com/en-ca/blogs/blog/wiring-in-series-vs-parallel-circuit-the-difference
- Series: This connection provides that a component terminal is electrically connected to another component terminal in a chain like kind of way.
- Parallel: This other connection arrangement suggests that all the components are side by side, connecting all of one terminal ends together and then connecting the other ends together.
Tutorial Videos on Basic Electronics
- 7 Simple Arduino Projects for Beginners - Tutorial and explanation of sketches* Water Detector
* Automatic Night Light
* Touch Sensor Doorbell
* Playback PCM Samples
* Digital Ruler
* IR Remote Decoder
* PC Gamepad Controller
Released by Ron Mattino
- Last Updated: Feb 25, 2025 11:01 AM
- URL: https://libguides.ucalgary.ca/makerspace_training
- Print Page Print Page