Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTIONS] [bugfix-2.0.x] Trying to use Marlin with GTM32 PRO VB #12622

Closed
AluOne opened this issue Dec 10, 2018 · 30 comments
Closed

[QUESTIONS] [bugfix-2.0.x] Trying to use Marlin with GTM32 PRO VB #12622

AluOne opened this issue Dec 10, 2018 · 30 comments
Labels
T: Development Makefiles, PlatformIO, Python scripts, etc. T: Question Questions, generally redirected to other groups.

Comments

@AluOne
Copy link

AluOne commented Dec 10, 2018

Hello,
after some small compiler errors I can build Marlin.
( SINGLENOZZLE_SWAP_LENGTH is now TOOLCHANGE_FIL_SWAP_LENGTH
, IWatchdog.h: No such file or directory
,SERIAL_PORT_2 is not supported for your MOTHERBOARD)

Marlin started with EEPROM version mismatch.

< 17:34:50: start

17:34:50: N1 M110 *2
< 17:34:50: echo:PowerUp
17:34:50: N2 M110 *1
< 17:34:50: Marlin bugfix-2.0.x
17:34:50: N3 M115 *5
< 17:34:50: echo: Last Updated: 2018-01-20 | Author: (none, default config)
< 17:34:50: echo:Compiled: Dec 10 2018
< 17:34:50: echo: Free Memory: 49319 PlannerBufferBytes: 1408
< 17:34:50: echo:EEPROM version mismatch (EEPROM= Marlin=V63)
< 17:34:50: echo:Hardcoded Default Settings Loaded
17:34:54: N5 M111 S6 *66
17:34:54: N6 M111 S7 *64
< 17:34:54: FIRMWARE_NAME:Marlin bugfix-2.0.x (Github) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Rostock 301 P4 EXTRUDER_COUNT:3 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
< 17:34:54: Cap:SERIAL_XON_XOFF:0
< 17:34:54: Cap:EEPROM:1
< 17:34:54: Cap:VOLUMETRIC:1
< 17:34:54: Cap:AUTOREPORT_TEMP:1
< 17:34:54: Cap:PROGRESS:0
< 17:34:54: Cap:PRINT_JOB:1
< 17:34:54: Cap:AUTOLEVEL:1
< 17:34:54: Cap:Z_PROBE:1
< 17:34:54: Cap:LEVELING_DATA:1
< 17:34:54: Cap:BUILD_PERCENT:0
< 17:34:54: Cap:SOFTWARE_POWER:0
< 17:34:54: Cap:TOGGLE_LIGHTS:0
< 17:34:54: Cap:CASE_LIGHT_BRIGHTNESS:0
< 17:34:54: Cap:EMERGENCY_PARSER:0
< 17:34:54: Cap:AUTOREPORT_SD_STATUS:0
< 17:34:54: Cap:THERMAL_PROTECTION:1
< 17:34:54: Cap:MOTION_MODES:0
< 17:34:54: echo:DEBUG:INFO,ERRORS
< 17:34:54: echo:DEBUG:ECHO,INFO,ERRORS

Than homing G28 only the motor X and Z are working. Y does not work.
Sometimes only the X motor is working.
The home procedure breaks by „Error:Printer halted. kill() called!“.
After that I reinstalled the Geeetech firmware to see if all motors are working
and the homing works with three motors.

18:47:12: N10 G28 *2
< 18:47:12: echo:N10 G28 *2
< 18:47:12: >>> G28 begin
< 18:47:12: >>> G28 delta begin
< 18:47:12: >>> home_delta begin
< 18:47:12: >>> home_delta homeaxis
< 18:47:12: >>> homeaxis(X)
< 18:47:12: Home 1 Fast:
< 18:47:12: Move Away:
< 18:47:13: Home 2 Slow:
< 18:47:33: Error:Printer halted. kill() called!

Any ideas what to do?
config.zip

@AluOne
Copy link
Author

AluOne commented Dec 11, 2018

Now I have written a small program that controls the motors individually and also there goes only the X motor.
Does anyone have the board running?

@AluOne
Copy link
Author

AluOne commented Dec 12, 2018

