Welcome! Log In Create A New Profile

Advanced

Updated Marlin customized for Mendel90

Posted by neildarlow 
Re: Updated Marlin customized for Mendel90
March 21, 2015 05:56PM
Hi Neil,

I checked the Preferences in Arduino :

Sketchbook Location is : C:\Users\D4RK1\Documents\Arduino so I´d say it´s the same. The folder locations above I directly copied from the adress field of my explorer ... which would suggest that Windows uses the right folder. It´s a little weird, because when I choose File --> Sketchbook it shows the Marlin and it shows libraries under which I can find the LiquidTWI, why isn´t the Board part working......

I downloaded your ZIP a second time and used the "fresh" files in case I somehow lost something, but didn´t help either...

Jens
Re: Updated Marlin customized for Mendel90
March 22, 2015 05:17AM
Hi,

Are you using arduino-1.0.6? If you are using arduino-1.5.x I would expect problems because the format of boards.text has changed to support the use of 8 and 32 bit targets.

I recall the hardware folders having sub-folders relating to variants and core, have you copied them also because boards.text makes use of their contents.

The whole Arduino thing can be a PITA and I believe that users should not need to build firmware themselves. All configuration that needs to be modified should reside in EEPROM and be managed through the host.

Regards,
Neil Darlow


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
March 22, 2015 05:57AM
I am using the most recent version available, which is 1.6.1

I did what was mentioned in the steps in post #1, copied the respective folders including their contents to the specified locations, other folders I left untouched. Do I need to copy additional folders or do I need to get my hands on a 1.0.6 version of Arduino?
Re: Updated Marlin customized for Mendel90
March 22, 2015 02:21PM
Yes, use the latest 1.0.x version. Versions 1.5.x and later support both 8 bit and 32 bit targets but the format and the layout of hardware and library folder contents has changed.

This will be the cause of not seeing the Melzi in the boards selection list. I did actually think this might be the problem a while back but forgot to mention it.

Regards,
Neil Darlow

Edited 2 time(s). Last edit at 03/22/2015 02:22PM by neildarlow.


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
March 22, 2015 02:27PM
Maybe you should add a hint in post #1 about the Arduino version range... so far it just says >= 1.0.1 ... that would include 1.6.x as well.

Thank you very much for your patience =)....and of course the work you have done on the firmware itself!

P.S. : and it´s finally working =)

Edited 1 time(s). Last edit at 03/22/2015 02:57PM by D4RK1.
Re: Updated Marlin customized for Mendel90
March 22, 2015 03:00PM
That would be useful. Unfortunately there is a time limit after which an author cannot edit his posts.

I need to update my Marlin repository to synchronise with the new upstream repository and I will add support for newer versions of Arduino at the same time.

nophead will also be able to take those changes for his fork so we do not have to keep visiting this topic again.


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
March 24, 2015 04:19PM
I have tried 1.0.1 and 1.0.6 (following the instructions in post 1) but get the following error, solution anyone?


