Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Setting Up a Raspberry Pi 3B, Camera Module, and iRobot Create: A Complete CS424 Guide

  1. Introduction

    The Raspberry Pi 3 Model B is a versatile single‑board computer equipped with USB, Wi‑Fi, Bluetooth, Ethernet, HDMI, audio, and GPIO pins. In CS424 we’ll use this board to control an iRobot Create, leveraging its robust hardware: a 4‑core 1.2 GHz processor and 1 GB of RAM. The minimum hardware required includes:

    • A Raspberry Pi 3B motherboard
    • A 32‑GB microSD card (with adapter if needed)
    • A 5 V power supply (e.g., CanaKit)
    • The Raspberry Pi Camera Module v2 for vision
    This tutorial covers installing the OS, configuring Wi‑Fi, setting up a discovery protocol, and ensuring wireless communication with the robot. It also includes safety precautions for handling the Pi’s exposed electrical contacts.

  2. Install the Raspbian Operating System
    1. Method 1: Using NOOBS (New Out‑of‑Box Software)

      NOOBS offers the simplest path. Download the “offline and network install” package from Raspberry Pi Downloads and follow the NOOBS installation guide. Extract the ZIP and copy its contents to the microSD card. Eject the card safely to avoid corruption.

      Boot the Pi with the card inserted, connect an HDMI display, USB keyboard, and mouse, and power it up. The OS installation wizard will guide you through setting locale, time zone, and user credentials. Once Raspbian is installed, skip to the configuration section.

    2. Method 2: Flashing a Raspbian Image Directly

      Download the full desktop image from Raspberry Pi OS Downloads. Follow the platform‑specific instructions for Mac, Linux, or Windows (Mac, Linux, Windows) to write the image to the microSD card. After flashing, insert the card into the Pi and power it on to complete the first boot.

  3. Initial Configuration
    1. Set the Hostname

      Edit /etc/hosts and /etc/hostname to change the default raspberrypi to a unique name like robotpi4 (replace “4” with your group number). Use sudo nano or your preferred editor. Remember to save and exit.

    2. Configure Wi‑Fi

      Add your home network credentials to /etc/wpa_supplicant/wpa_supplicant.conf:

      network={
          ssid="your_home_wifi_name"
          psk="your_home_wifi_passphrase"
          key_mgmt=WPA-PSK
      }
      
      For IllinoisNet Enterprise, generate a password hash with:
      echo -n 'your_netid_password' | iconv -t utf16le | openssl md4
      
      Insert the resulting hash into the configuration block:
      network={
          ssid="IllinoisNet"
          key_mgmt=WPA-EAP
          proto=WPA2
          eap=PEAP
          ca_cert="/etc/ssl/certs/AddTrust_External_Root.pem"
          identity="your_net_id"
          password=hash:6602f435f01b9173889a8d3b9bdcfd0b
          phase1="peapver=0"
          phase2="MSCHAPV2"
      }
      
      Replace the hash and your_net_id accordingly. Remove the plaintext password from your shell history with history -cw.

    3. Enable DHCP for Network Interfaces

      Edit /etc/network/interfaces to change all occurrences of manual to dhcp:

      auto lo
      iface lo inet loopback
      
      iface eth0 inet dhcp
      allow-hotplug wlan0
      iface wlan0 inet dhcp
          wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
      allow-hotplug wlan1
      iface wlan1 inet dhcp
          wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
      

    4. Set Up a Simple Discovery Protocol

      Create a script that notifies the central server whenever a network interface comes up. Run:

      sudo touch /etc/network/if-up.d/robotpi
      sudo chmod 755 /etc/network/if-up.d/robotpi
      sudo nano /etc/network/if-up.d/robotpi
      
      Insert the following content (replace backticks with actual backticks in your editor):
      #!/bin/sh
      curl --data "hostname=$(hostname)&data=$(ifconfig)" \
          https://apollo3.cs.illinois.edu/robotpi/controller.py/send_heartbeat
      
      Save and exit. Reboot the Pi with sudo reboot to apply changes.

  4. Alternative Initial Configuration via SSH or Direct Card Editing
    1. Via Wired Connection

      Connect the Pi to a router with an Ethernet cable. After boot, find its IP (e.g., 192.168.x.x) via the router’s admin panel or by pinging raspberrypi.local. SSH in:

      ssh [email protected] 192.168.x.x
      
      Apply the hostname, Wi‑Fi, DHCP, and discovery settings as above.

    2. Direct microSD Card Editing (No Boot)

      Boot a Linux system (or a Ubuntu Live USB), insert the microSD card, and mount the root filesystem. The directories are typically under /media/username/ or /run/media/username/. Edit the same files as in the booted method, but use paths prefixed with a dot (e.g., ./etc/hosts). After editing, unmount and safely eject the card.

  5. Testing the Setup

    Power the Pi with the microSD card and CanaKit supply. Wait a few minutes for boot. Open a web browser on any network‑connected computer and navigate to https://apollo3.cs.illinois.edu/robotpi. The dashboard will list all active Raspberry Pi nodes, showing hostname, timestamp, and wireless IP.

    Verify connectivity by SSHing into the Pi using the IP displayed:

    ssh [email protected] 10.195.29.33
    
    Use the default password raspberry unless you’ve changed it. To shut down safely, run sudo shutdown now. To reboot immediately, use sudo reboot now.

Manufacturing process

  1. Seamless MQTT Integration: NodeMCU DHT22 Sensors with Raspberry Pi 3 B+ as Broker
  2. Build a Remote Temperature Sensor with Raspberry Pi and Python – Step‑by‑Step Guide
  3. Build a Multi‑Sensor Temperature & Light Monitoring System with Raspberry Pi & DS18B20
  4. Mastering Raspberry Pi Sensor & Actuator Control: Accelerometer, Servo, and Data Streaming
  5. Raspberry Pi Home Security System: PIR Motion Detection + Camera Email Alerts
  6. Installing a Raspberry Pi Camera in a Birdhouse – Step‑by‑Step Guide
  7. Setting Up a Raspberry Pi 3B, Camera Module, and iRobot Create: A Complete CS424 Guide
  8. Build a Raspberry Pi 3 & Arduino Laptop: Step‑by‑Step Guide
  9. Mastering the Raspberry Pi Camera Pinout: A Complete Guide to Setup and Usage
  10. Understanding Camera Modules: Definition, Types, and Key Components