problem with GcodeCNCDemo and Arduino with Adafruit shield

Shop Forum Everything Else problem with GcodeCNCDemo and Arduino with Adafruit shield

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #6111
    Anonymous
    Inactive

    Hello

    First of all i want to make a school project which involves a 2 axis cnc platform.
    I have an Arduino Uno V3 board with an Adafruit motor shield v2.3.
    All powered by an external charger 12V 1A connected to the Arduino board.
    And 2 stepper motors bipolar with these specs.
    http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Robotics/42BYGHM809.PDF

    So, i installed the arduino board and software, which worked, connected the shield board, connected 2 steppers and tested both with the Adafruit test stepper library and both worked, also with charger set to 5V connected to Arduino board.

    So now my question is, i downloaded the GcodeCNCDemo files from github, zip file, and opened the GcodeCNCDemo2Axis, connected with serial monitor, matched the transfer rate but when i try to send anything it doesnt work, the motors dont even move, at all.
    Serial monitor was set to Newline, nothing worked. Config.h was also preset when i downloaded it to

    #define CONTROLLER AMS2
    #define VERSION (2) // firmware version

    so nothing changed.

    Also tried increasing voltage to 9V, still doesnt work, just more heat from the boards.
    Did i buy the wrong steppers?

    Please i would appreciate any help, thanks very much.

    #7075
    Anonymous
    Inactive

    Found the problem it was the
    #define AMS2_ADDRESS (0x60)
    not 61.

    Anyway now i have another problem, if i set the voltage higher than 5V it starts to overheat a lot. If i leave it at 3V it doesnt work after 3 commands, if it is powered through the Arduino board.

    I will try to power it through the shield. Hope it doesnt burn.

    #7076
    Anonymous
    Inactive

    I really dont know what the problem is, even powered through the shield it still doesnt work with the GcodeCNC program, but it works with the adafruit multistepper example.

    #7077
    Anonymous
    Inactive

    ok, buying 2 new steppers and a lead battery 12V 3,8Ah, hope this solves everything

    Click to access SM-42BYG011-25.pdf

    #7078
    Anonymous
    Inactive

    The only correct way to power the steppers is through the shield. trying to draw power through the arduino could damage the arduino.

    if your steppers are rated 12v i’d be surprised if they move at anything less than that. What is the amperage for each stepper? Your power supply amperage has to be greater than the sum of the amperage of the stepper motors. eg, two 0.5a steppers will draw (together) 1.0a, and the board & arduino will also use a small amount – maybe 0.2a or 0.3a. That means you need a 1.3a PS to be sure your robot doesn’t “brown out” in the middle of doing a job.

    Does that help?

    #7079
    Anonymous
    Inactive

    Thank you, i installed the new steppers, powered them through the shield with no jumper on board and everything is ok.
    The motors are rated for 12V and 0,33A and i used a wall charger with 12V and 1A max but they kinda overheat.

    Anyway i am glad it works, thanks for your help.

    #7080
    Anonymous
    Inactive

    I cannot get any of the demos to compile. The GCodecncdemo2axis just gives “error compiling” along with a large amount of, very hard to read, detail,
    This is it:-

    C:UsersTrevorAppDataLocalTempbuild4704107277036997597.tmp/core.a(wiring.c.o): In function `__vector_16′:
    C:Program Files (x86)Arduinohardwarearduinoavrcoresarduino/wiring.c:49: multiple definition of `__vector_16′
    grblstepper.c.o:C:UsersTrevorDocumentsArduinolibrariesgrbl/stepper.c:416: first defined here
    C:UsersTrevorAppDataLocalTempbuild4704107277036997597.tmp/core.a(HardwareSerial0.cpp.o): In function `__vector_18′:
    C:Program Files (x86)Arduinohardwarearduinoavrcoresarduino/HardwareSerial0.cpp:48: multiple definition of `__vector_18′
    grblserial.c.o:C:UsersTrevorDocumentsArduinolibrariesgrbl/serial.c:160: first defined here
    C:UsersTrevorAppDataLocalTempbuild4704107277036997597.tmp/core.a(HardwareSerial0.cpp.o): In function `__vector_18′:
    C:Program Files (x86)Arduinohardwarearduinoavrcoresarduino/HardwareSerial0.cpp:48: multiple definition of `__vector_19′
    grblserial.c.o:C:UsersTrevorDocumentsArduinolibrariesgrbl/serial.c:42: first defined here
    collect2.exe: error: ld returned 1 exit status
    Error compiling.

    As a new user of Arduino and C++ and Java stuff I am confused beyond measure. I can get two steppers (from DVDs) to run happily using the Adafruit library but being lumbered with gobbledegook of this quality just means I cannot move forward. So any help at all would be great.

    #7081
    Anonymous
    Inactive

    In arduino menu “tools > board” check that “arduino uno” is selected. It is probably giving errors because the wrong board is chosen.

    #7082
    Anonymous
    Inactive

    Oh that it was that simple! No, the IDE is set up for “Arduino Uno” and “COM6 (Arduino Uno)”. BUT one of your forum members (wlr76745) mentions “#define AMS2_ADDRESS (0x60) no 61” I have no idea what that is all about as there no #define statements in the program. Could this be a problem?

    #7083
    Anonymous
    Inactive

    Just to clarify a point I have a clone adafruit V1 motor shield. I should, therefore be using GcodeCNCDemo2AxisV1, but this program (sketch) is not in the download file, the file I am using is GcodeCNCDemo2Axis. I assume the absence of the V1 does not imply that it no longer works with the V1.

    #7084
    Anonymous
    Inactive

    It works. At the top of the file you have to change a setting. The comments tell you what to do. Something like #define MOTHERBOARD AMS1 iirc.

    Same file supports both boards.

    #7085
    Anonymous
    Inactive

    Apparently my first post was incorrect! GcodeCNCDemo6axisV2 compiles perfectly! I didn’t try it earlier as it was a 6 axis (3 stacked boards) which I knew would not work. But why does it compile and all the others don’t?

    #7086
    Anonymous
    Inactive

    Ok I give up! There are NO #define lines in GcodeCNCDemo2axis.ino!! Are we talking about the same program/sketch? And, by the way, I was only trying to get the sketch to verify!

    Anyway I have got the whole thing working now using GRBL and some easydrive boards.

    3 axis CNC device working well.

    Thanks for your help.

    #7087
    Anonymous
    Inactive

    there are 3 files in the folder, GcodeCNCDemo2xis.ino, config.h and ams2.ino, and you basically have to edit the last 2, not the first one

    read the comments it’s everything explained

    also i’m glad it works, good job

    #7088
    Anonymous
    Inactive

    Thanks a million! That does show the level of my stupidity! I didn’t realise that they were anything more than included library files, things which only geniuses edit, and gods write! I will have a go, later, at trying to get this to function.

    I have found, in my trials and attempts with IDE and c++ that I get, fundamentally, the same error if the “void loop” segment is deleted. I fiddle with bits of code in empty files and found this error as I was trying to set up some variables in a completely blank sketch.

    Anyway thanks for all your efforts and the light may just have dawned in my head.

    #7089
    Anonymous
    Inactive

    Sorry to be a nuisance but I thought you might like to know the problem was the GRBL library. Removing it allowed me to verify and upload the code to my arduino. It doesn’t run yet but that is WIP.

    #9478
    Anonymous
    Inactive

    Hello. I am sorry I am a bit new in this.
    I have setup AFMotorShield V1 with arduino uno. i am using GcodeCNCDemo2Axis.ino. Codes are loaded and serial monitor 57600 and Newline working fine. But when i enter G00 X1 Y1 the motors don’t move at all. I checked with stepper motor test examples included in the libraries and motors worked fine in the tests.

    I tried member wlr76745’s suggestion #define AMS2_ADDRESS (0x60).
    I loaded I2C scanner and found no I2C device in the MotorShield V1. And i couldn’t find #define Address statement on config.h and am1 files.

    Please help me.

Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.