FluidNC // Beginner tutorial // ESP32 GRBL

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
g'day everyone welcome to New Tech my name's miles and it's wonderful to have you here in today's video we're going to be checking out fluid NC and especially if you're looking to upgrade or use fluid NC for the very first time I'm going to go through a whole lot of different options available for you now I've also got a whole lot of different time stamps here so if you want to speed through to a specific part of today's video feel free to jump on there and Skip ahead to where you need to go so let's get started fluidancy is an advanced CNC firmware and it's for use with the esp32 so the esp32 is a 32-bit processor micro controller now that has in integrated in within it a Wi-Fi a Bluetooth and also a USB a serial connection as well so there's lots of different things that we're able to get out of this one chip now the best part about it is if you use it over Wi-Fi you'll be able to use it on multiple different devices it doesn't really matter what type of device that you use you're able to connect to it because it uses its own web page that's stored on the esp32 that you'll access via Wi-Fi Now some really great things about it is that there are regular updates and new features being released all the time so it's something that's evolving and you can add on different features as they release different things it can support up to six different accesses so those machines that might use like a rotary access as well as the XYZ axis you can have a dedicated Act access for those different things and you can also do if you've got two y-axises and you want them to be homes separately you can also set that up as well now it can also be loaded onto various or existing CNC control boards but they have to have the esp32 chip on board so just check what you've got and check what Hardware's compatible with via the wiki for fluid NC you can also ask for any support using the Discord server so there's a really great community on the Discord that you can ask questions to and they can provide answers things like that and the best part about it is is incredibly affordable it's a very cheap processor to buy with esp32 and it also costs absolutely nothing for fluid NC so I'm incredibly thankful for especially Bart who created the fluid NC out of his own time and collaboration with lots of other people to come up with this free software that you can install yourself at home now let's go quickly I'm going to jump over to the fluid NC website and just show you a little bit about how to find fluid NC and where to kind of start with fluid NC so I'm going to start by just typing in fluid NC into Google and you'll see here that it comes up with a GitHub now GitHub is like a website that has been created so people can upload code and they can collaborate on code with with other people and and share their projects now it can be very overwhelming if you've never been to GitHub before so don't worry too much about what you see on the screen so on the left hand side you can see these are all the files that are used to collaborate with to create fluid NC now there's one file in here that we will be accessing through this tutorial so while I'm here I'll just go up to code and I'm just going to download it as a zip so that happens in the background while I'm talking on the right hand side you can also see that we have the releases so if you're watching this maybe in six months time you'll find that there's been different releases there go check out the releases and see what different features or bug fixes have been updated since and even if you have fluid NC already I always suggest go about once a month and go and check out any releases so you can update your fluid NC firmware now to update fluid NC firmware it's so easy just upload one file to the esp32 and then it updates and you don't have to change any files or settings or anything like that it just updates and gives you new features straight away which is great now down the bottom here has a little bit of information about fluid NC itself but the one thing that I want to go to mainly is the check out the wiki if I go and click on the wiki this is a really fantastic resource to look through and I suggest if you're looking to get fluid NC and you haven't seen this yet go through and have a look at this information and read through it because it will certainly help with putting things together for especially your yaml folder and I'll talk about that in a second on the left hand side here you can see that there's a whole lot of topics you can look at like uh you know setting up your accesses set up your homing limits which is your SD card and putting a probe together different spindles that you can use on it different kinematics and bullet of information really helpful stuff now there's one thing that I suggest you going to so you can see especially if you want to find a board or Hardware that's compatible with fluid NC I'll just jump down to the existing Hardware here and you can see that there is a whole lot of different boards that are already available for use with fluid NC you can see a whole lot of these boards have something very much in common and that is this your this esp32 chip now they all use the same chip and they're just different variations because they're just using the pins in different ways some of them have the esp32 board and just plugged into a breakout board and some of them also have the esp32 chip installed directly on the board and all they're doing is using these little pins here to Output to different areas of the board so you can use them you might already have some of these already set up you might already have the MKS DLC 32 on your CNC and you want to update it to esp32 so that is possible now one thing that I want to get and I've just ordered this one is the tiny bit I really like the look of this one um the main reason is because it's a small board has lots of different outputs so it has five different accesses that you can attach I'm going to be using these as external control drivers so just use these pin outs and two external drivers and kind of not use these onboard small drivers that you can clip in I'll go through more in detail on how to upload it but essentially uploading is the same for each one of these boards and I'm going to show you quickly kind of the life cycle of putting these together so there's plenty of boards that they're compatible with and there's a couple down here that aren't compatible let's have a quick look at the kind of the life cycle of fluid NC on how to get it onto your computer so you start by downloading the fluid NC so I'll do that in a second and show you how to do it so we have the fluid NC software we install it straight on the esp32 and that only takes about a minute or so so it's like a generic firmware that's on the the ESP it doesn't know any information about where to send data for example your steps or your your motor drivers or probes it doesn't know any of that information yet because what you need to do is you need to put this yaml file onto it now yaml file is just like a text file that just has the sequence of oh here's my x-axis and I want the x-axis to use this pin as my stepping pin this pin as my direction pin and it gives it kind of like the rules or instructions on how you want your machine set up so it's incredibly easy on how to put this together so what I'm going to do for starters is go back here and I'm going to start installing it onto my esp32 this is the chip that I'm going to be using today now there's a whole lot of different variations obviously of type of chips and you could see that these were just plugged into some some of the breakout boards now on the mpcnc that I built probably about eight months ago I used just this chip alone and then used the pins to Output to my stepper Motors and probe and things like that it is very possible just to use this one you don't need to go out and buy like a specialized board for it so for example this one here is one that I bought from AliExpress now this one here has a lot more outputs has six different axises whereas something like this can only handle three different axises and the main reason is is the difference between this they have the same chips on them they have exactly the same pin outputs but what happens with this board and what you'll find with the large boards is they have these shift registers now I suggest going on to Google or YouTube and having a look at what are shift registers if you don't know what they are and essentially what they are is they kind of just extend your pins a lot further and having more outputs so but unfortunately only uses the shift registers for output sound that you can't use like an input for shift registers so you're kind of limited in how you can use shift registers but I'm not going to go into too much detail about that today because that's something that I'm sure if you want to go down that path you'll do some research so I'm basing today's video mainly about using this esp32 and what I'm going to do is I'm going to show you on how to upload fluid NC to this this board here and how to get it set up so you can use it straight away but before I do that I want to quickly talk to you about how I would go about using this board because if you've ever used arduinos before you can see that these pins here you can get these special type of wires that kind of have these little pin headers and you can put them over the top and then you can connect that to where it needs to go now I don't like using those pin header wires because of two things first thing is that they're incredibly unreliable and the second thing is that they can fall off really easily and cause a lot of issues for you down the track so I suggest if you want to use one of these to go ahead and buy something like this now this is called a terminal adapter so it uses these screw terminals down the side to extend your pins so all you would have to do is just figure out which way it goes on which is this way and you'd go on and clip it in now the issue is here and I'm going to show you the issue because I bought a couple of these going great these look fantastic online now I went through and tried to install it on there and you can see here that the pins don't actually align with the pin headers like there's just like one pin over too much and even if I put it onto the other little pin headers the same thing happens so it goes in between them which is really quite frustrating so there's there's two ways I can go about this is I've got another one here the reason why I didn't use this one is because some guy when they did the soldering at the factory in China they put this side on well but you can see this side uh where's the holes to put the screw terminals in they're actually being installed on the wrong side so I'm gonna have to go through later and desolder that and switch them over so I've got this other board here which has the correct terminal outputs and what I've done with this is that I've just got these pin headers and I'll just gently pushed them down just using these Clippers so it uses this header and this header here and went through and pushed those down as well and you can see here if I look underneath you can see all the traces on the PCB on where they kind of connect to so it's a really simple board there's nothing incredibly complex with it so I'll go ahead and mount that on so I just need to figure out the right way that's the clock there we go so you can see now that even though I've slightly pushed these pin headers out if I go and install it even though I might flare my pins out slightly on my esp32 it actually does align pretty well and um slide in so this this works fine as well alternatively you can do what I once did and go through and create your own breakout board just using like this um prototype board and I've just um connected the terminals screw terminals across to these pin headers I also put in 12 volt to 5 volt regulator here so I can use a 12 volt power supply with the esp32 now this is a bit of a quick and dirty way on how to do it and I'll provide a link down the bottom on an image on how you can achieve this so but I've used it quite a lot and it works often now the other thing that I'd suggest you're doing before you start thinking about wiring is install one of these for your limit switches now what this is is this is an opto coupler so using optical switches that allows you to separate the voltage the reason is is that limit switches go from pretty much your microcontroller and just go one cable all the way out to the machine and that can cause a lot of issues especially if you're using like high powered spindles and stuff they can create electromagnetic fields and then if that ever gets close enough to your limit switch it can actually go and Fry something like this because it can create enough voltage that will go through and could do destroy your microcontroller so I like using these little opto coupler connections so you just put your from here to here you put your XYZ limit switch pins there's also a fourth one that I use for the probe so I'll put them there and then I attach another power source here and then that goes out to the pins and this just keeps them completely separated that they never have that voltage that might come and destroy this pin so that's something else to consider as well okay so I'm going to go through now and upload fluid NC to this um esp32 now what you'll need to check when you're uploading it is that you get a USB cable that has the correct data pins in it some of these USB cables don't have data pin they only just used for power so just charging devices so if it doesn't connect to your computer for some reason go through and change the cable that's the first thing to try out if it doesn't connect to it so I'm going to go through and just go ahead and plug it in you'll see that the little red light flicks to say yep you're now connected and I've got power okay one thing about installing this that I found is that I can't use my windows 11 PC um it's not compatible for some reason it doesn't upload it using the fluid NC software what you'll need to use is a Windows 10 PC to do it so I'm going to jump back over to my desktop here now I'm going to show you on how to download this I'm going to go back to the GitHub and you can see up here where I said before that there are the releases so this is release 3.6.5 I'm going to go ahead and click on this release you can see here that there's a whole lot of features that have been added or bugs that have been fixed up on this one and I'm going to be using this win64 version here so I'm going to go ahead and just click it and it should download it pretty quickly okay now that's come down as a zip file what you'll need to do is unzip this file here so this fluid NC main this is the one that I downloaded at the beginning of the video that has if I just show you what's in there I really just wanted it for this file I know the example configs so this is something that I'm going to reference a little bit later but I'll be using this fluid NC 3.6.5 version so if you right click on this and then go to extract all and you'll find that we can extract it all and it will be just a folder so you'll have like two different versions one will have a zip file and one will have a folder so let's go into the folder one instead okay now the best part about using fluid NC is that you don't need any special like Arduino program or anything to upload it so what you'll need is just this program alone and inside here you can see that there's three different versions there's a Bluetooth version an FS version I think that's just like a normal USB version I can't remember but we also have this Wi-Fi version as well so to install it all you have to do is double click on the Wi-Fi version it will come up with this message just go to more info and go run anyway and we'll go through and find the attached or connected esp32 and I'll go ahead and we'll just start updating it straight away for you don't have to click anything else and that's what I really love and about the Simplicity of what they're doing with fluid NC and how easy this is to create you don't need to go through all these different loopholes to get it done so within that time now it's finished it's uploaded fluid NC and it's ready to go so what I need to do first of all is just restart this um the fluid NC I can do that by just removing the the cable and then reinstalling the cable back in I'm going to get rid of that window for the moment because I'm going to be using this fluid term file that they have in here so what I have to do one of the first things that I need to do I need to go to more info and run anyway for this fluid term I'm using number one which is the com3 now what I need to do is I need to do a couple of things and the issue with the computer that I'm currently using doesn't have Wi-Fi it just has ethernet input so I can't actually show you what the SP looks like at the moment so I'm going to show you using my phone so what you'll see at the moment when I go to Wi-Fi is that I'll have this under my network you should have a blank fluid and see when I click on it it asks for a password so that's quite simple you just go one two three four five six seven eight and then go join okay once you join you'll see the first thing that pops up is that should go directly to the fluid NC page that means that it is connected and it is working now one thing that I have already done is I've already uploaded one of the files that I need for it so I'm just going to go very quickly and show you on how to upload this file here so if I go under Wi-Fi I'm just going to get rid of that terminal if I go on to Wi-Fi for the moment it will have a file called index.html.gz now to run fluid and C with the normal controls that's something that you'll see very much like fluid wear and I'll show what that looks like that's this interface here to have this available that's what this index.html.gz file allows you to see or it uploads it so you have this web page control so what you need to do is get that index.html.gz available you can do that by just going into your fluid NC and then clicking on the open and you can see there in the middle there I've got flip index.html.gz file now if you don't want to do it via Wi-Fi if you can't connect to Wi-Fi yet because you haven't attached it to your Wi-Fi you can do it via this terminal so I'll go back and I'll show you what that means so under fluid term I'll go to one now I can actually upload the file directly from this terminal so I want to show you both ways so I could do it via Wi-Fi if I've connected to it or via terminal so here it says to upload I have to just click control U so I'll go ahead click control U and it opens up a upload file so what I want to do is go into that Wi-Fi folder and I find the index.html.gz file and I go open now all I have to do once that's opened it I just have to click enter and that will go ahead and upload that you can see I think goes up to 126 or something like that is the um the upload number and it happens pretty quickly so once that's gone up there it is it's now installed and you can see it's received and the other thing that you'll need to do is upload a yaml folder now a yaml file now the yaml file I spoke to you about before is kind of like your instructions on how your machine is set up so the the sp32 understands on how that's set up so if I go back over here and I go to downloads I've got this fluid NC DOT man this is the first file that I downloaded if I right click I'm just going to extract actually if I just double click on it I'm just going to copy this file out here which is the example config file and it's going to put it in downloads so I have the example config file here so this example config file now with my machine I've actually got it set up just using the basic esp32 and I'm just using simple pins so this is the yaml file if I open it up I've just pretty much used just the very first file here which is a three axis version four so if I double click on this you can see here that it has everything set up already in here now from this one here you can see here there's a couple of things that you can see straight up so you've got X which is X motor and you can see that this uses a specific pin for the limit so the limit pin is pin 17 and that's at a low you can also see that the direction pin is gpio 14 and the step pin is gpio 12. now I'm going to show you very quickly here that I've mapped this out already on my fluid NC esp32 for you so you can see where these actually join in so if I go back and have a look at this one here I can see that the direction pin is 14 and the step pin is 12 for my x-axis so if I go down here there it is 14 and 12. now that's really simple all I have to do is go from this wire at my direction and step pin straight into my motor driver and my motor drivers already have those pins in it you can see here that these dm-55 556 drivers already have those pins already placed in here so all I have to do is go ahead and put the pool which is my pulse or my step goes into there and my direction goes into the plus and then I can connect all my ground straight back to the ESP board so it's really simple on how to set that up with external drivers now you can also see here that if I go back to this yaml file we have the y-axis that's already set up in the z-axis and we also have the SPI pins as well we have the s SD card is already set up as well so I just use an external like an Arduino SD card module that I connected to it just using the CSP GPO io on five so if I go back here so we have the mossy which is G23 and g19 and G18 so that's what I've set up for my SD card and I've altered this slightly from my version my version also includes laser output as well also I'm not sure if this has a probe in it this one I've also this does have the probe included on it as well on 32. so hopefully that this has kind of given you a really clear idea on how the basics set up now if you're using something that has your shift registers you can actually go through and just have a look on how they've set theirs up so this six pack on 2131 is using shift registers and you can see here that uses this engine i2s stream so you can see here when it uses the pins for these it uses i2so pins now this refers to the shift register pins you can see that we still have our gpio pins but it also uses these other pins and these refer to the shift register pin outputs as well it kind of gives you a good idea on how that this can run on any type of board or how to put it together for yourself so what I need to do before I jump in and upload my yaml folder I need to set up my fluid NC for my local network Now setting on the Wi-Fi is really simple so once you have the ESP setup you can then go go ahead and connect it to your your Wi-Fi or your router that you want to connect to so once you've opened it up in the dashboard you go up to the lines up in the top right hand corner go through to setup and then you go start setup go continue now underneath that it says what access point ESP uh need to be connected to so I'll go search and choose your Wi-Fi network and then go ahead and type in the password and then what is the ESP access point SSID which is fluid NC which is fine and the password for the access point just leave that as it is and then go ahead and go continue and then setup is finishing so once you've finished that you should be able to disconnect from the ESP and then on the desktop now I can connect to it should be on the network should be fluid NC DOT local then go ahead and connect to it now that it's actually available on my whole network that I can have multiple devices be able to connect to um but only at one time so here you can see that everything's set up so once you've finished your yaml file you can obviously use a lot of the files that are up there as your templates to go through and edit the ones that you want to use and and make them yours you can go ahead and just upload them so under fluid NC there we can see that there's an upload or a managed local files button we click on that and then click on upload files and that's where you can upload the files that you need or the yaml file that you want to gain access to to control your system so the one that I've already uploaded is the three axis underscore V4 and I'm just going to go close okay now down underneath here you need to make sure that you name the config file name as the the three axis the one that we just saw underscore v4.yaml and that will make sure that it will use that file that's sitting in the file directory this one here to control the machine or to set up the machine for what we need to so it's got a big green tick and I can just go ahead and restart fluid NC so I hope that this has been enough information for you to get started and I suggest happy reading it is a fantastic platform and I think that the guys who have put it together have just been amazing and I want to thank them very much for putting together fluid NC because this has come to us for free and there's such great support and there's constant attention to updating and putting this together so if you ever get a chance to say thank you to them go ahead and do that but thank you very much guys for watching if you want to find any of the components that I used or any of the yaml files that I also used as well find them in the description below but besides that if you've liked this video please make sure that you do like it subscribe to my channel and I'll see you next time
Info
Channel: NEWTech Creative
Views: 70,357
Rating: undefined out of 5
Keywords: FluidNC, GRBL, CNC controller, ESP32, WI-Fi, CNC, workbee, MPCNC, Avid CNC, X-carve, Pro, Electronics
Id: RSuW-UMqJsY
Channel Id: undefined
Length: 26min 14sec (1574 seconds)
Published: Wed Jan 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.