Welcome! Log In Create A New Profile

Advanced

TeensyPrinter: a RAMPS-like board built around the Teensy 3.6

Posted by salfter 
TeensyPrinter: a RAMPS-like board built around the Teensy 3.6
March 25, 2019 03:48PM
I started work on this a little while ago, aiming to produce a modular 3D printer board with something faster than an Arduino Due:

https://gitlab.com/salfter/TeensyPrinter

There's just enough I/O to handle three axes, three extruders, four heaters, five thermistors (bed, 3 hotends, and an enclosure), and a few other things. It borrows the emergency-stop feature from RAMPS-FD and extends it to include a "suicide" input controlled by the Teensy to ensure that heaters, motors, etc. are shut off in hardware if Marlin decides to kill the printer. Separate power inputs for motors/electronics, hotends, and the bed heater allow different parts of the printer to run on 12V or 24V (or, in the case of the bed heater, on AC if you use an SSR). Connections for the most common LCD controllers are included, so no adapter boards should be necessary.

At this point, the schematic should be mostly complete. Next task is to choose components so a BOM can be generated and a PCB can be laid out. I intend to use mostly surface-mount components, especially for the heater MOSFETs so the PCB can serve as the heatsink (similar to a RAMPS 1.6).

The design is licensed under the TAPR OHL, and developed in KiCad. I've already gotten a Marlin PR accepted to enable pin assignments to be moved around on the Teensy 3.6; this is just making use of that. smiling smiley
Re: TeensyPrinter: a RAMPS-like board built around the Teensy 3.6
March 26, 2019 01:16PM
How is this coming?

Could you spin a simpler version with just the basics? I have some teensy 3.1s I think.
Can KiCAD export a eagle fileset?

Also if the board is 100mmx100mm or less several asian companies will spin 10 boards for $2 or $5.

I have used JLCPCB to get boards for $2. They were nice.

I have a order in now for 10 Sinaptec boards to test with a arduino nano. As I say my printer is very basic (SmartRapMini2).
Between the Sinaptec and the Nanoheart, I will probably respin these ideas into a small board, the goal being cheap and easy to make.

Then comes the mashup of all sorts of software to support my ideas.
Re: TeensyPrinter: a RAMPS-like board built around the Teensy 3.6
March 26, 2019 10:26PM
Quote
orbitalair
How is this coming?

Doing PCB layout, working in sections. I have a power-and-heaters section with ridiculously fat traces, multiple stepper sections that are all alike (except for three connectors on Z to allow single, parallel, or series hookup), etc. I'm thinking I'll rearrange the signals coming out of the Teensy to group like signals together for easier routing: all SPI signals together, all step/dir signals together, etc.

Quote

Could you spin a simpler version with just the basics? I have some teensy 3.1s I think.

Is there enough I/O on a Teensy 3.1 to drive even a single-extruder configuration? Each extruder needs three digital outputs (step, direction, chip select), a PWM output (heater), and an analog input (thermistor). Axis steppers need three digital outputs each. Throw in endstop inputs and a small number of miscellaneous I/Os and I'm using all 64 available lines (including the pads on the bottom). You can reduce that count to 54 with one extruder, 51 if you don't use TMC2130s. I counted 51 pins total on the Teensy 3.2 that's currently available, some of which will be power, debugging, and other not-GPIO pins.

Quote

Can KiCAD export a eagle fileset?

Not AFAIK. Besides, open-source hardware should be produced with open-source software. (IMHO.)

FWIW, KiCad can import from EAGLE.

Quote

Also if the board is 100mmx100mm or less several asian companies will spin 10 boards for $2 or $5.

If I can fit it all in that envelope, great. I'm not entirely sure I can at this point, but we'll see. It needs 2-oz. copper to get heavy enough traces to handle up to 15A in some places, which means I'm probably already out of the running for the cheapest PCB services.
Re: TeensyPrinter: a RAMPS-like board built around the Teensy 3.6
March 27, 2019 09:46AM
Thanks for the reply !. All good points.

RE; eagle, I have used FreePCB in the past, I suppose it still works, way back then (10yearsago) kicad was hard for me to understand and everything else was on windows anyways.
at this point still not sure where to go, stick with freepcb, or eagle, kicad, or some online service. The JLCPCB companion site has a really deep pcb design tool, but its all online.

I see the diff in the teensy3.1 and the 3.6, yeah pin count may be a prob. Major issue is the cost, a teensy3.2 is $20 (3.6 is $29), a nano is $1.50. splurge and slave 2 nanos together $3.

cheap, fast, reliable -- pick 2. right?
Re: TeensyPrinter: a RAMPS-like board built around the Teensy 3.6
March 27, 2019 06:46PM
Quote
salfter
Is there enough I/O on a Teensy 3.1 to drive even a single-extruder configuration? Each extruder needs three digital outputs (step, direction, chip select), a PWM output (heater), and an analog input (thermistor). Axis steppers need three digital outputs each.

Do you really need a Chip Select on every stepper? So long as you aren't actually sending step pulses, nothing will move. Maybe you can tie CS to be true all the time?

Also, for mixing extruders like the Diamond, you only need one heater and thermistor for 3 or 5 steppers.

Quote

It needs 2-oz. copper to get heavy enough traces to handle up to 15A in some places

I suggest not directly powering the bed heater from the controller. Instead, the controller provides a 5V or 12V signal with sufficient current to switch a relay (or maybe a 5V signal to a MOSFET on a separate board) to control the bed heater, which could be mains-powered, or 12V/24V powered via separate wiring. Not only does that save putting 15A traces and a big MOSFET on the board, but also 20+A power supply wires and connectors to the board. And also the cheap PCB manufacturing is maybe within reach.
Re: TeensyPrinter: a RAMPS-like board built around the Teensy 3.6
March 27, 2019 07:15PM
Quote
frankvdh
Quote
salfter
Is there enough I/O on a Teensy 3.1 to drive even a single-extruder configuration? Each extruder needs three digital outputs (step, direction, chip select), a PWM output (heater), and an analog input (thermistor). Axis steppers need three digital outputs each.

