Loading

Next-Gen Electronics NEW

From Ultimaker Wiki
Jump to: navigation, search

Note: Feel free to comment on the discussion page!

Contents

Goal

Design a user friendly board that is cheap and easy to produce on in higher volumes, and remove the hardware bottleneck to allow further firmware development for faster printing and standalone operation.

If possible it would be nice to have a single universal "mainboard" with different assembly variants that does not need any plug-in modules. Although this makes it more difficult to replace individual components, the total costs for the basic board can be drastically reduced, while still being able to run more extended hardware, or even the [LAOS] project and others by assembling optional components.

The electronics in the Ultimaker will have the task of buffering complete G-code files to allow standalone printing instantly, or to store them for later execution.

Planning (preliminary)

Requirements defined (/meeting) 3-jul
Schematic finished + Layout rough concept 31-jul
Mechanical integration -> Define dimensions/mounting/cooling 7-aug
Board layout complete 31-aug
Order first protype (3/4 pieces) 7-aug
First prototype assembled and working 31-aug
Order first batch (Unless another prototype is desired) 1-oct
Testbed designed and assembled 1-dec

Requirements

General

  • Basic board price < 75 EUR
  • 4 layer PCB, single side fully SMD (except for some connectors)
  • Firmware upgradable over USB & SD
  • Jumperless (all configuration managed by software)
  • Accidently swapping connectors should not be able to do any damage
  • Programmable and Functional Test
  • Track boards either by MCU serialnumber or 1-wire ID chip

Power

  • Electronics must be able to handle a external supply voltage from 24V (also higher possible standard?)
  • All electronics will only run from external power to keep things simple (avoid usb powered leds causing confusion)
  • 5V (0.5A) & 12V (0.5) power availability on board

