Go Down

Topic: ATmega1284p-pu Avrdude.conf stk500v2 Baudrate signature byte upload problem (Read 2117 times) previous topic - next topic


Well the Global variables line is just two lines before the end of the compiling and the upload of the Marlin firmware. I don't think I'm going to be fast enough to press that reset button, I'm old dude.
The timing doesn't need to be exact. The most important thing is to not reset the board while the compilation is still running. The reason is that the bootloader is only activated for a short amount of time and so if you do it too soon it will have already exited the bootloader by the time the upload attempt starts.

If you're happy with burning the bootloader every time, that's fine too.

Also when uploading a sketch to the Gen7 1.5v board through the MCP2200 chip I should set the Arduino IDE programmer to AVRISP MKII or to AVRISP?
The Tools > Programmer menu selection only matters when you are doing a Tools > Burn Bootloader or a Sketch > Upload Using Programmer. For a standard upload, it makes no difference which programmer you have selected.


Hi Pert,
Okay I'm have a problem with the z-axis stepper motors they sounds like a diesel truck and runs rough. I don't have anything attached to the z-axis motors it just keeps running rough. I tried turn the zjerk up and it helps a little.

Code: [Select]
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 5, 5, 150, 500 }

#define DEFAULT_MAX_FEEDRATE          { 300, 300, 1, 25 }

#define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 500, 10000 }

#define DEFAULT_ACCELERATION          100    // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION  1000    // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION   100    // X, Y, Z acceleration for travel (non printing) moves

#define DEFAULT_XJERK                 10.0
#define DEFAULT_YJERK                 10.0
#define DEFAULT_ZJERK                  5.0
#define DEFAULT_EJERK                  5.0

Sorry were having a thunder storm so have to make it short.
Thank you Kenn.


The stepper motors I'm using are from 2 old Beckman (Epsom) Dot Matrix printers they are Astyrosyn 17PS-C026-02. I can't find any datasheets on them but they look just like Nema 17's.

The x-axis and y-axis move and sound fine.

I attach a old picture of my Mendel90 so you can see the motors.

Thank you, Kenn.


It sounds like you got a successful upload of Marlin at least, so congratulations about that!

I don't have any experience with 3D printers at all. For 3D printer-specific questions, you will probably be better off using a different forum.

My experience with stepper motors is that usually the symptoms you describe are caused by sending pulses to the motor too quickly, resulting in missed steps. You need to experimentally determine the minimum pulse interval for your particular setup. If you set it too low, you get this sort of problem. If you set it too high, then the stepper can't achieve it's maximum speed. How to do this in Marlin, I have no idea.


Hi Pert, thank you for the reply.

How do you successfully repair the firmware without ever operates the device? That's pretty awesome.

I have uploaded both bootloader and the Marlin firmware about 20 times or more now through the Arduino Uno. With no errors from the software only from human error.

I have looked at other forums but didn't see what I was exactly looking for only hints to what I could try. I did try some of them but it didn't fix the problem.

I believe the line:
Code: [Select]

#define DEFAULT_MAX_FEEDRATE          { 300, 300, 1, 25 }

Is the minimum pulse interval and why I have the z-axis motors set to 1. I have tried setting the 1 to other values but the z-axis seems to like the low setting.

I think people forget that the z-axis has two motors connected to one driver board. Plus I might be getting feedback from the other z-axis motor. Maybe I should try putting a ferrite core on the z-axis lines to smooth out the signal.

Any way I'll keep trying .

Thank you, Kenn.


It is a bit funny that I've made contributions to Marlin and helped people to update the firmware on their 3D printers, yet never used a 3D printer (nor even seen one in real life). I think a 3D printer would be something very interesting to work with, but I haven't succumbed to buying one yet.


Hi Pert, thank you for the reply.

Well I figured out what the problem was. The motors I have for the z-axis are to low in torque for directly driving the 5/16" threaded rod to lift the y-axis.

The other thing is I can't find in any of the RepRap Mendel90 documentation or on the RepRap forum were it states "you need a stepper motor with minimal X-torque" to drive a 5/16" or 8mm threaded rod. If they had only put something in the documentation it would have save everyone a lot of time.

I did find a web page with a calculator that was last edited in Dec 2018.


Because of the low torque motors it really didn't mater what setting I put in the Marlin firmware or how high I raised the current. They were just never going to turn the all thread correctly.

