problem compiling firmware for metal plus dual

Code hacking talk

problem compiling firmware for metal plus dual

Postby Gustav » 2015-Jun-Sun-18-Jun

Hi! My first post so i hope i've put it in the right section! I have some problem compiling firmware for the metal plus dual.

I have a model 1412 Metal Plus with dual extruders (rev. F4 board). I just replaced the primary extruder with a e3d v6 extruder to try to print polycarbonate, using the second UBIS for supports.

I followed the step by step guide on (can't post URL because its my first post, but the instructions in the first hit when you google "e3d printrbot") compiled the new firmware according to the instructions (using RevF-version-1 source from the Printrbot GitHub) changed max temp and thermistor table and flashed it successfully. Everything worked perfectly except for one thing: the secondary extruder motor isn't working! (the one connected to the Extrudrboard) Both heaters are working great and everything else is all fine and dandy.

I then reflashed with the Metal Plus w Dual Extruder.hex from Printrbots page and then both extruder motors are working but of course i loose the higher max temp of the e3d i had with the custom firmware.

I´ve been searching all day for a solution but now i've reached the limit of my competence. Is RevF-Version-1 the right source for Metal plus dual extruder? Do i need to change anything in configuration.h to enable both extruder motors?

Please please somebody help me!
  • 0

Gustav
Waiting to connect to printer...
 
Posts: 7
Joined: 2015-Jun-Sun-17-Jun
Reputation: 0

problem compiling firmware for metal plus dual

Sponsor

Sponsor
 

Re: problem compiling firmware for metal plus dual

Postby RetireeJay » 2015-Jun-Sun-19-Jun

It sounds like you will need a specific, custom firmware for the unique combination of extruders that you have. So instead of obtaining a hex file, you will need to obtain the source code for your 'bot. Probably the Metal Plus Dual Extruder, as you mentioned. And then you need to go in and customize "configuration.h"

Instructions on setting up Arduino and FLIP for compiling and flashing your firmware are in the Printrbottalk Wiki (red-white-beige button next to the "Search..." box at the top of the screen.)
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4800
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: problem compiling firmware for metal plus dual

Postby Gustav » 2015-Jun-Sun-20-Jun

Oh, maybe i was a little fuzzy, i already did set up and compile a custom firmware but thats when i run into problem. It's when i compile it myself that i can't get the second extruder motor to work. I changed max temp and the thermistor table to no. 5 for extruder 0 in the configuration.h. Thats when everything but the extruder motor is working.
So compiling and flashing is successful, what i can't find is a hint of what to change to compile for Dual extruder to make both motors run.

I can only find a .hex file for Metal Plus dual extruder, not the source or any hint of what i need to change in the source to make the motor work.

So far i tried RevF-Version-1 and Unified Firmware v3 from GitHub. They compiled and flashed without problem (i lost G29 and other features when using Unified Firmware v3) and the printer works fine with my custom firmware apart from the second extruder motor not responding.

Has anyone else successfully compiled a firmware for Metal Plus with dual extruder? if so, what source did you use and what parameters?
  • 0

Gustav
Waiting to connect to printer...
 
Posts: 7
Joined: 2015-Jun-Sun-17-Jun
Reputation: 0

Re: problem compiling firmware for metal plus dual

Postby Gustav » 2015-Jun-Sun-20-Jun

by the way, i also used your extension for the thermistor.h table. That part worked like a charm so thank you :)
Now i just need to find a way to compile it so the second motor works then I'm a happy camper...
  • 0

Gustav
Waiting to connect to printer...
 
Posts: 7
Joined: 2015-Jun-Sun-17-Jun
Reputation: 0

Re: problem compiling firmware for metal plus dual

Postby RetireeJay » 2015-Jun-Mon-07-Jun

Since Brook has made a strong commitment to "open source" it seems that Printrbot would have the source code available for Metal Plus dual extruder somewhere. Since it's not immediately obvious on Github where that is, I'd say it's time to open a ticket with Printrbot support.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4800
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: problem compiling firmware for metal plus dual

Postby JonS » 2015-Jun-Mon-10-Jun

Can you really use two fundamentally different hot ends? The firmware only supports one PID tuning for dual extruders. With two hot ends with essentially the same thermal design this is kind of okay. But with two completely different hot ends, i would expect there to be problems.

Do you intend to re-write the PID tuning code?
  • 0

Printrbot Metal Plus with:

- Dual Ubis 13S metal hot ends (swapped for original Ubis metals)
- Dual Gear Head extruders
- Heated bed
- PEI print bed film

Printrbot Jr (put out to pasture).
User avatar
JonS
ACME leadscrew
 
Posts: 388
Joined: 2013-May-Fri-22-May
Reputation: 20

Re: problem compiling firmware for metal plus dual

Postby Gustav » 2015-Jun-Mon-16-Jun

Yeah i was a bit worried too with using the same PID for both extruders but the UBIS looks very stable with the PID's I got from auto tuning the E3D.
  • 0

Gustav
Waiting to connect to printer...
 
Posts: 7
Joined: 2015-Jun-Sun-17-Jun
Reputation: 0

Re: problem compiling firmware for metal plus dual

Postby Gustav » 2015-Jun-Thu-13-Jun

