PDA

View Full Version : Suggested PWM frequency for a minimal Novamill conversion



GND
31-03-2020, 07:16 PM
I'm in the final stages of my conversion of a Novamill to using LinuxCNC. When I acquired the machine, the original control box was intact and functional - so I'm keeping as much of the original electronics as possible, including the stepper drives and so on. I'm just replacing the old serial port interface card with a Mesa card to handle the motion control. All very straightforward - it really is almost a drop in replacement as far as the steppers, home and ESTOP switches and spindle on/off are concerned. The biggest learning curve has been LinuxCNC - but that was anticipated, and is a different story....

So far I have the steppers whirring, homing working and the spindle relay firing - all good. The final part is to add spindle speed control. I am re-using the original PWM to 0-10v converter card that sits in the side of the control box - it handles all the spindle drive isolation issues, and just needs to be fed with a PWM signal by the Mesa card. Again, straightforward.

My question simply is what PWM frequency I should be using? The Denford PWM to 0-10v converter obviously has some filtering in it, so must expect a certain frequency range of PWM input - but what?

I've searched all the usual sources and forums but found nothing concrete. I wondered if any forum members either had an original Denford and could measure the frequency. Or more likely, anyone who has done a similar conversion and could tell me what frequency they used - successfully!

In the absence of further information I am going to try 100Hz, but am ready to be advised otherwise!

Cheers
Graeme

Clive S
31-03-2020, 08:22 PM
I have done a conversion on a Novamill using a Mesa 7i92. I also changed the feed and speed pots to alps encoders.

Here is a link for some pics including the ATC https://photos.app.goo.gl/qUwAmX5nGVTGMZyi6

I don't remember now but I think this might be the bit you want.

# ---Setup spindle at speed signals--- on bob relay pin DB 17

setp hm2_7i92.0.gpio.024.is_output 1

net spindle-enable hm2_7i92.0.gpio.024.out
sets spindle-at-speed true

#Below sets position of relay contacts on power up
setp hm2_7i92.0.gpio.024.invert_output true

#PWM Generator signal/setup

setp hm2_7i92.0.pwmgen.pwm_frequency 1500

setp hm2_7i92.0.pwmgen.00.output-type 1
setp hm2_7i92.0.pwmgen.00.scale 5000
setp hm2_7i92.0.pwmgen.00.enable true

net spindle-speed motion.spindle-speed-out-abs hm2_7i92.0.pwmgen.00.value

Ross77
31-03-2020, 11:51 PM
Ive just done one as well but I used the 7i76 which has the isolated spindle out so I connected direct to the Sprint board.

Clive's the man though and helped me get mine up and running

GND
01-04-2020, 11:33 AM
Many thanks Gents - and especially Clive for the detailed information. Those photos make for a very interesting story - you certainly made some far reaching upgrades to your Novamill!

Looks like you used a replacement board from eBay for your PWM to 10v conversion, and set your frequency at 1500Hz. As I mentioned, I am retaining the original converter, so I have no idea what its preferred frequency will be. Reading various sources were suggesting much lower rates, but seeing your board taking a higher frequency was interesting. Maybe I'll just have a play and see what frequencies I can use to get the desired 0 to 10v swing. I guess if I find a frequency that works, then that is as good as any!

Thanks also for the HAL fragments. Today's first job is adding them (or something very similar) to mine.....

Cheers
Graeme

GND
03-04-2020, 10:11 PM
Just to close the loop here, I now have a working speed control on my Novamill, essentially using the lines in the HAL file that you supplied Clive - many thanks for that, it saved a lot of grief! I added them into the "custom" HAL file rather than the main HAL file, as this means I can make new main HAL files using the PnCConf tool, and not overwrite my edits. But the content was pretty much as suggested and it worked fine.

And to answer my original question - in case anyone comes and finds this thread in the future. I tried 100Hz, 1000Hz and 1500Hz and there was no discernable difference between the results. That was as measured using a digital voltmeter on the PWM to 10v converter output - the original Novamill one. So the conclusion - it's not critical!

Thanks again Clive for your help with this. Now to try the first tentative cuts....

Cheers
Graeme

Ross77
04-04-2020, 12:50 AM
Now to try the first tentative cuts....
Don't be shy, Ive not used it in anger yet handled some hex sockets in stainless steel with ease.