Repic

From RepRap
Revision as of 17:38, 1 December 2010 by DavidCary (talk | contribs) (test new template:tag)
Jump to: navigation, search
Crystal Clear action run.png
Repic

Release status: experimental

Repic Motherboard.jpg
Description
"as simple as possible" all-in-one electronics based on PIC18 or PIC24
License
public domain
Author
Contributors
Based-on
Categories
CAD Models
External Link


"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint-Exupery

Repic Motherboard.jpg

This page details the experimental all-in-one USB/PIC-based motherboard I am developing for RepRap and CNC routers. It may be of interest to programmers who are familiar with Visual Studio Express and want to play around with the RepRap firmware within that environment using a minimal set of hardware.

Please note that Repic is still in development and has not yet been tested. Repic is a significant departure from the standard electronics both in terms of architectural design and compatibility. I'm making it publicly available in keeping with the spirit of RepRap, but it's up to RepRap-dev and the community as a whole to decide whether any of it has any merit.

Current Status

  • Motherboard design complete.
  • PCB constructed and assembled (still missing power transistors).
  • USB link and in-circuit programming have been tested and are working.
  • Pololu drivers installed and working, preliminary tests driving the steppers was successful.
  • Endstops tested and working.
  • Firmware is still in development and not yet usable.
  • Host software is still in development and not yet usable.

Design Goals

The primary design goal for Repic is to pare the electronics back to an absolute minimum. This means designing a single-sided, through-hole PCB that can be easily made at home. It also means a lowering of cost: a full set of electronics on EBay frequently sells in excess of AU$300 whereas a complete set of Repic-based electronics costs around $80, including the four Pololu stepper drivers. I am currently researching ways to safely replace the Pololus with PWM-controlled H-bridges which should bring the price down further to around $40. Another consideration is that the holy grail of RepRap is 100% replication; the more complex the hardware requirements, the longer this will take to achieve.

A secondary goal of Repic is to make it as user friendly as possible. In pursuit of this goal I have chosen to move to a USB-based hardware interface. This allows RepRap to support full plug-n-play capability as well as removing the need for a USB->serial convertor and the associated configuration headaches for the end user.

Initial Design

For the main controller of my motherboard I have replaced the Arduino-based architecture with one based on the Microchip PIC series. My current PIC of choice is the 18F4550 which has several advantages:

  • Cost. At $11 per chip it's about the same as an Arduino.
  • Native USB 2.0 compliancy. Development of USB client devices is extremely easy with this chip.
  • Minimum support electronics required.
  • Good I/O support. Up to 16 bi-directional digital endpoints, 13 10-bit A/D inputs and 1 D/A output.
  • Available in both SMD and DIP packaging.

One of the disadvantages to using this chipset is that the standard RepRap firmware has been developed in C++ and there is no freeware C++ compiler available for the PIC18 architecture. Personally I question the decision to use C++ in any type of low-level embedded system such as RepRap for a whole variety of reasons, but that's what we have so that's what I work with. For the time being I get around the problem by running it host-side, which means Repic cannot operate in standalone mode and must rely on the host PC to do the gcode parsing for now. On the plus side, the firmware is reduced to just a few dozen lines of C code and the need for an end-user to re-flash the firmware is virtually eliminated.

There is a project currently in development to port the official RepRap firmware to C99, when completed I intend to move this into the Repic firmware and switch to the PIC 24F series which will in turn allow the Repic motherboard to operate in USB host mode. This will allow support for reading gcode files off the now well-established USB memstick standard, thus replacing the current SD-card based system and finalizing the design of Repic as a fully USB-compliant device.

Repic Motherboard and Feature Set

Repic Schematic.gif Repic Pcb.gif

The Repic motherboard is a single-sided PCB using through-hole components only. There are no jumpers or thin traces between pins. The board contains a USB connector, plug-in slots for up to four Pololu stepper drivers and terminals for the following:

  • Three microswitch endstops (although opto-endstops are also supported).
  • The extruder heater and thermistor
  • A PWM-controlled heatbed with thermistor. The heater coils can be run off 5V, 12V or a combination of the two.

The board also supports in-circuit programming via the USB port for firmware upgrades and general development work.

The PIC circuitry is quite basic and was loosely based on a variety of circuits around the web including those by Dan Overholt, mdhosale and "Evan". The heatpad, extruder/thermister and stepper circuitry is based on Adrian's Pololu-based circuit. A considerable amount of inspiration was also derived from Peer's simplified electronics.

Repic Host Software

Repic Host.jpg

The host software is still in the very early stages of development. I currently have the official firmware running host-side with the output feeding into a 3D model of RepRap with support for extrusion rendering. This is effectively a "Virtual Mendel" that allows me to play print sequences in realtime (albeit at much higher speed) before committing them to plastic.

Repic Project Files

Unless you're a curious developer and willing to get your hands dirty there's not much here that will be useful to you, but building Repic electronics will involve the following steps:

  1. Download the PCB files and make a single-sided PCB from them.
  2. Load the bootloader image into the PIC18F4550. If you don't have a PIC burner then try breadboarding one (todo: create a page showing how to do this). Then install the chip onto the Repic circuit board.
  3. Download the Repic firmware and upload it to the chip. To do this, plug Repic into the host PC (or press the reset button) while holding down the program button. Then use the Microchip bootloader to upload the firmware into the chip.
  4. Assemble the rest of your RepRap as normal plugging the steppers, end-stops, heater and thermistor into the appropriate terminals.

The entire project package can be downloaded here:

  • Repic v0.1 (alpha) Project Files (todo: upload this file)

The package includes the following components:

  • Parts list
  • Eagle project files
  • Circuit schematic
  • PCB image
  • 3D render
  • Firmware source code
  • Compiled firmware hex file
  • Host software executable
  • Host software source code.

If you want to modify anything then you might also need some of the following software, they're all available for free download:

Developer Contact Details

Mark Feldman (aka Myndale)