Now it's a little clearer. X and Z motor worked but Y does not make a step. If I push the Y limit switch by hand, then the homing runs through.
Because in my own program the Z motor didn't work but with Marlin.
Is there a special initialization for the motors except digitalWrite(Y_EN, LOW); ?

@AluOne
Copy link
Author

AluOne commented Dec 16, 2018

The solution can be found hear.
[https://github.com//pull/10898]

@boelle
Copy link
Contributor

boelle commented Feb 21, 2019

@AluOne submit an PR to bugfix 2.0

@boelle
Copy link
Contributor

boelle commented Mar 6, 2019

@thinkyhead i think we can close this one

@AluOne
Copy link
Author

AluOne commented Mar 27, 2019

I think there have been no changes yet and we shouldn't close the call.
The main problem is still the eeprom.
I can't save any settings.
Is there a user who can work with the current version on the Rostock 301?

start
18:32:51.528 -> echo:PowerUp
18:32:51.528 -> Marlin bugfix-2.0.x
18:32:51.528 ->
18:32:51.528 -> echo: Last Updated: 2018-01-20 | Author: (Alu One, default config)
18:32:51.528 -> echo:Compiled: Mar 27 2019
18:32:51.528 -> echo: Free Memory: 49463 PlannerBufferBytes: 1408
18:32:51.528 -> echo:EEPROM version mismatch (EEPROM= Marlin=V63)
18:32:51.528 -> echo:Hardcoded Default Settings Loaded

@Phr3d13
Copy link
Contributor

Phr3d13 commented May 17, 2019

Nope, I can't get a fully working build on my Rostock 301 either.

@AluOne
Copy link
Author

AluOne commented Jun 3, 2019

Today I took a new test:

First after download the new version I copied the configuration header,
than compiled with Anduino 1.8.9.

fatal error: IWatchdog.h: No such file or directory

If I delete the directory HAL_STM32 I can compile to the next error.

#warning "SERIAL_USB is not set!"
#error "Serial port 0 does not exist"

I can fix it in HAL.h with #define MYSERIAL0 MSerial1 in line 81
With these changes I get a binary that I can write to the GTM32 PRO board.
After booting I get the problem with EEPROM and SD card.
With M500 I can save without a message but after booting I get the same error.

17:59:54.203 -> start
17:59:54.203 -> echo:PowerUp
17:59:54.203 -> Marlin bugfix-2.0.x
17:59:54.203 ->
17:59:54.203 -> echo: Last Updated: 2018-01-20 | Author: (none, default config)
17:59:54.203 -> echo:Compiled: Jun 3 2019
17:59:54.203 -> echo: Free Memory: 50295 PlannerBufferBytes: 1408
17:59:57.381 -> echo:EEPROM version mismatch (EEPROM= Marlin=V67)
17:59:57.381 -> echo:Hardcoded Default Settings Loaded
18:00:00.147 -> echo:SD init fail
18:00:02.214 -> echo:SD init fail

It's a pity that no developer has the board or the printer.
Marlin is so much better than the original firmware but with my means I just can't get it to work.

@Phr3d13
Copy link
Contributor

Phr3d13 commented Jun 10, 2019

Using this set of configs and the tip above about removing the HAL_STM32 folder, I was able to get SD reading working, but SD writing is failing silently also causing SD EEPROM to fail (pretty sure that's the fallback option when EEPROM is enabled, but no EEPROM type is setup (SPI, I2C, SRAM)). Most other things appear to be working, LCD, SD detect, SD read, axis steppers, endstops, thermistors work (but readings are wrong), and heaters work. Fans don't appear to work either.
Rostock 301 configs test.zip

@Phr3d13
Copy link
Contributor

Phr3d13 commented Jun 10, 2019

I tested writing to the SD via another method (octopi instead of Simplify3D) and SD writing appears to work. I don't know why EEPROM on SD isn't working any more, I've tried explicitly defining it, I've tried letting it be the thing that gets enabled because nothing else is. But apparently the SD can be read from and written to.

@Phr3d13
Copy link
Contributor

Phr3d13 commented Jun 10, 2019

Further testing, the eeprom.dat file is being written to the SD card, it isn't being read when the machine starts. Always:

09:03:05.241 : echo:EEPROM version mismatch (EEPROM= Marlin=V67)
09:03:05.241 : echo:Hardcoded Default Settings Loaded

@Phr3d13
Copy link
Contributor

Phr3d13 commented Jun 10, 2019

Have a PR submitted to get EEPROM working from SD reliably. Thanks to some help from Pinchies. Two small hurdles left: fans and temps.

@AluOne
Copy link
Author

AluOne commented Jun 12, 2019

Nice to read about the next steps. I have tested your version (PR) and I can read and write to the SD card. I think it would be nice if we could access directly to the EEPROM.
I compiled now with platformio and there are no modifications needed.

@AluOne
Copy link
Author

AluOne commented Jun 13, 2019

I tested my own temperature table(thermistor_1.h) with the values from Geeetech Repository. The values are displayed correctly up to 70 degrees. But I need a correction factor and get negative values. How can I avoid this?

const short [][2] PROGMEM = { { OV( 1664-2930), 120 }, { OV( 1801-2930), 115 }, { OV( 1943-2930), 110 }, { OV( 2090-2930), 105 }, { OV( 2239-2930), 100 }, { OV( 2389-2930), 95 }, { OV( 2538-2930), 90 }, { OV( 2686-2930), 85 }, { OV( 2829-2930), 80 }, { OV( 2968-2930), 75 }, { OV( 3124-2930), 70 }, { OV( 3246-2930), 65 }, { OV( 3358-2930), 60 }, { OV( 3461-2930), 55 }, { OV( 3554-2930), 50 }, { OV( 3653-2930), 45 }, { OV( 3738-2930), 40 }, { OV( 3810-2930), 35 }, { OV( 3870-2930), 30 }, { OV( 3912-2930), 25 }, { OV( 3948-2930), 20 }, { OV( 3977-2930), 15 }, { OV( 4002-2930), 10 }, { OV( 4022-2930), 5 }, { OV( 4038-2930), 0 }, };

@AnHardt
Copy link
Contributor

AnHardt commented Jun 13, 2019

Something in your circuit seems to be seriously wrong - if it produces voltages below GND level. The ADCs will not measure that but will be destroyed.

@AluOne
Copy link
Author

AluOne commented Jun 13, 2019

Thank you for the note. The circuit is I think quite ok. The correction value was only for testing to display the values (I have no debugger). I have a version from December that shows the temperatures correctly, but since then a lot has happened in temperature.cpp.

@rohklich
Copy link

Hi,
I want to get Geeetech's GTM32 PRO VD to work with marlin. With changed config and new added pins file it compiles without any hacking so far. Although, it's a somewhat different board, I think I will run into similar problems as you soon.
But I don't want to start experimenting until I know, that I could go back to a working smartto version.
@AluOne Did you try or had any difficulties on flashing back geeetech's stock firmware? I have managed to read out a bin-file via st-link from the board, can i flash this back in case anything goes wrong?

@Phr3d13
Copy link
Contributor

Phr3d13 commented Jun 15, 2019

I have the bootloader for the pro VB board, and a method to get my Rostock 301 back to stock. I'm sure with the bootloader and method I have and the firmware you have, we should be able to get you back to a stock state.

@AluOne
Copy link
Author

AluOne commented Jun 15, 2019

If I want to use the firmware from Geeetech, I use the tool "STM32 ST-Link Utility" from ST with a simple ST-Link dongle. First I write the bootloader from Geeetech and then I'll take Hyperterm to upload the firmware (described in Geeetechs forum). With the bootloader from @Phr3d13 I think you can save some work.

@rohklich
Copy link

Where can I get the bootloader? And am I correct, if I assume you both talk about different bootloaders?
I planned to burn the firmware with a st-link dongle and stm's flash loader demonstrator. Does the smartto FW always depend on a bootloader? I hoped it was only to work with their FW-update tool.
@AluOne do you have a specific reason for using the st-link dongle just for the bootloader but burn the FW with Hyperterm?(via serial?)
Once I have a safe method to get back to stock, I can go further than examining the hardware. I collect what I learn here if you want to take a look.

@boelle
Copy link
Contributor

boelle commented Jun 22, 2019

@AluOne is this one solved?

@AluOne
Copy link
Author

AluOne commented Jun 23, 2019

Unfortunately Marlin is not running with the GTM32 PRO Board yet. But we have made great progress. One of the last things is temperature control.
@boelle Maybe you can help us with that. With the correct therministor table at 20 degrees air temperature -1 degrees are displayed. If I hold my finger on the resistor, 17 degrees are displayed.
What settings can we change here?

@boelle
Copy link
Contributor

boelle commented Jun 23, 2019

i have no idea, i'm not a coder but just a concerned 3rd party

thought things looked solved and was just curious

@AluOne
Copy link
Author

AluOne commented Jun 23, 2019

Maybe @AnHardt can give us a hint in which direction we should search?
This is the thermistor table.

@AnHardt
Copy link
Contributor

AnHardt commented Jun 23, 2019

With the correct therministor table at 20 degrees air temperature -1 degrees are displayed. If I hold my finger on the resistor, 17 degrees are displayed.

Correct? Obviously not - else you'd get the right temperatures.
If the linked table should be the right one you don't have to replace Marlins table 1. Just use Marlins 11. Should be for the same sensor.

If that still shows wrong temperatures, check if the pullup resistor on the used ADC pin is really 4.7KOhm. But everything else would be a surprise.

How to make a custom table is common knowledge. Just search for that.

@AluOne
Copy link
Author

AluOne commented Jun 24, 2019

Thanks for the good advice.
With table no. 11 I get a value of - 10 at 20 degrees.
Looks like the table or something else is wrong.
If I adjust the values manually, I get sweeping values:

{ OV(921), 40}, { OV(931), 38}, { OV(941), 37}, { OV(951), 35}, { OV(961), 33}, { OV(971), 32}, { OV(981), 29}, { OV(991), 27}, { OV(1001), 25}, { OV(1011), 20},

The vote does not match any table.
Is it possible to determine the remaining values from the determined values?
hotbed
The pullup resistor seems to be 4.7 K, but I didn't measure.

@AluOne
Copy link
Author

AluOne commented Jul 1, 2019

Now I have created 2 new temperature tables for the sensors. At the bed I measured directly next to the sensor. On the aluminum plate the temperature does not arrive. At the hotend I measured at the top.
I have measured for the nozzle up to 200 C degrees for the bed up to 120 degrees
It would be great if someone could test the files on his Rostock 301.
Changes in configuration.h:

#define TEMP_SENSOR_0 21
#define TEMP_SENSOR_BED 22

Changes in thermistors.h:
#if ANY_THERMISTOR_IS(21)
#include "thermistor_21.h"
#endif
#if ANY_THERMISTOR_IS(22)
#include "thermistor_22.h"
#endif

thermistor.zip

@shitcreek shitcreek added the T: Development Makefiles, PlatformIO, Python scripts, etc. label Jul 11, 2019
@boelle boelle changed the title [bugfix-2.0.x] Trying to use Marlin with GTM32 PRO VB [QUESTIONS] [bugfix-2.0.x] Trying to use Marlin with GTM32 PRO VB Oct 24, 2019
@boelle boelle added the T: Question Questions, generally redirected to other groups. label Oct 24, 2019
@boelle
Copy link
Contributor

boelle commented Oct 24, 2019

will close this one as it mostly seems to be about creating a custom table

if its about adding suport for a new board a [FR] should be created instead

we can alway reopen if i got it wrong and this is a bug

@boelle boelle closed this as completed Oct 24, 2019
@chepo92
Copy link
Contributor

chepo92 commented Apr 29, 2020

#if ANY_THERMISTOR_IS(21)
#include "thermistor_21.h"
#endif
#if ANY_THERMISTOR_IS(22)
#include "thermistor_22.h"
#endif

This improved thermistor readings a lot!, , I'm checking with a multimeter and values are very close in my 301.
@AluOne would you PR those tables?, at this time there is already a thermistor 21 file

@github-actions
Copy link

github-actions bot commented Jul 2, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: Development Makefiles, PlatformIO, Python scripts, etc. T: Question Questions, generally redirected to other groups.
Projects
None yet
Development

No branches or pull requests

7 participants