Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Losing connectivity. Busy.
brownjd
Newbie
Posts: 7
Permalink
Post Losing connectivity. Busy.
on: June 18, 2014, 15:41
Quote

I'm trying to build my own polar graph using salvaged stepper motors from some HP scanners. The two motors have the following markings:

STH-39D1126-02 1.8 DEG/STEP 4.1 OHM

I have the motor shield (v1) using separate power served by a 5V 2000 mA switching adapter. I stacked two pairs of SN754410 (1 A continuous, 2 A peak each) of chips with heat sinks per the motor shield FAQ (http://forums.adafruit.com/viewtopic.php?f=31&t=26873).

The problem is that it will only work for a little while before I lose connectivity with the arduino (uno). I can upload the machine spec, set home, and move to point a few times before commands start stacking up and the uno reports being busy with a command. If I restart the polar shield software, it works again for a bit with the same result.

Several questions come to mind:

  • Am I using the right voltage for the steppers? I have no idea what they might take. I can't find any data sheets for them.
  • Is the power supply enough to handle the demands of the motors? What's the general rule here? Do you oversize the power supply to ensure enough available power for when the motors demand it (assuming your chips can handle it), or does that overload the board? Do I double it for two motors?
  • I cannot replicate the lockup behavior if I write my own test program, but I also don't know how to drive both motors simultaneously like the polar graph code does. I suspect both motors at the same time may be overloading the board. Possible?
  • Is the motor shield truly isolated from the arduino? In other words, if there was a thermal shutdown, could it wreak havoc on the uno? Limor mentioned kickback protection issues with chips I am using. Does this matter here?
  • I'm using polar graph 1.7.25-1.6. Not sure if that matters.

Thanks in advance,

Jason

kongorilla
Pro
Posts: 362
Permalink
kongorilla
Post Re: Losing connectivity. Busy.
on: June 18, 2014, 21:16
Quote

Hi Jason,
While your computer and polargraph are still on speaking terms, hit cntrl-c to open the controller's console. Issue commands using the controller until it the polargraph gets stuck on 'busy'. Was there an error message of interest in the console?

Motors/voltages: (Warning! - I'm not an expert, and there are subtleties I'm ignoring. This is a general guide only) If that 4.1 ohm spec is correct (you can check the coils with a multimeter), and you're giving them 5V, using Ohm's Law, each motor should be taking about 1.2A. That would put you over the 2A of your supply. Is your supply getting hot? Are the drivers getting too hot to touch? If everything is merely comfortably warm, you should be OK.

If you've got the power jumper removed from the motorshield, I think your uno is safe.

brownjd
Newbie
Posts: 7
Permalink
Post Re: Losing connectivity. Busy.
on: June 18, 2014, 21:31
Quote

Thanks for the tip. I tried a test with just the Uno connected (no motor shield) and I could not get it to freeze up. I'll try the cntrl-c trick tonight when I get a chance.

Regarding heat: the motors were cool, h-bridges were cool, and adapter was cool.

Here's the weird part - the motors are supposed to draw their maximum when stopped. The Uno seems to freeze up when while in the middle of moving the pen. So, I'm not sure about the adapter. I didn't want to try a bigger one in case I might overload things. Would a higher amperage power adapter not hurt anything? (back to my original question: is it just available power?).

kongorilla
Pro
Posts: 362
Permalink
kongorilla
Post Re: Losing connectivity. Busy.
on: June 18, 2014, 23:06
Quote

I'm doubtful the 'busy' freeze has anything to do with power. It's usually because the polargraph has received a command it doesn't like -- it'll return a message like "coordinate out of range" (something along those lines) in the console. That's not unusual when first setting up a machine. It's easy to get one of the machine specs wrong, or do something with the controller that's unexpected, resulting in commands that stymie the polargraph. And that usually happens when the pen is moving because the polargraph will be told to move the pen somewhere it thinks it can't.

The fact that your motors and drivers are cool is unusual, though. You sure you've pulled the power jumper out of the motorshield? I could see there being a problem if you've got the power coming from the uno and instead of your adapter, causing the uno to reset or something.

Anyway, do the console check before going out and buying a new adapter. (And check that the jumper is off the shield).

brownjd
Newbie
Posts: 7
Permalink
Post Re: Losing connectivity. Busy.
on: June 18, 2014, 23:15
Quote

Jumper is definitely off. I can unplug the AC adapter and motors will stop (and power light goes out on the motor shield). I'll check on the commands and post tonight.

brownjd
Newbie
Posts: 7
Permalink
Post Re: Losing connectivity. Busy.
on: June 19, 2014, 02:44
Quote

Okay, I reproduced with motors running.

incoming: READY
regenerating preview queue.
regenerating preview queue.
Dispatching command: C09,3550,3541,END
Last command:C09,3550,3541,END:2031137544
regenerating preview queue.
incoming: SYNC,3550,3541,END
incoming: READY
incoming: READY
incoming: READY
incoming: READY
incoming: READY
incoming: READY
regenerating preview queue.
Dispatching command: C01,4345,4445,END
Last command:C01,4345,4445,END:1514302686
regenerating preview queue.
incoming: SYNC,4345,4445,END
incoming: READY
regenerating preview queue.
Dispatching command: C01,3856,3944,END
Last command:C01,3856,3944,END:711519010
regenerating preview queue.
incoming: SYNC,3856,3944,END
incoming: READY
regenerating preview queue.
Dispatching command: C01,4933,3155,END
Last command:C01,4933,3155,END:133239904
regenerating preview queue.
incoming: SYNC,4933,3155,END
incoming: READY
regenerating preview queue.
Dispatching command: C01,5415,3916,END
Last command:C01,5415,3916,END:4267995948
regenerating preview queue.
incoming: SYNC,5415,3916,END
incoming: READY
regenerating preview queue.
Dispatching command: C01,4271,5171,END
Last command:C01,4271,5171,END:3160939933
java.io.IOException: Device not configured in writeArray
	at gnu.io.RXTXPort.writeArray(Native Method)
	at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1171)
	at processing.serial.Serial.write(Unknown Source)
	at processing.serial.Serial.write(Unknown Source)
	at polargraphcontroller.dispatchCommandQueue(polargraphcontroller.java:2652)
	at polargraphcontroller.draw(polargraphcontroller.java:698)
	at processing.core.PApplet.handleDraw(Unknown Source)
	at processing.core.PApplet.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:695)
