Headless Raspberry Pi (or better suggestions!)

dave_the_nerd
Posts: 143
Joined: Thu Oct 09, 2014 3:23 pm

Re: Headless Raspberry Pi (or better suggestions!)

Post by dave_the_nerd » Wed Apr 13, 2016 5:34 pm

Setting up a RPi as a controller in headless mode, you could still connect it to your home network and use VNC or something to control it through software, no LCD or fancy buttons and stuff needed.

I've been very happy just plugging my laptop into the Arduino/gShield and controlling it from there. It's not like I'm going to be leaving it running unattended, and since I'm not going anywhere for the run time of the job, I can surf the web and whatever with my laptop. Hooray. :geek:
Shapeoko 2 # 6651: 500x1000mm, Acme screw and belt drive Z-axis, DW660 w/ IC mount, Arduino/grblShield w/ gCode 0.9g and 3D-printed electronics enclosure.

Joe Pineapples
Posts: 41
Joined: Sun Apr 10, 2016 1:22 pm

Re: Headless Raspberry Pi (or better suggestions!)

Post by Joe Pineapples » Thu Apr 14, 2016 12:00 am

dave_the_nerd wrote:Setting up a RPi as a controller in headless mode, you could still connect it to your home network and use VNC or something to control it through software, no LCD or fancy buttons and stuff needed.

I've been very happy just plugging my laptop into the Arduino/gShield and controlling it from there. It's not like I'm going to be leaving it running unattended, and since I'm not going anywhere for the run time of the job, I can surf the web and whatever with my laptop. Hooray. :geek:
There's a couple of reasons why I don't want this..
-Personal preference, at work I do all my programs on one PC on the office then take USB sticks out to multiple machines on the shop floor.
-My home CNC machines will be in my garage (at the bottom of the garden) which is out of wifi range.
-I want to keep my PC clean and warm, in the house.
-I'm setting my garage out as a home workshop, space is limited and I could do without a PC tower and monitor taking up space.
Nokia 3310 with custom ringtone
Nintendo Gameboy with backlight upgrade and worn D-pad

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Headless Raspberry Pi (or better suggestions!)

Post by cvoinescu » Thu Apr 14, 2016 1:16 pm

I believe that was mentioned as a plus for the Raspberry Pi setup, not as a requirement. You can transfer files over the network too, not just on USB sticks and SD cards, and you can drive it from another PC if you wish, but it should work perfectly fine on its own, without network access.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

WillAdams
Posts: 8523
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Headless Raspberry Pi (or better suggestions!)

Post by WillAdams » Thu Apr 14, 2016 1:19 pm

I believe the Raspberry Pi, headless could be made to work similarly to how I've been using my OrdBot w/ Azteeg X5 mini Smoothieboard:

- do design work on my tablet
- pull microSD Card from Smoothieboard, insert into tablet
- copy files onto microSD
- pull card from tablet, insert into Smoothieboard
- power up system and print from the file on the microSD card, no network or other interface needed

I think the Raspberry Pi just uses a full-sized SD card.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

CrazyBillybob
Posts: 198
Joined: Mon Dec 16, 2013 2:09 pm
Location: Ohio
Contact:

Re: Headless Raspberry Pi (or better suggestions!)

Post by CrazyBillybob » Thu Apr 14, 2016 1:34 pm

At one point I thought about using an Alamode board on the Rasberry Pi to run a Shapeoko. Example http://zapmaker.org/raspberry-pi/3-alam ... -pis-gpio/

Never followed through with it but it might give you what you'r looking for.

CBB

Joe Pineapples
Posts: 41
Joined: Sun Apr 10, 2016 1:22 pm

Re: Headless Raspberry Pi (or better suggestions!)

Post by Joe Pineapples » Thu Apr 14, 2016 8:33 pm

Shook wrote:I have a raspberry pi and use it with my Shapeoko. My concern with a tiny LCD is that the interface won't scale well to that small size.
Shook, would you mind sharing the details of your RasPi setup? Between my day job, coming home to look after a new born son, taking my other son to karate/football three nights a week - the research I am doing isn't yielding much result :(
Nokia 3310 with custom ringtone
Nintendo Gameboy with backlight upgrade and worn D-pad

Shook
Posts: 139
Joined: Thu Nov 12, 2015 6:50 pm
Location: Downingtown, PA

Re: Headless Raspberry Pi (or better suggestions!)

Post by Shook » Fri Apr 15, 2016 4:44 pm

Here's a discussion on using bCNC with Raspberry Pi: https://github.com/vlachoudis/bCNC/issues/12

The basic gist is that unless you're torture-testing the machine, a Raspberry Pi 2 can handle what it needs to.

1) Setup the Raspberry Pi according to Chamnit's comment in the thread above. Most of that is pretty standard if you've ever used a Raspberry Pi. If you haven't, take a look at the adafruit tutorials - https://learn.adafruit.com/adafruit-ras ... i/overview

2) Once you're at the point that you're booting into a GUI, set up the network. Even if you don't plan on using a network with it in its final location, it makes everything easier because if you need to update it, you can bring it into the house and plug it in without a monitor or keyboard, and control it from your laptop.

3) I originally used the bCNC distribution that was linked in the thread above, but a) I don't see it there any longer. b) I never had luck making it work. I think the latter is because bCNC didn't understand the tool change commands and defaulted to running in a safe mode.

4) Make sure that the pi user can access the serial port - at a terminal, type:

Code: Select all

sudo usermod -a -G dialout pi 
5) I'm running universal G-Code Sender from here - https://github.com/winder/Universal-G-Code-Sender

