Welcome! Log In Create A New Profile

Advanced

Controlling RAMPS without extra firmware

Posted by yeoyeo 
Controlling RAMPS without extra firmware
January 23, 2020 02:58AM
Hello,

I'm relatively new to arduino but I have bought a ramps 1.4 to run 5 steppers for my project which is a large pick and place machine. Please bear with me as I have a bunch of gaps in my understanding related to my main question which is bolded below:

Is there any way to control the motors (which will be on the RAMPS) through just the Arduino code?



Background: This is a pick and place machine that requires some operator input (in terms of what object to pick up). Based on the given command, the 5 motors should know when to operate (independently) for the end effector arm on the machine to reach the location specified by the operator and get that item.

I've watched a few videos for 3d printers saying to download Marlin, Ponterface and Slic3r to generate g code and operate the motors. I'm a little bit confused as to what these Marlin files I've downloaded do (configuration.h) and how the gcode operates the motors.

Also when the G-code is generated, how does Ponterface communicate to the arduino (which communicates with the ramps)?

Can I write up my own simple g code instructions for the motors to work?

Where would I compile and upload these instructions?



Since I am not 3d printing anything is there any way for me to simply find out which pins are connected from the ramps to the arduino for the stepper motors and just program those to work in the arduino ide? I'm not sure how any of the 3d printing firmware/software (Marlin, Ponterface) could help my project since I need to have an operater put in what object to pick up and to keep track of what is left.

Seems like this is only achievable through the Arduino ide environment.

Any advice or knowledge with how the ramps actually executes any commands would be greatly appreciated!
Re: Controlling RAMPS without extra firmware
January 23, 2020 05:39AM
Yes you can just move steppers them from arduino...

see [reprap.org] for a very simple demo to move all stepper back and forward, (also tuns mosfets on and off)

But you really cant run a p&p like that... its will require alot more programming


gcode are just text instructions to control the firmware. eg G1 X5 Y10 F500 see [marlinfw.org] for details.

The ramps is really a serial device. you send gcode to it in uppercase, it responds with OK when its ready for next command.
There is also more complicate protocol that sends line number and checksums see [reprap.org] for details.


"the 5 motors should know when to operate (independently) "
most ramps firmwares will not do this. X,Y Z are independent, but E0 and E1 are special.

configuration.h is the main configuration file. you edit it so the firmware knows the exact details of your hardware. for eg steps/mm how me steps does your machine need to move 1mm.

Edited 1 time(s). Last edit at 01/23/2020 05:42AM by Dust.
Sorry, only registered users may post in this forum.

Click here to login