Initial Setup of Microcomputer

The schematic below outlines how the OSL is controlled. LiPo batteries are used to power the motors while a microcomputer communicates executables to the actuators, and separate joint and motor encoders enable low-level closed feedback loops to increase the accuracy of joint angles. The following is a step-by-step guide on how to utilize these features and get the OSL running properly.

Table of Contents

Ordering a Raspberry Pi and SD Card

Download Image onto SD Card

Windows Device: Adding a Network

Mac Device: Adding a Network

Adding Email Addresses to Startup Mailer

Windows Device: Connecting to Raspberry Pi After First Connection

Mac Device: Connecting to Raspberry Pi After First Connection

Order Raspberry Pi and SD Card

  1. Click here to be directed to a page where you can order a Raspberry Pi. Either the Raspberry Pi 3 Model B or Raspberry Pi 3 Model B+ is preferred.
  2. Purchase a Micro SD card with at least 16 GBs of storage from a retailer.

Download Image onto SD Card

Click here to download the SD image, and includes necessary startup / accessibility / libraries that facilitate use in controlling the OSL (and other robots in general).  The image is 7.3 and is the latest version of Rasbian (Debian Stretch).  It is pre-loaded / includes the following functionality:

  • Wifi + access point backup on boot for immediate wireless access
  • Emails IP address upon boot, if connected to WiFi
  • Legacy Adafruit / other Python libraries for popular ICs (MPU-6050, LS7366R, ADS-1X15, etc.)
  • Example python code from other projects (e.g. MIT CSEA Knee state machine)
  • Dephy Actuator Package libraries for OSL project

To use the image, you’ll need to flash it on a micro SD card, which can be performed using imageUSB.  After it is flashed, it can be inserted into the SD card slot on the Raspberry Pi.

Installing PuTTY on Windows Computer

  1. Download the PuTTY application by clicking here and being transferred to the PuTTY website. Once at the website, download either the 32-bit or 64-bit (32-bit is recommended) application. The links to download PuTTY will be titled “putty-0.70-installer.msi” and “putty-64bit-0.70-installer.msi”.
  2. Open the downloaded file and install the PuTTY file on your computer.

Adding a Network to the Raspberry Pi

  1. Connect the micro-USB port on Pi to the USB port on computer with the SD card inserted into the Pi. A red and green light should light up on the Raspberry Pi.
  2. Open up the panel that displays all available WiFi networks.
  3. Click on the network that says “Neurbionics_RPi”, type “aaaaa11111” for the password, and connect to it.
  4. Open up PuTTY or terminal, dependent upon using a Windows or Mac computer.
  5. If using PuTTY:
    1. A PuTTY Configuration window will open up. Under the Host Name section, type “10.0.0.200”  and use SSH for the connection type. After entering these in, click “Open”.
    2. You are now connected to the Pi.
  6. If using terminal:
    1. Type “ssh pi@10.0.0.200” and press Enter.
    2. You are now connected to the Pi.
  7. In the command line, type “sudo nano /etc/wpa_supplicant/wpa_supplicant.conf” then press enter.
  8. A script called “wpa_supplicant.conf” will open up with a list of network settings.
  9. Following the example of the MSetup network, type in network settings for main internet network to be used.
  10. When network settings have been input, press “Control+x”.
  11. Press “y” and then “Enter” to save settings.
  12. Type “sudo nano /etc/rc.local” into the Terminal command line and press Enter.
  13. In 42nd line of code, where it says “declare -a ssids = ()”, type your network name into the parenthesis inside of quotation marks.
  14. Press “Control+x”.
  15. Press “y” and then “Enter” to save settings.

Adding Email Addresses to Startup Mailer

Adding your email address to the startup mailer will make connecting to the Raspberry Pi much easier in the future. Since you added your network earlier, the Pi will automatically connect to it, and then by adding your email to the startup mailer, you will receive an email containing the IP Address of the Pi so that you can access the internet while working directly on the Pi.

  1. In Terminal command line, type “sudo nano startup/startup_mailer.py” and press enter.
  2. On the 10th line of code, where “recipients” are listed, add your email inside brackets and quotation marks after the “=” sign. If there are already emails listed, add a comma inside the brackets to then end of the last email, then type your email inside quotation marks. An example is shown below with multiple email addresses.
  3. Press “Control+x”.
  4. Press “y” and then “Enter” to save settings.

Connecting to Raspberry Pi on Windows Computer After First Connection

  1. Connect Raspberry Pi to computer via USB.
  2. Open up the PuTTY desktop app.
  3. A PuTTY Configuration window will open up. Under the Host Name section, type in the IP Address that has been emailed to your email and use SSH for the connection type. After entering these in, click “Open”.
  4. A new command window will open. Login as “pi”, press Enter, and then type the password “neurobionics” and press Enter.

Connecting to Raspberry Pi on Mac Computer After First Connection

  1. Connect Raspberry Pi to computer via USB.
  2. Open up Terminal application.
  3. Type in “ssh pi@<IPAddress>”, using the IP Address that was emailed to you and press Enter.
  4. Type “neurobionics” as the password and press Enter.

Testing Base-Line Code on the DEPHY Actuators

The page that is linked will walk take you back to the initial controls page. The baseline code will ensure that the computer, Raspberry Pi, and DEPHY actuators are communicating correctly. All the code that will be is downloaded on the SD Card from the initial image download. Click here to be routed to the page.