# Alunar m508 Firmware

I have a Alunar M508 machine that I am trying to get new firmware on. The firmware that was loaded on the machine wasn't very good. The x axis was mirrored and the home point was way off. I was looking into Marlin to put on the machine, but don't have any experience on what to edit in the code to make it work for this machine.

Does anyone have any experience with this machine? Uploading new firmware that works or editing the code to make it work for this machine. I appreciate any help!

Here is a link to the firmware I am currently using. I'm on MacOS Sierra 10.12.5 using the 1.6.8 Arduino IDE.

• I removed the URL shorteners from your answer, and made the links inline. That said, I don't really understand what your question is here. You're basically saying "please help me get my printer working, here is my firmware, please fix it". That doesn't make a good StackExchange question. What specifically do you have trouble with? Could you try to distill a single, specific question (for instance: "How do I set up the directions of the axes in Marlin correctly?" or "How do I adjust the home point in Marlin?"). – Tom van der Zanden Sep 27 '17 at 8:37
• @DonniePlumly Correct me if I'm wrong, but you are looking for help on how to install firmware (Marlin) onto your machine? – tbm0115 Sep 27 '17 at 16:25
• @tbm0115 I know how to install the firmware on to the machine. My question was what I needed to edit in the Marlin Firmware to get the machine running. I went into the config file and edited the bed size and some other things and do have it running, but the print quality is still bad. – Donnie Plumly Oct 9 '17 at 21:04
• The answers below did not lead me to anything. I beat my head until I got something that worked. Here is a link to a Github repo. github.com/dplumly/Alunar_M508_Firmware – Donnie Plumly Oct 3 '18 at 19:11

The Alunar firmware you linked is a fork from the main Marlin firmware. If the bed Y direction is reversed, usually the stepper is incorrectly placed (mirrored) this is seen frequently for the Anet A8 printer which is very similar to your printer. In your case the X direction is wrong, this is usually related to the wiring of the stepper, reversing the connector by 180 degrees should do the trick (hardware solution). As a software solution, changing direction is not difficult in Marlin based firmware; you just want to invert the stepper direction; the following section in the configuration.h file does that for you:

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


Just change INVERT_X_DIR to true.

If your home position is still not working for you, you should look into this section of the same configuration file:

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -33
#define Y_MIN_POS -10
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240


Change the MIN_POS positions as such that it starts at the corner of the bed. A more in depth bed center calibration tutorial can be found here.

P.S. Please do not print anti-wobble caps for the Z-axis rods (as mentioned in another answer), these are not reducing the wobble, in fact they cause problems. What happens if you constrain the top is that you get a statically indeterminate construction; forces and displacements are not predictable! Better solutions to eliminate Z-wobble are lifting devices that decouple X/Y movement from the threaded rod (eccentricity of the threaded rod) from the Z movement. Also fixate the threaded rod above the springy stepper-to-threaded-rod coupler.

disclaimer: I am the maintainer of the firmware that you linked.

The firmware will not improve your print quality. well, it may to some extent, but for the most part, it wont.

There is fine tuning involved that may be set for MY printer, but the values may need to be changed for you. Not to mention the physical tuning that I have done with my printer. Software is not the place to initially look for print quality improvements.

Some examples:

I printed anti-wobble caps for the Z-axis rods. Which improved the print drastically for me. As the print got higher, the quality got worse.

I printed Z-stop improvements, so I could fine tune the Z-stop.

I printed X & Y belt tensioners. Loose belts cause skipped steps which causes poor quality prints.