Page 1 of 1

Einsy board 1.1a and Simple Metal

PostPosted: 2018-Jan-Tue-20-Jan
by cbxbiker61
I just received my first Einsy board from Ultimachine. The Einsy is the board used in the Prusa MK3. It has TMC2130 stepper drivers that are quiet and have some pretty nifty new capabilities such as missed step detection/recovery and homing without endstops. It will also be capable of power fail recovery when printing from SD card after Marlin gets up to feature parity with the Prusa firmware. With the 2560 micro, there is enough flash to put a proper LCD control on it.

I've already built a test firmware for it, although I do need to go back and vet the configuration changes.

Now I just have to design and print an adapter plate since it's just a bit wider/longer than the PrintrBoard. I'll punch a couple of holes in the front of the Simple for the USB port and reset button.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Jan-Thu-21-Jan
by cbxbiker61
A couple of photos of my adapter and Einsy board.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Jan-Tue-18-Jan
by TryTryAgain
So cool! What kind of changes did you have to make to the einsy firmware? Just change the build volume settings or was it more involved?
The feature I'm most interested in is the missed step detection. Have you had an opportunity to try it out?

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Thu-23-Feb
by cbxbiker61
TryTryAgain wrote:So cool! What kind of changes did you have to make to the einsy firmware? Just change the build volume settings or was it more involved?
The feature I'm most interested in is the missed step detection. Have you had an opportunity to try it out?


Current Marlin doesn't have a pins header for the Einsy board, so I copied the pins header from the Prusa MK3 source tree. A few minor changes to the config file from the existing PrintrBoard config, i.e. adding on the Trinamic drivers and using the new pins header file. I have built the firmware, so I know it's pretty close. I'm just waiting for an opportunity to swap the board into place. I'll keep you posted.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Fri-14-Feb
by cbxbiker61
I've got my Einsy connected to my computer running Marlin 1.1.8! I'm in test mode at the moment so it's not mounted in the PrintrBot yet.

1. fixed the common problem where the display ribbon cables are keyed on the wrong side, just grind the key off on one end and reverse the cables.
2. fixed an issue with the Full Graphics display (artifacts on the display):
In ultraldc_st7920_u8glib_rrd.h:
#pragma GCC optimize (0)

Marlin is not reading my SD card at the moment, I just finished testing the SD card on the graphics display by wiring it to an Arduino Mega and the Mega can read the SD card. I need to debug why Marlin can't read it. It does recognize the card detect pin though, I've double checked the pin definitions for SD/SPI and they seem to be correct. Might have to connect my scope to the SPI pins and see if the Marlin/Einsy is sending data correctly.

The buzzer doesn't seem to work at the moment, but while I've got it attached to the Mega, I'll test it out and go from there.

Once I get the SD card and buzzer sorted out, I'll use my scope to monitor the stepper motor pins and see if they're being triggered.

BTW, you want to get a couple of 40mm 5V 3pin fans for the Einsy, they're no longer "dumb" 12V. Marlin/Einsy can be configured to monitor fan RPM and pause/cancel a print if they're not spinning.

https://www.amazon.com/gp/product/B00NEMGCIA/

I'm also going to use a 90 degree usb cable so I don't have to punch a hole in the front of the PrintrBot.

https://www.amazon.com/gp/product/B00GURMTTC/

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Sat-10-Feb
by cbxbiker61
The buzzer is working, It was all along, I just expected the menu clicks to be a little louder.

I plugged a spare stepper motor into the board's X, Y, Z and E plugs. Initially the X and Y weren't interpolating steps. I speculated that configuring the stepper motors over SPI wasn't happening reliably, so I looked into the TMC2130Stepper library. I found that it was driving SPI at half the rate that I found in the Prusa MK3 firmware so I changed that. That seemed to do the trick and now the steppers all run interpolated. BTW, it's a beautiful thing to hear how much quieter/smoother the steppers sound in this mode..

