Hello I was wondering if you got this going yet ?
If so do you have the pin assignments?
Thanks Stan
I am stuck, because the ATX power supply doesnīt work. :-(
I did a first pin assignment ... on paper. Because i need two HCT245 and there is little space on the board, i may change some pins.
This is my current(!!!) definition for board 85 in pins.h:
Has anyone worked on porting the temperature code?
I haven't had any time for this project in the last 2 weeks, and with my focus on SPI transactions for the next several days, it may be another week until I can look at Marlin porting again.
I am stuck, because the ATX power supply doesnīt work. :-(
I did a first pin assignment ... on paper. Because i need two HCT245 and there is little space on the board, i may change some pins.
This is my current(!!!) definition for board 85 in pins.h:
Thanks very much for the prompt responce. I'm waiting on my Oshpark 3.1 before
I can test (Hopefully they are supported by PJRC I have 2 teensy 3.0's from Paul).
I'm used to 5v logic, I forgot about level shifting thanks. Your using 2 HCT245 are
you using 1 for each direction?
Thanks very much for the prompt responce. I'm waiting on my Oshpark 3.1 before
I can test (Hopefully they are supported by PJRC I have 2 teensy 3.0's from Paul).
I'm used to 5v logic, I forgot about level shifting thanks. Your using 2 HCT245 are
you using 1 for each direction?
Stan
No Direction;-) Teensy 3.1 inputs are 5V compatible.
Only "DOUT5V" pins need level shifting.
Hey all, has anyone gotten any motors to move with Marlin and Teensy 3.1? The code compiled and I changed the pin assignments to match with my setup but the motors wouldn't move. I have basically a functional printer with Teacup and Teensy but I would like to get Marlin ported over to Teensy
EDIT: Just got the motors to work!! Now on to the temperature porting. Paul, have you had the chance to look at this again?
EDIT: Just got the motors to work!! Now on to the temperature porting.
Congratulation!
After getting a new power supply i decided to take the "modular" approach: a great controler-board holding a teensy 31 on beakoutboard, two stepperdriverboards (2x3max DRV8825), one PWM-board. Today i will test the first stepper.
My plan is to solder and test 3 stepperdriver and the endstops. Then join with the printer hardware and test the combined movements.
Next step solder and test the PWM-board.
Hey all, has anyone gotten any motors to move with Marlin and Teensy 3.1? The code compiled and I changed the pin assignments to match with my setup but the motors wouldn't move. I have basically a functional printer with Teacup and Teensy but I would like to get Marlin ported over to Teensy
EDIT: Just got the motors to work!! Now on to the temperature porting. Paul, have you had the chance to look at this again?
I expect Paul has some ideas, but just in case he is busy, I can describe how I did it for the Due port of Marlin. I haven't looked into Teensy code much yet, but I would like to add Teensy3.1 support to it, currently I don't have the hardware but I have some on order.
In temperature.cpp the interrupt function ISR(TIMER0_COMPB_vect) needs to be called every millisecond. In the AVR version, this shares the millis() timer used by the Arduino core. In the Due version, I decided it was easier to allocate a new timer to call the temperature function. One of those methods should also apply to the Teensy version.
The other change required in the temperature ISR is the code to actually read ADC values, I took the easy route and just call analogRead().
There is code in tp_init() which initializes the AVR analog ports, and again I took an easy route and skipped that - the Arduino core will do the required initialization.
Hopefully next week I will get a Teensy and put some hardware together.
I expect Paul has some ideas, but just in case he is busy, I can describe how I did it for the Due port of Marlin. I haven't looked into Teensy code much yet, but I would like to add Teensy3.1 support to it...
That's awesome, thank you so much for your suggestions! I'll try them out and see if I can get the ADC stuff going for Teensy. Please let me know if you make any progress also!
I wonder if we can add on the what Paul already started:
My plan is to solder and test 3 stepperdriver and the endstops. Then join with the printer hardware and test the combined movements.
i finished testing hardware of stepperdriver-module with breadboard and my contollerboard.
Now the controller is connected with the endstop and (first) the x-axis motor of my felix-printer.
My problem: the motor doesnīt move with marlin, but moves fine with an AccelStepper based test programm!?
Any idea?
Additional: Sometimes it moves a little bit ( about one millimeter), but i cannot repeat this. Using arduino or repetier doesnīt make a difference.
Hey aikx, I actually had a very similar issue! Hmm let me see... here's what I tried that made it work... Since you are able to move the motors with AccelStepper, I am assuming your hardware setup is fine. At first, my stepper motors weren't moving because I didn't have the enable pin of the stepper driver grounded. How did you configure your AXIS_STEPS_PER_UNIT? Are you using microstepping with your stepper motors? These are the stepper drivers I am using: http://www.pololu.com/product/2128. If you scroll down to "Step (and microstep) size", it explains how to use microstepping. Once I added microstepping and adjusted my steps per unit, I was able to see the motors moving with Marlin. Good luck! Hope this works... let me know what happens!
Also, did you try moving the motors without any endstops?
Also, when you are using Repetier Host, is it recognizing Marlin as the firmware type in the printer information?
My problem: the motor doesnīt move with marlin, but moves fine with an AccelStepper based test programm!?
Any idea?
First send M119, it will show status of all your endstops, make sure that inverting(X_MIN_ENDSTOP_INVERTING) is set properly in config. After this you should get movement in at least one direction for each axis, then you can home an axis by ie. "G28 X0" for x, I recomend homing one axis at a time at first, chances are you have inverted some steppers direction or some endstop is not correctly plugged or something, so be prepared to pull out the plug... If you don't have "all" (3) endstops, you can try disabling "min_software_endstops" and "max_software_endstops" (set to false)..
Originally Posted by bobc
I expect Paul has some ideas, but just in case he is busy, I can describe how I did it for the Due port of Marlin. I haven't looked into Teensy code much yet, but I would like to add Teensy3.1 support to it, currently I don't have the hardware but I have some on order.
.... On a side note... if I remember correctly, I thought you were able to get the motors moving awhile ago with marlin and teensy, no?
Yes, forgot it!
I tried all board and stepper-driver combinations and found that DRV8825 makes the difference:
Code:
Key differences between the DRV8825 and A4988:
The timing requirements for minimum pulse durations on the STEP pin are different for the two drivers. With the DRV8825, the high and low STEP pulses must each be at least 1.9 us; they can be as short as 1 us when using the A4988.
So i went "back" to A4988!
1. Problem: Stepper driven by DRV8825 doesnīt step and rotate. But there are mini-movements and some noise inside! AccelStepper test worked! ->>Marlin on Teensy 31 generates too short pulse durations on the STEP pin! I cannot measure this.
Good message: I could test three MIN-Endstops, move X,Y,Z steppers using A4988 Stepper Motor Driver Carrier . They home with Repetier and i could test an gcode file (cold, no extrusion)!
2. Problem: The movements are very, very slow!
I used 16 microsteps same as ramps. Same definition of steps per unit as for felix 2.0. The measured movement is correct.
Is it possible, that the teensy timer is too slow? I found many hardware constants in stepper.cpp but donīt understand them....
Teensy runs 48 or 72 MHz, no difference.
When I tried to compile it for Teensy 3.1, I got the following error:
Arduino: 1.0.6 + Td: 1.20 (Windows 7), Board: "Teensy 3.1"
stepper.cpp: In function 'void st_wake_up()':
stepper.cpp:262: error: 'ENABLE_STEPPER_DRIVER_INTERRUPT' was not declared in this scope
stepper.cpp: In function 'void trapezoid_generator_reset()':
stepper.cpp:323: error: 'OCR1A' was not declared in this scope
stepper.cpp: At global scope:
stepper.cpp:339: error: expected constructor, destructor, or type conversion before '(' token
I have an Ultibots K250VS delta printer that I would love to control with the Teensy 3.1 and RAMPS 1.4.
Teacup currently does not support delta printers, but is working with Teensy 3.1. Marlin and Repetier do support delta printers, but are not known to be working with Teensy 3.1 (please let me know if I am wrong!).
Would it be preferable to spend the time adding delta support to Teacup, or finish porting Marlin to Teensy 3.1?
After giving it some consideration (research), I think I would rather work on porting Marlin to Teensy 3.1 rather than add delta support to Teacup. Others seems to be working on the delta support for Teacup.
I have a spare Teensy 3.1 and Ramps 1.4 on the way so I will have dedicated hardware that I can swap into my 3D printer for testing.
I got Paul's Marlin to compile by changing line 181 of stepper.cpp from:
Code:
#elif defined(__arm__) && defined(IRQ_FTM2)
to
Code:
#elif defined(__arm__) && defined(__MK20DX256__)
Further porting and testing when the spares arrive...
After giving it some consideration (research), I think I would rather work on porting Marlin to Teensy 3.1 rather than add delta support to Teacup. Others seems to be working on the delta support for Teacup.
Smoothie (http://smoothieware.org) already has delta support, is designed specifically for ARM chips, and has a MUCH cleaner and easier-to-maintain codebase than either the Marlin or Repetier firmware. It's a pleasure to work on, which I know from spending hundreds of hours writing an auto-calibration routine for delta printers. Right now it only works on LPC17xx chips, but porting it wouldn't be that hard. You'd just need to get the right toolchain and adjust any CPU-specific features to use different register names, or whatever.
The one drawback is that if you want to save any settings, you need an SD card. Otherwise, you have to edit hard-coded default values in the firmware (which you already have to do a lot of with Marlin and a little of with Repetier). If you do get an SD card, it'll show up on your computer as a removable drive, so you can edit the config and drop .gcode files directly from your computer. It's pretty nice.
The reason I'd choose this over Marlin is that it's designed to work with CPUs that aren't ancient, terrible and laughably overpriced (AVR series), and that the logical structure of the program is properly organized into classes and subdirectories, whereas Marlin and Repetier firmware are "a big row of tabs, and each tab is full of spaghetti." Smoothie hasn't been shoehorned to run on 1980-class crap with no more than 4K of RAM. In fact, the Teensy's processor is even a better fit than the LPC series they use on the Smoothieboard, as it has twice the RAM (64K!)
Has anyone worked on porting the temperature code?
I haven't had any time for this project in the last 2 weeks, and with my focus on SPI transactions for the next several days, it may be another week until I can look at Marlin porting again.
Your board looks very interesting. Are you targeting a particular firmware?
Yeah, I really like marlin. Aside from the predisposition towards atmega chips I really like the firmware and want to get it working with a teensy. Its basically a RAMBo board with the main chips swapped. I also changed some of the packages for ones that are easier to hand solder. Do to the limited pins on the teensy I moved all the stepper enable pins to an I2C GPIO expansion chip. I also left the SPI digital pot for the motor currents, I really like that feature.
Michael,
your board looks great I would suggest to add two things not available elsewhere:
- Place for two more stepper motors to drive four extruders, so it is possible to use E3D Kraken or to do something like the color mixing demonstrated here
- The possibility to use at least one Thermocouple instead of Thermistors, to print materials like PEEK above 290degC
The difference is that I'm replacing all of the Stepper logic with Closed loop DC servomotor/Quadrature Encoder.
I've got some success on moving the X/Y axis via Repetier, and am now working on the ADC code to read the thermistors appropriately.
Last edited by unix_guru; 04-07-2015 at 08:10 PM.
Reason: updated images