Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Repeatable Errors on Plots
halfluck
Newbie
Posts: 12
Permalink
Post Repeatable Errors on Plots
on: July 2, 2018, 07:45
Quote

Hey Guys,

Hope all you 'graphers are going well.

I have built and calibrated my Polargraph, spent a few weeks learning the Polargraph Controller and started knocking out a few jobs.

The first thing I plotted was the Crown SVG here ==> http://vectorink.com/symbol/kings-crown-0102/
It came out perfect, the circles were well circle and the lines joined up nicely.

Then I tried a few other SVG's around the place but really having mixed luck, They display OK on the Polargraph Controller but when I plot them the errors are there.

I use this SVG as an example

https://commons.wikimedia.org/wiki/File:Gosper_curve_3.svg

I have plotted it 6 times and the errors are all in exactly the same place
Image
Image

Thinks I have attempted to troubleshoot so far:

*i have read every single troubleshooting forum post! this doesnt seem to fit in with anything.
* i have tired the vector in different locations on the canvas and resized
* I've tried to import it into Inkscape, ungroup and convert paths to objects and save as thinking it might be an issue with the SVG but still no luck.
* I tried a different power supply
* I have tried slowing down the max speed to 800 and acceleration to 400
* I have tried updating to the latest Polargraph Contoller from github source, Polargraph Server A1 from github source.
*double check all machine measurements

Any ideas appreciated, Thanks for your patience!
Rob.

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 2, 2018, 08:18
Quote

Another couple of Gosper
Image
Image

Tried a Hilbert Curve

Image
Image

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 2, 2018, 08:35
Quote

This is my Polargraph Properties file, if that helps:

# *** Polargraph properties file ***
#Mon Jul 02 15:32:52 WST 2018
controller.pixel.samplearea=10
controller.pictureframe.position.y=244
controller.pictureframe.position.x=64
controller.testPenWidth.startSize=0.3
controller.machine.colour=969696
machine.motors.mmPerRev=32.0
controller.vector.filename=C\:\\Users\\Rob\\Desktop\\hilbert curve.svg
controller.window.width=1920
controller.frame.colour=C80000
controller.image.position.y=218
controller.image.position.x=156
machine.motors.accel=400
controller.image.height=567
controller.machine.serialport=1
controller.window.height=1018
controller.maxSegmentLength=2
controller.geomerative.polygonizerLength=1
machine.penlift.up=180
machine.penlift.down=120
controller.page.position.y=243
controller.vector.scaling=61.6
controller.page.position.x=58
machine.step.multiplier=16
controller.pictureframe.width=421
controller.grid.size=18.0
controller.testPenWidth.endSize=0.61
controller.pictureframe.height=298
controller.page.colour=DCDCDC
controller.testPenWidth.incrementSize=0.05
controller.image.width=453
machine.motors.stepsPerRev=200.5
machine.pen.size=0.4
controller.page.width=420
controller.pixel.mask.color=00FF00
controller.machine.baudrate=57600
controller.vector.minLineLength=0
machine.width=537
controller.geomerative.polygonizer=0
controller.page.height=297
controller.vector.position.y=206.96
controller.vector.position.x=148.64
controller.image.filename=
controller.background.colour=646464
controller.homepoint.y=539.93
controller.homepoint.x=56.98
machine.motors.maxSpeed=800
controller.guide.colour=FFFFFF
controller.density.preview.style=2
controller.pixel.scaling=1
controller.densitypreview.colour=000000
machine.height=740

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 2, 2018, 08:45
Quote

This is Hilbert #2 error is always in the same spot with this one

Image

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 2, 2018, 09:21
Quote

I tired another "Crown" just to make sure I havent broken anything and it plots fine

Image

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 2, 2018, 13:03
Quote

I just noticed this

machine.motors.stepsPerRev=200.5

Where as it should be 200, it seemed to get skewed between importing and exporting. I have changed and it adjusted my canvas, Could this be the error that is building up?

Cheers Rob.

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 3, 2018, 14:51
Quote

Nope that wasn't it! I really thought I was onto something. I feel like I have turned over every stone at this stage

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Repeatable Errors on Plots
on: July 4, 2018, 09:09
Quote

It's quite fascinating! I'm sorry not to be more helpful, I'm away at the moment so not able to dig I to it... But this is a really interesting study. It looks like each block of the drawing has integrity, but there's something going on between the blocks.

The controller does do rounding (so the .5 might be significant), but it isn't relative, or compounding. The inaccuracies shouldn't build up. There are also natural distortions in how the machine draws, but these would be evenly distributed.

The repeatable nature tells me it's not a physical problem (belt or motor slippage).

I can think of some experiments to do in order to debug, but an obvious answer isn't springing out.

It looks like your configuration is for a Adafruit Motorshield V2, running in microstepping mode. So you've got squealy motors, and step style in the firmware config section set to MICROSTEP.

Microstepping, when it's not working right _does_ lead to compounding errors, so that's the only thing I can think to try. Changed the step style in the firmware to INTERLEAVED and re-flash your arduino with it. Then change step multiplier to 0 and stepsperrev to 400 (easiest to do that by editing the default.properties.txt file), and re-upload the machine spec.