The X and Y endstops trigger properly. I still need to test the Z endstop.

The outstanding issue is reading from the SD card. I'm speculating that there is an issue with sharing the SPI bus, since the TMC2130Stepper library is using SPI library calls and the SdCard functions are reading/writing registers directly. I see that the Arduino "official" SD card library is using SPI calls, rather than reading/writing registers directly so I'm patching the SdCard code to use SPI library calls. Wei'll see if that fixes it.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Sat-15-Feb
by cbxbiker61
I've got it reading from the SD card now. I also found a better way (more official) of handling the graphics artifacts.

I figured out that the Einsy needs a different pins_arduino.h vs a standard Arduino Mega. It uses more pins.

One last issue to figure out...my Extruder stepper isn't working, all of the other stepper drivers are working.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Sun-03-Feb
by cbxbiker61
Ahhh, PREVENT_COLD_EXTRUSION was preventing me from testing the extruder. So yeah it works.

I should be able to mount the Einsy in the PrintrBot about Thursday or Friday after I get my 5V 3 pin fans.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Tue-23-Feb
by cbxbiker61
For anyone interested, I've put up my current patch. Everything seems to test out. I'm now waiting for some three pin connectors for my 5V fans and some spade connectors for the power input. I want to wire this up nicely so it's nice and reliable.

http://www.xilka.com/printrbot/marlin/1 ... ambo.patch

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Wed-08-Feb
by RetireeJay
I'm curious - what are you using for your firmware development tools? And how do you configure them? Does Einsy come with its own IDE like Arduino does?

I got really frustrated with the Arduino IDE and gladly went over to PlatformIO when it became available (using Notepad++ for my editor). But I suspect if I wanted to implement your firmware on my Rev F6 board I'd need some other compiler. Microsoft's C++ compiler? I tend to get lost in all the dependencies of this file on that file which depends on that other file, which gets its pin assignments from that header except for some pins which come from another package entirely...

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Wed-11-Feb
by cbxbiker61
In my case I use Linux with make. Marlin includes a Makefile, but it needs some tweaking to the the source code locations. I patch the Makefile for my setup and use a build-*.sh script to build the various versions.

PlatformIO can build it also, I think quite a few of the Marlin devs use it. I simplified the configuration options by moving the options that may be encountered on a PrintrBot to PrintrBotConfig.h. You can see how I set them for reference in build-printrbot.sh.

If you have the PrintrBoard F5/6, apply the Marlin-1.1.8-20171227.patch, then set the options in PrintrBotConfig.h. That should build you a firmware,

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Wed-11-Feb
by cbxbiker61
I finally have started the conversion. I had to redesign the adapter bracket. I made it shorter, put nut traps in the Einsy mount holes and offset the holes a bit to move the Einsy board about 4mm towards the front. I am going to punch a hole in the front of the PrintrBot base for the USB cable.

The existing stepper connectors will plug in to the Einsy without changing the end. They just wont have the locks to match the Einsy board's plugs. Other items, such as end-stops will require new connector ends. It looks like it will be pretty straight forward, just spending a bit of time changing connectors.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Wed-17-Feb
by cbxbiker61
Here's a few photos of the Einsy board going into the Simple. Now getting on with the wiring.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Thu-11-Feb
by cbxbiker61
I wired up two 6-pin pci-e cables to the power input. Three wires terminating into each spade-clip, for a total of 12 input power wires. There is definitely going to be solid power on this board.

X, Y and Z are all moving correctly. I have the X and Y end-stops connected and working.

Re-pinning the new connectors is a bit fidgety. I do have an IWISS crimping tool that works pretty good for this.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Thu-22-Feb
by cbxbiker61
Just a couple of thermistor connectors to do, plug the 5v fans in, and wire up the inductive sensor.

