Turning a Mill into CNC to help with an electric car conversion

Hi Neil, hope you’ve had a Merry and safe Christmas for all your family, and thanks for the nice little creative video for us all to enjoy.

Glad to see the spindle and Z axis is coming along.

So Neil, keep on staying safe and have a Happy New Year :partying_face:

Regards Jerry :australia:

Hi Jerry, we have had a great Christmas thank you, albeit a quiet one, but sometimes that’s nice too. Hope you and your family have had a good and safe Christmas too.

Happy New Year :confetti_ball:.

Kind regards,

Neil.

Awesome stuff! Merry Christmas

If you don’t know the scene: old school. You wanna see the movie…

Cheers Quintin, Merry Christmas.

Maybe this toy can re-enact the scene :grin:, although it’s on its way down to my nephew as we type :thinking:.

Hi all,

Hope you are all well, just thought I’d give an update.

I’m still doing things in the background, although have been very busy with my day job, will be changing jobs later this month and moving house (huge task when you have 2 littlen’s). Still on track, the next house has a garage… so the milling machine will move to there, this is good news as I can run it at max speed without worrying about swarf on the carpet, doh!.

So as the machine is packed up I’m getting into the video editing side again and planning the MGF build, where I now have a towbar fitted to my car and a twin axel trailer to transport the MGF.

What is next? Well I still have to finish off the Z-Axis and spindle, although this should be a lot easier in a garage, then it’s directly on to the MGF build.

I want to do a lot more with the ODrive’s in future and am now seriously looking to use them in the MGF. I may even turn up at the Birmingham NEC with it late in the year, that is my altimate short term goal anyway (charred or charging), watch this space.

Happy ODriving,

Neil.

4 Likes

Hi Neil, I wondered where you where, and hoped all was well in your part of the world, I guess Job, and moving would explain your absence.

Yes everyone need a shed/garage mostly for sanity sake, or at least that has been my experience.

Here is something that may interest you for MGF’s future, that is you didn’t know already.
https://fullycharged.show/ let Robert know and I’m sure the show will have interest :slight_smile:

Anyways just glad to hear you are still moving forward.

Regards Jerry. :australia:

1 Like

Thank you Jerry, all is well here.

Looking forward to the garage.

I was a Patron of Robert for a good while and have mentioned it on a few occasions although think the team are really busy and I can’t get the MGF up and running quickly due to the day job :grimacing:.

Hopefully things will move quicker this year.

Kind regards,

Neil.

Very inspiring project Neil, it answers lots of questions to me which I consider in my cnc build, and sure interested to see your experience with BLDC spindle as I plan the same just with little bit more powerful 6384 120KV BLDC. One question, is 5065 powerfull enough for axes? Will it drive 2x bigger cnc?

For your car, might be better to look out at Vesc project? First of all it is more suitable for such aplications, and second there are several high power projects available to the public, you may order your PCB and build your self one which will cost you less then buying one…

1 Like

Hi all,

Hope you are all well.

I’m back, in a new house, with a new day job, after a heart op and now have the garage set up and started creating content.

This is my garage setup…

Although the video I’ve just uploaded was made in the old house. Here it is though: -

Now I’ll be able to get on with the Z and spindle drives.

Happy ODriving,

Neil.

4 Likes

Hello all,

I hope all is well.

I’ve been busy getting a new PC for video editing, getting on with a long edit (the video below) and tweaking the design of the Z and Spindle parts to machine out.

I can’t say how happy I am with the ODrive system. The accuracy allows me to create parts near perfect dimensions and repeat them with negligible deviation.

Here is my latest video: -

Hope you enjoy it.

Happy ODriving.

Neil.

Hello all,

Hope you are all having a good weekend.

I know I haven’t posted in a while, so thought I’d give an update and share the CNC mill development so far, basically, I’m now going to control the ODrive with a Teensy 4.1 and use a Gameduino 3x Dazzler to display on a Portrait oriented HDMI display.

Ye Olde controller that can be frustrating to use…

New Display using the Teensy 4.1 controlling the Gameduino 3x Dazzler…

Programming the Teensy (easier than I thought).

Teensy 4.1 connected to the Gameduino 3x Dazzler.

As you can see in the pictures, I am currently upgrading the CNC controller and display for seeing all the information easily and with a resolution of 720 x 1280.

This will have so many positives when it comes to machining out parts, not only speed, but also showing all aspects of the machine while it works.

The main idea behind getting this setup is so I can fit a display like this in the MGF and monitor everything about the MGF Electric Power Unit, what do you think? Could look a little Tesla’ish.

What’s the cost though? Well, here is the list: -

  1. £26.48 - Teensy 4.1 microprocessor

  2. £40 - Second hand monitor (still in the post)

  3. £43.99 - Gameduino 3x Dazzler with HDMI out

  4. Some time programming, drawing the screen, generating menus and integrating it all in the machine.

So all this full control and modern looking display system for £110.47 plus a little programming time, where basic controllers can set you back £2500 plus on a home CNC. Also, this will double as the display in the MGF :-D.

What’s the difference then between what I have at the moment? Well, the current microprocessor is an Arduino Mega 2560 and these are the differences: -

  1. Arduino has 256KB of flash (program storage) where the Teensy has 8MB

  2. Arduino has 4 serial ports where the Teensy has 8 (better for connecting to all the MGF devices)

  3. Arduinos benchmark speed is 7 where the Teensy is 2381

  4. Arduino runs at 16MHz where the Teensy runs at 600MHz (and is overclockable to love 1MHz with cooling)

  5. Teensy has a Micro SD card slot

  6. Teensy has a Real Time Clock built in (good for the MGF project also)

  7. Teensy is, well, Tiny

  8. I think the display difference is fairly self explanatory, where every time I need to make changes to a milled part I have to go through the extensive menu system with only 8 lines of text. The Gameduino allows me to create pop up windows to easily select programs and features.

As you can see this is a little extra work than I was planning, although will make all the projects even more fun and easy to use. I only received the Teensy and Gameduino on Wednesday and have already got it to start looking like a CNC display.

Now the Garage is sorted, the MGF has been over here and the mill is progressing nicely, I should be able to move things along so much more (all settled in now).

Has anyone else tried this type of configuration? I think it makes the machine look ultra modern.

Kind regards,

Neil.

1 Like

Good evening all,

The CNC machine is quickly becoming just that, a machine capable of accurately accepting GCode and turning it into a product with just the press of a button.

Here is the latest (well, last night) version of the program, and it is now fully married to the CNC code, so there is just one program to run everything from the GCode conversion, HDMI display picture through to the machines full movement and control.

These are the items that are now available on the new system: -

  1. Jog mode with zeroing facility - Zero X and Y Axes and shows both zeroed value and absolute machine value for each Axis.

  2. Spindle speed graphic to show the actual spindle speed (currently a pseudo value)

  3. Circle mode, to machine circles manually with all the features (internal, external, climb/conventional milling, feed speed and diameter).

  4. Axes Panel now moves with the machine, where the edges of the displayed box are the machines movement extremes, will show soft end stops also when written.

  5. I’ve fitted the white 8x8 LED matrix to it also just for machine status at the machine.

  6. Also I have now managed to streamline the code even further, where it runs through all the code in just over 5ms, that’s 200 times per second, this means I have been able to run the machine at a much faster feed speed. Last night I tested the circle program to 420 mm/min or 7mm/sec, that’s quite fast considering the machine is capable of moving me out of the way while leaning on it.

The purple board is the ISO7762F isolator chip from @Alexander_Jones that prevents earth loops from destroying the microprocessor when the ODrive pulls loadsa current. Works a treat, has no issues at all :star2::star2::star2::star2::star2:.

Sorry for the flickering display, this was recorded on my phone.

I am hoping to take the machine and some projects to the NEC in Birmingham next year too, watch this space ;-).

Here is a quick video: -

Kind regards,

Neil.

Hi Neil, Any chance of seeing the code/wiring on Github?

Hi James,

Certainly, I’ll share a link to the current version later, I’m currently amending the sketch so that I can choose GCode files to load onto the Teensys RAM from the SD card without switching off. Currently it loads the GCode file to RAM during boot up which is ok until you need the next pattern, then you have to re-edge find the part before proceeding. I have this working on another Teensy 4.1 fine, it just need integrating into the CNC program.

I will share a picture of the parts I am making too.

There is around 400kB of free RAM on the Teensy to load the GCode file to, where this equates to around 20000 lines of GCode. I have some additional RAM chips to solder on to the Teensy so will have an extra 16MB, although the GCode can run from SD, albeit at reduced speed. It’s working really well and is really reliable.

1 Like

Below are the older files (well only by a few weeks for the CNC to Display sketch) for my CNC machine, these are open source files under the GNU General Public License (version 3 or later).

BLDC_ODrive file is the pre HDMI display sketch for the Arduino Mega 2560, 2 x 16 x 4 LCD displays and 2 x 9-way keypads.

CNC_Control_and_Display sketch controls the Gameduino 3x Dazzler with an HDMI output onto a portrait orientated display, this from a Teensy 4.1 with integrated SD Card reader, although still has a 9-way keypad attached.

As above (previous post) I am currently integrating multiple GCode file selection into the CNC sketch to load into Teensy 4.1 RAM so the SD card can be removed while running and new GCode uploaded without the Teensy having to be power cycled. This will allow the CNC machine to remain on to stop having to re-setup the machine to the part.

Happy ODriving,

Kind regards,

Neil.

P.S. and the ODrive Motor Mount it’s currently machining :-

3 Likes

Woah, superb cheers - look forward

1 Like

So good to see great progress.
I’m going to try and use those optocouple chips.
For ground loops.
Cheers

1 Like

Hello again,

The projects will be coming thick and fast, well thick as it takes me a while to develop the code for mill use and fast because these ODrive’s just don’t miss a beat no matter what you throw at them (in the electrical sense, don’t try water, they may bite).

I’ve been able to mill some precise parts on this mill now, running the mill for hours and hours without any concern. I’ve now finished the Spindle belt housing, will have some video’s on that within a few weeks and am starting to produce the finishing parts for both Z and spindle. Soon the 56v ODrive will be attached, all I’ll need then is a bolt of lightning to bring it to life, mwa hahaha.

So, it’s all confirmed, I will be at the Makers Central event on 30th Apr and 1st May at the NEC in Birmingham this year, so if you’re around please feel free to take a look and ask me questions on the projects. The mill will be running on 2 x 12v batteries at 240Ah each :smiley: and flying the ODrive stickers for all to admire.

I’ll also be positioned next to James Bruton and Matt Denton near the Live Robots stand.
See if you can find me on the map here: EXHIBITORS | Makers Central

Here is the latest video showing the progress.

Take care,

Happy ODriving.

Kind regards,

Neil.

3 Likes

Hi All,

Just posting my latest video of the ODrives hard at work milling out this complex heatsink.

Yes this heatsink fits around the ODrive D5065 270KV motor and will hopefully keep it nice and cool as it will be used as the spindle motor. I’ve just finished all of the components for the spindle drive, so hope to get all those videos out before the event.

Happy ODriving,

Neil.

1 Like

Hello all,

I haven’t been on for a while as I was at the Birmingham NEC (UK) Makers Central event with the ODrive mill churning out chips with a 40mm cutter on the new ODrive spindle. These motors are very impressive.

I’ve also put in automatic crash control, which is simply just monitoring the RPM of the spindle and when it drops below 10% of the requested speed (for the 40mm cutter) all the axes and spindle stop, even between GCode so that it doesn’t brake the cutter, this I demonstrated at the event 4 times and it didn’t break any cutters.

The % drop reduces depending on the cutter, where the GCode says which tool to use it adjusts accordingly, I’ll have to do a video on this. So 4% drop for 10mm, and 3 percent for 8mm, and so on, although smaller bits are difficult to get right.

I was thinking of having it slow down the feed speed and continue cutting.

The machine running at 4000RPM (5500 possible at 27.5V, tested at the event on a 30V 20A power supply) was capable of 50mm / min through .25mm of material with the 40mm shell mill. It really hit the acrylic windows with some force and could be heard in the noisy environment.

At the event the machine only consumed aroun 260W maximum with the 40mm cutter where I could demonstrate why the ODrive and brushless motors is a good option for solar powered milling at home.

I had a great time there and was on the stand next to James Bruton and Matt Denton.

These ODrives as I’ve said many times before are fantastic.

I will make a wiring diagram video also to explain all the connections, the use of the isolator to prevent earth loops etcetera, where I had the ODrive reset button running through the isolator also (with a small electrolytic on there to prevent a weird 2 micro second negative pulse coming from somewhere).

I’m still running ver 0.4.11 as there was so much code to change for turns rather than counts per second, unless I’m missing something. The spindle is still in position control (don’t mock me too much) although the AMT102 is set to 384 CPR, so a long lasts 16.9 hours at 5500RPM or 31 hours at 3000 RPM. I will look into velocity control but can’t seem to find out how to do it on 4.11 firmware.

Anyway, that’s enough of me rambling, here are some pictures…





Happy ODriving,

Neil.

2 Likes