Difference between revisions of "Arduino"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 7: Line 7:
 
Arduino can interact with buttons, LEDs, motors, speakers, cameras, TV and smart phones etc. It can used for almost any electronics projects.
 
Arduino can interact with buttons, LEDs, motors, speakers, cameras, TV and smart phones etc. It can used for almost any electronics projects.
  
The Spoken Tutorial effort for Arduino has been contributed by '''Nirmala Venkat''' and '''Manivel''' from Spoken Tutorials team and '''Abhinav Dronamraju''' and '''Brijesh Gupta''' from FOSSEE team.
+
The Spoken Tutorial effort for Arduino has been contributed by '''Nirmala Venkat''' and '''Manivel''' from Spoken Tutorials team and '''Abhinav Dronamraju''', '''Brijesh Gupta''', '''Pratik Bhosale'''and '''Rajesh kushalkar'''  from FOSSEE team.
  
The domain review of basic level is done by '''Srikant Patnaik''' from FOSSEE. The content for Intermediate level is contributed by ''' Prof. Sharma''' from IIT Hyderabad.
+
The domain review of basic level is done by '''Srikant Patnaik''' from FOSSEE. The content for Advance level is contributed by ''' Prof. Sharma''' from IIT Hyderabad.
  
 
'''Learners''': High School and UG/PG Electronics students, hardware professional.  
 
'''Learners''': High School and UG/PG Electronics students, hardware professional.  
Line 37: Line 37:
 
   20. Buzzer (1 no.)
 
   20. Buzzer (1 no.)
 
   21. Push Button Switch (2 nos.)
 
   21. Push Button Switch (2 nos.)
 +
  22. DC Motors (2 nos.)
 +
  23. Acrylic Robot Chassis with screws and nuts
 +
  24. Caster Wheel (1 no.)
 +
  25. DC Motor Wheels (2 nos.)
 +
  26. Single Strand Wires
 +
  27. Screwdriver
 +
  28. HC-05 Bluetooth Module
 +
  29. 9V Battery with Connector
 +
  30. 9Volts-1 Ampere Adapter
  
 
Following components are required only for soldering purpose.  Hence one unit per lab should be sufficient.
 
Following components are required only for soldering purpose.  Hence one unit per lab should be sufficient.
Line 158: Line 167:
  
 
==Intermediate Level==
 
==Intermediate Level==
 +
#Assembly of Robot
 +
#*Components required to build a Robot
 +
#*About soldering DC motors
 +
#*Acrylic Robot Chassis with screws and nuts
 +
#*Steps to mount the motor on the Chassis
 +
#*Fixing the wheels of the Robot
 +
#*Assembled Robot
 +
#*About .apk file
 +
#*About MIT App inventor to build an app
 +
#*Code file for Car Bluetooth RC.apk
 +
#*Steps to install the app on the Android phone
 +
#Robot Control using Bluetooth
 +
#*Components required for Bluetooth communication
 +
#*About Bluetooth communication
 +
#*About Data Mode and AT Command Mode
 +
#*Circuit connection details of Arduino board and HC-05 Bluetooth module
 +
#*Actual setup of the connections
 +
#*Program to control the movement of the Robot
 +
#*Configure the Bluetooth in Android phone
 +
#*Working of the Car Bluetooth RC App
 +
#*Working of the Robot
 +
#*Control the movement of the Robot using Bluetooth communication
 +
 +
==Advance Level==
 
#Assembly programming through Arduino
 
#Assembly programming through Arduino
 
#*Write an assembly program to display a digit on seven segment display
 
#*Write an assembly program to display a digit on seven segment display

Revision as of 15:03, 9 October 2020

Arduino is an open source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board or microcontroller and a software, IDE (Integrated Development Environment) that runs on the computer. It is used to write and upload computer code to the physical board.

Arduino board designs use a variety of microprocessors and controllers. The boards are equipped with sets of digital and analog input/output pins, USB connection which is used for loading programs from computers, power jack, reset button etc.

A program written with the IDE for Arduino is called a sketch. The Arduino IDE supports the languages C and C++ using special rules of code structuring. It consists of only two functions, setup and loop. The setup function is used to initialize variables, input and output pin modes and other libraries needed in the sketch. After setup has been called, function loop is executed repeatedly in the main program. It controls the board until the board is powered off or reset.

Arduino can interact with buttons, LEDs, motors, speakers, cameras, TV and smart phones etc. It can used for almost any electronics projects.

The Spoken Tutorial effort for Arduino has been contributed by Nirmala Venkat and Manivel from Spoken Tutorials team and Abhinav Dronamraju, Brijesh Gupta, Pratik Bhosaleand Rajesh kushalkar from FOSSEE team.

The domain review of basic level is done by Srikant Patnaik from FOSSEE. The content for Advance level is contributed by Prof. Sharma from IIT Hyderabad.

Learners: High School and UG/PG Electronics students, hardware professional.


