Firmware for Dual Extrusion?

Discussions about firmware/slicing software, tweaks and settings
Post Reply
superhornet59
Posts: 60
Joined: Wed Apr 03, 2013 1:58 am

Firmware for Dual Extrusion?

Post by superhornet59 »

Thought I'd post this in a separate thread so it will be useful for anyone regardless of which dual-extrusion route they take. I've got my two extruders, thermistors, and heaters installed in the V2 board. Set Repetier host and Cura for dual-extrusion, and unplugged everything then reconnected. When I hit connect, the usual "FIRMWARE_NAME...... " message comes up and it says "EXTRUDER_COUNT:1" at the end. There is still the drop down option for manual control of extruder 1 or 2, but regardless of which I choose, it only heats/extrudes from extruder 1. So, I'm guessing I have to adjust something in the firmware? I kind of thought/hoped it would magically become dual-extrusion ready as soon as it detected the second extruder. I'm mechanically inclined, but my coding skills are just about zero, so, I'm stuck...... help please?

Kjetilei
Posts: 334
Joined: Fri Mar 16, 2012 8:26 pm
Location: Stavanger, Norway

Post by Kjetilei »

If the firmware is correctly set up you can select the second extruder in Repetier host by entering T1 in the G-code command line (under the Print panel tab). All extruder actions then apply to the second extruder. Enter T0 to return control to the first extruder.

I just remembered that you should also have a drop down menu in Repetier host for selecting extruder. It's located in the Extruder box under the Print panel tab (if the firmware/repetier is setup correctly).

With the "proper" g-code for dual extrusion you can get both extruders to heat up before starting to print - but I prefer to do it manually.

dognotdog
Posts: 181
Joined: Tue Sep 04, 2012 9:22 pm

Post by dognotdog »

With the Arduino/RAMPS board, you had to change the #define MOTHERBOARD directive from 33 to 34 for dual extrusion in configuration.h. If the V2 electronics is wired in the same way, you may be able to do that, or if it's different, define your own board in pins.h, with the correct pins setup for the various functions.

superhornet59
Posts: 60
Joined: Wed Apr 03, 2013 1:58 am

Post by superhornet59 »

So, I'm not sure what you mean by 'correctly set up'. I received my Felix preassembled, and it worked just fine, and I've never made any changes to the firmware. In Repetier host, in 'printer settings' I've set the extruder count to 2, and indeed there is a drop down menu in the 'Manual Control' tab. Maybe we're talking about the same thing.. I updated RH to the latest version just a few weeks ago. When I selected extruder 2 to begin heating, I get a little message in the log saying 'invalid extruder'. Were you both using the V1.X board? And how would I go about altering these .h files?

Sorry, explain to me as though I were a young child, because I'm a real dummy when it comes to this stuff :P

Kjetilei
Posts: 334
Joined: Fri Mar 16, 2012 8:26 pm
Location: Stavanger, Norway

Post by Kjetilei »

Aha! you need to perform som firmware changes for dual extrusion to work. As dognotdog mentioned you need to change the Motherboard from 33 to 34 in the Arduino GUI and upload the firmware to the Felix controller. There might be more involved but I can't remember at the moment (bad memory and I also added LCD/rotary ecoder support and other tweaks at the same time).

I have used 1.5 up until now but received the 2.0 upgrade a few weeks ago but still haven't found the time to finalise the upgrade yet :(

superhornet59
Posts: 60
Joined: Wed Apr 03, 2013 1:58 am

Post by superhornet59 »

Think it'll work on the V2 board the same way? I mean I know they're both running Marlin... so isn't there just some 'generic Marlin' version I can download that has dual extrusion supported, and just needs e-steps per mm and stuff like that tweaked? What I really don't understand is why dual extrusion isn't already supported in the firmware seeing as all of the ports and stuff are there. I mean, would dual-extrusion firmware not be able to run a single extruder printer?

And okay how would I go about changing the motherboard from 33 to 34 (don't even know what those numbers mean lol). All of this software stuff.. ports, comms, baud rates, etc it's all gibberish to me. If I write some bad code or something, can I brick my printer? I'm a little nervous about all of this because this is a custom tailored board, not the typical RAMPS used in all repraps, so if I mess things up there's not as much support/experience out there.

Can I just be lazy and do whatever you do when you get your V2 Board installed? hahaha

dognotdog
Posts: 181
Joined: Tue Sep 04, 2012 9:22 pm

Post by dognotdog »

Pester Guillaume until he posts a firmware for 2 extruders, then ;)

