Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Polargraph not connected and Command Queue not sent
brobes05
Newbie
Posts: 20
Permalink
Post Polargraph not connected and Command Queue not sent
on: February 8, 2016, 08:06
Quote

Hello Sandy,

Thank you for your excellent work. I am working on building a polargraph for independent study in Architecture school. My problem is that after I choose my correct serial port, I get the text saying that there has been a successful connection in the debugging window. Unfortunately, I am not getting a successful green connection in the processing polargraph interface. Strangely, it was working earlier when I updated the firmware. Now it seems to have stopped.

Furthermore, when I enable the command queue, the commands do not seem to disappear until there are none left.

Any ideas as to what I may be doing wrong would be greatly appreciated! I have attempted to unplug the arduino + shield to reset the device.

Thank you again for your excellent work!
Erik
Image

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Polargraph not connected and Command Queue not sent
on: February 8, 2016, 20:55
Quote

Connecting to the serial port is one thing, but it's receiving the "READY" messages from the arduino that triggers the controller to go green, and start feeding commands.

If it was working earlier with different firmware, I'd suggest the problem is with the new firmware. What happens when you go back to the old firmware?

In the Arduino IDE, check the serial port monitor to see what's coming out of the arduino. Baud 57600.

sn

brobes05
Newbie
Posts: 20
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 9, 2016, 02:47
Quote

Thank you for your reply Sandy,

I have sorted it out by installing v2 of the firmware. I think I did that yesterday, but changed the baud rate on the serial port of arduino IDE and it seems to be working. EDIT: I do not get a connection unless I update the firmware every time after closing Processing and using Arduino. Do you happen to know why? It works to update everytime, but seems unnecessary. I have checked and have all of the libraries installed that you have listed.

My major problem now, is that after I have set my machine dimensions as well as paper size, steps, etc... When I enable some points by, 'move pen to point', to test the adafruit stepper motors, I am simple getting a small warble of about 5 degrees back and forth until all of the commands are executed. I would think that the motors would be making full rotations.

Do you have any suggestions? Thank you again, I very much appreciate your help. Thank you.
Erik

My specs are:

Arduino Uno
AdaFruit MotorShield v2
AdaFruit Nema17
Windows7

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Polargraph not connected and Command Queue not sent
on: February 9, 2016, 20:41
Quote

You shouldn't have to update the firmware, no, that shows you're doing something a bit wrong.

Close arduino after doing it once, and you should never have to do it again. You can't connect if the arduino serial monitor is open.

Ok, in the controller, you need to "upload machine spec" before attempting and moves. Always do a "set home".

The small warble is probably just the motors engaging. What does the Processing console say is happening?

https://github.com/euphy/polargraph/wiki/Gondola-isn't-moving

sn

brobes05
Newbie
Posts: 20
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 9, 2016, 23:17
Quote

I appreciate the response Sandy,

I realize now that polargraph controller works every time that the firmware is updated with either firmware v1 or v2 from xloader. Still after I open arduino it fails again and I have to repeat.

Other than that, I have uploaded the machine specs and now the motors won't move at all. I'll give it a shot with firmware v2 again. It is puzzling that the motors work fine in Arduino.

Thanks again for your help.
Best,
erik
Image

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Polargraph not connected and Command Queue not sent
on: February 10, 2016, 07:42
Quote

Are you opening the serial monitor in Arduino? How are you testing that the motors work in Arduino? Manually entering a "move to" command?

I'm really confused about what process you're following, you might need to be a bit more methodical and clear about your explanation if you want me to be able to help.

Sn

brobes05
Newbie
Posts: 20
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 10, 2016, 23:11
Quote

Thanks again Sandy. Sorry for my lack of clarity.
I am opening a serial monitor in Arduino, I am using a stepper sketch provided by AdaFruit called, 'StepperTest' to test the motors.

I am following this process: http://www.polargraph.co.uk/setup/polargraphsd-controller-application/ as well as your instructables process.

I am connected on com10 and have uploaded my machine specs to the controller. I then manually enter, 'move to' and enable the program and it does not move.

Thank you again and I hope I have been clearer.
I appreciate the help.

Erik

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Polargraph not connected and Command Queue not sent
on: February 11, 2016, 08:07
Quote

You always need to do a "set home" before you make any moves.

There isn't a function called "move to", there are two (move pen to point, move direct), and it makes a difference which one you use as to which behaviour you'd expect. "move pen to point" should move even if you haven't set home, but it'll move wrong. "move direct" won't move unless you've set home.

Good news regarding the stepper test though, yes, at least you know it can work. So you upload the stepper test firmware, saw the motors moving. Then uploaded the polargraph_server_a1 firmware, and close ARduino IDE to use the Polargraph controller instead.

I'll mention it again: The polargraphcontroller can't connect if the serial monitor is open.