Both extruders work even if i use the Metal_Plus-Single.hex from printrbot (http://printrbot.com/project/metalplus/) so it seems that all Metal Plus firmwares have some different source code parameters. Cant find them anywhere though...

Posted the same question on Printrbot Answers now at http://help.printrbot.com/Answers/View/ ... l+extruder

So for now I'm running it as a single extruder machine with my custom firmware. Printing polycarbonate using a .8mm Volcano nozzle at 300c. Its super strong and sticks really well to a cold sheet of PET! But it would be nice to be able to use support material again.
  • 0

Gustav
Waiting to connect to printer...
 
Posts: 7
Joined: 2015-Jun-Sun-17-Jun
Reputation: 0

Re: problem compiling firmware for metal plus dual

Postby PxT » 2015-Jun-Thu-13-Jun

To get the second and third extruders working you should just need to update Configuration.h to configure the correct number of extruders, make sure pins.h has the right pin numbers configured, and that JTAG is disabled (also in pins.h).
See here for the correct values: https://github.com/Printrbot/Marlin/blo ... ns.h#L1535

Make sure you are making the changes in the right section of pins.h - look for the "Printrboard pin assignments" comment block at the start of the proper section. Or if you have a copy of Marlin from the latest upstream development then this has been moved into a separate file called pins_PRINTRBOARD.h
  • 0

User avatar
PxT
Print complete...
 
Posts: 1340
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97

Re: problem compiling firmware for metal plus dual

Postby Gustav » 2015-Jun-Sun-14-Jun

PxT: Yes, my pins.h is identical

I switched over everything from extruder 2 to extruder 3 on the Extrudrboard. AND THAT WORKS! But Cura only supports using extruder 1 or 2 for suport materials so i changed everything but the motor back to extruder 2, then i switched the pin outs in pins.h.
So i guess the problem is solved but i still don't understand why my custom firmware can't drive the motor on extruder 2 when printrbot's can.
  • 0

Gustav
Waiting to connect to printer...
 
Posts: 7
Joined: 2015-Jun-Sun-17-Jun
Reputation: 0

Re: problem compiling firmware for metal plus dual

Postby PxT » 2015-Jun-Mon-08-Jun

Hmmm... actually that is very interesting. I have been trying to get a triple extruder setup to work with a custom firmware as well and I am having the same issue with extruder #2 not working. #3 works fine. I assumed I had a bad board, but now I wonder if there is some firmware tweak that we are missing.
  • 0

User avatar
PxT
Print complete...
 
Posts: 1340
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97

Re: problem compiling firmware for metal plus dual

Postby Gustav » 2015-Jun-Mon-08-Jun

Yeah, i would have assumed some kind of hardware fault too if it wasn't for the fact that the stock firmware working fine with extruder 2! As it worked when i switched the pins for extruder 2 and 3 in pins.h the problem can't be upstreams of that. So my only conclusion is that the pin numbering for extruder 2 is different in metal plus, which also seems strange...
  • 0

Gustav
Waiting to connect to printer...
 
Posts: 7
Joined: 2015-Jun-Sun-17-Jun
Reputation: 0

Re: problem compiling firmware for metal plus dual

Postby PxT » 2015-Jun-Mon-14-Jun

I PM'd Laine about this to ask if he had any ideas, and got this reply:

From: lwalkera
Subject: Re: Firmware build for dual/triple extruder
Message:
Sounds like JTAG isn't being disabled. The way the disable is implemented
is a little dubious. IIRC, you have to access a register 3 times in a
certain number of clock cycles to be able to change JTAG state. It might
break depending on the C compiler you use. If you were to throw in some
inline assembly instead of the C lines to disable it, it would probably be
more portable.


Not sure if I'm up for hacking inline assembly, I haven't done any assembler in about 20 years and that was on x86. Although if JTAG is the problem, why would extruder #3 work, but not #2? I don't really understand this stuff. Maybe Laine will weigh in on this thread directly.
  • 0

User avatar
PxT
Print complete...
 
Posts: 1340
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97

Re: problem compiling firmware for metal plus dual

Postby PxT » 2015-Jun-Mon-16-Jun

I checked the data sheet for the AT90USB1286 and you have to make two writes within 4 clock cycles to disable JTAG. This is to prevent enabling or disabling it accidentally.

I managed to brave the compiler internals and got avr-gcc to give me the generated assembly. Unless I've made a mistake, the disable JTAG code compiles down to:
Code: Select all
      ldi r24,lo8(-128)
      out 85-32,r24
      out 85-32,r24


The two "out" lines are what we care about, and they are clearly happening within the 4-cycle limit that is required.
  • 0

User avatar
PxT
Print complete...
 
Posts: 1340
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97

Re: problem compiling firmware for metal plus dual

Postby PxT » 2015-Jun-Mon-23-Jun

I've been in touch with Brook & he is going to get me the exact source for the working Metal-Plus-w-Dual-Extruder.hex so we should be able to see the exact changes that were made. Will report back soon.
  • 0

User avatar
PxT
Print complete...
 
Posts: 1340
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97

Re: problem compiling firmware for metal plus dual

Postby PxT » 2015-Jul-Sat-21-Jul

Printrbot has finally updated github with the changes needed for this to work. On the Revision F printrboards you need to fix these two pins.h settings to make the Extrudrboard work correctly:

Code: Select all
  #define E1_STEP_PIN        13
  #define E1_DIR_PIN         37
  • 0

User avatar
PxT
Print complete...
 
Posts: 1340
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97


Return to Hack talk

Who is online

Users browsing this forum: No registered users and 2 guests