The inductive sensor on the PrintrBot is 12V whereas the Einsy board expects a 5V sensor. I'll pull the 12V from the power input and wire up a 4.7K/2.2K voltage divider to get an acceptable voltage to input to the Einsy.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Thu-22-Feb
by RetireeJay
That should work. Assuming the Einsy board's input is relatively high impedance - which is probably a reasonable assumption.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Sat-09-Feb
by cbxbiker61
Yeehaw, Everything is hooked up and basic functionality is working.

I ran into the axis moving twice or even four time as far as it should bug last night and thought I would be bug fixing today. Before I went to bed I decided to do a web search for that problem and found that it should be fixed in the Marlin bugfix-1.1 branch. A new 1.1.9 branch is imminent. Today I'll get the the bugfix-1.1 branch working and I should be in business.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Sat-15-Feb
by cbxbiker61
OK, the bugfix-1.1.x branch did fixup the TMC2130 driver initialization problems. Now it runs nice and quiet, and does the bed leveling without problems.

Next phase...print something!

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Sun-16-Feb
by cbxbiker61
I now have a working Einsy/PrintrBot Simple!

Linear advance code is messed up in bugfix-1.1. In Marlin 1.1.8 I patched setup() to initialize the TMC2130 CS pins properly and it works. I'll post a video when I'm printing something more interesting than a test stick.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Feb-Mon-11-Feb
by cbxbiker61
A couple of videos with the Einsy board:

before patching the hysteresis: https://youtu.be/eyHxXpe1pOE

after patching the hysteresis: https://youtu.be/m-mUHwTZkFs

Note that the stock stepper motors on PrintrBot's are high-impedance and the Einsy board works best with low-impedance motors, preferably at 24V. Configuring the TMC2130's in Stealth-Mode is exceptionally quiet, but I did have some layer shifting, so It isn't worth it to me.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Mar-Thu-13-Mar
by cbxbiker61
It prints like a dream! Couldn't be happier with the results.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Mar-Thu-13-Mar
by cbxbiker61
cbxbiker61 wrote:I now have a working Einsy/PrintrBot Simple!

Linear advance code is messed up in bugfix-1.1. In Marlin 1.1.8 I patched setup() to initialize the TMC2130 CS pins properly and it works. I'll post a video when I'm printing something more interesting than a test stick.


It turns out that the versions of Marlin greater than 1.1.8 are going to use different values for the linear extrude factor. This will be a gotcha when updating past 1.1.8. On 1.1.8 my linear extrude factor was set to 30. On bugfix branch and newer it turns out that I need 0.07 to get comparable results.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Mar-Fri-17-Mar
by Mooselake
How about a little YouTube video so we can be envious and RJ can get even more eager for his MK3 to arrive?

Sounds like it was an easier conversion than going to a Printrbot G2 board, although iirc the Einsy is still an 8 bit AVR and the G2 is ARM with greater potential (possibly not actual) for improvement over the Printrboard.

Kirk

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Mar-Fri-19-Mar
by RetireeJay
The AT MEGA on the Einsy board has 256kB available program memory vs 128kB on the Printrboard's AT90USB1286; the MEGA has 100 pins vs 64 pins, but their CPU speed is the same at 16MIPS. The corresponding specs for the ARM are hard to find, but the Aduino Due uses it and they say 512kB of program memory and a CPU clock speed of 84MHz (clock speed is not the same thing as instruction rate, so I don't have an apples-to-apples comparison for speed).

