Generation 3 firmware

From RepRap
Jump to: navigation, search

This page describes something which is no longer the most recent version. For the replacement version see: "Official" Electronics


RepRap Generation 3 Firmware

I am the firmware to control the Generation 3 Electronics System

Protocol

The authoritative protocol specification lives as a shared Google Doc. This document describes the setup and implementation of the communication protocol that the 3rd Generation firmware uses. We've attempted to fully document the protocol so that it can be easily implemented on other platforms, and also so that people can easily understand how it operates in order to hack on it. If you spot any bugs, or have any contributions, please drop us a line. Old Protocol Google Doc

Devices

In this system, there are essentially three different types of devices:

Host Device - This is your computer that controls the RepRap and issues commands and queries. As of this writing, the only software that is capable of acting as a Host device is ReplicatorG.

Master Device - This is the main microcontroller device. In the Generation 3 Electronics, this is the RepRap motherboard which contains an onboard Sanguino. It is responsible for receiving commands from the host (or other source) and either executing them directly or delegating them out to the various slave devices.

Slave Device - This is a microcontroller device that takes care of one small subsystem, such as an extruder, a toolhead, or a temperature-controlled build base. It receives commands from the Master device and then executes them.

Communication Channels

The protocol itself is split into two different communication channels:

Host CPU -> Motherboard Communications

This is the link between the computer and the motherboard. The physical communication happens over a USB->TTL serial link.

Motherboard -> Slave Communications

This is the link between the motherboard and the various extruder toolheads. The physical communication happens over RS485.

Firmware

Stable version: Download RepRap 3rd Generation Firmware v1.1

We have written firmware that implements both the Master and Slave devices. These firmwares are fully operational, but there are many improvements left to be made. You can get the up-to-the-minute version of the firmware from the subversion repository if you like to be cutting edge. The subversion code is not guaranteed to work, and may contain bugs. Use it at your own risk.

There are two different firmwares that we have written: ArduinoSlaveExtruder and SanguinoMaster. Each one is designed to be run on an Arduino or Sanguino respectively. See the instructions below for configuring and uploading them to your boards.

Arduino Libraries

We have written a few libraries to enable extra functionality such as our packet system and SD card reading/writing. You will need these libraries in order to compile and upload the firmwares. This is very simple to accomplish. Just copy the folders in the libraries/ directory into the hardware/libraries/ folder contained in the Arduino software.

To rephrase: Copy reprap-r3g-firmware-1.x/libraries/* to arduino-00xx/hardware/libraries/

Sanguino Master Firmware

The Sanguino Master firmware is designed to be run on the v1.x versions of the RepRap Motherboard. Using this firmware is very easy:

  1. Download and unzip the firmware.
  2. Open the sketch in the Arduino IDE.
  3. If needed, edit the Configuration.h file and change it to match your electronics setup. It has built-in documentation.
  4. Select 'Sanguino' from the boards menu and upload it.

Arduino Slave Firmware

The Arduino Slave firmware is designed to be run on the v2.x versions of the Extruder Controller. Using this firmware is very easy:

  1. Download and unzip the firmware.
  2. Open the sketch in the Arduino IDE.
  3. If needed, edit the Configuration.h file and change it to match your electronics setup. It has built-in documentation.
  4. Optional: If you are using a non-standard thermistor, modify the ThermistorTable.h file. It has built-in documentation.
  5. Select 'Arduino Diecimila' from the boards menu and upload it.

Host Control Software

Now that you have the firmware installed, you'll want to control it with something. Currently, the easiest way of doing this is by using ReplicatorG. So, the first thing you'll want to do is install ReplicatorG. You'll need at least version 0004. The software comes pre-configured to work with a few common RepRap machines and contains information you need to configure it to control your machine.