Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: calibration challenges
polarhb
Newbie
Posts: 11
Permalink
Post calibration challenges
on: April 16, 2012, 08:09
Quote

My polargraph is almost working.

machine x is 1009, y is 1700mm.
using #10 ball chain and 3D printed sprockets.
adafruit motor shield with 2x http://bit.ly/HM9PJW
These are 200 step/revolution motors.
There's a cryptic comment in the polargraph instructable to double the stepsperrev so I've tried 200, 400, and 800.
sprocket diameter is ~30mm so I set mmperrev to 30*3.14 = ~95

But something is off, it's basically all moving in the right direction, but the chain forms a catenary (gets loose and falls under its own weight) when I try larger moves.

A few questions:
Are the 'perfect' sprockets for this chain? I think my DIY sprockets are ok but there might be some slippage.
Did I calculate mmperrev correctly?
What is the right stepsperrev for these motors?
What else could be causing the slackness in my chain?

I think this chain is a bit heavy for this purpose. Anyone using this successfully?

Thanks, looking forward to getting this all working.

-hb

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: calibration challenges
on: April 16, 2012, 11:51
Quote

Hi HB, welcome. Your stepsperrev should be double the actual steps of the motor, so yours should be 400. This is because the code uses the INTERLEAVED step type, which is a kind of half-stepping.

Lots of different ways of working out sprocket circumference - yours is as good as any, but it's better to actually measure how much cord (chain) is extended per rev than try to work out what it is in theory.

I got a little stung when I got some new bead-chain and it had a very slightly different pitch than the old stuff, a couple of mm difference. It still fit in my sprockets' teeth, and the size of the sprocket hadn't changed so it was tempting to believe that mmPerRev should be unchanged. But in fact, the extra half a millimetre per bead added up to a genuine difference.

That said, miscalculations there will distort your drawings and make things a little funky, but your catenary issue is something else. The code doesn't do anything to combat this - it has no conception of gravity or forces, and so it can come up when moving asynchronously.

It will be amplified with a heavy chain (which is why I decided on the plastic chain to be honest), but even with the plastic chain, once the cord is not under much tension then the gondola is no longer under control and starts swinging about, and I had a problem where it tended to swing out of the drawing area and knock the hanging counterweight, and the whole thing would jump out of the sprocket. Others (John Abella) have used the metal chain with success, but it might depend on the size of the machine.

There isn't a solution to it at the moment, except to be careful when doing big moves. This is easy enough when moving manually, but hard to control when doing vector graphics because the draw / move sequence can't be controlled. The spring-loaded takeup spools I've got on the blog were an attempt to get around this gondola-crashing-into-counterweight issue, but it doesn't fix the catenary issue.

Right. If your machine is calibrated then it shouldn't often happen. If it happens only during a move, then that's somewhat understandable, and doesn't signal a problem. If, once the machine has stopped moving, one of the chains is loose then that _does_ signal a problem, because if you pull it tight, then you'll find the gondola is outside of the machine area. The controller shouldn't be able to send commands for coordinates that are outside of the machine area, so there's a good chance that the controller thinks this is _inside_ the area, but the physical reality of the machine doesn't match it's model of it. What kind of move replicates this issue (like, diagonal, straight down the edge etc)? I would like to build a "catch" into the code to prevent it, but not sure the arithmetic overhead is worth it.

Perfect sprockets? if the beads go in the teeth, and the sprocket grips the motorshaft ok, then they're good enough, but like I said above, try to measure the actual length of chain extended rather than just the circumference of the sprocket - you can count the number of teeth and then measure a stretched-out length of chain with that number of teeth. I have had an issue last week where the sprocket was slipping on the motorshaft too - this was because they are printed in PLA and the motor got hot, so softened a little. Solved with a dab of glue.

Good luck!
sn

kongorilla
Pro
Posts: 362
Permalink
kongorilla
Post Re: calibration challenges
on: April 16, 2012, 18:46
Quote

@hb - This isn't in regard to your calibration issue, just general FYI - Monitor the temperature of the motor drivers on your shield until you're sure they aren't getting too hot. Assuming you wired your motors in the bipolar fashion, the motors you have draw .85A (though the seller states this is from hearsay, not a datasheet). That's a little beyond the limits of the drivers (.6A). If your drivers are getting really hot, you might need to take steps to avoid damaging them. The Adafruit forum has a discussion about buying extra drivers to solder "piggyback" style (search for that term) on top of the ones on the board, doubling the current your motors can safely draw. Heat sinks would help, too, along with a fan blowing on the ICs.

polarhb
Newbie
Posts: 11
Permalink
Post Re: calibration challenges
on: April 16, 2012, 23:25
Quote

@kongorilla,

thanks for your response. The loose metal chain seems to be forming during a diagonal move, it's as if the 'take-up' motor isn't drawing up the chain as fast as it should (or vice versa - the 'releasing motor' is going too fast. Is there a series of calibration commands that I can issue individually to the motors that would allow me to ask an individual motor to move a certain distance? Or move both motors and ensure they rotate exactly as expected? I'd like to isolate motor movement issues, then ensure that my sprockets/chain are perfect.

I'm currently powering the motors just with the USB which presumably is driving the motors with 5v. I had tried to use an AT power supply (12v), but did so with the jumper plugged in and smoked one of the L293D. Luckily I had a spare and the rest of the motor shield and the Arduino Mega seems undamaged. Would it have been ok without the jumper in? i'm not keen to try.

Thanks for the hints on the L293D, I'll order a few extra.

I had originally set up with Lanthan's Pololu/Sanguinololu code and was getting similar issues; so I moved to the Adafruit shield so I could be on the latest code and on the same platform as most of you while I debug it.

I'm a bit surprised the motors are moving at all with just 5V USB power, but they seem to moving ok. What do you use for external power?

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: calibration challenges
on: April 17, 2012, 18:43
Quote

Must be a strong USB cable 🙂

Kongorilla is right about the current of the motors being mismatched to the driver ICs (assuming that they are) - I've blown up L293Ds before by trying to drive too-big motors, though rarely.

Not sure why your AT supply made them go bang - I don't know enough about power supplies to speculate. I would always remove the jumper if you're using the USB too though, especially with a supply as potent as an AT one. I wouldn't like to think of that somehow finding it's way back into the USB circuits of your PC. There is also no reverse polarity protection for the shield, so be extra careful.

I tend to use a regular plug-in psu, 1000mA variable voltage set to 6v or 7.5v. It goes into the arduino power socket and with the jumper in place, it powers the logic and the motors together. I know it's not the recommended way of doing it, but I've never had any problems with the small motors I use.

Things about power or slippage might be a problem, but the catenary issue can happen even in a well tuned and reliable machine - it's just the nature of the beast, and heavy chains will make it worse, but light chains won't make it go away either. That's until there's a way to detect the situation and do something about it. It's not wrong.

The thing you should do is start the machine, set the home point and make sure the purple spot on the controller matches where the gondola really is on the surface. Then use move pen to point to slowly move the gondola around and check that the purple spot continues to match the physical reality of where the gondola is on the surface, and that you can move it back to the same exact point it started at ok.

If it gets out of sync then you have issue with dropping steps or slipping - I wouldn't be surprised running only with 5v. If your issue is purely the catenary thing, then lighter chain may improve things, but adding weight to the gondola and to the counterweights will also help to pull things tighter. But you will start to run out of power to move the extra weight and it'll skip/slip more.

SN

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