Arduino Uno

An Arduino contains a microchip, which is a very small computer that you can program. You can attach sensors to it that can measure conditions (like how much light there is in the room). It can control how other objects react to those conditions (room gets dark, led turns on).



SPECIFICATIONS:

  • Microcontroller                          ATmega328
  • Operating Voltage                      5 V
  • Input Voltage (recommended)   7-12 V
  • Input Voltage (limits)                 6-20 V
  • Digital I/O Pins                          14 (of which 6 provide PWM output)
  • Analog Input Pins                      6
  • DC Current per I/O Pin             40 mA
  • DC Current for 3.3V Pin           50 mA
  • Flash Memory                           32 KB of which 0.5 KB used by bootloader
  • SRAM                                       2 KB
  • EEPROM                                  1 KB
  • Clock Speed                              16 MHz

DIGITAL PINS:

  • Digital → 0,1
  • There are 14 digital pins – 0,1,2,3,4,5,6,7,8,9,10,11,12,13.
  • Various digital inputs and outputs are connected to these pins.
  • Functions:
  • digitalRead(pin)
  • digitalWrite(pin,value)
  • value: 0,1
  • 0 → OFF
  • 1 → ON


 ANALOG PINS:

  • Analog → Range of values
  • There are 6 analog pins – A0,A1,A2,A3,A4,A5.
  • Various analog inputs and outputs are connected to these pins.
  • Functions:
  • analogRead(pin)
  • analogWrite(pin,value)

 PWM PINS:

  • PWM → Pulse Width Modulation.
  • The digital pins 3,5,6,9,10,11 are used as PWM pins.
  • These pins are used to control the voltages by changing the ON/OFF time.
  • For 0V → 0; For full voltage → 255. Hence the PWM ranges between 0 & 255.
  • PWM pins are used to control the brightness of LEDs, Speed of Motors.
  • Functions:
  • analogWrite(pin,value)
  • value: 0 to 255

UART:

  • UART →  Universal Asynchronous Receiver/Transmitter
  • Pins Used:
    • D0 pin → RX (Reciever)
    •  D1 pin → TX (Transmitter)
  • These pins are used for Serial communications between Arduino Uno and other devices.
  • Connection:
    • GND → GND
    • TX → RX
    • RX → TX

  • Functions:
    • Serial.begin(baudrate)
      • Baudrate → bytes per second
      • Various baudrates in Arduino: 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200,  230400, 250000
      • Among these 9600 baud is most widely used
    • Serial.print(“text”)
    • Serial.println(“text”)
    • Serial.write(ASCII value)
    • Serial.read()
    • Serial.flush()
    • Serial.available()
  • GSM, GPS, RF, Zigbee, etc.

SPI:

  • SPI → Serial Peripheral Interface
  • Pins Used:
    • D11 → MOSI (Master Out Slave In)
    • D12 → MISO (Master In Slave Out)
    • D13 → SCK (Serial Clock)
    • D10 → SS (Slave Select)
  • These pins are used for communication between Arduino (master) and one or more devices(slaves).
  • Connection:
    • MISO → MISO
    • MOSI → MOSI
    • SCK → SCK
    • SS → SS


  • Functions:
    • SPI.begin()
    • SPI.transfer()
  • SD card module, Shift registers

INTERRUPTS:

  • Stops the sequential execution of the program gives high priority to a set of codes on any change of 
  • high priority tasks.
  • Pins Used: 2,3
  • Function: attachInterrupt(digitalPinToInterrupt(pin), ISR, mode);
    • Pin → 2 or 3
    • ISR → function/method in which the action to be performed is specified
    • Mode:
      • LOW
      • CHANGE
      • RISING
      • FALLING
      • HIGH

No comments:

Post a Comment