Please ensure that you have the Arduino hardware kit ready with you before you begin to learn from this tutorial series. 
The list of components is as follows:
 1. Arduino UNO or Compatible Board (1 no.)
 2. USB Power Cable (1 no.)
 3. Resistor 220 ohms (6 nos.)
 4. Resistor 10K Ohms (2 nos.)
 5. Resistor 1K Ohms (4 nos.)
 6. Breadboard (1 no.)
 7. Tricolor LED Common Cathode (1 no.)
 8. Red LED Common Cathode (1 no.)
 9. Seven segment display - Common cathode (1 no.)
 10. Seven segment display - Common anode (1 no.)
 11. Decoder – IC 7447 (1 no.)
 12. LCD 16 X 2 soldered with pin header (1 no.)
 13. Jumper wires Male to Male (20 nos.)
 14. Jumper wires Male to Female (8 nos.)
 15. Potentiometer 10K Ohms (1 no.)
 16. ESP8266 es01 WiFi Black color Module  (1 no.)
 17. DHT11 Temp_Humidity Sensor Module (1 no.)
 18. L293D H-Bridge Motor driver IC (1 no.)
 19. Toy Motor (1 no.)
 20. Buzzer (1 no.)
 21. Push Button Switch (2 nos.)
 22. DC Motors (2 nos.)
 23. Acrylic Robot Chassis with screws and nuts
 24. Caster Wheel (1 no.)	
 25. DC Motor Wheels (2 nos.)
 26. Single Strand Wires
 27. Screwdriver 
 28. HC-05 Bluetooth Module
 29. 9V Battery with Connector
 30. 9Volts-1 Ampere Adapter

Following components are required only for soldering purpose. Hence one unit per lab should be sufficient.

1. Soldering iron (1 no.)
2. Soldering stand (1 no.)
3. Soldering lead (1 no.)
4. Soldering paste (1 no.)


Basic Level

  1. Overview of Arduino
    • Learning objectives of Arduino
    • Prerequisites for learning Basic level Arduino tutorials
    • Prerequisites for learning Intermediate level Arduino tutorials
    • Who can use Arduino?
    • Glimpse of Spoken Tutorials available on Arduino series
  2. Electronic components and connections
    • Breadboard and its internal connections
    • LED and its connections
    • Tri-color LED
    • Resistor
    • Simple circuit using LED, resistor and breadboard
    • Common mistakes when using breadboard to make connections
    • Pushbutton and its connections
    • Common mistakes when using pushbutton to make connections
    • Seven segment display and its connections
    • Demonstration of all the above components
  3. Introduction to Arduino
    • About Arduino device
    • Features of Arduino
    • Components of Arduino board
    • Description of Microcontrollers
    • Few examples where a Microcontroller is used
    • Installation of Arduino IDE on Ubuntu Linux OS
    • Run the arduino executable file
    • The Arduino IDE window
  4. Arduino components and IDE
    • Set up a physical connection between Arduino and a computer
    • Connect the Arduino board to the computer using the USB cable
    • Various components available in Arduino hardware
      • ATMEGA 328 microcontroller chip
      • About Arduino BootLoader
      • Digital Pins
      • Analog Pins
      • Blinking LEDs that are helpful for troubleshooting
      • Ground Pins
      • External power adapter
    • Arduino programming language
  5. First Arduino Program
    • Write an Arduino program to blink an LED
    • Arduino program is saved as Sketch
    • Default program environment with two empty functions -
      • setup - function for setting up a micro-controller
      • loop - infinite loop
    • Program to turn on the LED
    • Compile the program into binary format
    • Program to turn off the LED
  6. Arduino with Tricolor LED and Push button
    • Tricolor LED - Common Cathode Tricolor LED
    • Other external devices that are required for this experiment
    • Understand the connection circuit details
    • Connect a tricolor LED to Arduino board
    • Write a program to blink tricolor LED
    • Use Pushbutton to control the blinking
    • How to reduce the delay of the blink
  7. Arduino with LCD
    • Connect an LCD to Arduino board
    • See the details of the circuit connection
    • See how to do the soldering
    • Setup the components as per the circuit diagram
    • The aim is to write two strings on the LCD display
    • Write a program to display a text message on the LCD
  8. Display counter using Arduino
    • Connect an LCD and a Push button to Arduino board.
    • Add a pushbutton and make a simple counter
    • Write a program in the Arduino IDE
    • See that pushbutton is working successfully
    • Modify the program to set a counter
    • Output: count is increased whenever the button is pressed
  9. Seven Segment Display
    • Connect a seven segment display to Arduino board
    • Types of seven segment display
    • Connection details of common cathode seven segment display
    • Connection details of common anode seven segment display
    • Circuit connection explanation
    • Live setup of the connection
    • Program to blink LEDs in seven segment display
    • High and low state of LED's in the seven segment
    • Program to display digits 0 to 4 in seven segment display
    • Compile and upload the program
  10. Pulse Width Modulation
    • About Pulse Width Modulation
    • About duty cycle and frequency
    • Formula to calculate the duty cycle
    • Experiment to control the brightness of LED by varying the duty cycle
    • Experiment to control the speed and direction of a DC motor
    • Circuit connection explanation of the above experiments
    • Source code for the above experiments
    • Demonstration of the output
  11. Analog to Digital Conversion
    • About DHT11 sensor
    • Arduino resolution concepts
    • Circuit connection details of DHT11 sensor and Arduino
    • Features of DHT11
    • Download the DHT11 Arduino library to run this program.
    • Code to detect the temperature and humidity using DHT11 sensor
    • Display the output in the Serial Monitor screen
    • Display the output in the Serial Plotter screen
  12. Wireless Connectivity to Arduino
    • About ESP8266-01 WiFi module
    • Various pins of ESP8266-01 WiFi module
    • Circuit connection of ESP8266 - 01 module with Arduino
    • Setup the read-write permission to the USB port
    • Download and install ESP8266 WiFi module in Arduino IDE
    • Establish a connection between WiFi module and a laptop or a mobile phone
    • Source code for the above experiment
    • Demonstration of the output

