Arduino Robotics workshop Day1

7,587 views
7,522 views

Published on

Slides from my Arduino robotic workshop http://hardwarefun.com/arduino-workshop

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total views
7,587
On SlideShare
0
From Embeds
0
Number of Embeds
1,351
Actions
Shares
0
Downloads
249
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Arduino Robotics workshop Day1

  1. 1. Arduino Robotics Workshop Day 1 Sudar Muthu (@sudarmuthu) http://hardwarefun.com/arduino-workshop http://github.com/sudar
  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 http://hardwarefun.com Moderator for Arduino India forumhttp://hardwarefun.com 2
  3. 3. Special Thanks Anil and Sysplayhttp://hardwarefun.com 3
  4. 4. Objective Introduce Arduino Learn about robotics Learn about sensors Build a small bot Make it autonomous Fully hands on Details at http://hardwarefun.com/arduino-workshophttp://hardwarefun.com 4
  5. 5. Basics of Roboticshttp://hardwarefun.com 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 Kithttp://hardwarefun.com 10
  11. 11. Can you identify the different components in the kit?http://hardwarefun.com 11
  12. 12. Breadboard Basicshttp://hardwarefun.com 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 groundhttp://hardwarefun.com 13
  14. 14. Arduinohttp://hardwarefun.com 14
  15. 15. Different Arduino types Arduino Uno (The one used for this workshop) Arduino Mega Arduino Due Lillypad Arduino BT Arduino Ethernet .. and cloneshttp://hardwarefun.com 15
  16. 16. Getting to know your Arduinohttp://hardwarefun.com 16
  17. 17. Identify these components in Arduino Microcontroller Power jacket USB jacket Digital pins Analog pins Reset buttonhttp://hardwarefun.com 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 Headershttp://hardwarefun.com 18
  19. 19. Identify these components in Arduino Power Led Rx and Tx Led’s Test Led Crystal Anything else?http://hardwarefun.com 19
  20. 20. Powering up Arduinohttp://hardwarefun.com 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 pinhttp://hardwarefun.com 21
  22. 22. Setting up Arduinohttp://hardwarefun.com 22
  23. 23. Testing the setup with a “Hello World” programhttp://hardwarefun.com 23
  24. 24. Blinking LEDhttp://hardwarefun.com 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 http://hardwarefun.com 25
  26. 26. Anatomy of an Arduino sketchhttp://hardwarefun.com 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 availablehttp://hardwarefun.com 27
  28. 28. Digital Input and outputhttp://hardwarefun.com 28
  29. 29. Digital Inputhttp://hardwarefun.com 29
  30. 30. Digital Output The LED blink that we did at “setting up Arduino” is Digital outputhttp://hardwarefun.com 30
  31. 31. Analog Inputhttp://hardwarefun.com 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 Monitorhttp://hardwarefun.com 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 Outputhttp://hardwarefun.com 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 Ledhttp://hardwarefun.com 35
  36. 36. Introduction to Batterieshttp://hardwarefun.com 36
  37. 37. Main Concepts What is voltage? What is current ratting? Rechargeable Don’t ever short circuit ithttp://hardwarefun.com 37
  38. 38. Different types of batterieshttp://hardwarefun.com 38
  39. 39. Can you identify the battery which is part of the kit?http://hardwarefun.com 39
  40. 40. Let’s get some Foodhttp://hardwarefun.com 40
  41. 41. Introduction to Motorshttp://hardwarefun.com 41
  42. 42. Dc Motor vs stepper motorhttp://hardwarefun.com 42
  43. 43. Identify the motor in the kithttp://hardwarefun.com 43
  44. 44. H-Bridgehttp://hardwarefun.com 44
  45. 45. Understanding the pins of H- Bridgehttp://hardwarefun.com 45
  46. 46. Connecting motors to H-Bridgehttp://hardwarefun.com 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 ideashttp://hardwarefun.com 50
  51. 51. Links Arduino – http://arduino.cc Asimi – A simple bot using Arduino http://hardwarefun.com/project/asimi Getting started with hardware programming http://hardwarefun.com/tutorials/getting-started-with- hardware-programming Getting started with Arduino http://hardwarefun.com/tutorials/getting-started-with- arduino-and-avr Workshop Details http://hardwarefun.com/arduino- workshop
  52. 52. Questions Thank You Sudar Muthu (@sudarmuthu) http://hardwarefun.com/arduino-workshophttps://github.com/sudar/arduino-robotics-workshop

×