3D Printer Software with Teensy 3.1

Status
Not open for further replies.
Awesome. Glad to see it's coming along. :)

Truth is, I don't have a 3D printer, or even much experience with 3D printing. There's not a lot more I can do, unless any specific technical issues come up with the Teensy software side.
 
It's all good Paul. You've enabled us. Now we must do our part.
I'm "cheating" some would say. Rather than placing inline ARM code for ADC... which I'm not good at at all, I'm using the existing ADC library from here. I'm also using your Timer library, and bringing in the more robust PID library.

Thanks for this platform Paul. So very grateful.
 
Screenshot from 2015-04-08 17:23:28.png
Marlin Firmware on Teensy 3.1 with Analog Thermistor's for Extruder and Bed functioning...
 
open source closed loop board

This is great work people! I am curious if Unix_guru has had any luck getting controlling servos with teensy 3.1 and Marlin. Any first prints? I am looking for an open source platform to do closed loop CNC milling. Any ideas?
 
open source closed-loop board

This is great work people! I am curious if Unix_guru has had any luck controlling servos or processing encoder feedback with teensy 3.1 and Marlin. Any first prints? I am looking for an open source platform to do closed-loop CNC milling. Any ideas?
 
Last edited:
I'd love to say I have a video of it printing... The Marlin code *IS* running wonderfully on it. Heated bed and Extruder temperatures are being maintained. Extruder stepper works as expected. Using either Repetier, or GCODE on SD card, I can move the X/Y/Z AXES about, and trace out a 3D pattern.... however...

I'm no mechanical genius (ok, I'm a cheapskate). The premise of my project was to build a 3D printer from scraps, and this is what has bitten me. My Y-AXIS is mechanically sluggish. X and Z work like a charm, and if I transpose X and Y, the software running Y (PID routines and Quadrature Decoder) are doing their job well. But a PID can't compensate for a sticky linear bearing...

So, I'm working with the fine folk at Printrbot to try to get a properly functioning mechanical platform to attach my electronics and DC motor config to... I'll update my blog as I begin THAT conversion.
 
This is pretty awesome! I was just thinking about using teensy to drive 3d printer using Marlin firmware. Decided to google for anyone already doing work on this and this thread came up. Excellent work guys!

I see a new board ID for Marlin code mentioned. Does this mean that this code is already included into main Marlin build? I'm looking at Marlin source on github and don't see anything. I was hoping I could download source and build for my Oshpark version of teensy3++. If not, where can I get current version?

I'm also thinking about making my own board based on teensy and Megatronics. I see that someone is already working on another board but I don't like the stepper drivers being built into the board.
 
I'd love to say I have a video of it printing... The Marlin code *IS* running wonderfully on it. Heated bed and Extruder temperatures are being maintained. Extruder stepper works as expected. Using either Repetier, or GCODE on SD card, I can move the X/Y/Z AXES about, and trace out a 3D pattern.... however...

I'm no mechanical genius (ok, I'm a cheapskate). The premise of my project was to build a 3D printer from scraps, and this is what has bitten me. My Y-AXIS is mechanically sluggish. X and Z work like a charm, and if I transpose X and Y, the software running Y (PID routines and Quadrature Decoder) are doing their job well. But a PID can't compensate for a sticky linear bearing...

So, I'm working with the fine folk at Printrbot to try to get a properly functioning mechanical platform to attach my electronics and DC motor config to... I'll update my blog as I begin THAT conversion.

Amazing work, I would love to see how you accomplished it. Can you post your code online??
 
Are there any updates? Is there a kit that can be used with the teensy?

My son is getting into 3d printing, and am likely going to pick up a budget 3d printer soon.
I am considering xyzprinting da vinci 1.0, and Printrbot Simple Metal.
links if interested:
http://us.xyzprinting.com/us_en/Product/da-Vinci-1.0
http://printrbot.com/shop/assembled-simple-metal-with-heated-bed/

I am planning to flash the xyz one (based on Arduino Due) with Repetier Host, if I get that one.

Please let me know if there's something else out there that I could use with a teensy, and I could help with testing. It would be cool to have one with a teensy, as would be great to extend it.

And what's the difference between Marlin and Repetier Host?
 
I'm interested in this, is current code with heater-thermistor control posted somewhere The only thing I found on github was over a year old.
 
Hey there, I am very interested in this project, however I would like to rebuild marlin for the Teensy 3.5 or 3.6. Ultimately I would like to design a board similar to the RAMPS for this board. It would be neat to implement the uSD card and USB host among other features (DACs to set current limits on the stepper drivers maybe?) I will be doing what I can to do this, but I welcome any help.
 
Hey there, I am very interested in this project, however I would like to rebuild marlin for the Teensy 3.5 or 3.6. Ultimately I would like to design a board similar to the RAMPS for this board. It would be neat to implement the uSD card and USB host among other features (DACs to set current limits on the stepper drivers maybe?) I will be doing what I can to do this, but I welcome any help.


I have a lot on my plate however I would really like to support development of Marlin for Teensy 3.2 or 3.5/3.6. It pains me that so much time for so long has been put into supporting the Atmega chipset where something like Teensy would be far superior in performance and potential features.
 
RAMPS conversion Requirements
Analog pins needed = 3
Digital pins needed = 66 (including reset)

T3.5 max pins available = 61 (including reset)

At least 1 GPIO expander would be required. Using the T3.5 would be safer since it is 5V safe. A regulator would be needed to step the 12V down to something safe. The RAMPS is not a complex board, it should be possible to create a Teensy RAMPS based on the schematic. I would make a few changes, like removing the PTC's, or spec'ing something better. Same for the input/output terminals for the bed heater.

