1 (edited by adrian 2013-05-20 15:31:12)

Topic: Beta of updated firmware, improved Pause/Filament Chg, etc

I've been working on taking the latest lawsy firmware and extracting all the Solidoodle patches (theres a few, but not a heap)
I then took the very latest Marlin firmware as of the 8th of May when I started.
I then patched in all of the Solidoodle patches and made a few cleanups and commented all of the Solidoodle Patches with {SD Patch} so they could be easily located. This is just for SD specific patches.

Then I've grabbed buildrob over on github much improved Pause command (actually Filament Change) and then repatched that into the new code tree, available at https://github.com/ozadr1an/Solidoodle- … in_v1_M600.

The end result of all that is:

  • Arduino 1.X Support! (You need to update Arduino with the files in ArduinoAddons)

  • All of lawsy's Solidoodle tweaks to the original Marlin_V1 firmware

  • All of Rincewinds and Tealvinces Hysteresis and ZWobble patches

  • All of the current Marlin_V1 patches/fixes/updates. Adds some handy things like low-speed SD allowing longer control panel distance etc;

  • Added a feature to allow you to park the extruder head by safely moving it to a parking position. Unbundled this from the LCD requirement.

  • You can use this function for instance to clean the drive gear or change filament. Changing filament allows you to replace a nearly depleted spool or to change the filament entirely for multi-colored prints. (Patch imported from work by "buildrob" https://github.com/buildrob/Marlin_M600 and then reworked] )

  • M600 - Park head to allow filament change or pause of print (Defaults to home position based on SD2 or SD3)

  • M601 - Unpark head to resume printing

  • M602 - Turn on/off extruder motors (e.g., for change over)

  • M603 - Display LCD alert, sound beeper and wait for button press.

  • Filament Feed Alarm and Auto-Pause - Pauses the print automatically when the filament feed alarm is tripped ( as referenced in http://www.soliforum.com/topic/2266/hey … arm-175mm/ ) - still under alpha testing to iron out all the bugs in all scenarios

M600 has also been patched to provide the firmware commanded pause to Repetier-Host. So you can auto pause and home the head by sending an M600 or sending other co-ordinates and retraction distances to it as part of the M600. Sending M601 resumes the print, but you'll also have to press continue in Repetier-Host (It has now firmware commanded resume sad ).

Don't add M600 as a pause-script command either, as it will cause planets to collide and stars to explode.. well actually, it just causes a double-pause scenario, over writing the saved XYZ co-ordinates in the M600 command.. making M601 useless.

Just to restate; To resume prints, you need to send M601 and then click resume in Repetier. I'm trying to work out the logic to deal with repetier only having Firmware Requested Pause and not Resume...

Added benefit is the M600 saves all co-ords correctly, so you can home and move Z around more than you can with just repetiers pause function.

The auto-home function has also been added to SD card print pause/stop, and the Change Filament command on the LCD. But i'm in the process of further tweaking that as well to present a resume menu item when not printing from SD card.

I'm still thrashing out the patches over the next few days; but it would be great if a few more people could help troubleshoot any issues or specifically the M60X commands above... you can play without a print job running, just move the head/z-axis around and then send M600 etc.. (everything has sane defaults based on defined printer (SD2/3)).

Make sure you download the Marlin_M600 Branch; https://github.com/ozadr1an/Solidoodle- … in_v1_M600
Remember to set the correct Solidoodle_Printer and your Thermistors correctly. You'll also want to make sure that

#define PARK_HEAD_ENABLE

is enabled to test the M600 functions and to auto-park the head on SD card pausing etc via the LCD panel (if you have one; and don't forget to enable that too! smile ).

Thanks for any assistance in troubleshooting whats there so far... I'll post the next version in a couple of days finalising the Filament Alarm trigger... just want to iron a few more things out first..

Obligatory Warning: what I've already also posted is still very much Beta - it works fine on my Sang and RAMPS boards printing etc.. but don't dabble with this unless you are comfortable with firmware flashing.

Adrian

2

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

So I'm nearly done with the Filament_Alarm stuff.. will post it up this evening.

3

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

It's a crime that no one has posted in appreciation, so I'd like to thank you for all of the hard work you've put into this.

4

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

I honestly just discovered this thread tonight- awesome job, thanks Adrian!

Grand Rapids, Michigan
SD2 with Sanguinololu board, glass bed mod, E3d_v5 bowden version hotend (currently direct drive), Lawsy Mk5 jigsaw replacement, octopi printserver, drv8825(tiny troubles)

5

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Thank you Adrian.

6

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

I just put an order in for a new minitronics setup complete with LCD and keypad. I am hoping to use this firmware on it. You rock Adrian! Can't wait to test this out!

SD3 w/ mods:
Glass bed with QU-BD heat pad upgrade, threadless ballscrew w/ 8mm smooth rod, spectra line belt replacement, lawsy MK5 extruder, Lawsy replacement carriage, E3D hotend, Ramps 1.4 w/ reprap discount controller, DRV8825 drivers, 12v 30A PS, Acrylic case, Overkill Y-idlers, Filament alarm, Extruder fan + more.

7 (edited by adrian 2013-05-23 14:55:37)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Ok, Just synced the latest patches to Git.

Firstly, the broad changes:

  • Starting to skirt the boundaries of  the 644 in size, so did some clean ups:

  • I've Setup #ifdef's for Zwobble and Hysteresis patches - this is because the Zwobble adds 9k and the Hysteresis 1.9k, and both do the same thing but differently. Decide which you want, and enable it! smile

  • All the Filament_Alarm code is setup the same, if you dont define a FILAMENT_ALARM_PIN value, it will not compile in any of the code.

  • I've added some comments in the Configuration.h file of the various firmware size changes when you compile in the various options.

  • Added the Filament Alarm Code

Big update is the addition of my Filament Alarm function. As described in http://www.soliforum.com/topic/2516/wip … when-idle/ this is run out of the main loop and every 2.5ms or so (to not impact timing functions otherwise) checks if the configured pin has been pulled low. If it has, it triggers the M600 command. Once triggered, if it remains active for the configured value of PAUSE_HEATER_DELAY, it will automatically shut off the heater. The loop also inspects if the pin returns to a normal state (open), and if more than 1.5mins has passed, it will reset the alarm status - this is to prevent multiple pause conditions when refeeding the filament.

This version also includes the pausing of Repetier Host when the alarm trips, or you send an M600 command manually.
The problem is there is a bug, and I'd love someone to help out troubleshooting it.. I've chased it for a day to no avail. Basically it seems a race condition of sorts occurs when I enqueue the M600 command - the M600 correctly parks the head to the configured location (based on SD2/SD3 definition) however it seems the last command from repetier is then still exectued. I've tried playing with adding delays after sending the repetier pause but it doesn't seem to help.

Anyway, M600 works otherwise as expected, and it shuts off the extruder motor allowing rapid filament changeover etc (as demonstrated in http://www.soliforum.com/topic/2514/dem … 0-seconds/ ).

M601 works as expected, and as stated, you simply need to enter M601 before clicking Continue in repetier and it all works as expected.

About 2 out of 5 times the code manages to cleanly enqueue the M600 and the head stays parked - at the moment I re-home the heads a second time manually...

If we can nut out the bug in my code when I first enqueue M600, then this will be an awesome function! smile At the moment, I manually home the head the second time.

To use this directly from repetier-host, just send an M600 from the console - it'll auto pause repetier for you as well.

Demo of M602 and the Filament Alarm:


8

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Very keen for some assistance debugging that initial M600 issue - so if anyone can download and have a look at the code that would be most appreciated! smile

9

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Great job! Sorry for not having much time to play with it at the moment (I am struggling with MkIV and JHead and also I need to spend some time at my real job smile ). I'll give a hand as soon (and as much) as I can!

10

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

I'll do the same, but am in the middle of a week-long project.  Hopefully in a couple of days.
Matt

11

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Cheers all! Keen still for feedback/assistance.

I'm going to spend most of tomorrow I think bashing the code again.. so any input would be awesome smile

12

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Speaking of firmware in another thread.. reminds me...

Its awfully quiet in here.... wink Anyone ?

13

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Have you assigned pins already on the ramps board for the filament alarm? I just got a couple micro switches in that would be perfect.

SD3 w/ mods:
Glass bed with QU-BD heat pad upgrade, threadless ballscrew w/ 8mm smooth rod, spectra line belt replacement, lawsy MK5 extruder, Lawsy replacement carriage, E3D hotend, Ramps 1.4 w/ reprap discount controller, DRV8825 drivers, 12v 30A PS, Acrylic case, Overkill Y-idlers, Filament alarm, Extruder fan + more.

14 (edited by adrian 2013-06-19 05:11:44)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Yeah mate, Digital Pin 53 if you grab the latest bundle from https://github.com/ozadr1an/Solidoodle-Marlin_v1 .

But you'll need to swap the commented entries around - to avoid confusion I'd left the Sang pin as the default define..

53 is the pin right next to the VCC pin in Aux-2.. so a simple double-header socket will work ...
Pin 4 is likewise positioned on the Sang...

If you have better suggestions for unused pins that have convinent access to a VCC rail for use as pull up feel free to throw them out there - but in my mind Aux-2 and the Sang's Aux Pins 'sort of' align, at least mechanically ...

15 (edited by 2n2r5 2013-06-19 07:27:18)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Awesome, thanks!

http://reprap.org/mediawiki/images/c/ca/Arduinomega1-4connectors.png


(I know 53 was a typo) 63 works as would D1 and D57. I think 63 is a good choice.

I (think)am getting rid of my fans and going to small peltier cooling pads. Any chance those 5v pins next to D1 and D 57 could handle 3A max draw? If so I could just use these instead and forget about the mosfets.

http://www.ebay.com/itm/DC-6-2V-6-16W-3 … 0787605300

SD3 w/ mods:
Glass bed with QU-BD heat pad upgrade, threadless ballscrew w/ 8mm smooth rod, spectra line belt replacement, lawsy MK5 extruder, Lawsy replacement carriage, E3D hotend, Ramps 1.4 w/ reprap discount controller, DRV8825 drivers, 12v 30A PS, Acrylic case, Overkill Y-idlers, Filament alarm, Extruder fan + more.

16 (edited by adrian 2013-06-19 09:10:34)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

2n2r5 wrote:

I (think)am getting rid of my fans and going to small peltier cooling pads. Any chance those 5v pins next to D1 and D 57 could handle 3A max draw? If so I could just use these instead and forget about the mosfets.

http://www.ebay.com/itm/DC-6-2V-6-16W-3 … 0787605300

Alas, no. The 5V Rail comes from the MEGA's 5V Rail, which is only good for 800ma max (and shouldn't really be run at that anyway).

Your solution is a *very* simple LM323 or MC78T05 + 2 capacitors circuit to give you a regulated 5V/3A supply from your existing 12V supply... or take the lazy route and run a seperate 5V/3A plug pack.

But...

I'm a big fan (boom-tish) of doing stuff for kicks etc, so don't let me stop you, but for purposes of a sanity check, let me remind you you're trading out about 500ma's for 3A's of energy consumption, and peltiers aren't really that great.. they also have a 'hot-side' for their 'cold-side'... meaning that you risk creating lumps of hot-air in your build zone.  Bang for buck wise, they are also no 'better' than a fan at cooling the stepper.. so you'll burn more power, create hot zones, and really be no better off than having stuck with DC Fans.

If I was seeking a solution to 'i'm drowning in DC Fan Noise' - I'd be simply tackling it through one of 2 easier, existing routes that consume less energy to achieve the same result:
a) get 'silent bearing' fans
b) Move all my fans to share a single PWM control pin and then run them at a slower speed and thus dBa ...

Anyway - don't let the above stop you exploring it.. but I personally feel the tradeoffs vs existing fan solutions isn't worth it. But that is just my opinion.

17 (edited by 2n2r5 2013-06-23 14:10:03)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

{{BUMP}}

Okay, My filament change is doing the same thing that you described. It's kind of disturbing sometimes because my extruder looks like it is possessed. I wish I had taken some video of it because the hobbed gear was going full speed and the carriage looked like it was just floating around my bed.

Have you tried sending a "buffer" command before m600. Maybe something like an endstop check M119 then M600. Would that help hook the command properly?

Forgive my ignorance (I am not a programmer tongue)

SD3 w/ mods:
Glass bed with QU-BD heat pad upgrade, threadless ballscrew w/ 8mm smooth rod, spectra line belt replacement, lawsy MK5 extruder, Lawsy replacement carriage, E3D hotend, Ramps 1.4 w/ reprap discount controller, DRV8825 drivers, 12v 30A PS, Acrylic case, Overkill Y-idlers, Filament alarm, Extruder fan + more.

18

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Yeah, I've got it pretty stable now in a yet-to-be-committed version.. I think I've got it sorted out but I've been fiddling with the carriages etc and need to get it back up and running again to finish it off.

I sort of had but it on the 'bother uploading it when its working perfectly' list as there had been little interest in it for a while. I'll get back onto it in the next day or so.

19

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

I'm interested! was just waiting for the final release.

20 (edited by 2n2r5 2013-06-26 04:17:58)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

http://2n2r5.com/pictures/printer/show-n-tell/filament_alarm.JPG
http://2n2r5.com/pictures/printer/show-n-tell/filament_alarm2.JPG

Awesome job on the code. A couple suggestions, can you have it home X-Y before resuming print. With the motors turned off, it is too easy to knock the extruder out of position. Also, I don't know if it is supposed to trip my keypad buzzer but it doesn't. No big deal.


This system could potentially save me some huge hard-ache. I have 5-6 rolls that are down to only a couple wraps. It would be nice not to have to worry about it running out.

Great work. Can't wait for the final.

Post's attachments

filament_Alarm.stl 139.01 kb, 17 downloads since 2013-06-26 

You don't have the permssions to download the attachments of this post.
SD3 w/ mods:
Glass bed with QU-BD heat pad upgrade, threadless ballscrew w/ 8mm smooth rod, spectra line belt replacement, lawsy MK5 extruder, Lawsy replacement carriage, E3D hotend, Ramps 1.4 w/ reprap discount controller, DRV8825 drivers, 12v 30A PS, Acrylic case, Overkill Y-idlers, Filament alarm, Extruder fan + more.

21

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

Nice setup on the filament switch smile

Moving the extruder should be a non issue - before it releases the head it saves the last print position. an M601 will return it to the correct location - ideally this will be a menu option off the LCD.. and as for Repetier-Host... not sure on how I'll tackle that bit besides the present advice of 'Issue M601 before clicking Continue'.

LCD Buzzer yes, it should work, but I had to tweak some stuff there which has meant its kind of flakey at the moment. In programming terms, the previous Buzzer Code was 'blocking' - not what you want when you are relying on the execution of further code.  It'll be back next upload to GitHub.

22

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

On holidays next week, will test this properly then.

2n2r5, your cable chain sags a lot? Is there a lot of wiggle in your fit between the links or is it because the SD3 has more links?

23 (edited by 2n2r5 2013-06-26 14:22:44)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

One of the tabs broke on my round end adapter. I need to use the other hole anyways which requires me to move some cables. I just haven't felt like rewiring everything.

the tab might have broken because of the weight. I am going to reprint with my black filament. It seems to he a bit more stout and better suited for the application.

SD3 w/ mods:
Glass bed with QU-BD heat pad upgrade, threadless ballscrew w/ 8mm smooth rod, spectra line belt replacement, lawsy MK5 extruder, Lawsy replacement carriage, E3D hotend, Ramps 1.4 w/ reprap discount controller, DRV8825 drivers, 12v 30A PS, Acrylic case, Overkill Y-idlers, Filament alarm, Extruder fan + more.

24 (edited by 2n2r5 2013-06-26 15:08:14)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

adrian wrote:

Nice setup on the filament switch smile

Moving the extruder should be a non issue - before it releases the head it saves the last print position. an M601 will return it to the correct location - ideally this will be a menu option off the LCD.. and as for Repetier-Host... not sure on how I'll tackle that bit besides the present advice of 'Issue M601 before clicking Continue'.

LCD Buzzer yes, it should work, but I had to tweak some stuff there which has meant its kind of flakey at the moment. In programming terms, the previous Buzzer Code was 'blocking' - not what you want when you are relying on the execution of further code.  It'll be back next upload to GitHub.

I thought the "resume print" on the panel was going to issue the M601 command. Face | palm ... Will try again when I get home.

SD3 w/ mods:
Glass bed with QU-BD heat pad upgrade, threadless ballscrew w/ 8mm smooth rod, spectra line belt replacement, lawsy MK5 extruder, Lawsy replacement carriage, E3D hotend, Ramps 1.4 w/ reprap discount controller, DRV8825 drivers, 12v 30A PS, Acrylic case, Overkill Y-idlers, Filament alarm, Extruder fan + more.

25 (edited by adrian 2013-06-26 15:30:18)

Re: Beta of updated firmware, improved Pause/Filament Chg, etc

2n2r5 wrote:

I thought the "resume print" on the panel was going to issue the M601 command. Face | palm ... Will try again when I get home.

It should, I'll have to recheck the code I previously committed. But thats what it does *now* anyway wink I was referring more to what needs to be done via Repetier (if you don't have an LCD Panel....). But yes, "Resume Print" should do what it says on the Box big_smile

I need to cleanup some stuff, and I'll re-commit what I have now anyway in the next day or so. Come the weekend, I'll pull my finger out and finish it off... I was planning on doing the hot-end shootout, but since I no longer have a Solidoodle OEM hotend, its probably greatly diminished in immediate relevance and it seems the firmware is now more relevant to more people smile