Chillipeppr, GRBL, JSON and CHROME

My little CNC Controller

My little CNC Controller

Real life’s taken over somewhat, with three kids (one 6 months, one 3.5 years, one, my wife, 38ūüėČ I rarely get time to learn how to use the equipment to actually cut stuff.

During a rare couple of hours free time, I decided to play about with GRBL

I figured I’d explain how I finally managed to get it going on my Arduino Duemilanove, with my Clone CNC Shield V4

Of course, as always, practically, nothing’s been done, the shield is sitting on the arduino, doing its shieldy stuff, there’s no motors or power connected, just a string of stuff coming out of the serial port! (so, it probably works, right?)

FIRST –¬†use GOOGLE CHROME¬†(wasted an hour on that one, couldn’t connect to JSON server!)

SECOND –¬†¬†Download the pre-compiled HEX file – at the GRBL websit home page, scroll down a bit

Direct link – http://Grbl v0.9j Atmega328p 16mhz 115200baud with generic defaults (2015-07-17) (version 0.9J as of writing)

THIRD – Connect up your arduino and flash it with XLOADER – See instructions – HERE

Reset the Arduino

FOURTH РDownload the JSON Serial server from Github РHome page Here

– unzip to somewhere nice (i’m on desktop!) and run the server, ensure to tick ‘allow firewall access

Note down which COM port your Arduino is connected to

FIFTH –¬†Open up CHROME, type in¬†http://localhost:8989

SIXTH РType in the new window that appeared OPEN COM8 115200

(where COM8 is the com number of your serial / USB adaptor on the arduino)

Seventh – FIre up chillipeppr, Select GRBL

Voila, you’re talking, it all seems to automagically work!

Of course, there’ll be a way of automating ¬†/ adding a command line prompt to the JSON thingy so you don’t have to web into localhost first…..small steps eh!

On my travels, also discovered that it’s not trivial to get TinyG2 running on the Arduino Due – with the CNCshieldV4 that I Have ¬†i’ve put that experiment off a little while

Next step, cutting stuff – ETA, 2016?

Copycats! – upcycling ikea tables for enclosure

Having two kids really means that you get almost Zero time to tinker, I can ponder many ideas, but often can’t carry them out in a reasonable time

Referring back to my post here –¬†https://bleughbleugh.wordpress.com/2015/06/22/where-to-put-the-mill/

I’ve just googled someone that’s done just that!….

Sean's Ikea Lack Tables Enclosure

Sean’s Ikea Lack Tables Enclosure

http://3dprint.com/84409/ikea-3d-printer-enclosure/

Off to watch Mach 3 tutorial videos, mayaswell get some theory practice in!

It’s Alive, ALL 4 axis…..

It’s been a few weeks now, still haven’t actually cut anything proper like,

however, a BIG occasion, I can now JOG all 4 axis quite happily in Mach3!

for those looking everywhere (and I did), no-where really quite states obviously or easily the pins on the connector needed to control the 4th Axis, it’s pins 8 & 9

Axis Step Pin# Dir Pin#
X Axis 2 3
Y Axis 4 5
Z Axis 6 7
A Axis 8 9

And Also – another setting needed,

Under CONFIG – Homing / Limits.

Set Soft MAX and Soft MIN on A axis to ZERO, that’ll allow it to rotate forever.

Now, one plus side of getting the A axis to work, it uses the same stepper motors as the X,Y,Z. it should help me to¬†be able to accuratley calibrate the system now as many websites suggest that the 400 steps per rotation is ‘off a bit’….

Here goes. Need to figure out ‘homing’ and how exactly the G-Code relates to the position on the table. most ‘dry runs’ so far have pushed the CNC past its limits…..which is annoying as i don’t have limit switches yet!

JP-1482 Spindle Board

Noting some of the ‘stuff’ on the board, we can see that it’s quite simple really, it’s a small microprocessor controlled, dual¬†sided¬†PCB Two voltages – 18V AC and 36V AC from the secondaries of the transformers, 18V dropped down to 5V to feed the processor electrics….. 36V rectified to DC, then passed to the spindle somehow the micro takes in the variable resistance from the POT at the front of the box and converts it to DC, PWM at whatever voltage the 36V AC is converted down to. Not sure what the extra plugs do yet though, i’ll keep adding to this board STC 15W408AS –

  • SOP16 – Single Chip Micro – 8051 based – 8-12 times faster than standard 8051
  • 8K RAM,
  • 512 Bytes SRAM,
  • 3 Channel PWM,
  • 10 Bit ADC,
  • 5K EEPROM
  • UART
  • SPI
  • 5 external interrupts
  • 2 timers
  • comparator
  • internal clock
  • encryption
  • RS485 Control

Page 68 onwards of the english PDF datasheet covers this IC, LNK 306DN Р AC TO DC CONVERTOR РDATASHEET HERE Р8 PIN IC WITH PIN 3 MISSING IRF 640N РIOR P447D Р5TH Generation power Hexfet MOSFET РDATASHEET HERE KBJ 1510 РBridge Rectifiers РDATA SHEET HERE 78M05  Р5V Voltage regulator РDATASHEET HERE EL817 X 4 4 PIN DIP PHOTOCOUPLER РAKA OPTOISOLATOR РDATASHEETS HERE ES1J X 3 Р1A Ultra fast recovery rectidier РDATASHEET HERE

Spindle Board

Spindle Board

Spindle Board - Top

Spindle Board – Top

There is a few versions of this board around, one older one seems similarly laid out but based upon a 555 timer! Theres a fellow Aussie doing much more digging than I at this time, ill pinch some wording from his page on how my board works. The spindle speed control works by passing the PWM through a low pass filter, then reading the DC voltage produced on an analog pin of a PIC micro. The micro then reads the value (most significant 7-bit’s of 10 bits), and sends it to a digital pot. The digital pot contains an 8-bit data register (16-bit really with command byte) and is 10K and we need 5K, so that’s why we are grabbing 7 bits (need 8 bits and grabbing 7-bits divides the value in half). The last log explains why I need to convert PWM to a resistive value (voltage divider). I’ve also added a feature for the Z auto level probe on the board. The issue there is, my system has been configured to work with Normally Closed limit switches and the act of probing, is a Normally Open operation.¬† ¬† Have look at his projects on Hackaday.io Here

TinyG, TinyG V2, Arduinos

Gonna be slow few weeks….

Some researching on alternate control methods for the CNC, avoiding totally the old school parallel port…

Well, today the parts have arrived, I’ll be assembling them soon,

Looks like it’s Very early days for TinyG V2 and the CNC shields along with the Arduino Due..

However, good news it does seem.

TinyG V2 is compatible with the RAMPS-FD and modified RAMPS 3D printer boards…and another board I’ve just discovered ¬†– GAUPS – HERE

Those devices use  the standard Polulu style driver modules Рthat use the A4988 Stepper Driver from Allegro MicroSystems

My CNC Shield V3 device also uses those devices.

So, fingers crossed, it should be, worst case a simple pin-reconfiguration, probably something I can do in some spare time here

Software!, Another!!!!, CAM thoughts

The Actual, Physical CNC’ing is on hold for a few weeks whilst family come down to visit.

So, doing waaaaay too much research, i’ve narrowed down some software selections,

Here’s some thoughts on the CAM, which’ll probably go out of the window as I’ve still not decided on which CAD software to start putting time into to learn.

this CNC stuff is 90% preparation, design, bugger about. Turns out the fun, actually making physical stuff is only 10%! D’oh!

CAM software – stuff wot makes the toolpaths, in order of pricing

  • http://www.grzsoftware.com/ – Meshcam
    • easy to use
    • well priced – $250 USD (around $340 AUD at time of writing)
    • great for 3D, not so good for 2D

Here’s some other peoples thoughts

http://www.factorydaily.com/node/1223089 – quick compare of 3 CAM softwares

http://blog.cnccookbook.com/2014/01/20/results-from-the-2014-cnccookbook-cam-software-market-share-survey/ – Survey showing top used CAM softawre – Meshcam top, followed by CAMBAM for the hobby market!

CAM2014LowEnd

Annoying, 32 Bit, 64 Bit….More toys to buy?

Well, looks like i’m faced with a few more barriers to my lovely days of CNC’ing

Conventional CNC’s use parallel ports. None of my PC’s have those

complex CNC Driving software, currently is split into two main options.

  • Mach3
    • Needs windows 32 Bit. Ideally a Parallel port but can be used with a USB dongle
  • LinuxCNC
    • won’t work with a USB dongle, only a parallel port, or plugin card

My conundrum ¬†–

All¬†¬†PC’s in the house are 64 Bit,

I have an old Toshiba netbook, NB255-N250, it’s performance is somewhat lacking though¬†with a CPU Mark score of just 290 and an out of the box windows performance rating of just 2.4 (memory jumped from 3.6 to 4.7 after chucking in a 2Gig stick of RAM from hard rubbish instead of the included 1Gig)

So, Time to look at other small, powerful PC’s to run the mill?

Doing a quick compare on CPU Benchmark¬†suggests that the new, cheap intel Atom PC’s, using the Z3735F / Z3736F processors ¬†can get a three fold performance improvement – in the range of 900 CPU Marks

Decisions….

I’ll probably re-install windows AGAIN on my Laptop, it has ¬†a Core i5 M 430 processor which sits around the 2100 PC marks, mark, i’ll chuck windows 8.1 on it and suffer the potential grief of transferring my 64 bit licence to 32 bit, and limiting myself to just 4 Gig of RAM

Right now, i’ll manage with the Toshiba

Another new gadget purchsed – Android TV Box

Thanks to Ozbargain on this one, a $50USD android TV Box

Just picked up one of these Tronsmart R68’s at¬†http://www.geekbuying.com, youtube unboxing here

geekbuying-c8f4d2e5-4d3b-4bf9-9cda-2700556f1d33

Tronsmart-R68-Exclusive-Private-Mould

Some thoughts as to why I purchased

The Boards….Some more information

There are a few circuit boards in the black box that comes with the CNC

    • JP-3163B¬†– Stepper motor control board, 3 channel
    • JP-1635A¬†– Single Channel Stepper motor controller board
    • TB6560AHQ – stepper motor controller chips –¬†TB6560AHQ_AFG-20080407¬†– PDF Manual
    • JP-1482 – Spindle controller board – more information at CNC Arena

Some more information about these, including DIP Switch Settings

TB6560 JP3163B Board inputs outputs TB6560 JP3163B Board Dip Switch Settings TB6560 JP3163B Board PCB ConnectorsJP-1365A

GreenBoard

TinyG – G2 – Arm Processors

Arduino Due 1 РArduino Due 

Reading up in-depth more about Arduinos, CNC’s and ‘stuff’, I’ve found a superb product called TinyG

Reading further on the Synthetos website about the TinyG, I discovered a forked branch of the code that is called G2. It’s basically a TinyG Arm port that uses their G-Shield, which at the time of writing is, unfortunately sold out.

I’ve noted that the G Shield uses TI’s DRV8825 stepper drivers

Whilst Googling those parts, I discovered – This website¬†that basically suggests that they’re pin compatible with the A4988 used in those cheap drivers I picked up. Main advantage of the G-Shield device is that it can do 1/32th of a microstep, so much finer resolution for the CNC. Given that i’ve trouble locating the spindle within roughly the 30×20 area of the CNC without smashing into the limits, I think i’ll manage with 1/16th for now

Oh, the picture.

The V2 sounded rather good, so, I picked up an Arduino Due also, my favourite cheap chinese webstore had a voucher for 10% off so I bagged this for just over $23 AUD

Grand total for my new Shield is now $44.59. and I have the option of standrd TinyG GRBL, or G2

I think i’m going to spend more time buggering about making the thing cut than actually cutting anything…..Still have the software to go yet

Finally, why I haven’t bought a Syntheos product.

I can see that the TinyG V8 board has been out a little while now, there’s headway being made to V9, even some reports of them out for testing. I’m on the wall right now and really happy learning, tinkering. ¬†i’ll be jumping and buying a V9 when it’s releasedūüôā. V8 is¬†a very well reviewed product so I can’t wait to see what V9 has to offer.

For those of you less into the electronics and general tinkering – highly recommend to get a V8, it’s almost plug and play with these cheap, chinese CNC’s

Follow

Get every new post delivered to your Inbox.