I have a BLDC cordless router from Makita (model XTR01) that I am using in my Shapeoko CNC. I am currently running it off a 24V 350W Meanwell power supply that I have adjusted the voltage down to 21V (the max a Makita Battery puts out) and have wired into the battery contacts. I want to be able to control the router RPM from my CNC control board and not the stupid dial on the router. Sadly the ESC that is built into the thing is potted with a crapton of epoxy resin so I cannot reverse engineer it. Instead I got a purchased this guy:
https://www.amazon.com/gp/product/B07VL7D1WC
to control it. It seemed like a good fit.
The router has a 1600kV motor with Hall sensors. The rated range of the router is 10k - 30k. It has 2 pole pairs.
I have a few questions:
1. The ERPM limit of the 4.12 boards appears to be 60k. With 2 pole pairs on the moter, 30k RPM becomes 60k ERPM. Is it safe to operate at this limit or should I back it off a bit to say 58k.
2. What are the recommended settings for running a VESC based board off a power supply and not batteries? Pretty confident that I need to turn off regen breaking and set the breaking current to 0. Is there anything else?
3. How do I configure the board to use PWM for the input? Can this even be done or do I need to get a PWM to PPM converter?
Having driven motors above the ERPM limit with older VESCs you'll probably be fine, you'll just notice as the speed increases eventually it starts juddering. I always backed off pretty quickly and the control scheme should let you clamp the RPM values to avoid this. Ideally you'd want to move to a VESC 6 that will handle up to 120kERPM IIRC but the FlipSky Mini is probably good enough to be getting started with.
Are you sure it's just a 2 pole motor, most RC motors are 12 - 14 pole so that seems quite small to me. But I have no experience with router BLDCs.
If you filter the PWM output from the CNC Controller you'll get a 'analogue' output that can be pumped in as an ADC control value.
Alternatively you may be able to replace the dial on the existing router controller with a filtered PWM output from the CNC Controller.
So I have made a lot of headway on this. I have an arduino reading the PWM signal from the control board and spitting out an appropriate PPM signal. I have verified that the PPM signal is making it to the VESC in the PPM app with Realtime App logging enabled in VESC Tool. However when I try to start the motor it just gives off a high pitch hum. Any help is greatly appreciated.
.
The VESC accepts PPM signals on the servo cable. PPM is a pulse that is between 1 millisecond to 2 milliseconds every 11 or 22 milliseconds that indicates direction and speed with stopped at 1.5 milliseconds. Some people wrongly refer to PPM as PWM which just makes it really confusing, PWM would be a pulse that could be between 0% and 100% of the period. You could filter a PWM control signal with a resistor and capacitor to convert it to an analogue signal and feed that into the VESC. A servo tester outputs PPM.
CthulhuLabs: Any chance we can have a couple pictures of your setup? Specifically the Router, the Control Board → Arduino → VESC connections and another related connections. It should help the debugging, plus people always love looking at pictures.
I still feel that it ought to be possible to use the PWM signal from the Control board to drive the VESC via a simple resistor/capacitor filter allowing you to remove the Arduino.