As for Marlin, I would make code changes like removing double's since they are treated like floats by the AVR's but treated like Doubles for the ARM's. Meaning even with the FPU they would be slower for no real gain. Adding things like the ADC Library or implementing its features allowing higher resolution and faster sampling speeds.

I think the one thing to remember is that in order for the Teensy RAMPS to really work as a competing design is to have reason for it.
Is it cheaper or better or more accurate. What does the Teensy provide that the RAMPS or any other board currently used not provide?
 
RAMPS conversion Requirements
Analog pins needed = 3
Digital pins needed = 66 (including reset)

T3.5 max pins available = 61 (including reset)

At least 1 GPIO expander would be required. Using the T3.5 would be safer since it is 5V safe. A regulator would be needed to step the 12V down to something safe. The RAMPS is not a complex board, it should be possible to create a Teensy RAMPS based on the schematic. I would make a few changes, like removing the PTC's, or spec'ing something better. Same for the input/output terminals for the bed heater.

As for Marlin, I would make code changes like removing double's since they are treated like floats by the AVR's but treated like Doubles for the ARM's. Meaning even with the FPU they would be slower for no real gain. Adding things like the ADC Library or implementing its features allowing higher resolution and faster sampling speeds.

I think the one thing to remember is that in order for the Teensy RAMPS to really work as a competing design is to have reason for it.
Is it cheaper or better or more accurate. What does the Teensy provide that the RAMPS or any other board currently used not provide?

Well, a good number of the RAMPS pins are simply routed to the AUX4 header. the "smart controllers" that plug in there use a good number but leave 5 unconnected and use another 5 for the SD card slot that we hopefully wouldn't need. so that knocks 10 pins off right there. I would rather design it to use an off the shelf smart-controller (with the SD card unconnected) to avoid reinventing the wheel (though If I did I would look at an I2C solution) I think you're right about 3.5, High speed USB would be nice, but probably not necessary. 3.6 with level shifters would probably work as only a few components require 5V (smart controller, limit switches if optos or hall effects are used, servos, maybe PS_ON for ATX PSU?) but 3.5 is the more simple solution. I have never worked with "5V tolerant" I/O, I assume yo do 5V output you pull the line high with a pullup resistor? Blade fuses, or some kind of fuse would be a must, As for having a reason, 1. I have a 3.5 and 3.6 and want to do something with it, 2. I have a delta 3d printer running RAMPS/Arduino Mega that could benefit from more grunt, 3. I am an Engineering Physics major and, while I have designed a couple PCB's I want to have as much experience with the process as I can get. 4. I am an Engineering Physics major and, while I have written a good number of control programs, I want to have as much experience with the process as I can get.

Thanks for the input, It has been quite helpful.
 
I was thinking of building a printer controller around the Teensy3.x, or an Atmel SAMD21J18A chip. So I wondered just how many I/O were needed to drive a 3d printer.
Stepper motors (step, dir, enable) x 5 (dual extruder) = 15. Heaters (ADC,PWM) x 3 = 6. SD card (SPI) = 4. Display (SPI) = 4 or I2C = 2. Endstops = 3. Encoder+switch = 3. Fan PWM = 1.
Total = 36 lines (max). This does not include servos, extra end stops, or the USB serial I/O, but it is far less than the 66 pins dedicated to the RAMPS! So the Atmel SAMD21J has enough. (But the SAMD21G used in the Arduion falls short.)
The Tensy3.0-3.2 is fine, but you'll probably have to solder to the pads on the bottom to pick off some extra I/O's. The 3.5 avoids the issue.
As far as 5 volt tolerant stuff. The Tensy 3.2 and 3.5 will 'stomach' seeing 5V high inputs, but they still only source 3.3 volts as high on output. I don't know if a pull up resistor is the answer, but the stepper drivers are fine with just 3.3v input. You'll need a driver transistor or different mosfets to make sure that these drivers for the heaters and fan switch into saturation with only 3.3 volts. Since I use NO snap switches for my endstops (and invert the logic) I'm fine here with just pull ups enabled on the inputs. If you use one of those inductive sensors as a probe, the usual resistor network (adjusted for 3.3 volts, or leave at 5v for the 5v tolerant cpu's) is fine.

Alot of new work has been done on the current RC branch of Marlin, so I'd like to start any fork from what will become the 1.1 branch. I'd want to do such a fork to be CPU neutral with config files so by editing just one file any ARM based board could play. I actually just found out about the existence of the Teensy 3.5/6 a few days ago(!), before then I was more interested in doing the SAMD, but now I'd like to try both.
 

Yes, I did. That looks like it was for the Teensy 3.1 wired to the Ramps board, a good place to start. Might have to be changed a bit for the 3.5/3.6, and if I try to do something with the SAMD, I'll first have to come up with an Arduino pins.h mapping of the GPIO's to Arduino pin numbers. I'd probably start with what's there for the Arduino Zero/M0 as that is a subset of the SAM21J. The PWM and AD pins need to get mapped correctly.

In any case I think I'd have to comb though the code to fix any Atmega specific HW accesses and remap those to some sort of HAL translation macro's based on CPU type.
 
In terms of soldering to the pads underneath the Teensy 3.2, there are a couple of PCBs that you can buy to simplify this:
 
Hi Paul, do you know the current status of this project? It looks like unix_guru ran off the road a little bit with DC motors and encoders instead of steppers.

I am building a Prusa 3d printer with the RAMBo board and am very interested how I can use Teensy for the brains of this setup.

Is there any "completed" work that I can use as a starting point?

Thanks,
Bob
 
Status
Not open for further replies.
Back
Top