Intermediate Level

  1. Assembly of Robot
    • Components required to build a Robot
    • About soldering DC motors
    • Acrylic Robot Chassis with screws and nuts
    • Steps to mount the motor on the Chassis
    • Fixing the wheels of the Robot
    • Assembled Robot
    • About .apk file
    • About MIT App inventor to build an app
    • Code file for Car Bluetooth RC.apk
    • Steps to install the app on the Android phone
  2. Robot Control using Bluetooth
    • Components required for Bluetooth communication
    • About Bluetooth communication
    • About Data Mode and AT Command Mode
    • Circuit connection details of Arduino board and HC-05 Bluetooth module
    • Actual setup of the connections
    • Program to control the movement of the Robot
    • Configure the Bluetooth in Android phone
    • Working of the Car Bluetooth RC App
    • Working of the Robot
    • Control the movement of the Robot using Bluetooth communication

Advance Level

  1. Assembly programming through Arduino
    • Write an assembly program to display a digit on seven segment display
    • Arduino - Assembly code reference
    • Arduino ATmega328 Pin mapping
    • Connection circuit details
    • Installing AVRA and AVRDUDE assembler
    • How to connect and check the port number of Arduino
    • Assembly program to glow the dot LED on the seven segment display
    • Assembly program to display digit two on the seven segment display
    • Assembly program to display digit five on the seven segment display using decoder
    • How to save the file, assemble and upload to the Arduino
  2. Digital Logic Design with Arduino
    • Write an assembly to verify the logical AND operation
    • Use the m328Pdef.inc file that is available in the code files link of this tutorial.
    • Explanation of the Source code for logical AND operation
    • Save the file and generate the.hex file
    • Upload the code to the Arduino
    • Displaying the output on the Seven segment display
    • Replace the program with or to perform logical OR operation
    • Replace the program with xor to perform logical XOR operation
    • Implement and verify the below combinational logics:
      • A = W′
      • B = WX′Z′ + W′X
      • C = WXY′ + X′Y + W′Y
      • D = WXY + W′Z
  3. AVR-GCC programming through Arduino
    • Write an assembly program to display a digit on seven segment display
    • Arduino - Assembly code reference
    • Arduino ATmega328 Pin mapping
    • Connection circuit details
    • Installing AVRA and AVRDUDE assembler
    • How to connect and check the port number of Arduino
    • Assembly program to glow the dot LED on the seven segment display
    • Assembly program to display digit two on the seven segment display
    • Assembly program to display digit five on the seven segment display using decoder
    • How to save the file, assemble and upload to the Arduino
  4. Interfacing LCD through AVR-GCC programming
    • Interface a LCD to Arduino board
    • Pin connections details of the Arduino and LCD
    • Image showing the connections
    • Live set up of the connections
    • Write an AVR-GCC program to display a digit on LCD
    • Using avr/io.h, util/delay.h, stdlib.h libraries in the program
    • Using ClearBit() and SetBit() function
    • Various functions used to excute the output
    • Using make FNAME command to compile and upload to Arduino
    • Displaying the output digit 5 on the LCD
  5. Mixing Assembly and C programming
    • Combining Assembly and C programming
    • Explanation of the circuit connections
    • Live setup of the connection
    • Assembly routine program which initialises and sets pin 13 of Arduino as output
    • Call that Assembly routine in AVR-GCC program to blink the Dot LED of the Seven Segment display
    • Use the Makefile that is available in the code files link of this tutorial.
    • Explanation of the Source code of the subroutine and main program
    • Save the file and generate the .hex file
    • Upload the code to the Arduino
    • Display the output on the Seven segment display

Contributors and Content Editors

Nancyvarkey, Nirmala Venkat, PoojaMoolya