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

Wrong dimensions in the final plot #120

Open
joseedil opened this issue Aug 27, 2022 · 6 comments
Open

Wrong dimensions in the final plot #120

joseedil opened this issue Aug 27, 2022 · 6 comments

Comments

@joseedil
Copy link

joseedil commented Aug 27, 2022

Hey, thanks for the great tool.

I'm using saxi on a headless raspberry pi to control an iDraw A3 plotter. The machine uses the Axidraw firmware (currently with v2.6.5, not sure if it will work if I update it).

When using the Axidraw Inkscape plugin (v2.7.0) it correctly prints the SVG. But when using saxi I'm getting a consistent 0.8 scale factor in both X and Y directions. In the picture, it's supposed to make 10mm squares spaced 10mm from the paper border.
IMG_4251

On the saxi interface, I disabled 'fit page' and 'crop to margins'. The preview looks OK.
Screen Shot 2022-08-27 at 18 26 37

I get the same 0.8 scaling factor if I use 'fit to page' with margins.
Screen Shot 2022-08-27 at 18 33 37

I would guess the tool is set to a different turns/mm ratio then the one on my machine.

Am I missing something?

Could you point me to where to look for in the code to help tweak it (I skimmed through it and did not locate where this kind of setting is being handled).

@joseedil
Copy link
Author

I updated the EBB firmware to v2.8.1 (latest).

Same thing.

Curiously, when I update the Inkscape plugin to v.3.5.0 (latest), it also gives the strange 0.8 scaling factor.

Surely some parameter changed from one version to the other. I'll keep investigating.

@joseedil
Copy link
Author

joseedil commented Aug 28, 2022

Ok, found the problem.

In the Inkscape plugin there is a 'native_res_factor' parameter in the axidraw_conf.py file. The default value is 1016.0 and it is used to compute the steps/in rate of the machine.

native_res_factor = 1016.0  
# Motor resolution factor, steps per inch. Default: 1016.0
# Note that resolution is defined along native (not X or Y) axes.
# Resolution is native_res_factor * sqrt(2) steps/inch in Low Resolution  (Approx 1437 steps/in)
#       and 2 * native_res_factor * sqrt(2) steps/inch in High Resolution (Approx 2874 steps/in)

The machine vendor provided a customized plugin. I checked it and the only thing that seems to change is this parameter which is tuned to the value 1270.0.

Indeed, when I configure the latest inkscape plugin to this number the machine prints in the correct size. Also, the 0.8 scale factor is exactly the ratio between these two numbers.

I did not find anywhere in the saxi source code where the steps/in rate is computed to try to fix it.

@joseedil
Copy link
Author

I was able to make successful plots with this machine after changing the stepsPerMm parameter to 1.25 * 5. Not submitting a pull request as it will surely break things for Axidraw owners.

Why not expose this setting (or a machine selection setting) on the GUI?

@sihil
Copy link

sihil commented Nov 21, 2023

Just dropping in to save someone heading down the rabbit hole I've been pursuing for the last few hours (based on confidence having seen this issue): @joseedil is talking about the original iDraw A3 and not the newer iDraw v2.0 A3.

The newer v2.0 line do not use the EBB protocol but instead use g-code. It cannot currently be hooked up to saxi. 😢

If you have such a plotter and you're trying to use it using tools other than Inkscape then I suggest reading this and this.

@thierryc
Copy link

thierryc commented Feb 5, 2024

I've delved into this matter and discovered that it's not an issue per se. I currently share a similar requirement, albeit for different reasons. I've developed a customized plotter utilizing the same EBB board.

However, my GT2 motor pulley has 16 teeth, unlike the Axidraw's 20 teeth.
This leads to a mathematical variation in accuracy, as I have 6.25 steps per mm compared to the Axidraw's 5 steps per mm.
The motor itself boasts 200 steps per rotation.

In response to additional requirements, I've created a fork that hasn't been pushed as a pull request yet. WIP. In this fork, I've incorporated a dropdown menu enabling users to select the device and its associated settings. Feel free to explore it, and any feedback you may have would be greatly appreciated.

node cli.js --firmware-version
EBBv13_and_above EB Firmware Version 2.8.1

https://github.com/thierryc/saxi/tree/xylodraw

branch: xylodraw

image

@joseedil the iDraw A3 plotter.
your version use probably 16 teeth pulley and a EBB board.
Do you know other Axidraw Clones?

@joseedil
Copy link
Author

I'm not aware of other clones, but this whole discussion was enlightening.
Have been using the axidraw cli since I reported the issue, maybe it's time to try saxi again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants