Arduino CNC Project.

!!! NEW !!!
I’ve decided to release my arduino source. Hopefully, others can improve upon it, and send me their improved versions, and ideas. It’s always good to give back, no mater how small or insignificant. More info at the end of this post.

Day 1

Received the components now to play 😀

3x EasyDriver v4.4 breakout boards
3x NEMA 23 Stepper Motors
1x Funduino Uno R3

Wiring Diagram

Day 2

New parts arrived today. YAY!! It’s like X-Mas up in here!
IMG_1296
Day 2.5

Well.. Looks like i hit a bit of a snag today… Apparently, my handy-dandy nifty LCD/Keyboard shield for the arduino CNC project is a bust..

The problem is that the LCD shield is using the same pins as the stepper motor drivers..

The LCD uses the following pins:
Pin 4 (DB4)
Pin 5 (DB5)
Pin 6 (DB6)
Pin 7 (DB7)
Pin 8 (RS)
Pin 9 (Enable)
Pin 10 (Backlight)
Analog 0 – Push button switches

The EasyDriver 4.4 break-out boards use these pins:
Pin 2 X-Axis Step
Pin 3 Y-Axis Step
Pin 4 Z-Axis Step
Pin 5 X-Axis Dir
Pin 6 Y-Axis Dir
Pin 7 Z-Axis Dir

As you can seethe LCD shield and the EasyDrivers both require the same pins (4, 5, 6, 7).

I’m not sure if it’s possible to have both devices using the same pins at the same time.

As it’s not possible to share the pins between the LCD shield, and the EasyDrivers, i’m probably going to order one of the more expensive LCD shields that uses the ICSP pins.. That way i’m not using the pins i need for the ED boards.

 

Day 7

Sorry for the delay in updates, waiting for parts is a pain in the bollox.

Almost completed the project box, have everything mounted temporarily while i wait on more parts… ugh.. the wait is killing me, but then again, spreading the cost of the parts out over time makes it easier for me to purchase the better quality stuff, rather than looking for the cheapest Chinese junk i can find on shcmeebay.

It’s picture time boys and girls!

IMG_1297IMG_1298IMG_1299IMG_1300Those Ribbon cables are for the front LED’s, and reset switch on front of the box, 6x green LED’s total, 3 for Axis board power, and 3 for step activity,  1x Red LED for funduino power, and the reset button to reset the funduino if need-be without having to open the box up 🙂

 

And the rat’s nest of temporary wires grows. Will be glad when the blank PCB’s arrive from FoxyTronics, Nate is a really good guy, he sent me a $5.oo discount on my order, simply because i had asked earlier that week on his facebook page if there were any specials happening.. Can’t beat that for customer service!

 

shhhh.. don’t tell anyone, but when i was cutting the hole for the PSU plug.. i goofed.. that’s why you see a little gap there above the plug..

The rounded hole near it is actually square, with a round wire protection sleeve inserted, This was a temporary measure so i could run wires out of the box for the stepper motors. Once i get my PCB’s fabricated, the square hole will be accompanied by a twin square hole next to it, giving me two of them for RJ-45 connectors.. That way i can just use straight-wired cat5 for all three axis motors, and 6 limit switches   Clever aren’t i…

 

 

 

 Day 9

Today i etched my first custom PCB for this project. So i took my fritzing files and exported them as PDF, and selected the mirrod top, and non-mirrored bottom files to FedEX and had them print out three copies of each onto transparencies with these instructions:

NO SCALING
minimum of 120% Toner Density. (The denser the better for transferring)

The total cost of the prints with these settings was just shy of $5.oo
I could have printed them myself, but my printer doesn’t allow me to set the density strong enough for this.

BE SURE YOUR PCB IS COMPLETELY CLEAN, AND FINGERPRINT FREE!!

After carefully aligning the two transparencies, i slipped the double-sided blank PCB between them, and using a common household clothes iron with NO steam, and full heat, ironed the transfer onto the PCB. It’s important to have a piece of paper between the iron and the transparencies.
after a good 5 min’s of ironing one side, the PCB became hot enough itself to hold the other side in place when i flipped the board over to fuse that side. So the second side took much less time than the first.

Once the board, and transparencies where cool to the touch, i gently peeled away the transparency, leaving the toner fused to the copper on the PCB, do this for both sides.

ETCHING!

Who needs Ferric Chloride for etching PCB’s???

NOT ME!!!
Cheap PCB Etching Solution
(Safer than Ferric Chloride, or Cupric Chloride)

60% by volume Distilled White Vinegar @ 5% dilution
40% by volume Hydrogen Peroxide @ 3% dilution
1 tbsp non-iodized salt (Kosher salt)

This mixture worked really well to etch my PCB.
!!! CAUTION !!!
Be sure to do this ins a WELL ventilated area.
Wear gloves, safety-goggles, and a respirator!!
I’m not exactly sure how caustic this stuff is, nor it’s effects if exposed to skin, eyes, or mucus membranes. Simply put..
DON’T TOUCH, DON’T BREATH, DON’T SPLASH, DON’T EAT!!

Also.. any container you use this stuff in, throw it away.. better safe than poisoned!
!!! CAUTION !!!

Directions:
1) mix vinegar and peroxide, add salt, and mix until salt is dissolved.
2) Add masked PCB (I used Laser Toner Transfer method)
3) gently agitate solution
4) If no immediate reaction is visible (slight bubbling) Add a 1/4 teaspoon of the salt to kick off the reaction.
5) The solution will begin to turn blue, after about 5 min’s add 2 tablespoons of hydrogen peroxide to re-invigorate the solution, along with another teaspoon of salt.
6) Continue to agitate.
7) As the solution weakens, and you no longer see the formation of bubbles, repeate step 5.

If done properly, in a safe container (glass) your solution should produce a very good etch. This method, while slower than ferric chloride method, is just as effective, with the added bonus of being safer to dispose of.

 

IMG_1301

 Day 10

IT’S ALIVE!!!!!

Somehow i managed to nail screw, bang, and duct-tape together enough parts, gadgets, doodads, and whatsits to make something that blinks and spins motors..

First test of all the components so far in my 3 axis CNC mill project.. Sorry for the crap quality of video, seem this little android has a sucky camera…

Unfortunately, i still have a LOT of work to do. Mainly, i need to increase the feed, and rapid movement rates, and test the limits of these no-name stepper motors. That way i can max out the step pulse speeds and increase movement for more efficient, and speedier work times, once i finish building the rest of the machine.

TODO:
Acquire 20x60x500 mm T-Rails for X,and Y axis.
Acquire 20x40x200 mm T-Rail for Z axis.
Acquire v-slot bearings… like… alot of them..
odds and ends like fasteners, t-nuts, off-center spacers etc.

 


Day… who counts any more lol..
10/29/2015

Well.. The CNC project has started to move along into the hardware fabrication stage..

All of the code PC side, as well as Arduino side has been completed, as well as all of the electronics have been designed, fabricated, and tested… So.. as my friend Steve Guest from down under says, i’m making progress on my delorean lol…

Finally found someone with a miter saw, so was able to cut the CNC rails at precise measurements @ exact 90 degree angles.

Also measured, and cut out the end plates for the rails, and a test-fit carriage plate from a single piece of 0.25″ x6″ x 12″ 6061T aluminum plate stock. The final cut was rough, as i used a band saw, so i did a bit of light milling on the drill press to ensure everything was symmetrically squared.

Tapped the holes at the ends of the rails with M5 -0.8 tap, and secured the end plates to the rails using 25mm M5 button head screws.. I would have liked to use socket cap screws, but unfortunately, Menards wanted $0.89 for each screw, and i’ll need roughly 50 or so by the time i’m done, and i just can’t see paying $50+tax for some screws!

TODO LIST:

– Need to fabricate the base frame to maintain rigidity, as well as serve as a mounting point for the X-Axis stepper motors, pillow bearings, and lead screws.
– Need to fabricate the two gantry plates that hold the Y-Axis rail, and slides on the two X-Axis rails.
– Need to use a piece of scrap aluminum flat to test fit, and adjust measurements on holes for v-groove bearings.
– Need to procure, or fabricate some aluminum spacers so the carriage plates don’t ride against the sides of the rails.
– Need to fabricate the plunge, or Z-Axis end plates, one with a pillow bearing, and the other with a 35.2mm diameter hole for the stepper motor+spacers+5mm coupler assymbly..

After all that’s done, i can start designing the wire harness, and plan out locations for mounting the end-stop limit switches..
I may end up making a drag chain and for-going the wire-harness approach, we’ll see what the pro’s and con’s of each design are, and if the cost outweighs the benefits of the drag chain idea.

And now… Machine porn!

IMG_1326 IMG_1327 IMG_1328 IMG_1329

 

—————————————————————————

11/20/2015

First fit and test run of the Z-Axis Linear motion.
As you can tell, i need to throw the threaded rod on the lathe and turn it down to center it properly in the coupler. Other than that, it works quite well for designing everything in Adobe Illustrator.


Day….. erm… i have no idea… It’s 12/24/2015 (Christmas eve??? dafuq…)

So… I’m releasing my source code for the arduino mega.

Here’s how it’s “supposed” to work (i haven’t really tested this AT ALL, so fair warning, you should really have an idea of what to do to make it actually work)

Diagram:
CNC_LCD_MEGA_UNO_COMBO

 

 

 

Explination:
Breakdown of parts:
Arduino Uno
Software: GRBL 9x
Hardware: Protoneer v3 CNC Shield

Arduino Mega 2560
Software: LCDKeypadMenuTemplate2 -=[ Download Source Here ]=-
Hardware:
Funduino/Mango 16×2 LCD Keypad Shield (Uses pins 8,9,4,5,6,7)
Cheap Chinese 4×4 membrane button array (NOT IMPLIMENTED YET)
SD Card reader breakout (NOT IMPLIMENTED YET)

The PC connects to the Arduino Mega 2560 via USB, The Arduino Mega 2560 Connects to the Arduino Uno R3 via RX/TX pins.

PC -> Mega -> Uno