That would by next step... But I admit I never liked the microstepping on the adafruit shield so I'll take any excuse to be it as the villain!

Sn

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 5, 2018, 07:58
Quote

Hi Sandy,

Thanks for the words, I'm just using an Arduino Uno with a couple of A4988 Stepper Drivers plugged into Nema 17 Motors. It's hardwired for 1/16th Stepping. I had a look at the configuration but serial stepper drivers don't seem to have the same option as AF boards. i.e. const int stepType = INTERLEAVE;

I have another stepper board available which I can set to Full Step and try that.

Cheers Rob.

Cheers Rob.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Repeatable Errors on Plots
on: July 5, 2018, 08:31
Quote

Aha ok that's that theory out the window then. Can you email me the SVG so I can have a go? sn@polargraph.co.uk or point me at whatever generates the patterns.

I'd be curious to see if the problem occurs at every scaling level - if you double the size of the vector in the controller do you still get the issue, OR if you crop the drawable section down to just the area with the most obvious distortion using 'select area' then 'set frame to area's, does the distort still happen. I think that experiment would tell you firmly whether the problem is in the controller (specifically the part that converts vector points to native coordinates) or some weird firmware edge case.

Very exciting!

Sn

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Repeatable Errors on Plots
on: July 8, 2018, 18:28
Quote

Ok, good news and bad news:

Good news is I got a chance to draw out the hilbert curve svg that you were trying. Bad news is that it drew out fine - no distortion.

I used the current version of the Polargraph controller, with the SVG at the same scale as yours, on the same sized page. My machine is not the same size as yours, but not far off.

The hardware is different though: I'm using a Polarshield, which sits on an Arduino MEGA 2560 and wires up two A3988 motor drivers, hardwired to microstep at 8x.

Usually this uses the polargraph_server_polarshield firmware, but I also tried with the polargraph_server_a1 firmware, with serial steppers configured - same result.

Image

The rest of the hardware is a 9v, 2.66A PSU and two NEMA 17HS13-0404S steppers, motor speed and acceleration were around 2500 (that includes microsteps, so it'd be 5000 on yours to move at an equivalent speed on the page).

Hypothesis: This hilbert curve is a bit of a "torture test", cramming in as much back-and-forth as possible to try and prompt tiny errors, then magnify the consequences of it. I'd be amazed that physical errors (overshooting or dropping steps) would be so consistent between runs, and that there was no sign of them during other drawings (the crown)... But I've been amazed before. Perhaps if you drew hundreds of tiny crowns you'd find that they lost integrity too.

On my stepper drivers I can tune the current to give more or less torque/grip. If yours can also, look at bumping them up a little and see if that makes any difference.

This is a fascinating exploration!

You could try to replicate my settings more exactly by changing to step multiplier of 8 (will still work fine, but will lose half of it's internal resolution) if that's appealing. I don't imagine it will make any difference though.

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 9, 2018, 06:34
Quote

Hi Sandy,

That really is fantastic news! phew.

I have still been playing, I expanded my machine width to 840, some printed mounting brackets and standoffs for guides. Installed my A4988 Stepper Drivers into a Shield and calibrated the Pots on the Stepper Drivers

V x A = W
2.8V x 1.7amps = 4.76watts
4.76watts/12volts = 0.39Amps

they were originally sent to double that from the factory.

Image
Image
Image

unfortunately my board has a design fault and is hardwired for 1/16 microstepping,

I noticed now that A1 has gone EOL, i'm going to invest in some better hardware and revisit this.

Cheers Rob.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Repeatable Errors on Plots
on: July 9, 2018, 22:01
Quote

A physical slipping error seems inconceivable to me, given the absolute step-perfect repeatability of the symptom.

I should say that I've never tuned a stepper driver with a meter or with maths - only ever by ear and touch, so it's very possible I'm overcooking it.

I don't really believe the 16x microstepping makes the difference, but you could always test it in 8x mode by snipping off the MS3 pin, or cutting the trace on the board. A bit irreversible.

If you mean polargraph_server_a1 is EOL, then it isn't completely sunsetted. There's hardly been any functional change in the firmware in the last couple of years, so it might not make much difference.

The next version of PolargraphSD v3.0 kits will be based on an ESP32, so the code is quite different to the firmware for the old MEGA-based machines, but it is functionally equivalent. I might add new features that use the hardware features of the ESP32 but I've got no plans for that yet.

I see you've got another CNC board there though... Did you try drawing with that one?

sn

halfluck
Newbie
Posts: 12
Permalink
Post Re: Repeatable Errors on Plots
on: July 13, 2018, 09:27
Quote

Hi Sandy,

I picked up a few boards to try my luck with the polargraph, That CNC Shield V3 in the photo had a dodgy cap when it arrived, so much for a $1.95 board, I really have to stop buying the cheapest of the cheap. I also got an adafruit motor shield v1 Clone but one of the L293D chips has gone dodgy after running too warm using 12V as the source. So i haven't got far! i'll keep here updated if i make any more progress

Cheers Rob.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.024 seconds.