You've connected ok? (green text at the top)
You've uploaded the spec ok? (the queue empties)
You've watched the console as suggested in https://github.com/euphy/polargraph/wiki/Gondola-isn't-moving, and no useful messages are appearing in it? (no error messages)
There is a thing called the message log, which is to the right hand side of the command queue. Some error messages appear there too. (http://www.polargraph.co.uk/2014/08/feedback-in-the-controller/)

sn

brobes05
Newbie
Posts: 20
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 12, 2016, 02:58
Quote

Sandy,

Thank you for you efforts in troubleshooting my issues. I have done everything in your response email. I load the sketch in the Arduino IDE and watch the stepper move, then I upload the firmware with Xloader and see action on the serial monitor. Then I close the Arduino IDE and open Processing and upload my machine specs.

The serial monitor is closed as it closes when I shut down Arduino, so I don't see how it could remain open. Also, Arduino and Processing occupy the same serial port.

Maybe a solution would be to be the electronics from you. I am an architecture student so I have a 3D printer and have been making all of the parts. If I purchase a kit from you it will definitely work right? I had wanted to try on my own before I made the purchase, but there is some issue. Maybe my soldering, who knows.

Thanks again,
Erik

bolo16
Newbie
Posts: 10
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 12, 2016, 08:32
Quote

Erik.
Did you try with another USB cable? I had similar problem, when the USB cable was a little bit to long. I was not able to upload sketch into ARDUINO, but Polargraph can not to connect to PC.

Guest

Posts: 7
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 12, 2016, 17:19
Quote

Hi Bolo,
Yes, I have tried multiple cable and ports. I must be doing something wrong with the install of the firmware, arduino, processing chain. It's difficult to troubleshoot. I am able to upload sketches with 'polargraph ready', I just don't get any movement.
Thank you for your reply.
Erik

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Polargraph not connected and Command Queue not sent
on: February 13, 2016, 07:59
Quote

I really don't think the electronics are the problem. As you've proven, the hardware works OK with the adafruit sketch, so that rules out the electronics as an issue.

You've skipped over important parts of the assistance each time: What does the console reveal? Are there any feedback messages showing up in the controller? If the problem is in the software, you're going to have the exact same problem with an 'proper' polargraph. Until you figure out what the problem is, using the troubleshooting tools available (the console).

Sn

brobes05
Newbie
Posts: 20
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 16, 2016, 22:51
Quote

Hey Sandy,

I have managed to get everything working except for the servo. When I click pen lift and pen drop, I am not getting any servo movement. The steppers are working fine it seems though. I had previously not gone into the Arduino code and enabled everything properly. Also the console is displaying no errors and everything seems to be set other than the servo. Any ideas? Here is the setup I have either commented or uncommented.

// 1. Specify what kind of controller board you are using
// ======================================================
// UNO or MEGA. Uncomment the line for the kind of board you have.
//#ifndef MICROCONTROLLER
#define MICROCONTROLLER MC_UNO
//#define MICROCONTROLLER MC_MEGA
//#endif


// 2. Add some libraries if you have a MEGA
// ========================================
// Uncomment the SPI and SD lines below if you have a MEGA.  
// http://forum.arduino.cc/index.php?topic=173584.0
//#include <SPI.h>
//#include <SD.h>


// 3. Specify what kind of motor driver you are using
// ==================================================
// Only ONE set of lines below should be uncommented.

//   i. Adafruit Motorshield v1. The original, and still the best.
//   -------------------------------------------------------------
//#define ADAFRUIT_MOTORSHIELD_V1
//#include <AFMotor.h>

//   ii. Adafruit Motorshield v2. It's all squealy.
//   ----------------------------------------------
#define ADAFRUIT_MOTORSHIELD_V2
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"

//   iii. Using discrete stepper drivers? (eg EasyDriver, stepstick, Pololu gear)
//   ----------------------------------------------------------------------------
//   Don't forget to define your pins in 'configuration.ino'.
//#define SERIAL_STEPPER_DRIVERS 

//   iv. Using a signal amplifier like a UNL2003? 
//   --------------------------------------------
//   Don't forget to define your pins in 'configuration.ino'.
//   #define UNL2003_DRIVER


// 4.  Turn on some debugging code if you want horror
// =================================================
//#define DEBUG
//#define DEBUG_COMMS
//#define DEBUG_PENLIFT
//#define DEBUG_PIXEL


// 5.  Disable program features if you need to free up space
// ========================================================
#define PIXEL_DRAWING
#define PENLIFT
#define VECTOR_LINES



/*  ===========================================================  
    These variables are common to all polargraph server builds
bolo16
Newbie
Posts: 10
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 17, 2016, 08:37
Quote

Hi brobes05

Did you try both servo1 and servo2 connectors on the motor shield board? For me servo is working when it is connected to servo2.

brobes05
Newbie
Posts: 20
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 18, 2016, 20:01
Quote

Thanks bolo!

I switched the servo input and it works. I still had a problem uploading the arduino sketch as it was missing the "utility/Adafruit_PWMServoDriver.h" or whatever the exact phrase is. I simply removed the prefix of 'utility' and it was able to find the library. I am not sure why that prefix was added. Furthermore, with the updated Adafruit Motor V2 library, the servo .h file has been renamed to Adafruit_MS_PWMServoDriver.h rather than the former. I suppose it will work with either, but I'll stick with this hack for now.

Thanks again, now to finally test a drawing.
Fingers crossed.

Erik

bolo16
Newbie
Posts: 10
Permalink
Post Re: Polargraph not connected and Command Queue not sent
on: February 19, 2016, 14:36
Quote

Hi Erik
Try this: https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
Maby this is the solution ?

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Polargraph not connected and Command Queue not sent
on: February 19, 2016, 15:57
Quote

The polargraph firmware uses the regular arduino servo library, no extra stuff is needed.

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