Interfaces

  • USB-Device (Serial Port) serial link
  • LAN (wired)
  • Standard External SD Card
  • JTAG/TRACE connector (See Keil's Connectors for different options --> 10-pin Cortex Debug?)
  • 5 Stepper drivers, software configurable microsteps and currentlimit, up to 2A, 24(-35)V, Stall Detection
  • 4 PWM outputs, 3A, 24-35V
  • 4x PWM controlled fans with speed/failure detection (12V?)
  • 4x analog inputs (0-5V) (can be used for temp sensor boards)
  • 6x (Opto) endswitch inputs ---Depends on stall detection test results (GND, 5V, signal)
  • (Internal temperature sensors near power electronics (I2C or similar))
  • (On board status leds (power/ready/error/active/hot/debug1/debug2/usb act/lan/lanact))
  • External CAN Interface connector (which one?)
  • External RS485 Interface connector

Expandability

  • Extra peripherals can be interfaced using CAN-Nodes
  • Expose all usefull MCU pins (At least SPI, I2C, CAN, Some I/O and ADC)

Mechanical

  • Use connectors for all standard ultimaker interfaces (rather than screw terminals/headers) - Side entry preferred (JST)
  • Design with cooling in mind
  • SD/USB/LAN/Power accessible from rear panel
  • Mountable on bottom of Ultimaker using m3 bolts
  • (When cover panel assembled only connectors and status LEDs accessible)

Optional UI Board

  • Stop Button
  • Jog Buttons + Enter/Back ROTARY ENCODER
  • Graphic full color LCD touch screen, separate from main board, (minimum distance 25cm)
  • Status LEDs (power/busy/error)

Concept Synthesis

Power Regulator

Estimated 3.3V current consumption is:

  • LP1768@100Mhz: 50mA
  • LAN Controller: 80mA
  • SD Card: 40mA
  • Misc (leds and stuff): 50mA

Total is at least ~250mA

When printing standalone or from the LAN connection no USB 5v is available. This means that somehow the 5/3.3v has to be generated from the 18V line. When using a normal linear regulator (18-3.3)*0.25 = ~3.5W will be dissipated in heat which will need additional cooling.

A switching regulator is slightly more expensive, but since the much higher efficiency (around 85% rather then 20%) this will solve the thermal issue and reduce power consumption (a bit). TI has some good candidates.

To be able to automatically switch between USB power and the external power supply (to allow playing around with firmware without using a wall adapter) the TI TPS2115 can be used. The status output pin makes it easy for the micro controller to know where power is coming from (so a "no external power" warning can be displayed). When the switching regulator is left out for budgetary reasons USB powered operation is still possible, since this will automatically be selected.

Stepper Drivers

Manufacturer Model Packages Max U/I/Peak Pro's Cons Suppliers Price@1k
Allegro A3988 QFN36 / LQFP48 46V / 1.2 / 2.8 Proven to work, simple to interface Jumperless operation requires a lot of mcu pins and a external DAC, no feedback Digi-Key ~2.53
ST Microelectronics L6470 HTSSOP28 45V / 3.0 / 7.0 Some experience, Stall detection, Step OR Full SPI control More expansive then Allegro Digi-Key ~5.72
Trinamic TMC260 TQFP44 40V / 1.7 / (7.0?) Stall detection, lots of diagnostics, spi config, Coolstep Expansive, Limited Current, Not so known brand Farnell ~5.66
On Semiconductors AMIS-30542 40V / 2.2 / 5.0 Complicated Stall detection readout (analog) Digi-Key ~7.02
On Semiconductos AMIS-30624 24V / 0.8 Complicated stall readout, Limited current Digi-Key ~6.68

Connectors

Power
USB
Ethernet
Steppers 4-way S4B-PH-SM4-TB 2.0mm, Surface Mount, Side entry 500+ € 0,36
PWM 2-way S2B-PH-SM4-TB 2.0mm, Surface Mount, Side entry 500+ € 0,266
Endstops 3-way/4-way for two
Fans 3-way

Selected Components

(Try to keep all logic stuff on 3.3v)

Component Part Why Price
3.3V Regulator Stepdown or linear?
MCU LPC1768 Relatively cheap, compatible with MBED Platform, easy to use, fast 100+ € 5,93
ENET PHY chip DP83848 Same as in MBED module 100+ € 3,49
Stepper Drivers A4983 Proven to work, easy to interface 100+ € 3,01
PWM Driver  ? Some MOSFET?
Stepper Ref voltage DAC Min 6 chan, speed doesn't matter, 8-bit? 10-bit? 3,3v operation?
Bluetooth Module (optional) Which one? Availability?


Software Integration

Bootloader

A bootloader is required to be able to download new firmware without special tools. The following NXP application note lists a example of a USB bootloader. This should be verified to work as soon as possible. http://www.nxp.com/documents/application_note/AN10866.pdf

Relevant Peripherals

Motor control PWM

The MCPWM contains three independent channels, each including:

  • a 32-bit Timer/Counter (TC)
  • a 32-bit Limit register (LIM)
  • a 32-bit Match register (MAT)
  • a 10-bit dead-time register (DT) and an associated 10-bit dead-time counter
  • a 32-bit capture register (CAP)
  • two modulated outputs (MCOA and MCOB) with opposite polarities
  • a period interrupt, a pulse-width interrupt, and a capture interrupt

Input pins MCI0-2 can trigger TC capture or increment a channel’s TC. A global Abort input can force all of the channels into “A passive” state and cause an interrupt.

Timer 0/1/2/3

A minimum of two Capture inputs and two Match outputs are pinned out for all four timers, with a choice of multiple pins for each. Timer 2 brings out all four Match outputs.

  • A 32-bit Timer/Counter with a programmable 32-bit Prescaler.
  • Counter or Timer operation
  • Up to two 32-bit capture channels per timer, that can take a snapshot of the timer value when an input signal transitions. A capture event may also optionally generate an interrupt.
  • Four 32-bit match registers that allow:
    • Continuous operation with optional interrupt generation on match.
    • Stop timer on match with optional interrupt generation.
    • Reset timer on match with optional interrupt generation.
  • Up to four external outputs corresponding to match registers, with the following capabilities:
    • Set low on match.
    • Set high on match.
    • Toggle on match.
    • Do nothing on match.
Pulse Width Modulator (PWM)
  • Counter or Timer operation (may use the peripheral clock or one of the capture inputs as the clock source).
  • Seven match registers allow up to 6 single edge controlled or 3 double edge controlled PWM outputs, or a mix of both types. The match registers also allow:
    • Continuous operation with optional interrupt generation on match.
    • Stop timer on match with optional interrupt generation.
    • Reset timer on match with optional interrupt generation.
  • Supports single edge controlled and/or double edge controlled PWM outputs. Single edge controlled PWM outputs all go high at the beginning of each cycle unless the output is a constant low. Double edge controlled PWM outputs can have either edge occur at any position within a cycle. This allows for both positive going and negative going pulses.
  • Pulse period and width can be any number of timer counts. This allows complete flexibility in the trade-off between resolution and repetition rate. All PWM outputs will occur at the same repetition rate.
  • Double edge controlled PWM outputs can be programmed to be either positive going or negative going pulses.
  • Match register updates are synchronized with pulse outputs to prevent generation of erroneous pulses. Software must "release" new match values before they can become effective.
  • May be used as a standard timer if the PWM mode is not enabled.
  • A 32-bit Timer/Counter with a programmable 32-bit prescaler.
  • Two 32-bit capture channels take a snapshot of the timer value when an input signal transitions. A capture event may also optionally generate an interrupt.

Peripheral Selection

It would be nice to have all stepper drivers on a timer that is able to swap pin state automatically. The PWM Peripheral is not an option since it only has a single timer, and thus results in only being to drive all steppers at the same speed . The PWM peripheral can be used for stepper pulse generation, as it has 3 outputs that can be switched ON and OFF at various intervals, using a "reload on interrupt" using this method arbitrary pulse-trains can be generated at various (independent) frequencies. The maximum frequency is limited by the interrupt handler duration, but can typically be > 100 khz.

Current Idea:

  • PWM High Current drivers on PWM 1/2/3/4, Servo's on PWM 5/6
  • Stepper X/Y/Z on MCPWM - MCOA0, MCOA1, MCOA2 (each channel has its own timer, for every vector speed can be changed for 3 axis at once how to keep track of steps?)
  • Endstops on MCABORT? (When this input goes low, all six MCO outputs assume their “A passive” states, and the Abort interrupt is generated if enabled.)
  • Other 3 steppers on Timer 0/1/2 - MAT0.1, MAT1.1, MAT2.1
  • 2 digital inputs on Timer 3/4 - CAP3.0, CAP4.0 (Could be used for stuff like optical encoder bands)

MCU Pin count estimation

LPC1768 mbed pinout.gif

Testbed Specification

Since the mainboard will have relatively many components a testbed is desired to programm stock bootloader and firmware over JTAG, and to do a fully functional test before shipment to the customer. It can also be valuable for quickly detecting problems on defect boards so they can be repaired.

Test Sequence Sample, break on any error (Concept)

  • Read board UID (from 1-wire chip)
  • Measure risistance between supply lines and ground
  • Powerup, low voltage, measure+limit current
  • Powerup, high voltage, measure+limit current
  • JTAG Boundry Scan
  • Programm MCU with I/O Test programm
  • Test all outputs (high-low-high)
  • Load test high current outputs
  • Measure Stepper reference voltages
  • Enable stepper drivers
  • Turn steppers, verify displacement
  • Programm board revision and test result in 1-wire chip (can be read by firmware)
  • Programm bootloader and latest firmware

The testbed will be constructed as described in the Sparkfun Pogo-Bed tutorial.