Who is using GRBL on Maple Mini/Blue pill?

aroldorosenberg
Tue Oct 30, 2018 9:43 pm
I know that there’s a port, but I want to know how well developed it is so I can design a motherboard for a maple mini and a few stepper drivers, something like the cnc shield for Arduino Nano, but without the design flaw where the drivers are stuck on 1/1 stepping mode. A Bluepill-based board would be even better, given that it can run faster and the USB pins are exposed, so you can use a proper USB-B connector.

EDIT: I already tested it on a physical CNC router and it works pretty well. What kind of filtering/protection should I use when designing the PCB?


aroldorosenberg
Tue Nov 06, 2018 8:55 pm
I came up with this design for the Blue pill.

Excuse the lack of top and bottom layers, they made viewing the layout really difficult, but I’ll put it in github after I get it made and tested

board outline.PNG
board outline.PNG (57.09 KiB) Viewed 1325 times

aroldorosenberg
Fri Dec 07, 2018 6:30 pm
And here is the physical thing!

Lets see if it works

48172261_2155647991163903_20103749775130624_n.jpg
48172261_2155647991163903_20103749775130624_n.jpg (57.67 KiB) Viewed 1070 times

Vicolaships
Sat Dec 08, 2018 11:52 am
Looking great!

What version/fork/branch of grbl have you compiled on the Blue Pill ? https://github.com/usbcnc/grbl ?
I plan to do a similar thing but using bigger steppers/drivers, probably NEMA 34 with TB6600 based drivers.

Keep us updated about your progress :D


aroldorosenberg
Sat Dec 08, 2018 4:09 pm
Isn’t there a single branch? That link is the same I’m using. Too bad I need Coocox to compile it.

Yesterday I tested the board with A4988 stepper drivers, I found out the .lbr for the step sticks was upside down, so I needed to solder the step sticks like this to make it work, but it did work pretty well and I’ll order a corrected and improved version of this board.

I plan to use it with TB6600 drivers using the MKS CD adapter, which works perfectly with the STM32.


paulvdh
Thu Dec 13, 2018 12:21 am
quite some time ago I wrote a program very similar to Grbl and got it to a state where it was sort of working, but still had a lot of rough edges.
Then I tried to toy a bit with LinuxCNC, found Machinekit and bought some BeagleBones and build a CNC machine around that.
My stepper drivers do not fit on a postage stamp, they are aluminum boxes screwed to a backplane.

Recently I decided I made some mistakes, I should have bought a small industrial PC and a MESA card for my CNC back then.
Those won’t fit in the available room any more and it would be quite an extensive rebuild, so I decided to give Grbl a try.
So I found gnea/grbl on Github, cloned it. Changed the name of the programmer in the makefile (Waauw, a makefile) and put it in an AVR.
Paired it with bCNC just to satisfy my curiousity and have some fun and it quite pleases me.
The software has quite a bit of nice functionality and still is not overly complicated.
It looks like an almost perfect balance for my needs.

In the meantime I got interested in STM32, the AVR’s are a bit (but not terribly) slow for grbl. The ATMega328 also does not have enough pins for Grbl and a 16MHz crystal, as used on the arduino boards is a bad choice for UART. The arduino folks apparently never cared to correct this mistake, which leaves the world with UARTS that work “most of the time” at higher baud rates. Not really my kind of soup.
It seems that Grbl is keeping track of some of the ARM clones and it looks like they are moving in the direction of official support for some ARM board, but knowbody knows yet which. My vote is for STM32F103.

So I left my AVR test breadboard hanging by it’s wires on those big stepper drivers and went looking for Grbl for STM32.
Hardware USB, That is what I want, and the extra pins, Flash and MHz are all nice bonusses.
So I found & cloned usbcnc/grbl and put that in a Blue Pill.
bCNC sees my Blue Grbl Pill and I see step and direction signals on my Rigol Scope, but I haven’t connected them to the steppers yet.
I plan to do that in the coming weeks.
Breadboards with such steppers (and a 36V power supply) and a water cooled Chinese 1.5kW spindle is not a combination I particularly like. I have made an investment of around USD1500 in that machine and butloads of time. I have been tinkering on it for years, the whole machine is self built. So I’m in no rush to use a breadboard put plan on building something a bit more reliable on perfboard / vero board.
I have quite some experience with building electronics on perfboard, because most of my projects are only one-off and soldering a board together is about the same amount of work than designing a PCB in KiCad.
The board is mosty a power supply, the Blue Pill, some buffering and interfacing between 3V3 and the optocouplers in the stepper motors and other small stuff. Nothing complicated.

In the meantime I found pretty cheap boards from China which are made to interface with Mach3.
If you search Ali / Ebay / China for “Mach3 100kHz” you find a bunch of different boards with similar layout.
The boards come in Blue or Red, (Just like the Pill’s, is this a coincidence? :) I’ve seen about a handful of very alike but slightly different boards, and some boards which have the same form factor, but quite different electronics, so be a bit carefull.
I have looked closely at a bunch of photographs of these boards and they do have an STM32F103C8T6 on them.
They also have:
– USB
– Poly fuse & voltage regulator.
– Optocouplers.
– 74HC541 for Step & Dir to drive the optocouplers for stepper drivers such as I have.
– ULN2003
– Decent screw connectors.

I do not know if the IDC connector is for programming. If it is not, then a programming header is missing, but the STM32 only needs GND and 2 signal wires for programming and that is an easy mod.
These boards are well below USD 20 and it would be very hard to compete with them.
Yet they are almost perfect for Grbl.
The “bitsensor.com” website mentioned on the silkscreen does not seem to exist anymore but these boards seem pretty popular.
I hope this is the right place to make more people aware of these boards and get some feedback on opinions and Ideas.

I had to shrink and compress the image more to get it accepted on this forum, but with a bit of browsing on Ali / Ebay you can find photographs in which the “STM32F103” text is readable.

grbl_bitsensor_small.jpg
grbl_bitsensor_small.jpg (58.65 KiB) Viewed 929 times

ag123
Thu Dec 13, 2018 6:37 am
i think both the ‘diy’ grbl and the commercial one mentioned are nice :D

aroldorosenberg
Sat Dec 15, 2018 2:35 am
Paulvdh, I went with the GRBL route because I didn’t like the way the wiring turned out to be using that same board (I bought a pair and ended up selling them), not to mention the fact that it’s made to work only with Mach3, which is ancient, closed source and has an awful UI. I did think about the possibility of running GRBL on it, but I’d be back with the wiring issue. It’s nice that it has optocouplers and a 74HC541 IC working as a buffer and those elements could be used on a bluepill cnc board as well. It also shows up as a HID device, now that would be interesting for a proper firmware because no drivers would be needed (BTW, the stm32 grbl runs on Raspberry PI without any driver).

aroldorosenberg
Sun Dec 30, 2018 2:38 am
My test was successful. I changed something in the layout of my board and I’ll order another batch.

Also, a guy kindly added 5 and 6 axis support to GRBL, so I think I’ll try drawing a version of this board with at least a 4th axis, like the red Mach3 controller

gecko.JPG
gecko.JPG (48.11 KiB) Viewed 674 times

Rick Kimball
Sun Dec 30, 2018 3:36 am
[aroldorosenberg – Tue Nov 06, 2018 8:55 pm] –
I came up with this design for the Maple Mini

[aroldorosenberg – Fri Dec 07, 2018 6:30 pm] –
And here is the physical thing!

You do realize that is a bluepill not a maple mini, yes?


aroldorosenberg
Sun Dec 30, 2018 4:28 pm
[Rick Kimball – Sun Dec 30, 2018 3:36 am] –

[aroldorosenberg – Tue Nov 06, 2018 8:55 pm] –
I came up with this design for the Maple Mini

[aroldorosenberg – Fri Dec 07, 2018 6:30 pm] –
And here is the physical thing!

You do realize that is a bluepill not a maple mini, yes?

Give me some credit, buddy. I changed the design to use a Blue Pill instead of a Maple Mini.


Rick Kimball
Sun Dec 30, 2018 5:15 pm
I think your approach, it is excellent.

The problem I have with many posts on this site is the confusion when a post says things that aren’t true.


aroldorosenberg
Tue Jan 01, 2019 3:32 pm
Well I did write maple mini / blue pill

I have some doubts over whether the maple mini would work as well due to the usb self-reset circuitry


aroldorosenberg
Sat Feb 23, 2019 12:25 am
After some changes, here it is! It’s fully functional. Since it works with a BluePill, maybe an all-in-one board could be in the near future.

Image


enif
Sat Feb 23, 2019 10:22 am
Wow – this is a great design, I love it!!!
Do you intend selling these boards? ..or release them as open source?
And do you have any intentions to make a version for 3D-printing, like a kind of BluePill RAMPS?

BennehBoy
Sat Feb 23, 2019 10:58 am
I think I’d like to have a go at building something like this in the future, I assume GRBL can be used for cutting thin sheet metal given the right tooling?

Would be great for cutting car body metalwork patch repairs :D (although I’ve a friend who has his own CNC laser cutting business – but I daresay he’s too busy making money off the machines to do one off’s )

Guessing lasers powerful enough to vut metal might not be cheap/may be hard to obtain :lol:


aroldorosenberg
Sun Feb 24, 2019 3:21 am
[enif – Sat Feb 23, 2019 10:22 am] –
Wow – this is a great design, I love it!!!
Do you intend selling these boards? ..or release them as open source?
And do you have any intentions to make a version for 3D-printing, like a kind of BluePill RAMPS?

Thanks, I’m glad you liked it.
Yes to both. I’ll sell them locally, and I also made a git repository for the Eagle design files in case you want to assemble one.

https://github.com/Alfrederson/cncstm32

There are at least two designs of boards for the BluePill as a 3D printer controller running Marlin 2.0 and I did one as well, but since I couldn’t get Marlin to compile I’m putting it on hold for now.

[BennehBoy – Sat Feb 23, 2019 10:58 am] –
I think I’d like to have a go at building something like this in the future, I assume GRBL can be used for cutting thin sheet metal given the right tooling?

Would be great for cutting car body metalwork patch repairs :D (although I’ve a friend who has his own CNC laser cutting business – but I daresay he’s too busy making money off the machines to do one off’s )

Guessing lasers powerful enough to vut metal might not be cheap/may be hard to obtain :lol:

Some people have controlled cnc plasma cutters with the standard Arduino, it’s not more expensive than a wood router if you already own a plasma torch. I don’t know how well this would play with the interference, but so far it doesn’t seem to be affected by the brushless spindle I own (I don’t own a scope to know for sure, but there are no false endstop triggers or connection drops).


Rick Kimball
Sun Feb 24, 2019 3:55 am
[aroldorosenberg – Sun Feb 24, 2019 3:21 am] –
Yes to both. I’ll sell them locally, and I also made a git repository for the Eagle design files in case you want to assemble one.

https://github.com/Alfrederson/cncstm32

+1 thanks for sharing great job!


enif
Sun Feb 24, 2019 7:33 am
aroldorosenberg wrote:Yes to both. I’ll sell them locally, and I also made a git repository for the Eagle design files in case you want to assemble one.

Leave a Reply

Your email address will not be published. Required fields are marked *