Dear DAVID Community,

In 2016, DAVID and this forum have been integrated into HP Inc.
This forum has been read-only since then, and will be switched off by the end of 2019.

To everyone who has contributed here, we thank you for all your work and for the constructive, helpful and friendly atmosphere you have created!
Please continue to discuss on the HP Support Forums.

Grounding problem?

Grounding problem?

Postby Zeppelin1007 » Mon Jun 13, 2011 11:55 pm

Hey guys

Bit stumped here. Trying to get a basic stepper+arduino setup running here.

I'm running an arduino Mega128, a Pololu A4983 stepper driver, and im using an S150-9 for a power supply as seen here

http://www.meanwell.com/search/s-150/s-150-spec.pdf

Beefy little thing. Can handle 16 amps! I have a 3 prong cable wired to it properly.

So ive uploaded the test code from my arduino from this tutorial:

http://forum.pololu.com/viewtopic.php?f ... ino#p18758

Only instead of 12v im running at 9v. I have a small heatsink on the stepper driver, and biased it around 1amp. The motor turns just fine, although slowly, but i'm not complaining. It has a 99.5:1 gearbox. Also where it says 5V on the pololu, i'm running that from the arduino. I have the grounds between the arduino input/output and the PSU supply all jumpered.

So whats the problem? It works great, for about a minute, then one of a few things happen. 1. It simply stops moving. 2. It stops moving then a few seconds later, 3, it stops moving, then the PSU cuts off, along with my powerpad! Scared the crap out of me.

WHy i wonder if its a grounding issue, i notice while biasing it, if i touch the adjustment screw with a metal screwdriver, the current drops to near 0. Also just before everything stops working, my ampmeter climbs to something insaine, 12amps? All i'm doing is putting it in paralell between one of the motors coils.

The other reason i question grounding is the high pitch squeal, i beleive its coming from the motor, but again, it seems to change pitch if i touch the adjustment screw.

Any suggestions? Im close! I just dont want to damage any of my parts!

Thanks in advance guys!
Zeppelin1007
 
Posts: 31
Joined: Sat Jan 29, 2011 7:54 am

Re: Grounding problem?

Postby WalterMo » Tue Jun 14, 2011 10:49 am

Hi,
What to do?
First: Don't connect an amperemeter in parallel to a load (here: motor coil). Always in series!
The amperemeter has a very low internal resistance which will cause an "infinite" high current.

Connect it just at the + V output pin of the power supply in series to all the loads ( Arduino and Pololu with the motor). You should measure a current at standstill or at a slow speed of the motor of about max. 1 Amp.

Your power supply is by far oversized for this job. And what I know from switching power supplies of PC's, they need a certain base load. Maybe the current load is too less. Therefore and for testing connect a 12V bulb of the back lights of a car directly to the output pins of the power supply (in parallel).

Regarding ground lines: Connect both lines from Arduino and Pololu board as separate wires directly to the - V pin of the power supply.
Connect FG (pin 3) only to the earth pin of the mains.

Walter
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Grounding problem?

Postby Zeppelin1007 » Wed Jun 15, 2011 12:34 am

Walter,

My bad i meant SERIES for current measurements. Duh on my part.

As far as my breaker tripping problem, that part i solved. I stupidly had under rated connectors on the end. I cut them off, stripped a tiny bit of wire, connected it and no more issues.

IM still fighting with this thing stopping. I had it all working amazingly last night in the late hours. Come out this morning and the darn thing wouldn't even turn! I Rechecked all my connections, it worked again (using a breadboard)

I swapped in a smaller stepper, and it worked fine.

Basically now, the Nema stepper runs for a bit, stops, then begins ticking, and the ticking increases. Hitting reset on the arduino does nothing, but, turning off the power and turning back on runs it again, however, the amount of actual run time is less each time, which makes me wonder if its heat related. I have a ram heatsink on the a4983 which does heat up a bit, but dissipates it rather quickly.

My other, and newb question, ive read never turn on the arduino when theres no secondary supply for the a4983 or i'll fry it. Im powering the arduino and stepper both of the 9v supply. My question is, anyway i can run USB into it WHILE powering it at the same time from the 9v? I ie, just leave the usb plugged in (keeping the arduino on) then turning the 9v supply on and off as i run it? Only reason i ask is for the serial.write diagnostics.

My code is this thus far

Code: Select all
#define stepPin 2
#define dirPin 3
#define enablePin 4
void setup()
{
// We set the enable pin to be an output
pinMode(enablePin, OUTPUT);
// then we set it HIGH so that the board is disabled until we
// get into a known state.
digitalWrite(enablePin, HIGH);
Serial.begin(9600);
Serial.println("Starting stepper exerciser.");
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
}
void loop()
{
int j;
// set the enablePin low so that we can now use our stepper driver.
digitalWrite(enablePin, LOW);
// wait a few microseconds for the enable to take effect
// (That isn't in the spec sheet I just added it for sanity.)
delayMicroseconds(2);
// we set the direction pin in an arbitrary direction.
digitalWrite(dirPin, HIGH);
for(j=0; j<=10000; j++) {
digitalWrite(stepPin, LOW);
delayMicroseconds(2);
digitalWrite(stepPin, HIGH);
delayMicroseconds(1000);
}}


Which to me says, initialize the pins as i/o, and run the stepper as long as j is less than or equal to 10000. Then it should simply stop correct? If so, then what the heck is it ticking for?

Thanks walter!
Zeppelin1007
 
Posts: 31
Joined: Sat Jan 29, 2011 7:54 am

Re: Grounding problem?

Postby Zeppelin1007 » Wed Jun 15, 2011 12:53 am

Walter i feel like such a newb. And im in school for electrical engineering. Doh.

I simply had to rebias the current. Now somethings up with my meter, because it fluctuates and tells me im only using 3mA, either way it turns fluently and it hardly heats up now. My guess is it was supply too less of a current, then going into shutdown mode, then the motor would ask for infinity. Which would explain the heatsink heating up, cause now it hardly does.
Zeppelin1007
 
Posts: 31
Joined: Sat Jan 29, 2011 7:54 am


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron