Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:56 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Pi based CNC anyone?

     Page 1 of 2    
Author Message
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5119
Posted: 01:21am 26 May 2022
Copy link to clipboard 
Print this post

Hiya

My CNC died  

It was using a old Pentium mainboard with WinXP, and using Mach2 as the software. The mainboard has died. Tried swapping for another, and once I got past the WinXP licensing issues, it also died, old hardware. 3rd main board and now XP is stuck in a licencing loop " You need to activate Windows ", " Your Windows is already activated ", "You need to activate Windows ", etc.

Time to modernise. I've started researching and see the Raspberry Pi is used as a hobby CNC controller these days. But before I spend money, just wondering if anyone else has experience with this?

My motors and microsteppers are fine, so I just want to use the Pi GPIO pins directly via optocouplers to isolate the different logic levels, as the Pi is 3.3 but my microsteppers are 5.1. I'm hoping the Pi CNC software can be configured this way.

Thanks
Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Rickard5

Guru

Joined: 31/03/2022
Location: United States
Posts: 463
Posted: 02:10am 26 May 2022
Copy link to clipboard 
Print this post

Gizmo
What are you controlling? I mean I've seen guys make it work, but I wouldn't run my Bridgeport off it
I may be Vulgar, but , while I'm poor, I'm Industrious, Honest,  and trustworthy! I Know my Place
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5119
Posted: 02:30am 26 May 2022
Copy link to clipboard 
Print this post

Its a CNC table, 500*500*150mm. I use it for timber, making circuit boards, some light aluminum work. The stepper controllers are microsteppers and only need a Dir and Step signal at 5.1v

I've got a spare Pi4, going to try out the software later today.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:42am 26 May 2022
Copy link to clipboard 
Print this post

Personally, I wouldn't bother, just because I have one lying around. If you follow the forums, they still have lots of issues with latency and jitter.

I would go straight for one of the Fanuc clones on Aliexpress; they are dirt-cheap, fully featured, robust and can hit 500KHz step-rate.

I am currently building a 6-axis (infinitely expandable) motion controller but I have no intention of incorporating G-Code interpretation. I'll simply take pulses from the clones as position/velocity commands for the closed-loop servo-motors.

If I wanted to go "high-end" with a sexy HMI, I would consider a PC or RPi or Odroid but I would do it properly.



Craig
Edited 2022-05-26 14:49 by Tinine
 
PeterB
Guru

Joined: 05/02/2015
Location: Australia
Posts: 655
Posted: 05:06am 26 May 2022
Copy link to clipboard 
Print this post

G'Day Glenn (and Craig)

I have probably misunderstood the problem but 3.3V signals can usually drive 5V logic.
If not there are several cheap devices to boost / reduce levels.

Good luck.  Peter(B)
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 05:13am 26 May 2022
Copy link to clipboard 
Print this post

Glenn, If you want to take the less adventurous route, I can gift you a mainboard, cpu & RAM with an activation key for WIN XP Pro from old stock I had when I was manufacturing PC's.

PM me if interested.
OA47
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 05:19am 26 May 2022
Copy link to clipboard 
Print this post

  PeterB said  G'Day Glenn (and Craig)

I have probably misunderstood the problem but 3.3V signals can usually drive 5V logic.
If not there are several cheap devices to boost / reduce levels.

Good luck.  Peter(B)


Yup, never had a problem driving 5V but for me, the problem is the other way and I don't really care for voltage dividers. I grabbed a bunch of those level-shifters that Mick (Mixtel90) uses and they seem to get the job done. I use lots of MAX491 xceivers which were fine with the 5v-tolerant Rx pins of the PICs but with the Pico, I have to stick with 3.3v and so level-shifting it is.

There exists 3.3v alternatives for pretty much everything but right now, they fall into the unobtanium category.

Cheers!

Craig
 
PeterB
Guru

Joined: 05/02/2015
Location: Australia
Posts: 655
Posted: 05:27am 26 May 2022
Copy link to clipboard 
Print this post

I suspect OA47 has solved the problem. I have a spare XP machine in the cupboard for when my systam fails.

Peter(B)
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5119
Posted: 05:29am 26 May 2022
Copy link to clipboard 
Print this post

Watching lots of youtube videos. Maybe a arduino based option would be better. The Uno runs at 5v and can talk directly to the microsteppers, http://kalaakaar.in/cnc-controller-with-arduino-tb6600-and-grbl/. Its also dirt cheap.

I have a arduino as the brains of my 3d printer I built a few years ago. It was surprisingly fast. My CNC table is just 3 axis drivers and a spindle on/off, pretty simple. There are homing switches, but I never use them.

Thanks for the offer OA47, but I do have a couple spare laptops I could use to run the software. I was trying to use the original WinXP installation as its been set up with the drivers etc to drive the parallel port at high speed, and all the non essential windows stuff was removed. I didn't want to go through that setup process again.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
PeterB
Guru

Joined: 05/02/2015
Location: Australia
Posts: 655
Posted: 05:44am 26 May 2022
Copy link to clipboard 
Print this post

I think some people have experienced problems trying to drive 5V logic with a laptop.

Peter(B)
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 05:53am 26 May 2022
Copy link to clipboard 
Print this post

Just for interest, I just fired up my old Athalon desktop PC with XP (+ Mint). Still goes.

It is available for nix if you want it Glenn, but it sounds like you want to go a different route.

I'm at Cotswold Hills BTW.

Brian
ChopperP
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 07:15am 26 May 2022
Copy link to clipboard 
Print this post

Grbl on an Uno works well. Tried many things and this is as good as anything
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 08:11am 26 May 2022
Copy link to clipboard 
Print this post

Grbl Controller

Look interesting  

Site
Edited 2022-05-26 18:17 by Tinine
 
ElectroPI
Newbie

Joined: 27/04/2012
Location: Australia
Posts: 37
Posted: 09:55am 26 May 2022
Copy link to clipboard 
Print this post

1. latency & jitter are problems which need to be handled well by programs that run under Windows. Something like Mach3 or Mach4 work well but are not free.
https://www.machsupport.com/software/mach4/

2. as Peter mentioned, grbl on an Uno works very well and is free.
https://github.com/gnea/grbl/releases
Click the wiki button at the top of the page for lots of setup info. Basically the Uno running grbl sits between the computer/laptop and your CNC motor controller. It receives gcode commands from the computer/laptop and controls the CNC machine with built-in ramping of speed, curves, limit switch checking, etc.
Load grbl into an Uno & connect it to your CNC motor controller - the minimum you'll need are pins 2 -> 7 and 0V.



3. plug the Uno into a PC or raspi4 with a USB cable (raspi3B+ and below run too slow so stick with a raspi4 or raspi400). Use a short USB cable (I've had problems in the past with spindle motor noise being picked up by a long USB cable causing the computer to lockup).

4. there's a choice of CNC software to run, eg linuxCNC, Universal Gcode Sender (UGS), Candle, etc (there's lots more in the grbl wiki). Note - for testing if you connect to the Uno using a Terminal program like PuTTY you can type gcode commands and grbl will execute each one in real time.
My favourite program is Candle
https://github.com/Denvi/Candle for Windows or
https://github.com/pihnat/rpi-Candle for raspi4
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5119
Posted: 10:00am 26 May 2022
Copy link to clipboard 
Print this post

Thanks

Looks like there is a port to the ESP32, which is a bit faster than the Uno. I've been using the ESP32 on a few projects lately and have a spare one here, so might have a play. The Uno can get to 30,000 steps per second without jitter, the ESP32 over 60,000 it seams.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Revlac

Guru

Joined: 31/12/2016
Location: Australia
Posts: 1154
Posted: 10:15am 26 May 2022
Copy link to clipboard 
Print this post

I bought a CNC 3018 pro some time back, Yes its a toy but its ok to practice and learn with.
It come with an offline controller, just looked at it and it has the ESP32-wroom-32E, haven't used that controller or the GRBL app.  
Candle is very straight forward sender, and the view of the cutting track has shown me a few mistakes I have made and could go back and correct it before cutting.
Cheers Aaron
Off The Grid
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 10:41am 26 May 2022
Copy link to clipboard 
Print this post

  Gizmo said  Thanks

Looks like there is a port to the ESP32, which is a bit faster than the Uno. I've been using the ESP32 on a few projects lately and have a spare one here, so might have a play. The Uno can get to 30,000 steps per second without jitter, the ESP32 over 60,000 it seams.

Glenn


I for one, would like to follow this project  


Craig
 
Rickard5

Guru

Joined: 31/03/2022
Location: United States
Posts: 463
Posted: 12:14pm 26 May 2022
Copy link to clipboard 
Print this post

I got one of these 3018 machines  and outside of having to remake the spindle mount they are pretty amazing !
I may be Vulgar, but , while I'm poor, I'm Industrious, Honest,  and trustworthy! I Know my Place
 
Rickard5

Guru

Joined: 31/03/2022
Location: United States
Posts: 463
Posted: 12:14pm 26 May 2022
Copy link to clipboard 
Print this post

I got one of these 3018 machines  and outside of having to remake the spindle mount they are pretty amazing !
I may be Vulgar, but , while I'm poor, I'm Industrious, Honest,  and trustworthy! I Know my Place
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2950
Posted: 08:24pm 26 May 2022
Copy link to clipboard 
Print this post

Lads,

I also have a 3018 cnc and am happy enough with it with the standard controller that came with it.

The only thing is the supplied 24v brick they supplied (and replacement they sent as well) is not up to the task.
I bought a decent 5A 24vdc caged PSU from digikey for about $28AU and no problems there.

I have heard many reports of the 3018 stopping mid stream but not experienced it myself so I suspect those issues would be power brick related.  In my case I couldn’t power the spindle to  1000 (RPM??) using any grbl program without having to first go to 600 then 1000.

For about $200AU I think they are pretty good but not easy to assemble

Regards,

Mick
Edited 2022-05-27 06:26 by bigmik
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025