Now building my own Raspberry Pi based controller

Thinking about building my own controller for my machine. Unfortunately it is not an XC (for various reasons). I was not sure if I wanted to use the controller that most people with my machine are using. This controller “Kit” comes with 425oz 4.2a motors, so I would like to continue with that as they seem to push the machines around good. My machine has a table size of 1765mm x 1105mm. Of cource the first thing I went looking for is @PhilJohnson 's Demon controller… Someone in the thread brought up a Raspberry Pi use instead of the Uno… well, I have an extra RPI hanging around…Hmmm

So here are some parts I am considering:

The Raspberry Pi CNC Hat
http://www.ebay.com/itm/Raspberry-Pi-CNC-Hat-V2-58-GRBL-v1-1-Compatible-Extra-Options-/272596155477

425oz 4.2a Motors

The Drivers (same ones you have Phil… I think) (this is the main part I am skeptical about)

and a 24v power supply

Am I headed in the correct direction here? Feel free to correct me as I often speak out of my fourth point of contact.

1 Like

yeah they seem to do good… there is a video of the creator of this cnc riding the gantry

@BlueLocktite The Pi takes the place of your computer, not the Uno, sending gCode to the controller. The CNC Hat is essentially an Uno with a CNC shield. There may be advantages depending on how you want to run the machine.

Yes, true Neil. I knew what I meant to say and typed it sideways. ha ha

Well when the machine is in the shop (spring when the shop is built) I thought it would be good not to have my laptop out there getting all dusty… so there it can be used remotely or I can turn on a monitor and manipulate the machine directly from the Pi.

Most people that have my machine (Gatton CNC) are using Mach3. I don’t want to use it because it needs an old windows machine and that just seems like such a step backwards to me.

one thing I can think of right away is the fact that you would not have an USB cable connecting the two. this seems to be the weak point especially on a plasma cutter with a high frequency start. you would be eliminating one place for interference. I have wanted to try one of these as I already use a raspberry pi 3 anyway and have an USB cable to the X-Controller.

Definitely…there are several reasons to use a Raspberry Pi. A couple more: they’re cheap, you can set it up to run your machine remotely, easily hook up a camera, add a touchscreen, and, if you’re adept at Python or willing to learn, you can have use the extra I/O pins for all kinds of cool stuff. Want your machine to send a tweet pith a picture of your completed job? Go for it. (I wouldn’t recommend being that hands off on a CNC machine unless it’s a small drawing robot or something)

1 Like

One thin to look out for is to make sure whatever you use is a 5V device (like the UNO) - as opposed to 3v.
Most of the 3v devices can’t drive the external motor controllers directly. You can use a voltage adaptor chip, but that is more cost and time to wire up. So something to think about.

from the protoneer site

The MCU is powered by the Raspberry Pi and runs at 5V(Level shifters are in place to allow the MCU and Pi to communicate at diverant logic level voltages).

from what I have read there is a voltage converter in the board that changes the voltage so that the two boards can work as one.

Was working on the wiring diagram this evening a little. Here is where I am currently… Sorry for the horrible photo.

Still lots more to figure out… buttons and stuff.
A few other notes about the photo. Planning on (2) 40mm fans blowing in to the box and (2) 40mm fans blowing out of the box. Amazon has a group of (5) of these fans for less than $12… and yup it is Prime. Also on the wiring to the motors, I just showed the on wire going to it but in reality it is 4 wires.

With the Raspberry Pi CNC Hat, you can actually use Pololu Stepper drivers attached directly to the hat… bad part is that it is maxed at 2a so with larger drivers you have to plug in Pololu Socket to External Conversion Boards. Pretty cool way to get around that power issue. They are $5 total… sounds good to me.

Well I have more changes I am sure… but this is where it is now.

Give me your thoughts and I will keep refining it.

1 Like

crud… just realized I have it showing all 4 drivers being used on the board. I will need to change it to slave two on the Y.

Planet CNC Mrk 3/4 is what I just went to. I’m still in the build phase but I have the electronics sorted. Planet CNC has its own interface much like Mach 3. They do offer a card reader so you could plug in a sd card and go, or which could be easier depending on your home network. The controller is network capable so if you had a network drop where your machine is you could have your computer anywhere. Something to think about. I will say so far I like the Planet CNC software far more than UGS or Easel. Just my 2 cents.

Cheers

1 Like

I have been pretty busy and haven’t kept at this but trying to return to it.

@JeffAnderson what size motors are you using?

The 270oz 1/4" dual shaft from Automation Technologies

Ah cool thanks.

Crazy enough… This Old Tony on YouTube just released a video today about rebuilding his Power Supply for his machine.

In it he talks about this formula for figuring out his power supply:

Motor amperage * 2/3 = (Driver amperage) * number of motors = Power supply amperage needed

If I am understanding this correctly with the motor specs above (4.2A) it shakes out like this with the formula:
4.2 * 2/3 = 2.77A * 4 = 11.08A

The next part he talks about is the voltage requirement. That formula is:
V=32* square root of the Motor inductance

That works out like this:
32 * square root of 3.8mH = 62.39V

So I need a power supply that will put out 62V at 11A… closest I found so far is going with (2) 350W 60V,5.9A and then splitting the drivers so that 2 work on each power supply.

That leads me now back to the drivers… The one above wont work because it needs to be at 60v (really supposed to be 62 but I think it will be ok?) That puts me on this one.
https://www.omc-stepperonline.com/stepper-motor-driver/leadshine-dm856-stepper-drive-20-80-vdc-input-05-56a-output-current-dm856.html

with all this… it is putting me about $400 (which is the same amount that the other controller is that people are using with my CNC. (I am not running an XC but I like the community) Looks like I may have some configuring still to do… if I am even correct on all this.

Oh something to think about… I am using much larger motors than most will. if you use the 2** motors and stuff your costs should be much lower than mine.

… and just so it is all in one spot and I don’t loose it. here is the link for the sockets for the external drivers.
http://www.ebay.com/itm/Pololu-Socket-To-External-Driver-conversion-board-/272511745429

That Gecko formula had me thinking several times whether it’s worth building my electronics from scratch. The 24V power supply that comes inside the X-Controller holds back a significant portion of my (relatively) high inductance motors.

To give you an idea, the very popular 269oz*in ones used by many people here have an inductance of 5.4mH and should theoretically be powered by 74V !! Most people (including myself) use them with 24V power supplies.

What I am trying to say is that a 48V power supply could be a better match for your motors (as opposed to a theoretical 60V) as a sweet spot between cost, performance and overheating.

Then you can stick with up-to-50V drivers (e.g. DM542T) and save some $ too. That is:

$43 for a 500W 48V PS
4x$25 for 425oz*in motors
4x$25 for DM542T drivers

That is $243 with marginally underperforming but cooler motors (instead of $362 and motors working closer to their limit).

This, along with the protoneer RPI hat, is exactly the setup I have in mind whenever I decide to go for new electronics.

@EliasPolitis Thanks for the food for thought. I looked again at the box that many are using with my CNC (Xylotex) and it says that it is a 4A Drive box, and I cant think that they are underdriving those motors that much (but I guess it is possible) I know it is using a 24v power supply.

I will do some more configuring.

I am running the 269 oz/in motors with a 48v powersupply on my Gecko G540…the motors are incredibly powerful in this configuration.

1 Like