Kjetilei
Posts: 334
Joined: Fri Mar 16, 2012 8:26 pm
Location: Stavanger, Norway

Post by Kjetilei »

superhornet59: the best thing is just to modify the existing Felix firmware instead of using another printer firmware-variant.

The reason why dual extrusion is not supported out of the box (at least for Ramps 1.4 users) is normally that dual extrusion steals the PWM port dedicated to the airduct fan

I took a quick dive into my firmware code and have described the changes I believe are necessary below.

Disclaimer: I make no promises that these code bits will not make your printer go ballistic (but there should be extremely little risk for anything going wrong - more can go wrong due to the physical rerouting you'll have to do yourself) and take no responsibility ;) I haven't looked into the 2.0 firmware settings so Guillaume might have made changes that make the code snippets below depreciated.

In Configuration.h:
Search for "#ifndef MOTHERBOARD" and change the value on the next line to 34:
#define MOTHERBOARD 34

You might also have to change #define TEMP_SENSOR_1 to 1:
#define TEMP_SENSOR_1 1

in Configuration_adv.h
Change #define EXTRUDERS from 1 to 2:
#define EXTRUDERS 2

I don't think you need to do any more modifications to the firmware.

You should now be able to upload the code and test it out in Repetier host to see if the Extruder 2 is available. I can't see how you should be able to brick the printer by doing this. If it doesn't work properly you can just reupload the standard unaltered firmware from Guillaume.

Good luck :)

superhornet59
Posts: 60
Joined: Wed Apr 03, 2013 1:58 am

Post by superhornet59 »

Okay, so I squeezed out a few more prints (juuust in case), and finally took a crack at this. Okay it's not as bad as I thought it would be.. but it's still not working. Kjetilei, great advice, but alas here's how things went down. I set up the Arduino compiler (like in the Felix 2.0 Manual PDF) and download the firmware so I could have something to tweak. Opened it up, had a look through, made the changes, but it doesn't work. First of all, there is a list that refers to the motherboard codes:
//// The following define selects which electronics board you have. Please choose the one that matches your setup
// 10 = Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
// 11 = Gen7 v1.1, v1.2 = 11
// 12 = Gen7 v1.3
// 13 = Gen7 v1.4
// 3 = MEGA/RAMPS up to 1.2 = 3
// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Bed, Fan)
// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
// 4 = Duemilanove w/ ATMega328P pin assignment
// 5 = Gen6
// 51 = Gen6 deluxe
// 6 = Sanguinololu < 1.2
// 62 = Sanguinololu 1.2 and above
// 63 = Melzi
// 64 = STB V1.1
// 7 = Ultimaker
// 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
// 8 = Teensylu
// 80 = Rumba
// 81 = Printrboard (AT90USB1286)
// 82 = Brainwave (AT90USB646)
// 9 = Gen3+
// 70 = Megatronics
// 90 = Alpha OMCA board
// 91 = Final OMCA board
// 101 = FELIXprinters electronics 2.0
// 301 = Rambo

#ifndef MOTHERBOARD
#define MOTHERBOARD 101
#endif
I can see why you would change this from 33 to 34 if yoy have the RAMPS board, but alas, there is only one Felixprinters option (no idea if that reveals anything though).

I made the change to #define TEMP_SENSOR and #define EXTRUDERS as well.

I compile the 'sketch' and that works fine, but then when I try to upload it I get the following message in the compiler:
avrdude: stk500_getsync(): not in sync: resp=0x89
The only thing I could find online was that it meant that the wrong board was selected in the Arduino compiler, and so it wasn't uploading (though it doesn't say that explicitly). I'm almost certain I selected the right board because I chose the one it says to in the instruction manual, no doubt about it.

It also says "Done Uploading", which sounds like was successful.

So either it's uploading the firmware and its not working, or it's not uploading the firmware at all. Repetier host still shows EXTRUDER_COUNT: 1

What could be going on here? I emailed Guillaume earlier in the week, but no reply as of yet.

superhornet59
Posts: 60
Joined: Wed Apr 03, 2013 1:58 am

Post by superhornet59 »

**FIXED**

Turns out that the 4th Version Felix 2.0 Manual said to select the board as "ATmega1280" while the latest (7th) version of the same manual says to use the board "Arduino Mega(ATmega2560 or MEGA ADK)". I did that, and problem solved, the modified firmware uploads correctly and I now have the ability to use both extruders... woohoo! Now I just have to fine tune the g-code to work right.

Cheers!

Post Reply