6) Once that's installed shut it down, bring it to the shop and plug it all in. USB from the CNC machine goes into the usb port of the Raspberry Pi. I have an external monitor and the aforementioned keyboard/mouse combo.

---

I work on the CAD / CAM on my laptop in the basement and copy it via the network to the PI. Note on microSD vs. USB storage. The PI boots off of the microSD. Although there is a small FAT boot sector, you're not really going to use that for storage. You should put your files on a usb drive if you don't have a network.

With the file on the Pi, I power on the Shapeoko, open UGS and connect to it on the default serial port. I have limit switches enabled which requires me to home the machine before I can jog it. I home it with the built-in button, then jog it into position or use a macro to go to a pre-determined workspace coordinate system (G54-G59).

I use another macro (http://www.shapeoko.com/forum/viewtopic ... 15&p=50198) to zero the Z-Axis with a touch plate (just a piece of brass plate I measured with calipers). The touch plate and end mill are connected to the control board with alligator clips provided with Additive Aerospace's limit switch kit: http://additive-aerospace.myshopify.com ... -probe-kit

With all of the coordinates and workspace set, I pick the file in UGS and send it to the machine.

Let me know if you still have any questions. Glad to help if I can.
Shapeoko 3 (#1107)

Shook
Posts: 139
Joined: Thu Nov 12, 2015 6:50 pm
Location: Downingtown, PA

Re: Headless Raspberry Pi (or better suggestions!)

Post by Shook » Fri Apr 15, 2016 4:49 pm

WillAdams wrote:
*snip*

I think the Raspberry Pi just uses a full-sized SD card.
The Raspberry Pi 1 used a full-sized SD card to boot from. The newer models use MicroSD. I would highly recommend the Raspberry Pi 3 both because it's faster and because it has built-in wifi and bluetooth. One less thing to think of.

As I mentioned above, the microSD has a tiny FAT partition for boot/config data, but it's not something you want to store files in.
Shapeoko 3 (#1107)

Joe Pineapples
Posts: 41
Joined: Sun Apr 10, 2016 1:22 pm

Re: Headless Raspberry Pi (or better suggestions!)

Post by Joe Pineapples » Mon Apr 18, 2016 9:38 am

Shook wrote:Here's a discussion on using bCNC with Raspberry Pi: https://github.com/vlachoudis/bCNC/issues/12

The basic gist is that unless you're torture-testing the machine, a Raspberry Pi 2 can handle what it needs to.

1) Setup the Raspberry Pi according to Chamnit's comment in the thread above. Most of that is pretty standard if you've ever used a Raspberry Pi. If you haven't, take a look at the adafruit tutorials - https://learn.adafruit.com/adafruit-ras ... i/overview

2) Once you're at the point that you're booting into a GUI, set up the network. Even if you don't plan on using a network with it in its final location, it makes everything easier because if you need to update it, you can bring it into the house and plug it in without a monitor or keyboard, and control it from your laptop.

3) I originally used the bCNC distribution that was linked in the thread above, but a) I don't see it there any longer. b) I never had luck making it work. I think the latter is because bCNC didn't understand the tool change commands and defaulted to running in a safe mode.

4) Make sure that the pi user can access the serial port - at a terminal, type:

Code: Select all

sudo usermod -a -G dialout pi 
5) I'm running universal G-Code Sender from here - https://github.com/winder/Universal-G-Code-Sender

6) Once that's installed shut it down, bring it to the shop and plug it all in. USB from the CNC machine goes into the usb port of the Raspberry Pi. I have an external monitor and the aforementioned keyboard/mouse combo.

---

I work on the CAD / CAM on my laptop in the basement and copy it via the network to the PI. Note on microSD vs. USB storage. The PI boots off of the microSD. Although there is a small FAT boot sector, you're not really going to use that for storage. You should put your files on a usb drive if you don't have a network.

With the file on the Pi, I power on the Shapeoko, open UGS and connect to it on the default serial port. I have limit switches enabled which requires me to home the machine before I can jog it. I home it with the built-in button, then jog it into position or use a macro to go to a pre-determined workspace coordinate system (G54-G59).

I use another macro (http://www.shapeoko.com/forum/viewtopic ... 15&p=50198) to zero the Z-Axis with a touch plate (just a piece of brass plate I measured with calipers). The touch plate and end mill are connected to the control board with alligator clips provided with Additive Aerospace's limit switch kit: http://additive-aerospace.myshopify.com ... -probe-kit

With all of the coordinates and workspace set, I pick the file in UGS and send it to the machine.

Let me know if you still have any questions. Glad to help if I can.
Thanks Shook, after having a look at clips/screenshots, I think the Universal G-code Sender may be more suitable for what I want to do. Although bCNC looks very good, I think it may be overkill for a small-screen headless unit, I'll probably look more into it at a later date for other use though (currently I can't even get it to load an existing DXF or NC file :| ).
I'm looking at various guides and diagrams now and it appears I can wire the Arduino (with GRBL) directly to bigger stepper drivers (for bigger motors), if this is successful I think I'll have what I want.
Nokia 3310 with custom ringtone
Nintendo Gameboy with backlight upgrade and worn D-pad

WillAdams
Posts: 8523
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Headless Raspberry Pi (or better suggestions!)

Post by WillAdams » Mon Apr 18, 2016 10:57 am

List of options at: http://www.shapeoko.com/wiki/index.php/ ... spberry_Pi

Esp. See https://github.com/fsantini/rasPyCNCController (which I really wish had been done as a stripped-down, refactored bCNC, rather than a new project)
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

Post Reply