Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Speed or lack of
Visualbyte
Beginner
Posts: 33
Permalink
Post Speed or lack of
on: February 25, 2015, 14:06
Quote

Ok it's built and functioning but it seems a tad slow.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Speed or lack of
on: February 25, 2015, 18:39
Quote

I'm going to sound like I'm being facetious here, but ... increasing the speed is probably the first thing to do! (on the SETUP tab.)

Another point though, is that there just _is_ a hard speed limit on the v2 motorshield, and it's quite low. So even if you push the speed up to 4000 steps per second, you'll actually get a much lower speed out of it. It's something to do with the communications bus that the shield uses.

sn

Visualbyte
Beginner
Posts: 33
Permalink
Post Re: Speed or lack of
on: February 25, 2015, 19:25
Quote

I tried increasing the speed and it had no result

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Speed or lack of
on: February 25, 2015, 20:28
Quote

I don't quite remember what happened when I was playing with the v2 shield, but I remember it maxing out at a much higher speed, 1200 or so rings a bell. Worth mentioning that the speed is reset to the default when you reset the board, so you always need to re-send the "set speed" command when you reconnect.

Visualbyte
Beginner
Posts: 33
Permalink
Post Re: Speed or lack of
on: February 25, 2015, 22:10
Quote

http://forums.adafruit.com/viewtopic.php?f=31&t=43797

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Speed or lack of
on: February 25, 2015, 22:15
Quote

Good one, I think I might have come across that article when I was digging around last time. You'd need to change the hardware/libraries/Wire/utility/twi.h file to include

#define TWI_FREQ 400000L

and recompile the firmware and upload it. I don't remember if I did this myself.

sn

kongorilla
Pro
Posts: 362
Permalink
kongorilla
Post Re: Speed or lack of
on: February 25, 2015, 22:24
Quote

According to the page you linked to, you're using 200 step motors, but in your settings you have

machine.motors.stepsPerRev=400.0

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Speed or lack of
on: February 25, 2015, 23:05
Quote

Hadn't spotted that Kong. If this works, then it's because the AFMSv2 uses a x16 microstepping which fixes the error in the opposite direction. Really, you should have

machine.motors.stepsPerRev=200.0
machine.step.multiplier=16

If you are happy recompiling the firmware, you could do worse than changing https://github.com/euphy/polargraph_server_a1/blob/master/configuration.ino#L59

const int stepType = MICROSTEP;

to

const int stepType = INTERLEAVED;

and setting

machine.motors.stepsPerRev=400.0
machine.step.multiplier=1

And you'll get 8x faster movement.

sn

Visualbyte
Beginner
Posts: 33
Permalink
Post Re: Speed or lack of
on: February 26, 2015, 13:38
Quote

It's improved a tiny bit

Visualbyte
Beginner
Posts: 33
Permalink
Post Re: Speed or lack of
on: February 26, 2015, 14:53
Quote

I have started getting errors when compiling not sure what I have done wrong or if I have accidentally deleted something?

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Speed or lack of
on: February 26, 2015, 22:24
Quote

defaultMachineWidth is declared in polargraph_server_a1.ino, so if that is missing then things'll fall apart. I think if that file was missing, you'd have bigger problems. It looks like there's a deeper arduino problem here though. Arduino 1.0.6 is the latest version I've tested it in.

Step multiplier is used for microstepping drivers. When you say "move 100 steps" to a machine with microstepping, it'll move 100 microsteps, so will not finish actually on a full step. You can't really stop on a microstep because they aren't stable. So instead, when you say "move 100 steps" with microstepping=8, then it actually moves 800 steps, but this way it always finishes exactly on a full motor step.

sn

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