The Mega essentially acts as a “Man in the Middle” device between the PC and the Uno.

The workflow of the mega should work like this:
1) Any data flowing through the serial either from the Uno, or the PC are passed on to their respective targets without interruption by the mega. (PC->UNO / UNO->PC)
2) The Mega monitors the serial connection to the uno for positional data (X,Y,Z locations) and displays this on the LCD when it gets new positional data. (There needs to be a lot more work done in this area to further refine the data collection, parsing, display, and
3) If the user wishes, he can send programmed commands from the mega, using the LCD Keypad to cycle through the menu, and select the commands to send. (Reset, Hold/Pause, Home, Zero etc…)

UPDATE:
Since i didn’t feel the need to use an entire arduino mega 2560 to simply serve as a “man in the middle” to display information, i’ve come up with a completely different solution …. I’m going to build my own arduino!!…. Well.. Kind of. I’m simply going to use an Atmega328P-PU MCU chip, 3x 8-digit maxim based LED modules, and a few capacitors, buttons, resistors, and a 16Mhz crystal. Rougly, about $4 worth of componants..

It also saves the arduino Mega for future use.. what ever that may be.

I’ve also crapped the project box, as it just wasn’t large enough to hold the arduino+CNC shield, 2x PSU’s, a PWM controller, and the required cooling to keep everything from melting down into a bubbling parking puddle of burnt electronics, and melted plastic.

With that being said.. I had reached the point, where my project box was no longer big enough to contain the beast…

 
As a recap, i started out with an arduino, an idea, and a small 3.5″x5″x5″ project box. I soon realized that my power consumption needs just couldn’t fit inside that little box, so i upgraded to a 9″x4″x6″ box. After going through the motions of getting the CNC machine built, and cramming all the CNC motion related boards and power in that box, i again, realized i needed even more room..
 
Luckily, i had an old UPS laying around with a fried main-board, and dead battery, so i cannibalized it for the enclosure.. It’s been working out quite well.. and I’m pleased to say, i think i may have the final box.
 
After cramming indicator lights on the front, buttons on the top, a massive 120mm intake fan, a smaller 40mm fan for the CNC stepper drivers, 1 48v 8a PSU for the spindle, a PWM controller, and a “modified” ATX power supply, i end up with the image attached.
 
About the ATX Power supply.. Essentially, the PSU had a over-current & under-current protection IC, the issue with that, is on certain CNC jobs, all three steppers would initiate at once, draining a wee bit more juice than the IC liked, and it would shut down the PSU.. bad news if you’re in the middle of doing something..
 
So to combat this, i simply removed the offending IC (Texas Instruments TPS3510P) and bridged pin3 of the IC to pin 2 (GND).

Now the PSU runs without a hitch, and as an added side effect, for some reason i just can’t comprehend, the PSU actually runs 15°C cooler.

IMG_1497

 
I’ve also completed a prototype of my Digital Read Out system. Just waiting on a few parts to complete the breadboard mock up and test.

IMG_1496

Also, i’ve been rolling the idea around in my head of using an optical mouse encoder as a linear encoder for the machine.. I’ll have to dig into a couple of cheap optical mice to see if i can identify, and get the datasheet for the encoders..
 
That pretty much concludes the update..


4/20/2017

Ordered some more aluminum extrusions, went with openbuilds this time, because quite frankly, they are quite a bit less expensive than Inventables.

However, even though i payed for 2 day shipping, the parts actually took 4 business days. But what can you do?

Anyway, got the rails, and I’m now in the process of fitting everything together, and making measurements for cutting the new rails. Unlike the rails from inventables, these appeared to have been cut by a badger with a lazy dentist, but it’s not really that big of a deal, as i knew i’de have to square up the ends anyway.

Now what you’ve all been waiting for… all 3 of you  :D…
Metal porn!


As always, if you would like to help out, i have an Amazon wish list, feel free to purchase anything on it for me, and be sure to comment on the order so i know who to add to the thank you page at the end of the project.

Like, share, and don’t forget to send me donations so i can keep this project going

Hope to hear some great feedback soon!
—————————————————————————

Supporter’s Acknowledgements

Steve K. – Atlanta, GA
Darren M. – Laredo,Tx
Mark T.  – Omaha, NB

Thank you so much for supporting me while i build this project, it’s quite a bit of learning, and quite a bit of fun, and please know that each and every amazon wish list item that has been fulfilled is being used, and is very much appreciated.

Also, because Steve K. was the first person to reach out, and offer to help me, i will be creating an aluminum plate engraved with his name, and a special thank you from me.
I’m really sorry updates aren’t as often as you would like. Sometimes I’m simply waiting ages for parts, other’s I’m simply extremely busy with real life and work to have time to work on, and post updates.  I’ll try to be better, but as we are getting so much closer to the end of the build, it literally like snapping together Lego’s, and i simply forget to take photos or video during the process.

As always i will continue to edit, and upload photo’s and video as i acquire, and build more components. I also look forward to running the machine, and making the first widget.. here’s to hoping Youtube survives the advertiser backlash long enough for me to finish this project and upload a video!

Leave a Reply