Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Arduino Robotics workshop Day1


Published on

Slides from my Arduino robotic workshop

Published in: Technology

Arduino Robotics workshop Day1

  1. 1. Arduino Robotics Workshop Day 1 Sudar Muthu (@sudarmuthu)
  2. 2. Who am I? Research Engineer by profession Build’s robots as a hobby Playing with Arduino for more than 3 years Blog about Arduino at Moderator for Arduino India forum 2
  3. 3. Special Thanks Anil and Sysplay 3
  4. 4. Objective Introduce Arduino Learn about robotics Learn about sensors Build a small bot Make it autonomous Fully hands on Details at 4
  5. 5. Basics of Robotics 5
  6. 6. Anatomy of a RobotSensors Motors Processor
  7. 7. Sensors (Input)
  8. 8. Motors (Output)
  9. 9. Processor (Brain)
  10. 10. Getting to know your Robotics Kit 10
  11. 11. Can you identify the different components in the kit? 11
  12. 12. Breadboard Basics 12
  13. 13. How to use a breadboard The first two and the last two rows are connected In all the other rows, columns are connected Connect the first and last row to power Connect the second and second last row to ground 13
  14. 14. Arduino 14
  15. 15. Different Arduino types Arduino Uno (The one used for this workshop) Arduino Mega Arduino Due Lillypad Arduino BT Arduino Ethernet .. and clones 15
  16. 16. Getting to know your Arduino 16
  17. 17. Identify these components in Arduino Microcontroller Power jacket USB jacket Digital pins Analog pins Reset button 17
  18. 18. Identify these components in Arduino Voltage Regulator Power Pins (how many are there?) Ground Pins (how many are there?) Vin Pin Rx and Tx Pins ICSP Headers 18
  19. 19. Identify these components in Arduino Power Led Rx and Tx Led’s Test Led Crystal Anything else? 19
  20. 20. Powering up Arduino 20
  21. 21. Different ways to power up Arduino Using USB cable Using DC power jacket Giving voltage directly into Vin pin Giving regulated voltage directly into 5V pin 21
  22. 22. Setting up Arduino 22
  23. 23. Testing the setup with a “Hello World” program 23
  24. 24. Blinking LED 24
  25. 25. Making a LED blink Insert a LED in pin 13 Open File->Examples->Basics->Blink Select Tools->Boards->Arduino Uno Select File->Upload (or press ctrl+u) You should get the message “Done upload” Your Led should blink Congrats you can program Arduino now  25
  26. 26. Anatomy of an Arduino sketch 26
  27. 27. Printing values through Serial Uno has one UART hardware port, using which we can exchange information with computer Very useful for debugging Works at a specified baud rate Use Serial Monitor to read values SoftwareSerial is also available 27
  28. 28. Digital Input and output 28
  29. 29. Digital Input 29
  30. 30. Digital Output The LED blink that we did at “setting up Arduino” is Digital output 30
  31. 31. Analog Input 31
  32. 32. Reading Analog values from sensors Connect the LDR on pin A0 and Gnd LDR’s resistance varies based on the amount of light present Read the current value using analogRead() Print the value in Serial Monitor 32
  33. 33. Control an LED based on lightvoid setup(){ pinMode(13, OUTPUT);}void loop(){ int val = analogRead(A0); if (val > 50) { digitalWrite(13, HIGH); } else { digitalWrite(13, LOW); }}
  34. 34. Analog Output 34
  35. 35. Analog Output What is PWM? Analog like behavior using digital output Works by switching the LED on and off regularly Changing the brightness of a Led 35
  36. 36. Introduction to Batteries 36
  37. 37. Main Concepts What is voltage? What is current ratting? Rechargeable Don’t ever short circuit it 37
  38. 38. Different types of batteries 38
  39. 39. Can you identify the battery which is part of the kit? 39
  40. 40. Let’s get some Food 40
  41. 41. Introduction to Motors 41
  42. 42. Dc Motor vs stepper motor 42
  43. 43. Identify the motor in the kit 43
  44. 44. H-Bridge 44
  45. 45. Understanding the pins of H- Bridge 45
  46. 46. Connecting motors to H-Bridge 46
  47. 47. Let’s assemble the bot
  48. 48. Teaching robot to crawlMove Forward Both motors rotate in the forward directionMove Backward Both motors rotate in the reverse directionTurn left Left motor stops. Only right motor rotates forwardTurn Right Left motor moves forward. Right motor stops
  49. 49. Putting everything togetherYou have your first fully autonomous robot ready. Now take her for a walk 
  50. 50. What we will see tomorrow Varying the speed of the motor How IR works Making use of IR to find obstacles Make the bot avoid strangers Making it autonomous Future ideas 50
  51. 51. Links Arduino – Asimi – A simple bot using Arduino Getting started with hardware programming hardware-programming Getting started with Arduino arduino-and-avr Workshop Details workshop
  52. 52. Questions Thank You Sudar Muthu (@sudarmuthu)