Using a BeagleBone Black

eagletree
Posts: 96
Joined: Fri Jun 20, 2014 5:15 pm
Location: Western Washington State

Using a BeagleBone Black

Post by eagletree » Fri Jul 11, 2014 10:54 pm

I was studying ways to eliminate the shop computer I'm using to drive my Arduino machine and eventually TinyG machine. While I currently have an old 10.5 Mac acting as a go between which allows me to transfer g-code files to it via TCP, then take remote control to actually connect to the Arduino, my final plan being to replace that with a Mac Mini. I'm not too keen on having an easily destroyable box sitting up at the shop. I started looking at cheap SBCs to be a shop companion to the CNC controller.

I was turned off by the Raspberry Pi as a replacement, just because it doesn't come loaded with Linux. Looked like people in that community are happy to use non-standard OSs even though a version was available to install. The Beagle Bone Black does (Debian), and looks attractive as a cheaply replaceable box I can stick up at the shop and use via VNC. On paper, it sure looks straight forward to employ this device, but has anyone actually been successful in using it to talk via USB serial to the Arduino? If so, was the USB on this small of a unit able to power the Arduino reliably?

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

Re: Using a BeagleBone Black

Post by cvoinescu » Fri Jul 11, 2014 10:58 pm

Why is it a problem that the Pi does not come with Linux pre-installed? It's extremely easy to download it and flash it to a SD card.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

jlauer
Posts: 115
Joined: Thu Jun 26, 2014 9:29 pm

Re: Using a BeagleBone Black

Post by jlauer » Fri Jul 11, 2014 11:29 pm

I've heard from a few folks that they are using a Beagle Bone Black connected via USB serial port to the TinyG for their Shapeoko machines. They're running the ChiliPeppr Serial Port JSON Server on the Beagle Bone. This essentially exposes a websocket interface to send/receive serial port data to/from a browser app. There are binaries available for Beagle Bone Black on the ChiliPeppr site for the Serial Port JSON Server. They are then using ChiliPeppr Hardware Fiddle http://chilipeppr.com/tinyg as the Gcode sender/controller.

So, this can be done and is a really great way to go. If you've got GRBL, it would/could make sense to fork the TinyG workspace on ChiliPeppr and tweak it a bit to work with GRBL.

eagletree
Posts: 96
Joined: Fri Jun 20, 2014 5:15 pm
Location: Western Washington State

Re: Using a BeagleBone Black

Post by eagletree » Fri Jul 11, 2014 11:33 pm

I saw that you could put a Ubuntu variant on the Pi (I think via something called NOOBS?). I was just hoping to reduce the support steps involved in this ancillary computer I have to keep in the shop. It's nice to grab a box that you don't have to set up the OS on. For example, I could grab any old carcass PC and install Linux, and that too would be a cheap asset to leave sitting in the shop (shop is not secure). But it's inviting to have something I can unwrap, plug in, configure the interface and remote into. I'd want to be able to very quickly replace it if it's stolen or damaged. The mill itself is not very turn-key, I wanted to keep extraneous components as turn-key as possible. The beagle bone looked like the best shot at that because there was no download and flash step (BTW, downloading anything is a massive pain with the rural connections I have).

The Pi would be fine too I'm sure. Even if I used it, same question would exist though. I already modified the Python Universal CNC Master to stream g-code running on the 3.4 interpreter so I could drive this mill with this antique Mac, so I'm pretty sure get it working on any Linux. But (being a total noob on the electronics hardware side) I just didn't know if the USB on these SBCs can drive the Arduino? I read that some USB devices require more power than some USBs provide.

If the Pi is more accepted by this community, then I suppose it would be smarter go with it instead. There does seem to be a lot more Pi users than BBB users in the SBC community.

eagletree
Posts: 96
Joined: Fri Jun 20, 2014 5:15 pm
Location: Western Washington State

Re: Using a BeagleBone Black

Post by eagletree » Fri Jul 11, 2014 11:56 pm

jlauer wrote:I've heard from a few folks that they are using a Beagle Bone Black connected via USB serial port to the TinyG for their Shapeoko machines. They're running the ChiliPeppr Serial Port JSON Server on the Beagle Bone. This essentially exposes a websocket interface to send/receive serial port data to/from a browser app. There are binaries available for Beagle Bone Black on the ChiliPeppr site for the Serial Port JSON Server. They are then using ChiliPeppr Hardware Fiddle http://chilipeppr.com/tinyg as the Gcode sender/controller.

So, this can be done and is a really great way to go. If you've got GRBL, it would/could make sense to fork the TinyG workspace on ChiliPeppr and tweak it a bit to work with GRBL.
The TinyG is for the second mill I'm planning, but have only bought the electrical parts and a portion of the hardware for. The one I'm finishing up now is Arduino/G-Shield. For this one, I'm pretty sure that any python capable platform will work for that connection (I'm using stream.py and the python serial.py library on the Mac to make the Arduino work). The WiFi/Ethernet connection was for the other side. The ChiliPeppr looked like a cool approach, except I was wary of the effort in homing all the scripts locally, that are supposed to be pulled from the net. I do want to keep this machine mostly off the net and also would be a little concerned that using potentially non-configuration controlled libraries from elsewhere, could occasionally throw a monkey wrench in my workflow (if the libraries are updated, would seem one would want to test some set ups rather than have changes just appear in the middle of a job). But yes, the thought of having the web server sitting in the shop to connect to is kind of cool. Referencing my previous reply, trying to keep the moving parts down is a goal and it's attractive to just do an ftp of the gcode, then wander up to the shop to actually initiate the job (since you have to be present anyway).

You bring up an interesting point I was thinking about. I would like to run both mills (one GRBL and one TinyG) from the same controlling computer in the shop. I hadn't tested that far ahead (I've not powered up the tinyg and it's steppers yet), but it seems it's just two different serial devices to the controlling computer.

eagletree
Posts: 96
Joined: Fri Jun 20, 2014 5:15 pm
Location: Western Washington State

Re: Using a BeagleBone Black

Post by eagletree » Tue Jul 15, 2014 10:01 pm

To close this. As suggested, I've purchased a Raspberry Pi B+ to handle the gcode sending and local control of the machine. It made a lot of sense since this configuration has a a built in camera so once a job is started, I can leave the shop while it's running.

The Pi did come with a preload of a Debian variant so I'm reasonably comfortable configuring whatever is necessary.

Ninja4826
Posts: 18
Joined: Thu Sep 18, 2014 2:03 am

Re: Using a BeagleBone Black

Post by Ninja4826 » Wed Nov 12, 2014 5:11 pm

I was searching for a way to eliminate the Arduino from an Arduino and grblShield pair, and I stumbled on in here. I saw your question, and thought I'd place my input here. My current build is a Shapeoko 2 with grblShield and Arduino, connected through USB serial to my Beaglebone Black, which is connected to my network. I then SSH into the BeagleBone Black and run a script that I designed myself, which, with command parameters, will download a GCode file from my computer over FTP, send the Arduino the necessary commands, and return the response from the Arduino through the console. Being that I only have a desktop, and I don't want to move my only computer to the garage, I highly recommend doing something similar to this. The script is written in Python, and if you want, I can attach my script. I have to warn you, though, it is a bit messy.

eagletree
Posts: 96
Joined: Fri Jun 20, 2014 5:15 pm
Location: Western Washington State

Re: Using a BeagleBone Black

Post by eagletree » Wed Nov 12, 2014 5:37 pm

Thanks very much for the input. I would agree that having a custom script purpose built would be superior to the stream.py I was using. What I ended up using was Zapmaker's QT application (which should work on any ARM or sunxi linux platform). It only works if you have a sufficient sized screen. The original 7 inch I was using on the pi would not work with that application because if the resolution was set to fit it all on the screen, it was far too small to see, even with a magnifying glass ;). The application says it can support 800x600, but in reality it doesn't, it won't shrink to fit all the widgets on the screen. But I pried a 15.4 lcd out of a busted laptop, bought a chinese LCD board on ebay, hooked that up to the pi, and the application worked perfectly. Aside from sending gcode reliably, it also allows some positioning and homing commands to be done in a point and click manner.

Ninja4826
Posts: 18
Joined: Thu Sep 18, 2014 2:03 am

Re: Using a BeagleBone Black

Post by Ninja4826 » Wed Nov 12, 2014 6:34 pm

I aswell have a 7-inch display, but it is a cape for the BeagleBone. Thank you for mentioning that, because I now realized that I can attach a keyboard and mouse to the BeagleBone, and just use that instead of using a host-computer. Thanks!

EDIT:
I believe ZapMaker's GRBL Controller would work as well, wouldn't it?

eagletree
Posts: 96
Joined: Fri Jun 20, 2014 5:15 pm
Location: Western Washington State

Re: Using a BeagleBone Black

Post by eagletree » Wed Nov 12, 2014 10:44 pm

Yes, that is the application I was talking about. It should run on any Linux system.

It's unfortunate I couldn't use the 7 inch because I also bought a touch screen overlay for it. That would have been very handy onsite at the mill. Since I couldn't, I bought one of those cheap little keyboard mouse combos on ebay. I think they run about $11. It works perfectly on Pi with no changes and will work the Beagle or the many sunxi ARM systems. I thought this would be nice for the mill because it really saves space. It's only about 7 inches long and 3 inches tall. It came with a bluetooth dongle that makes it plug and play as a USB keyboard/mouse.

I had originally wanted the option to run my CAM on the Pi too (so I could turn around small changes while at the mill), but I ended up with Meshcam which only runs on Mac and PC.

Post Reply