My only saving grace is that I have the two original chassis from the Beckman dot matrix printers, that have the original set of 4cm gears to drive the paper feeder roller. I will use the gears and chassis to make a gear box for the stepper motors to drive the 5/16" all thread.

So my first redesign. This is why I like building things, I learn the knowledge and to me that's priceless.

Thank you, Kenn.


I'm glad you found the cause. It's unfortunate that you had to do a redesign but, with my projects at least, that does seem to be the normal course of events.


Hi Pert,

Okay I cut the section off the old Beckman dot matrix printer chassis to use the two 4mm gear from the paper feed roller assembly. I cut the end section off the roller and used it as a shaft that goes through the one 4mm gear and turns the 5/16 all thread. See attach photo.

Now this worked to turn the all thread but goes kind of slow. I set the functions in Marlin to this:

Code: [Select]
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 5, 5, 500, 500 }

#define DEFAULT_MAX_FEEDRATE          { 300, 300, 1, 25 }

#define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 300, 10000 }

#define DEFAULT_ACCELERATION          100    // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION  1000    // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION   100    // X, Y, Z acceleration for travel (non printing) moves

#define DEFAULT_ZJERK                  0.4

to get it to turn the z-axis threaded rod.

My problem now is when I click the x-axis home the z-axis starts to home but way to fast and the z-axis stepper motor starts to skip teeth on the 4cm gear.

I need to know what these two numbers are and if they are multiplying.

Code: [Select]
#define HOMING_FEEDRATE_Z  (4*60)

I don't know what the "4" and "60" refer to. I do know they are the z-axis homing speed.

Thank you, Kenn


I can't attach the picture because the forum says it's to big. Then when I resize the picture the forum says it wouldn't pass security check.


Sometimes it's nice to let the compiler do the math so that the code is easier to understand:
For example in the following code:
Code: [Select]
unsigned int delayDuration = 5 * 60 * 1000UL;  // 5 minute delay
You can clearly see that the math is calculating the number of milliseconds in 5 minutes.

This code is functionally identical:
Code: [Select]
unsigned int delayDuration = 300000UL;  // 5 minute delay
but it's not as obvious where this 300000 number came from.

In the case of the HOMING_FEEDRATE_Z, I'm not sure what the meaning of these numbers are, but there must be some documentary reason they wrote 4*60 instead of 240. Again, I don't know anything about 3D printers.


Hi Pert, thank you for the reply.

Here's what I think about  "Homing speeds (mm/m)"

(MM = distance in millimeters) X (M = time /1 minute in seconds) = ACCELERATION

I set my Homing speed to:

Code: [Select]
#define HOMING_FEEDRATE_Z  (.3*60)

In the C Programming Language, the #define directive allows the definition of macros within your source code. You can use the #define directive to define a constant using an expression. So I'm taking it that the macros needs ether a equation or two numbers separated by a comma.

I'm not sure but I think the configuration.h in marlin might be written in C programming Language.

Since I set the HOMING_FEEDRATE_Z to 0.3 X 60 = 30 the acceleration is slow enough that the stepper motor now turns without jumping the 4cm gears.

I'll try to attach the photo of the redesigned Z-axis motor.


Marlin is written in C++, but #define is the same in C++ and C.

I'm glad the initial issue with the Z axis didn't slow you down much. It sure is nice when it turns out you already have the parts you need on hand instead of having to wait forever for stuff you have to order. I usually get components from China with the free shipping so it could be months of delay, and that's when the thing actually shows up at all! The electronics hobby certainly feeds my hoarding instincts.


Thank you for the reply.

The Marlin firmware update works great I have uploaded over 50 times without any problems.

I have a new problem with the Z-axis which might be related to a setting in the Marlin firmware, but I don't know were it is or what it's call to change it.

Now remember this is a Mendel90 and my end stop for the Z-axis is in the top left hand corner.

When in Pronterface I click on the Z home the Z-axis will go up to the top and stop Like it's suppose to.

The problem is when I click on the X or Y Home the Z-axis starts to move down and if I have some just printed on the bed I don't want the Z-axis smashing into it.

Here's what I have set so far.

Code: [Select]
/ Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.

// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR true
#define INVERT_Y_DIR true
#define INVERT_Z_DIR true

So if anyone know how to correct the Z-axis from going down when you Home the X and Y axis please let me know.

Thank you, Kenn.

Go Up