Do you really need a Chip Select on every stepper? So long as you aren't actually sending step pulses, nothing will move. Maybe you can tie CS to be true all the time?

You can't configure TMC2130s without it. Each SPI slave needs its own CS line. (You could set them up for jumper configuration instead of SPI, but why?)

Quote

Also, for mixing extruders like the Diamond, you only need one heater and thermistor for 3 or 5 steppers.

That's one way to do multi-material printing. It's not the only way.

Quote

Quote

It needs 2-oz. copper to get heavy enough traces to handle up to 15A in some places

I suggest not directly powering the bed heater from the controller.

Driving something like the 600W AC heater I'm building into my Hypercube directly from the MOSFET on the board would be inadvisable. smiling smiley For a printer with more modest needs (like an Anet A8 or some other smallish printer with a 100-120W DC heater), the onboard MOSFET is an option. Put 24V through it and you can get twice the power at the same current (or the same power at half the current).

Basically, I'm not trying to restrict things to how I might want to configure a printer, but to maintain some degree of flexibility.
Re: TPS: a RAMPS-like board built around the Teensy 3.6
March 27, 2019 11:46PM
Getting all those connections out from under the Teensy was a bit of a challenge, leading to a somewhat large (150x120mm) board. I started out by laying out subsections: power and heaters, stepper drivers, thermistor inputs, LCD connector, etc. I rearranged pinout usage extensively on the Teensy to get like signals (that needed to be routed together) as close as possible. While there is a chunk of empty space where Lumbergh's mug resides (more on that in a minute), the rest of the board is relatively busy. It may be possible to shrink it somewhat, but I doubt it'd fit in 100x100mm without cutting something.

I also gave it a new name: TPS, the Teensy Pololu Shield. "T" for Teensy instead of "AM" for Arduino Mega, and then I just had to leave off the R at the beginning to get "TPS." It's a printer control board, and an Office Space reference. smiling smiley

Getting them produced in 2 oz. copper would run about $32 for 5 at JLCPCB; half of that cost is for the 2 oz. copper. They'll do 10 for about $40. 1 oz. copper would be $14 for 5 or $20 for 10, but there'll be more losses in the copper. (If you don't drive it to the limit set by the fuses (for instance, you use external MOSFETs and/or SSRs to switch heaters), you can probably get away with it...but at a per-board difference of $2 (qty 5), why skimp?

Edited 1 time(s). Last edit at 03/27/2019 11:58PM by salfter.
Attachments:
open | download - TeensyPrinter.png (665.5 KB)
Re: TPS: a RAMPS-like board built around the Teensy 3.6
March 28, 2019 03:58AM
Quote
salfter
You can't configure TMC2130s without it. Each SPI slave needs its own CS line.

You can use a common CS for all the stepper drivers if you daisy chain the SPI signals. This means that you have to write to/read from all the drivers in every transaction. But if you use DMA to do the SPI transactions as we do in RepRapFirmware, this is more efficient than doing a separate transaction with each driver anyway.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: TPS: a RAMPS-like board built around the Teensy 3.6
March 28, 2019 12:35PM
Quote
dc42
Quote
salfter
You can't configure TMC2130s without it. Each SPI slave needs its own CS line.

You can use a common CS for all the stepper drivers if you daisy chain the SPI signals. This means that you have to write to/read from all the drivers in every transaction.

Marlin doesn't support that AFAICT, except for some not-commonly-used hardware that doesn't work any other way. I took a quick look at ReprapFirmware; unless I'm looking in the wrong place, it appears its CPU support is limited to ARM-compatible microcontrollers from Atmel. Teensy 3.6 uses the NXP (previously Freescale) MK66FX1M0.

Looking at my current design, adding daisy-chain SPI support wouldn't be too tricky from a hardware perspective: some jumpers here and there to reroute signals, mostly. Software support to take advantage of it would be another matter.
Re: TPS: a RAMPS-like board built around the Teensy 3.6
March 28, 2019 03:36PM
As well as the ATSAM processors, RepRapFirmware is available for boards using the LPC1768/1769 processors (see [reprap.org]) and a port for STM32 processors is under way.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: TPS: a RAMPS-like board built around the Teensy 3.6
March 28, 2019 05:29PM
v0.2 allows TMC2130 SPI to be configured in point-to-point mode (which Marlin currently requires) or in daisy-chain mode. Five jumpers next to the Teensy determine whether one or six CS lines are needed, while the 10 3-pin jumpers next to the stepper drivers determine whether SDI and SDO are connected in parallel or daisy-chained. If you're using "dumb" drivers (A4988, DRV8825, etc.), all of the signals used for TMC2130 SPI are broken out somewhere on the board, where they can be used as additional GPIO.

The attached render shows the jumpers in point-to-point mode. The 3x4 blocks under the stepper drivers are configured in SPI mode for use with TMC2130s. DIAG1 on the X, Y, and Z axes are connected to endstop inputs for sensorless endstops on all three. (I'd probably only actually use this capability for X and Y and use a Precision Piezo, BLTouch, or other sensor on Z.)
Attachments:
open | download - TeensyPrinter.png (135.7 KB)
Re: TPS: a RAMPS-like board built around the Teensy 3.6
June 12, 2019 02:19PM
Hi Scott,

Nice work on this project. Do you have a pins.h file for your layout?
Sorry, only registered users may post in this forum.

Click here to login