Raspberry Pi 3 for Qurious

Let’s begin! 

Raspberry pi is a credit card-sized single-board computer that can be used to run multiple programs and tasks together. It has everything that a computer has like dedicated memory, processor, graphics card for output through HDMI display. This piece of hardware revolutionized the open-source world. Hobbyists and engineers started building things like home automation to servers, bitcoin mining rigs, etc.

Things

For this project, you will need

  1. Raspberry Pi 3 [RPi 3] board (quantity: 1 no.)
  2. VNC Viewer
  3. Micro SD card (quantity: 1 no.)
  4. 5V power adapter (quantity: 1 no.)
  5. Micro USB Cable A to B (quantity: 1 no.)
  6. WiFi router / mobile hotspot (quantity: 1 no.)

Objectives

  • Setup and run Raspberry pi with the OS package installer NOOBS (New Out Of Box Software) through an SD card
  • Install the OS Raspbian
  • Raspberry pi pin structure overview
  • Understand the capabilities of a Raspberry pi
  • Connect Raspberry pi to the network and update it with the latest files


Raspberry pi vs microcontrollers and microprocessors

You might have seen or heard people saying, my PC is very slow… I need to upgrade my RAM or, I want to play more powerful games… I need to buy a new graphics card etc. All this can be done with a microprocessor, not a microcontroller. Basically, the microcontroller will have limited memory, limited flash, and limited processing power embedded into a single IC (Integrated Chip). Whereas in a microprocessor, memory, external storage, graphics card are separate and you can change them according to your requirements. Microprocessors are used for tasks that need more calculations, need to take input from multiple devices, and output results onto multiple devices. The microcontroller does repetitive and easy jobs whereas the microprocessor can act differently based on varied inputs and conditions.

Compared to a microcontroller and microprocessor, a Raspberry Pi has a single chip called SoC i.e System on Chip that houses everything such as processor, memory, graphics card, WiFi, Bluetooth, etc. Hence the name single board computer. But there’s no flash storage for the Raspberry Pi. That’s why we need to load the OS onto an SD card to run the Raspberry Pi.

Since the Raspberry Pi does more processing, it takes more power also. The typical power consumption of Raspberry Pi is around 10 watts, which is almost the same as the power consumed by an adult human brain. Whereas microcontrollers require milliwatts of power to operate which is 1000 times lesser. That’s why choosing the hardware is dependent upon the task needed to be done.

Hardware capabilities of Raspberry Pi

Let’s go through the hardware capabilities of Raspberry pi by understanding its pinout possibilities which help in interfacing other hardware such as LEDs, sensors, etc. For this project, we will use the Raspberry Pi 3 model.

Raspberry Pi 3 GPIO Pinout

 

Here’s a link for the interactive pinout of  https://pinout.xyz/

The Raspberry Pi 3 has a total of 40 pins categorized as follows.

  • 5V (2 pins)
  • 3.3V (2 pins)
  • GND (2 pins)
  • GPIO (34 pins)

GPIO (General Purpose Input Output) pins

The GPIO pins are used to interface with external hardware. The voltage of these pins varies from 0 to 3.3V. To ensure that the input voltage is not above 3.3V as it might cause permanent damage to the Raspberry pi board.

  • Output function of GPIO – A GPIO pin designated as an output pin can be set to high (3V3) or low (0V).
  • Input function of GPIO – A GPIO pin designated as an input pin can be read as high (3V3) or low (0V). This is made easier with the use of internal pull-up or pull-down resistors. Pins GPIO2 and GPIO3 have fixed pull-up resistors, but for other pins, this can be configured in the software.
  • Other functions of GPIO – Other than simple input and output devices, the GPIO pins can be used with a variety of alternative functions, some are available on all pins, others on specific pins.
    • PWM (Pulse Width Modulation)
      • Software PWM available on all pins
      • Hardware PWM available on GPIO12, GPIO13, GPIO18, GPIO19
    • SPI (Serial Peripheral Interface)
      • SPI0: MOSI (GPIO10); MISO (GPIO9); SCLK (GPIO11); CE0 (GPIO8), CE1 (GPIO7)
      • SPI1: MOSI (GPIO20); MISO (GPIO19); SCLK (GPIO21); CE0 (GPIO18); CE1 (GPIO17); CE2 (GPIO16)
    • I2C (Inter-Integrated Circuit)
      • Data: (GPIO2); Clock (GPIO3)
      • EEPROM Data: (GPIO0); EEPROM Clock (GPIO1)
    • Serial
      • TX (GPIO14); RX (GPIO15)

The same pinout can be obtained just by typing the below command in the terminal window (the shortcut for the terminal is Ctrl+Alt+T). Keep in mind that If I don’t mention where to enter the command it will be usually in the terminal window. You can also access this from the menu.

pinout

Note: 

  • The terminal is the place where you can enter some predefined commands and get output or reply for the same from the computer.


Connecting Raspberry Pi to a network

In order to connect the Raspberry pi to the internet, you can plug an ethernet cable directly to the Raspberry pi or you can use WiFi. WiFi icon is visible at the top right corner of Raspberry pi. You can select your network and enter the password. You are now good to go.

The first thing you have to do after connecting to the internet is to update all the files. Open the terminal and type the following command and hit enter. (Terminal can be opened by pressing Ctrl+Alt+T)

sudo apt-get update

Here sudo corresponds to ‘superuser do’. This is like admin rights in Windows OS. Hence it will ask for the password. The default password is “raspberry” (unless you have changed it). This will update all the files of the OS.

You can also change the default/ configuration settings including the password by entering the following command.

sudo raspi-config

Applications of Raspberry Pi

Now that we know about Raspberry Pi and its basic hardware features, ever wondered where people have used these minicomputers… Here are a few examples.

  • IoT weather station- for sending the weather data over the internet
  • Pi satellite – Raspberry pi based satellite
  • Server- Raspberry pi based servers
  • Supercomputer – Cluster of raspberry pi doing complex tasks
  • Mining Rigs – Raspberry Pi based cryptocurrency mining rigs
  • Media Servers – for storing media content and provide them over the network
  • Robots – Raspberry Pi running ROS (Robot OS) in robots


Ask any Doubt related to this site...

إرسال تعليق

Ask any Doubt related to this site...

Post a Comment (0)