In file included from Wire.cpp:25:
/Wire.h:30:21: error: variant.h: No such file or directory
In file included from Wire.cpp:25:
Wire.h:36: error: expected `)' before '*' token
Wire.h:90: error: ISO C++ forbids declaration of 'Twi' with no type
Wire.h:90: error: expected ';' before '*' token
Wire.cpp:27: error: 'TWI_FailedAcknowledge' declared as an 'inline' variable
Wire.cpp:27: error: 'Twi' was not declared in this scope
Wire.cpp:27: error: 'pTwi' was not declared in this scope
Wire.cpp:27: error: expected ',' or ';' before '{' token
Wire.cpp:31: error: 'TWI_WaitTransferComplete' declared as an 'inline' variable
Wire.cpp:31: error: 'Twi' was not declared in this scope
Wire.cpp:31: error: '_twi' was not declared in this scope
Wire.cpp:31: error: expected primary-expression before '_timeout'
Wire.cpp:31: error: initializer expression list treated as compound expression
Wire.cpp:31: error: expected ',' or ';' before '{' token
Re: Updated Marlin customized for Mendel90
March 24, 2015 04:59PM
Have you copied the LiquidTWI2 folder from the zipfile to the ...\Documents\Arduino\libraries folder correctly? There appears to be something wrong in that area.

Edited 1 time(s). Last edit at 03/24/2015 05:06PM by neildarlow.


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
March 24, 2015 05:06PM
5 hours in i tried copying nopheads version back in, a bunch of errors occured. Extracted the nophead ZIP again and got his version to compile. Back to your version and suddenly it worked after replacing all of the ZIP folders with fresh ones, most likely there had been some old file left behind or something wrong with the folder structure. Thanks for the quick response!
Re: Updated Marlin customized for Mendel90
April 19, 2015 04:14PM
Hi All,

This update (19-04-2015) incorporates nophead's fix to correct an acceleration limiting factor. Not having this fix is only likely to affect anyone using a higher than default retraction speed.

NOTE: This firmware is not from the MarlinFirmware repository. Users of that firmware should note that this fix has been merged into the Development branch and you may update your firmware from there.

Regards,
Neil Darlow

Edited 1 time(s). Last edit at 04/19/2015 04:30PM by neildarlow.


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
April 19, 2015 09:10PM
Actually it does have an effect at any speed with acceleration > 3500. Without the fix it accelerates far too slowly and then jumps instantaneously to the target speed causing the extruder to jerk unnecessarily during retraction and fast forward. With the default Mendel90 settings it will now be smoother and also allow higher retract speeds.


[www.hydraraptor.blogspot.com]
Re: Updated Marlin customized for Mendel90
April 20, 2015 03:12AM
Hi,

My note was factually incomplete. The default acceleration for X and Y is 2000 so for anyone using the standard speed settings there is no immediate need to update (or switch from nophead's firmware).

Smoother acceleration and faster retraction speed offer the potential for higher quality prints and I look forward to seeing what this fix brings in this respect.

Regards,
Neil Darlow


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
April 20, 2015 05:04AM
The bug is actually when steps_per_mm * acceleration > 2,000,000, so it only affects the extruder due to the high steps and high acceleration combination.


[www.hydraraptor.blogspot.com]
Re: Updated Marlin customized for Mendel90
August 26, 2015 12:35PM
Hi,

I tried to compile the Marlin version from neildarlow for RAMPS 1.4 with Arduino MEGA 2560 and RepRapDiscount Full Graphic Smart Controller in Arduino 1.6.5 on OS X Yosemite and get the following error:

ultralcd.cpp: In function 'void lcd_buzz(long int, uint16_t)':
ultralcd.cpp:1487: error: 'lcd' was not declared in this scope
lcd.buzz(duration,freq);
^
'lcd' was not declared in this scope

I uncommented this line: #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

I included the libraries LiquidTWI2 and U8glib.

Can anyone help me?

Regards
Robert
Re: Updated Marlin customized for Mendel90
August 29, 2015 03:02AM
Hi,

I have not looked at the code for that display type. Does it actually use the LiquidTWI2 library?

I am currently on holiday and away from a suitably large screen and keyboard but if you can wait a few days I will take a look at what is happening.

Regards,
Neil Darlow


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
November 26, 2015 03:18AM
Hi Neil,

tried to upload your Firmware but i got an error and dont know why.



Best regards Peter
Re: Updated Marlin customized for Mendel90
November 26, 2015 08:30AM
Hi,

Are you using a version of Arduino after 1.0.6? Newer versions have problems with this legacy code because they use newer avr-gcc than the code was written for.

Another possibility is an edit to a configuration file is syntactically incorrect and it gets caught later in the compile.

Regards,
Neil Darlow

Edited 1 time(s). Last edit at 11/26/2015 08:32AM by neildarlow.


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
November 26, 2015 02:15PM
Hi Neil,

i am using Arduino 1.0.1 as you can see on my screenshot. I installed everything again and tried it again and guess what - IT WORKS!!!!smileys with beer
You are my Hero of the day, i was working on that for a long time. Thank you so much!

Regards
Peter
Re: Updated Marlin customized for Mendel90
December 13, 2015 06:54AM
Hi,

I'm trying to add z-probe on my Mendel90.
The probe is a "Capacitive Proximity Switch" and on the bed I replaced the glass whit 4mm aluminum, so the probe can detect it.
It's mounted using this holder: [www.thingiverse.com]

So far so good. If I understand correctly, it should work using this firmware like normal switch but without the servo, but....
I cant find the information on which pin of those 10 available on the side of Melzl board, do I need to connect it on(using proper resistors of course)

Could some one point me to the correct pin?
Re: Updated Marlin customized for Mendel90
December 13, 2015 03:30PM
If you get the Melzi circuit schematic from the reprap.org wiki you can determine which pin to use.

The port associated with P27 has a LED attached to it so that one is not available. If you have the chassis fan fitted you may have used the port associated with P28 for that.

There are two more ports available if you are not using a Panelolu2 or other I2C-interfaced LCD panel. You will need to determine which to use for yourself.


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
December 13, 2015 04:51PM
But where in the code, do I define the probe port?
Re: Updated Marlin customized for Mendel90
December 14, 2015 05:47AM
It is not obvious but the auto bed levelling feature uses the port assigned to Z_MIN_PIN in pins.h.

For a standard Mendel90, which homes upwards, this will not be already defined. You will need to assign the required pin.


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
December 16, 2015 03:56PM
Still no luck. sad smiley

I did this:
[pins.h]
Under line 1208: #ifdef MELZI
commented out line 1210: //#define FAN_PIN 4
added line: #define Z_MIN_PIN 4
I do use fan, but I did this just to make for simpler first testing.

[Configuration.h]
uncommented line 399: #define ENABLE_AUTO_BED_LEVELING


But when I run compile I get:
#error "You must have a Z_MIN endstop in order to enable Auto bed Leveling feature!!! Z_MIN_PIN must point to a valid hardware pin."

It's like somewhere down the code it's resetting the Z_MIN_PIN (the DISABLE_MIN_ENDPOINTS are commented out), but for now I didn't found it where.
Re: Updated Marlin customized for Mendel90
December 16, 2015 05:10PM
My guess is that you set the pin under the wrong motherboard stanza. You need to follow the motherboard definition from Configuration.h into pins.h and locate which one to change.


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Updated Marlin customized for Mendel90
January 20, 2016 12:54PM
Quote
neildarlow
It is not obvious but the auto bed levelling feature uses the port assigned to Z_MIN_PIN in pins.h.

For a standard Mendel90, which homes upwards, this will not be already defined. You will need to assign the required pin.

Hi, read the whole day for finding the right pin to connect my z-probe with your firmware. I have a nophead mendel 90 with the melzi board. I connected a bed fan to the board like shown here

[blog.seidel-philipp.de]

As you stated before i have to define z_pin_min in pins.h. So i looked into Configuration.h. Melzi is board 63. In your pins.h melzi definitions are from line 1207 to 1210.
So i looked into the pinout from JP16 in the melzi cuircuit from here [reprap.org].
Which is the correct number to use for the z-probe. I dont understand the connection from the pin number on the cuircuit to the pin number i have to define.

So for example. If i want to connect the Z-probe to JP16- Pin 2 (FXT A1), what is the corresponding line to add to pins.h

Thx
Wolfgang
Re: Updated Marlin customized for Mendel90
January 20, 2016 02:02PM
Damn, I forgot to post.
I got my Z-probe working & also kept homing up not down on my nophead mendel 90.
I'll post the minimal changed source and HW details tomorrow about the same time. (It's on a laptop, currently in office)
My mod on Updated Marlin customized for Mendel90
January 22, 2016 03:50PM
If I didn't forget something, those are my steps:

0. Bed is from 214mm x 202mm x 3mm aluminum (from www.plocevine.si) - same dimensions and mounting as original glass from nophead

1. Sensor is "LJ12A3-4-Z/BX Inductive Proximity Sensor Switch NPN DC6-36V" from ebay seller "gameszone.no1"


2. The small PCB on the head is little customized.

2.1 Drilled a 3. hole and inserted single pin from pin header
2.2 Used resistors: 2x serial 100ohm(=200ohm) 1x 330ohm
2.3 Used hot glue for securing and isolating
*On the picture you can see that I cut a trace but that was only my mistake.
!! test using a voltmeter before connecting the pin to the board !!



3. I had some problems installing some Arduino dependency for board on Ubuntu, so I used Win10 32x & Arduino 1.0.1 (from nophead SD card)

4. Reset the board(little button on the board) before uploading - This stupid thing took me few days confused smiley, because I turned printer on, and at upload I got some generic error.

In the code I needed to:
- define the sensor pin
- changed it so that it still homes UP
- the Z0 is on the board (don't forget to change your sensor distance from nozzle)
- the X0 Y0 is in one of the corners (when in center the calibration goes nuts )
- LCD is disabled because it used to much ROM

/*
*that little red board on the photo connected to the board using yellow cable is a "IRF520 MOS FET Driver" for bed collying fan.
*because of the aluminum my bed temperature is 10°C lower than using glass, For ABS I use UHU stick, and for PLA nothing.
*It works great, only the print speed had to be dropped or it did skip steps on XY
*My extruder is E3Dv6
*Sensor holder: [www.thingiverse.com]
*/


My starting G-code using Slic3r:

M106 ; extruder fan on, to stop oozing from last print
G28 ; home all axes
G1 X110 Y140 F9000 ; move X Y fast on the center
G1 Z50 ; move Z closer to the bed, to reduce waiting time
M106 S0 ; extruder fan off
M42 P29 S0; bed fan off


M190 S[first_layer_bed_temperature] ; bed on[first_layer_bed_temperature] degree and wait till it it reaches

G29 ;perform bed calibration

M104 S[first_layer_temperature] ; set extruder on [first_layer_temperature]

G1 Z5 ; - those lines below still aren't optimal
G1 X30 Y0
G1 Z0 ; nozzle on the bed, to prevent oozing
M109 S[first_layer_temperature] ; wait extruder to reach [first_layer_temperature]

G1 Z0.3 ; Up a little bit
G92 E0 ;set Extruder coordinate 0
G1 X100 E5 F100 ; move 100mm and extrude 5mm at speed 100 
G1 Z2 ; tare off

Hope it helps a little bit.

Greetings,
Miha

Edited 1 time(s). Last edit at 01/22/2016 03:50PM by miharix.
Attachments:
open | download - Marlin-Marlin_v1_Mendel90_miharix.7z.002 (341.7 KB)
open | download - Marlin-Marlin_v1_Mendel90_miharix.7z.001 (614.4 KB)
Re: Updated Marlin customized for Mendel90
January 23, 2016 11:48AM
Thank you for the detailed description.

I have still some questions to that.

I see that you connected the Z-Probe to JP16 Pin 2 (i.e. EXT A1)

In pins.h you added

#define Z_MIN_PIN 30
#define Z_STOP_PIN 20
#define Z_MAX_PIN 20

Where are those numbers (20,30) from. Is there a table like EXT-A1 on a melzi is pin Arduino Pin 30 ?

Is it really neccessary to change X0 and Y0 Postion. I have 100 gcode files that are obselete if i change that.

Wolfgang
Re: Updated Marlin customized for Mendel90
January 23, 2016 02:22PM
If I remember correctly, I was looking at the schematic reading the existing code and g-code and test my predictions by simply changing an existing end stop pin, and then checking the endstops status ( M119 ).

I'll think the EXT-A2 is A.pin 29 EXT-A3 is 28, and EXT-A4 is 27
Because the M42 P29 S255 is the gcode command that activates my bed fan (pin under Z_MIN_PIN)

Changing X0 Y0 probably isn't necessary, but I didn't experiment to long after
I found that after G29 I simply couldn't move to negative coordinates, but positive did go till bed dimensions.
For me it didn't make much difference, because the new bed material and thickness did require new gcodes.
Also most prints I do generate gcode before printing (stl/stl-s->Slic3r(position->select material...->send to printer)->RsPi+octoprint load & print )
Re: Updated Marlin customized for Mendel90
January 24, 2016 06:35AM
Thank you again;
Now thinks are getting clearer smiling smiley

I found the definitions of port number in fastio.h

I will experiment a bit, when my sensor arrived.

Wolfgang
Sorry, only registered users may post in this forum.

Click here to login