techdescfinal

Embed Size (px)

Citation preview

  • 8/2/2019 techdescfinal

    1/9

    Lopa Nath

    ENGL 202CSection 18

    March 14, 2012

    Technical Description

    Microcontrollers:

    The Arduino Diecimila

  • 8/2/2019 techdescfinal

    2/9

    Audience and Scope

    The purpose of this document is to provide the reader with a basic understanding of anArduino Diecimila microcontroller. The document will go over what exactly a

    microcontroller in general is, the main components of the Arduino Diecimilamicrocontroller, programming the Diecimila, and some uses of microcontrollers. Afterreading the document, the reader will be able to identify when they can use amicrocontroller in a project, which options on the microcontroller they should use, and theimportance of microcontrollers due to widespread use of them in todays society.

    The intended audience is people new to the use of microcontrollers in the field of robotics.They know little about the use of microcontrollers, how they are set up, and what theirpurpose is. They would refer to this document when finding a suitable wiring method for acurrent project they might be working on. A robotics classroom in high school or college

    would be the ideal location for this document. This document will explain the basics of theArduino Diecimila so further investigation into electrical concepts may be necessary for athorough understanding of wiring processes.

  • 8/2/2019 techdescfinal

    3/9

    Introduction

    Microcontrollers came into use in the 1970s and over the years have evolved in many waysincluding smaller size, faster processing speed, and a much cheaper price. These

    improvements have allowed microcontrollers to become more accessible to consumers.The functions that a microcontroller can provide and the ease with which they can beutilized have also led many people to use them in personal projects such as those involvingrobotics.

    What is a microcontroller?

    A microcontroller is an integrated circuit that performs many of the same tasks a computerwould but is used in automatically controlled devices. The microcontrollers in thesedevices carry out specific tasks and make decisionspreprogrammed by the user as opposed to personal computerswhich are more flexible for a users needs.

    Similar components of a computer and microcontroller: Processing core Memory Input and output terminals that can be programmed

    Microcontrollers execute a program that the user stores onto it and makes decisions basedon these instructions. In robotics, microcontrollers are used most often for logic and sensor

    interpretation, for example to receive data from sensors and make decisions based on thisinformation.

    Overview of the Arduino Diecimila

    The Arduino Diecimila is a type of microcontroller. It is open-source and open-hardwarewhich means that the design for the hardware and tools and code for the software areavailable for free which is why many people choose to use Arduino for their projects.

    Specifics of the Arduino Diecimila

    The Arduino Diecimila is 2.7 inches in length and 2.1 inches in width. It has 14 digitalinput/output pins, 6 of which can be used as Pulse Width Modulation (PWM) outputs, and6 analog inputs. PWM, in short, is a way in which power output is controlled so that thepower loss when switching electrical devices is very low.

    Figure 1: A microcontroller

  • 8/2/2019 techdescfinal

    4/9

    In terms of memory, it has 14KB of programmable memory (stores code) and 1KB of Random Access Memory (RAM) and its clock speed is 16MHz.

    It also has a USB connection, a power jack, and a reset button. To use the Diecimila, it must be connected to a computer with a USB cable or to a battery and it contains all the

    components to then run. The board has a jumper to indicate whether to use USB orexternal power. For USB the jumper is placed on the two pins closes to the USB connectorand for external, it is placed on the two pins closest to the external jack. The board operateson an external supply of 6 to 20 volts although 7 to 12 is recommended.

    Figure 2 below shows the locations of the various components on the Arduino Diecimila.

    Pins on the Arduino Diecimila

    For input and output, the 14 digital pins can be used for either although it must be specified

    in the code using the functions pinMode(), digitalWrite(), and digitalRead().Specialized functions of pins:

    Pins 2 and 3 can be used to trigger interrupts on a low value, rising or falling edge,or a change in value using the attachInterrupt() function.

    Pins 3, 5, 6, 9, 10, and 11 can be used for PWM output using the analogWrite()function.

    Figure 2: The Arduino Diecimila

  • 8/2/2019 techdescfinal

    5/9

    Pin 13 has an LED built into it that is on when the pin is high value and off for lowvalue.

    An Brief Explanation of Pins

    While the concept of pins can be confusing to many, it is important to understand thedifference as they can provide various different uses.

    Digital pins only have two ends of a spectrum, high or low, on or off, 5 volts or 0 volts. Forthis reason, the digital pins are usually used for anything that does not vary. For example,to turn an LED on at full brightness, or off.

    Analog pins , however, are usually used for input and they can read various values between0 and 1023 (for Arduino purposes). Analog is used for variable sensors such as apotentiometer because it will return the exact values that the sensor varies through.

    PWM, meanwhile, outputs between 0 and 5 volts. Because the output can be varied withPWM, it is most often used to power motors. It can also be used to light an LED withvarying degrees of brightness as opposed to digital, where it is either fully on or fully off.

    The ground pin , lastly, is used to complete the circuits the user creates when wiring thedifferent inputs and outputs. It represents 0 volts compared to anything else that is wiredwith it.

    Programming the Arduino Diecimila

    The programming language for Arduino is derived from the Processing programminglanguage. It is, however, very similar to C. The main difference is that unlike in C where theprogram always enters at main(), the Arduino language does not have this. Instead, it hasthe function void setup() which is called whenever the hardware is reset and used for anysetting up that needs to be done before the actual code is run. The function void loop()runs infinitely after the setup function exits and this is where the main coding is done. TheArduino is also not threaded so it cannot run parallel processes. It does however, asmentioned earlier while discussing pins, support interrupts.

    Uses of Microcontrollers

    Due to the quickly declining cost of microcontrollers and the vast possibilities of theirfunctionality, they are present in many of the systems we use today such as:

    Remote controls Toys

  • 8/2/2019 techdescfinal

    6/9

    Power tools Appliances Medical devices

    ConclusionThe progress made in the field of microcontrollers has been widely successful andcontinues to grow. They have come into use in everyday objects and can now be used at alow cost for everyday projects for those who are interested. They will inevitably continueto expand into more areas of our lives and being able to work with them gives users agreater understanding of how the tools they use everyday function.

  • 8/2/2019 techdescfinal

    7/9

    References

    Figure 1: http://www.robotshop.com/content/images//basic-micro-basicatom40-m-microcontroller-module-a.jpg

    Figure 2: http://arduino.cc/en/Main/ArduinoBoardDiecimila Information from

    http://arduino.cc/en/Main/ArduinoBoardDiecimila

    http://www.societyofrobots.com/microcontroller_tutorial.shtml

    http://www.robotshop.com/content/images/basic-micro-basicatom40-m-microcontroller-module-a.jpghttp://www.robotshop.com/content/images/basic-micro-basicatom40-m-microcontroller-module-a.jpghttp://www.robotshop.com/content/images/basic-micro-basicatom40-m-microcontroller-module-a.jpghttp://www.robotshop.com/content/images/basic-micro-basicatom40-m-microcontroller-module-a.jpghttp://arduino.cc/en/Main/ArduinoBoardDiecimilahttp://arduino.cc/en/Main/ArduinoBoardDiecimilahttp://arduino.cc/en/Main/ArduinoBoardDiecimilahttp://arduino.cc/en/Main/ArduinoBoardDiecimilahttp://arduino.cc/en/Main/ArduinoBoardDiecimilahttp://www.societyofrobots.com/microcontroller_tutorial.shtmlhttp://www.societyofrobots.com/microcontroller_tutorial.shtmlhttp://www.societyofrobots.com/microcontroller_tutorial.shtmlhttp://arduino.cc/en/Main/ArduinoBoardDiecimilahttp://arduino.cc/en/Main/ArduinoBoardDiecimilahttp://www.robotshop.com/content/images/basic-micro-basicatom40-m-microcontroller-module-a.jpghttp://www.robotshop.com/content/images/basic-micro-basicatom40-m-microcontroller-module-a.jpg
  • 8/2/2019 techdescfinal

    8/9

  • 8/2/2019 techdescfinal

    9/9