regenerating preview queue.

It stays busy with the last command. Any ideas?

I am running OS X 10.9.3, so I had to install the legacy ftdi drivers. They've never given me any problems, but I mention it in case there's a known issue or something. Sounds like the controller and server are losing serial connection.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Losing connectivity. Busy.
on: June 19, 2014, 23:13
Quote

That's a bit funky isn't it. The serial connection is dropping. Cursory googling links (http://forum.arduino.cc/index.php?topic=65761.0) this to power supply issues indeed, where drawing heavily on the current supplied over the USB causes the board (or at least a part of it) to reset. I don't think this is to do with the motor power, and the external supply.

I know it sounds stupid, but I've had an embarrassing amount of success in troubleshooting by trying different USB cables and different USB ports on your machine (hubs, front panel, back panel, long cable, short cable, cheap cable, expensive cable), and I recommend you try that.

Servo motors draw a comparatively high current, but you aren't using one here, so I guess it isn't a sudden power surge. It might be that it is just continuously on the edge of it's tolerance. With the extra load required to run the logic chips on the motorshield, maybe that just pushes it over? Just a guess. Could even be faulty.

sn

brownjd
Newbie
Posts: 7
Permalink
Post Re: Losing connectivity. Busy.
on: June 20, 2014, 15:55
Quote

I will try a different USB cable.

I did post this problem to the adafruit forums and they had a few suggestions to try, including pulling one h-bridge chip out. I was able to replicate the error with only one motor running (since I only had one chip connected). When I pulled out both chips (empty sockets), but leaving the motor shield connected and powered, I could not replicate the error.

This points to a problem with the shield in my mind. The issue is that I don't see why the motor shield should cause problems with the arduino's serial connection if they are separately powered. I verified that the light goes out on the shield if I unplug its power, so I'm very confident I'm not trying to power steppers off of USB.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Losing connectivity. Busy.
on: June 21, 2014, 12:23
Quote

Whether you have an external supply or not, I suppose the driver ICs still draw power from the logic supply. I wouldn't think they'd draw much though!

sn

brownjd
Newbie
Posts: 7
Permalink
Post Re: Losing connectivity. Busy.
on: June 21, 2014, 20:40
Quote

Think I figured it out with Adafruit support Bill's help. The heat sinks atop my stacked chips were shorting the pins. When I pulled the heat sinks off, I could not replicate the usb port exception.

Bottom line, the heat sinks slide around a little when you're pressing on them to get the chips seated in the socket. You need to make sure they are not touching any of the pins on either side.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Losing connectivity. Busy.
on: June 21, 2014, 20:42
Quote

Gah! Glad you got to the bottom of it!

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