× Forum Header

Pololu A4983 driver and EMC, no movement, noise

More
13 Jul 2010 13:58 #3342 by lanthan
Dear all,

I am having some trouble getting started with emc and a DIY X-Y table set up to learn EMC.

The steppers are salvaged from and old Star printer (Mitsumi M42 sp-1) and an epson scanner. They are wired as bipolar, and turn out to be a bit underpowered to drive the table, but work (see below).

The X and Y axes are driven Pololu's A4983 stepper motor driver carriers.
Those are connected to a Xydrive XD14 "high speed" parallel port breakout board.
Stepper drivers and parallel port breakout are fed with +5 V (wall wart) and +12V (3 Amp regulated supply)
Each axis has enable (inverted), step and direction pins, plus opto-switces for the limits.
The breakout board is connected to a netmos parallel port PCI card (bought second hand on ebay).
The computer is an AMD Athlon 64x2 4600+ at 2.4 GHz. It runs a fresh install of Ubuntu Hardy from the LiveCD (kernel 2.6.24-16-rtai sept 30, 2008). emc2 is 2.3.5

Max Jitter is 10'506 ns for the servo thread and 15'414 for the base thread.

The A4983 stepper driver spec sheet gives as minimal values:
  • step high pulse 1 microsecond
  • step low pulse 1 microsecond
  • setup step time 200 ns
  • hold time 200 ns

I fed those values to the stepconf wizard (as well as the appropriate memory address from the paralel port card)

The problem: when I try to jog the axes with stepconf, the only thing I can notice is a high pitched whine plus after a while some heating of the motors.

At least the signal appears to reach the motors (the noise changes with the jog buttons).

I tried modifying the timing values by a factor 10, same results

As a troubleshooting measure, I then connected an arduino to the a4983 drivers (in parallel to the breakout board connexions: nothing bad has happened till now...): I can get both axes moving OK when controlling them with the arduino.

On the arduino, I use loops of this sort:

digitalWrite(X_STEP_PIN, LOW);
delayMicroseconds(X_STEP_DELAY);
digitalWrite(X_STEP_PIN, HIGH);
delayMicroseconds(X_STEP_DELAY);

The values I have found to work best (smoother operation of the motors) with my setup are:

X_STEP_DELAY = 700 microseconds
Y_STEP_DELAY = 150 microseconds

So I suspect the problem with emc might be possibly the correct setup of timings. (the other possibility would be hardware: signal loss with a crappy parallel port cable).

But I am a bit confused: how could I translate the "correct" values into stepconf or the HAL file? Which parameters should I be modifying?


Thank you for any hints...

Please Log in or Create an account to join the conversation.

More
14 Jul 2010 00:13 #3348 by BigJohnT
Just try some huge number for step and direction like 20000 and go from there. A buzzing sound might mean your timing is too fast.

John

Please Log in or Create an account to join the conversation.

More
14 Jul 2010 22:31 - 17 Jul 2010 19:59 #3355 by lanthan
Hi!
Thank you for the suggestions!

Meanwhile: The netmos parallel port card stopped showing at all with lspci, I suppose it went to board's paradise.
I brought back to life an old P4 with an integrated parallel port in the motherboard. Am getting step signals passed, sort of: one of the motors moves, one way only, whenever I test any of the axes. I also discovered the extremely useful hal parallel port tester .

The voltages I measure at the terminals aren't near TTL anyway. I don't have a scope to further test the signals, but there must be interferences all over: when I run the stepper I get almost all the other lines at around 1.5 V.
The main suspect for now is the cheap, extremely thin parallel cable from eBay.

Am recycling an old cable and soldering a very simple breakout board à la Mantis , will report on the outcomes.
Last edit: 17 Jul 2010 19:59 by lanthan.

Please Log in or Create an account to join the conversation.

More
16 Jul 2010 13:31 #3365 by andypugh
lanthan wrote:

The voltages I measure at the terminals aren't near TTL anyway.


How much current are you drawing from the parallel port? Perhaps that is why the card died? They can generally only source a few mA, but should sink about 15mA.

Generally you use the p-port as a current sink. Connect the outputs to +5V with a 1k resistor to get a good solid 5V, then the p-port will sink enough current to pull the outputs down to logic zero. However, this really ought to be handled by the breakout board.

Motors whining but not moving is generally due to trying to move them too fast. Take the Axis VELOCITY numbers right down in the INI file and see if that helps. Bear in mind that the INI file is in units per second. Try 10mm or 0.5" per second.

Another cause of noise but no movement is inadvertantly swapping the step and direction wires..

Please Log in or Create an account to join the conversation.

More
17 Jul 2010 10:14 #3388 by lanthan
Should have thought of this before...

The cable in the attached picture (the bottom one) is being sold in eBay (UK) as "Parallel Printer 25M/25M Cable 3M - Switchbox DB25". It looked suspiciously thin (5 mm diameter) when compared to some worn and proven parallel port cable (7.5 mm diameter, on top). Pin signals were inconsistent, and interference was all over. Time for an autopsy.

Inside, surprise, surprise, only 11 teeny wires are to be found. These connect pins 2, 3, 4, 5, 6, 10, 11, 12, 13, 15 and 25. NO way this would ever work!

On top you see a corner of my new, extremely elegant ;-) breakout on stripboard.

I think I'll get some buffers for it, considering 74LS373 for the output pins, and inverter gates for the input pins (I've got opto-detectors at the limits, they raise the lines to 5V when triggered)

Still wondering how the parallell port card got to release the magic smoke: coincidence or not? I do not remember putting a high load on the lines. I am going to double-check the A4983 current needs, but it is supposed to be high impedance.

I am asking the seller of the cable, a computer parts shop, a full refund.

Greetings!
Attachments:

Please Log in or Create an account to join the conversation.

More
17 Jul 2010 10:47 #3390 by andypugh
lanthan wrote:

Inside, surprise, surprise, only 11 teeny wires are to be found. These connect pins 2, 3, 4, 5, 6, 10, 11, 12, 13, 15 and 25. NO way this would ever work!
...
I am asking the seller of the cable, a computer parts shop, a full refund.


My first thought was that it was a minimally-populated printer cable (and as such OK for the advertised purpose). But if the pinout you give above is correct then 3 of the 8 data lines are not connected so it would not even work for printing.

Please Log in or Create an account to join the conversation.

More
17 Jul 2010 13:38 #3391 by PCW
Looks like a serial cable to me...

Please Log in or Create an account to join the conversation.

More
17 Jul 2010 20:23 #3399 by lanthan
I double checked all of the wires. I confirm they connect to pins 2, 3, 4, 5, 6, 10, 11, 12, 13, 15 and 25.

It does not make sense for a printer parallel cable. Indeed, it would need at least all of the data pins connected, so 6, 7, 8 and 9 are missing.

A serial cable? But pin 10 is connected and it is supposed to be reserved, as per www.aggsoft.com/rs232-pinout-ca .

I think I have identified what it is: "Interlink and Windows 95/98/ME DCC parallel cable" as described here: www.lammertbies.nl/comm/cable/parallel.html .

So it would be a bad case of mix-up at the seller's. Unsurprisingly, it lacked any sort of labelling or tag.

Please Log in or Create an account to join the conversation.

More
17 Jul 2010 20:58 #3400 by PCW
Ahh, a LapLink cable. Haven't thought about those in years...

Please Log in or Create an account to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum