Forum Replies Created
-
AuthorPosts
-
July 14, 2017 at 1:43 am in reply to: can i use grblshield as a general purpose stepper controller? #10462mrwildbobMember
Do you have any sample code I can load to test. I am trying to use my shield just to control my steppers until I get my machine finished. This way I can tweak the machine before calibration.
Thanks!
boB
mrwildbobMemberLast night when I was in bed, I had an idea.
My CNC machine is not your typical machine. It will only have one purpose. My axis assignment is based on the orientation of the part to be worked, so it might not sound correct but the Z axis is a conventional Z axis. As far as the mechanics, I will make two Z axis back to back.
After starting the job the machine will position the Y axis to a specific location. Then Z2 axis will drill a hole, then move the Y axis to the next position and tap the hole for a setscrew. Z2 will go back home, then Y axis will move to the final position for engraving. The Z1 axis will then engrave the part with the design. When the job completes, all axis return back home and wait for the next part.
My solution: Use a TinyG and gShield and create a hybrid machine using two independent controllers. They don’t even need to know the other is there. At each process, I only need to talk to one controller at a time. The TinyG would control the X, Y and Z1 axis and the gShield would control the Z2 axis and tapping stepper only. Since the Z2 axis is just a drill and a tap, I can setup the python script to send the first instruction to move the Y axis to the correct location and wait there. Then the script will send the next gcode commands to the other controller and drill and tap. When those commands are done, control is back to the TinyG and it will finish the job with the engraving. I know this setup sounds weird, and it is, but I am focusing more on automation at this point. I plan to hand code most of the gcode anyway or create parts using a program and then modify for my needs. As far as spindle control goes, both spindles have controllers with pots on them. I could set the speed with them and forget about the PWM. I will use a relay board to turn on the spindles.
Once I get all this figured out and built, I am going to document and possibly make a video.
boB
mrwildbobMemberI wanted to share my progress. After spending a lot of time researching, I have been able to come up with a solution. I took your advice and decided to try the RPi route. I was able to achieve my end goal of making a standalone machine.
My setup consists of a Raspberry Pi 2 B, TinyG, and a few other minor accessories. I created a Python script by looking at other scripts and adding things as I learned Python. I have to admit, it was not as hard as I thought it was. I found some code that would enable me to stream the gcode to the TinyG with flow control. I created a <Donald Trump> huge </Donald Trump> gcode file and watched it send the job. I setup a series of push button switches for my functions (Start Job, Pause, Resume, Halt, Reset, Power down RPi, etc.). I have the gcode stored on the SD card for now but plan to use a USB drive to make it portable in the future. I have it connected to my network so I can SSH into it and edit scripts as needed. Having it networked might be a permanent feature as I can update it remotely.
Overall, I feel very comfortable with the current setup and feel it will do more than I need for now. It would be nice to have a LCD display to see progress and status coming back from the TinyG. That will be my next “feature”.
Thanks for your help.
boB
mrwildbobMemberjlauer,
Are you using Chilipeppr or are you streaming the gcode from the RPi to the TinyG?
boB
mrwildbobMemberI see where your coming from. I will consider the RPi and see what options are available. My goal is to make something that anyone can operate with out any formal training. Just load the stock and press start. I could possibly make the RPi limited to only certain functions.
Thanks for the ideas and help.
boBmrwildbobMemberhahaha Figures, I go the other direction.
Thanks for the info.
I had an idea and wanted to run it by you and see what you thought. If I got an Arduino Mega with a USB host shield and SD card, do you think it would work? I figured the buffering issues are resolved by using the USB host shield. The Arduino can then send the gcode after hitting the start button.
Your thoughts
mrwildbobMemberI have gone through the wiki pages including search engines and I am not able to find some kind of guide. I know people have done it and see machines on the market that have that ability. Detailed would be great, but something to give me a direction to head would be very helpful.
I have read someone used an Arduino Mega ADK, and added a SD card and was able to get it to send the data, but they had no other information. I would like to make something very simple that works. I do not wish to use the RPi or BBB. They’re great products but not for this project. I want to make a machine that does the same job all the time. The least user intervention the better. A good example, a toaster, put the bread in, press the lever, walk away.
I will keep researching for this project. I was hoping someone already has done something like this that could keep me from reinventing the wheel. 🙂
-
AuthorPosts