https://www.microchip.com/wwwproducts/en/ATmega2560
http://www.microchip.com/wwwproducts/en/AT90USB1286
https://en.wikipedia.org/wiki/List_of_Arduino_boards_and_compatible_systems#Arduino_Due

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Jun-Fri-20-Jun
by cbxbiker61
My Simple Metal with the Einsy board upgrade is performing flawlessly. It really is my go-to printer as long as the print will fit the build volume.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Sep-Mon-13-Sep
by Swood333
Excuse my noobness but... wouldn't it be possible to make changes to the existing Prusa source code for the MK2.5/3 firmware and take advantage of the improvements they've made? As best I can figure all you'd have to do is change the thermistor type, bed probe type, build volume, offset values, Extruder steps/mm and maybe the stepper directions if they're backward.. Right??? or am I far more ignorant that I think I am? lol

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Sep-Mon-15-Sep
by cbxbiker61
Swood333 wrote:Excuse my noobness but... wouldn't it be possible to make changes to the existing Prusa source code for the MK2.5/3 firmware and take advantage of the improvements they've made? As best I can figure all you'd have to do is change the thermistor type, bed probe type, build volume, offset values, Extruder steps/mm and maybe the stepper directions if they're backward.. Right??? or am I far more ignorant that I think I am? lol


With open source software...almost anything is possible. Prusa's software seems to work pretty well in implementation on their hardware, I have used it on my MK1->MK2->Mk2S->MK3. Yeah, I've upgraded my Prusa all the way from the first version to the MK3. Although the Prusa version seems to work pretty well in implementation for the Prusa specific features, I've found that their implementation of linear advance for example is not as well done as standard Marlin. The source code quality of Prusa's version compared to stock Marlin is also lacking, quite a bit of code looks like it was put in by naive, new to C++ programmers that probably started on Python.

At this point Prusa's implementation is distinct from Marlin proper (hard to move code back and forth without a complete rewrite).

In my opinion, it's best to wait for the better features from the Prusa firmware to be rewritten/implemented on base Marlin. Keep in mind that Marlin has features that the Prusa firmware doesn't have. I have turned on a couple of the newest/greatest features in Marlin 1.1.9 and they seem to be working nicely.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Sep-Wed-10-Sep
by kevinh6825
i'm trying to do this board upgrade as well and i've been trying to get the firmware to work for 5 days now. with only partial success. i'm having trouble with the lcd only showing blocks in row 1 and 3 and the x axis driver seems to fail after 1 minute of printing then x and y axis slow down dramatically while the extruder still runs at full speed. i'm sure its me but would like some help please. homing works, g29 3 point seems to work but other than that. I am new 5 days ago to the concept of programming so any help would be appreciated. marline 1.1.5 einsy is what i'm trying to use but not married to it.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Sep-Wed-10-Sep
by kevinh6825
my current config files

Configuration_adv.txt


Configuration.txt

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Sep-Wed-11-Sep
by cbxbiker61
You should be using Marlin 1.1.9, it's just the best version that is available. In my config I've turned on a couple of the newest features that seem to work well.

Apply this patch to a clean Marlin 1.1.9 source tree:

http://www.xilka.com/sheeva/tmp/Marlin- ... ambo.patch

The script that I use to build on my Linux box is build-einsy-printrbot.sh.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Sep-Wed-16-Sep
by kevinh6825
How do I patch? Will I need to change anything else or will this be it? Sorry never build a firmware before

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Sep-Wed-17-Sep
by cbxbiker61
There's a discussion on patching on my Marlin 1.1.8 thread.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Sep-Wed-19-Sep
by cbxbiker61
Something just came to mind. PlatformIO is one way to build/manage Arduino projects, it's actually a plugin to an editor. I'm pretty sure that the editor would either have a patcher built-in or it would be available as a plugin. Something to think about for Windows users.

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Nov-Fri-21-Nov
by drphil3d
Here is Marlin 1.1.9 for Printrboard RevF. I wish I had known about this thread a while ago, would have saved me countless hours of work.

Oh well, live and learn! :lol:

Feedback would be great! It would like to figure out how to build firmware for each model at the same time like i've seen here

xilka com/printrbot/marlin/

This is my github repo with source and precompiled firmware for a few printrbot models
github(.)com/Printrbot/printrboardmodernmarlin

Re: Einsy board 1.1a and Simple Metal

PostPosted: 2018-Nov-Sat-17-Nov
by cbxbiker61
The build script is in the patch file.