Carvera Spindle Power Upgrade - Stock Motor
by Chris602177 in Workshop > CNC
116 Views, 0 Favorites, 0 Comments
Carvera Spindle Power Upgrade - Stock Motor

This is a simple upgrade to get more (and measurable!) power out of your Carvera spindle motor.
Main Highlights:
- Stock Spindle Motor.
- Stock Firmware.
- Stock Controller.
- No custom PCBs or software knowledge needed.
- Completely reversible, no permanent changes required.
- Also compatible with community firmware and controller.
- In theory, should work with any other DC motor within the power limits of the controller.
Background:
The stock Carvera (not air) uses a BLD-300B motor controller in open loop mode, while using the main PCB / smoothieware firmware to do the closed loop speed regulation. This is not an efficient way to control a motor and leaves significant amounts of torque unused.
When trying to push the stock setup a little harder, the motor bogs down, slowing the endmill while maintaining the same feed. This increase loading on the tool can and does result in broken end mills, especially 1/8" bits.
Thoughts:
By implementing high speed closed loop control - in the motor controller - the correct response to increased loading can occur - increasing amps at the correct motor timing.
How it works:
- The Carvera's PCB / Smoothieware will output a 0 to 100% PWM signal to start the spindle, this is on a PID loop, so it starts low, increasing until the feedback pulses match the requested speed.
- The escon doesn't like a PWM under 10% or above 90%, so we convert it to 0 to 5v signal to get around this.
- The DFR1036 takes the PWM speed command and converts it to a 0 to 5V signal.
- The Escon starts the motor once the PID loop pushes the voltage above 0.5v.
- The Escon sends a pulse speed feedback to the Carvera's PCB / Smoothieware.
- This completes the PID loop and allows speed control to work without manually setting scaling.
Disclaimer - Currently Stall detection doesn't work, I'm working on a variation that swaps the DFR1036 for a more advanced controller that can implement stall control, while maintaining the simplicity of connections.
Supplies
- General Tools for working on a Carvera.
- A 2.5mm or smaller flat blade screwdriver - For the escon terminals.
- Escon 50/5 Speed Controller.
- DFRobot DFR1036 - PWM to Analog 0-5V Converter.
- A windows PC or virtual machine, tested with windows 10 - For the escon configuration software.
- Escon Studio, tested with version 2.2.
- A USB micro data cable, a right angled plug is useful if you are going to mount the controller in a similar fashion.
- Wago 226 style connectors or something else suitable for connecting wire ends.
- Hookup wire or similar, bootlace ferrules optional but recommended.
Access the Carvera's Controller Area
Make sure the machine is in a good position to test and the spindle is free to move, possibly remove any sharp tools in the spindle or take appropriate care.
Optional - Set the RPM to 2000 and try to stop the spindle with your fingers (remove sharp tooling!). Notice how easy it is to stall the spindle.
Power off your Carvera - There is live 230/110V AC in the back area. While this upgrade won't touch that wiring, it its safer that your machine is disconnected from the wall socket.
Now take off the back cover, this will expose the main controller and another cover that protects power supplies and motor controller.
See the offical guide here: https://wiki.makera.com/en/carvera/maintenance/deep-cleaning-the-carvera
Access the Power Supplies and Motor Controller

Take off the cover that protects the power supplies and motor controller. (Images taken from Makera's website shown above).
There are two power supplies:
- Upper One - 24V DC - Mean Well EPP200-24
- Lower One - 48V DC - Mean Well EPP200-48
The 24V Power Supply does the main Carvera PCB, Stepper Motors and X/Y/Z Servo Motors.
The 48V Power Supply ONLY does the spindle.
These power supplies are only rated to 200W when there is forced air cooling, otherwise its approx 130W.
The OTHER unlabelled PCB is the motor controller, a BLD-300B
While this isn't the exact manufacturer, this english datasheet / manual will give you most of the controllers details.
https://www.sys-motor.com/Account/Plug-ins/kindeditor/attached/file/20180516/20180516125751_1905.pdf
Record the Wiring Colours

Typically these shouldn't change from machine to machine, but it's good practice to record your original wiring by taking photos.
Explanation of the wires, top down, in groups:
First Plug (2 terminals): Power Supply
- Red : 48V DC (Direct from the 48V Power Supply)
- Black : 0V DC (Direct from the 48V Power Supply)
Second Plug (8 terminals): BLDC Spindle Motor
- Grey : Spindle Motor - Phase W
- Orange : Spindle Motor - Phase V
- Brown : Spindle Motor - Phase U
- Black : Spindle Motor - Hall Effect Sensors - 0V (Referenced to 5V Supply from this controller).
- White : Spindle Motor - Hall Effect Sensors - Sensor for W Phase
- Yellow : Spindle Motor - Hall Effect Sensors - Sensor for V Phase
- Green : Spindle Motor - Hall Effect Sensors - Sensor for U Phase
- Red : Spindle Motor - Hall Effect Sensors - 5V Supply (This voltage is output from the this controller).
Third Plug - Carvera PCB / Smoothieware IO Connections
- Green : PWM Command Signal from the main PCB, this is a 0 to 100% 5V PWM signal.
- Black - Loop 1: 0V Reference (from Main PCB)
- Empty: This is reserved on the controller for a possible Fwd/Rev control, but is not used by the carvera.
- Black - Loop 2: 0V Reference. By pulling this down to 0V, it enables the controller.
- Black - Loop3: 0V Reference: By pulling this down to 0V, it disables the controllers motor braking function.
- Blue: Speed Feedback, at 12 pulses per motor revolution.
- Red: Alarm Signal. The motor controller will pull this to 5V when there is a fault detected by the motor controller.
Other notable mentions:
The bigger metal potentiometer is a manual override, it clicks to the off positions, but turning on will manually drive the spindle motor.
The little blue plastic potentiometer (between the motor terminals and io terminals) is how to set the limit for motor overload amps.
The dip switches on the bottom control the open / closed loop settings on the motor controller. By default it is set to open loop and 4 pole motor.
Wait - This motor controller has closed loop speed control ???
It does, but is limited to 4000rpm at the motor. Basically useless as the machine loves to run faster.
Wire Up the Escon Controller - Testing and Configuration

This step is recommended as it will let you configure and confirm the motor controller and motor are working correctly independently of the rest of the machine.
First Plug (2 terminals): Power Supply
- - : 0V DC (Direct from the 48V Power Supply)
- + : 48V DC (Direct from the 48V Power Supply)
Second Plug (8 terminals): BLDC Spindle Motor Power
- Brown : Spindle Motor - Phase U
- Orange : Spindle Motor - Phase V
- Grey : Spindle Motor - Phase W
- Empty: Reserved on the controller for a motor cable shield (not used on the default carvera wiring).
Third Plug (5 terminals): BLDC Spindle Motor Feedback
- Green : Spindle Motor - Hall Effect Sensors - Sensor for U Phase
- Yellow : Spindle Motor - Hall Effect Sensors - Sensor for V Phase
- White : Spindle Motor - Hall Effect Sensors - Sensor for W Phase
- Red : Spindle Motor - Hall Effect Sensors - 5V Supply (This voltage is output from the this controller).
- Black : Spindle Motor - Hall Effect Sensors - 0V (Referenced to 5V Supply from this controller).
Forth Plug (6 terminals): IO for testing control (optional)
Wire a on/off switch to terminals 2 and 6, then can be used to start / stop the motor during testing. This can be done from the Escon's software so this step is fully optional.
Later on we will wire the Carveras IO into these terminals.
Escon Software - Startup Wizard

Plug in the USB cable and connect with the escon software.
Using the Escon Startup Wizard (press the on screen help button for more information about this wizard)
- Motor Type: Maxon EC Motor - This just tells the software the motor is a BLDC type. It doesn't matter that its not a maxon motor, the auto-tune will take care of the parameters.
- Speed Constant or KV : 260 rpm / V. The accuracy of this value shouldn't matter as the feedback regulates the speed.
- Thermal Time Constant Winding: Left this at default of 4.0
- Number of pole pairs: 4
- Max Permissible Speed: 12500 : This is the no load speed of the motor.
- Nominal Current: 4.1 : This is the rated current of the motor.
- Max Output Current Limit: 8.2 amps. This is the short term current, i've used double the nominal current. There is no offical value for this, but there is a temperature sensor connected to the motor, so if it gets too hot, the Carvera will shutdown.
- Select digital hall effect sensors.
- Hall sensor polarity: Inverted
- Select type of sensors: Available Hall Sensors
- Mode of operation: Speed Controller (Closed Loop)
- Enable Functionality: Enable CCW - This prevents the motor from running backwards at low / no speed setpoint.
- Use Digital Input 2 and Active High.
This continues on the next steps but its spilt depending on if you testing or final installing.
Set Speed Reference


Option 1 - For Testing Only
We can use the Escon's potentiometer to allow us to test the speed control.
Select
- Analog Set Value
- Input: Potentiometer 1
- Scaling 0 to 100% = 0 to 12500rpm.
Option 2 - For Final Install
We use the analog voltage generated by the DFR1036 to control the speed.
Select
- Analog Set Value
- Input: Analog Input 1
- Scaling 0.5v to 5v = 0 to 12500rpm.
Note the 0.5v is important here!
The Carvera's / Smoothieware's PID loop will push the voltage (via PWM) over the threshold automatically. This allows the controller to have a reasonable 'stopped' voltage buffer, preventing noise or voltage offsets causing the motor to creep.
Also the option selected earlier comes in to play, the "Enable Functionality: Enable CCW " means the motor won't run backwards when the spindle is stopped and the voltage is below 0.5v.
Finish the Startup Wizard



Current Limit: Set a Fixed current limit of 8.2 amps (or whatever you selected earlier). This limit the amps the controller will send to the motor.
Speed Ramp: This is how quickly the spindle will spin up / slow down. You can be flexible here, I found fixed values of 5000 rpm/s seems reasonable.
Note: If too low, it will take a long time to stop. If too high, it may generate too much power trying to stop the spindle.
Minimal Speed: 0 rpm.
Fixed Offset: 0 rpm.
Digital IO:
- Digital Input 1: Not Used
- Digital Input 2: Enable CCW
- Digital Output 1: Ready (Used to send alarm signal to the Carvera PCB)
- Digital Output 2: Commutation Frequency (Used to send speed feedback to the Carvera PCB).
Analog IO:
- Analog Input 1: Set Value
- Other Analog Inputs not used.
- Optional - Analog Output 1 : Actual Current Averaged. This can be used to measure motor loading without having the USB plugged in.
Other Settings:
- Digital Output 3 - Polarity : Low Active
- Analog Output 1 - Scaling : Defaults are generally ok
Finish the wizard and it should automatically open regulation tuning.
Tuning the Escon

Select "Auto Tuning"
This will open the tuning display, press start.
The motor may move slightly as it measures motor parameters.
Optional - Testing



Using option 1 in Step 6, you can now test the motor and controller independently of the machine.
Turn the machine back on - take appropriate care as you will be working near live 230/110V wires.
Using the on/off switch wired into digital IO terminals 2 and 6, and potentiometer 1, turn the motor and change the speed up and down. You will see live motor values in the escon software.
Optional - Set the motor RPM to 1212 (x1.65 = 2000 @ spindle). Use your fingers to try and stop the spindle similar to step 1 - notice the difference! Its much harder to stall the spindle, as the controller gives the motor more amps to compensate for the additional load.
Also if you have access to a taco, you can measure the spindle speed to confirm reported reading, but not essential as the hall effect sensors will report the correct speed.
What I noticed was the motor couldn't push past approx 11250 rpm, even if the speed command requested 12500 rpm.
Finish the Wiring

I still need to make a diagram for these connections buts it's not too complex.
The molex connector from the Carvera's PCB has the following 4 colours:
- Green : PWM Command Signal from the main PCB, this is a 0 to 100% 5V PWM signal.
- Blue: Speed Feedback, at 12 pulses per motor revolution.
- Red: Alarm Signal. The motor controller will pull this to 5V when there is a fault detected by the motor controller.
- Black - Looped : 0V Reference (from Main PCB)
Connect the 0V (black wire) to all the required locations
- GND Reference (Black wire) of the DFR1036's 3 pin connector.
- Escon terminal 5 (0V reference)
- Make sure any additional loops of the original carvera's wiring are isolated (use heat shrink or electrical tape if needed).
Connect the 5v to all the required locations.
- 5V supply on Escon temrinal 6 (this is the 5v source / supply).
- Enable CCW input on the Escon (DIO terminal 1) - always enabled if power is on.
- 5V supply (Red Wire) of the DFR1036's 3 pin connector.
Join the Cavera's PWM command signal (green wire from molex plug) to the PWM input of the DFR1036 (blue wire).
Connect the Cavera's PWM feedback signal (red wire from molex plug) directly to Escon terminal 3.
Connect a new wire from the voltage output of the DFR1036 to the Escon's Analog Input 1 (AIO terminal 1).
Note the escon's analog GND and DFR1036 voltage GND are both tied to their other GND connections, so additional wires are not needed.
Double check the DFR1036 dip-switch is set to generate 0 to 5v and NOT 0 to 10v.
Update the Carvera's MDI and Run
We need to tell the Carvera's PCB / Smoothieware that we will be sending it 4 pulses per revolution and not 12 that it is currently expecting.
Power on and connect to the Carvera normally with the controller software.
Enter the following command in to the MDI.
config-set sd spindle.pulses_per_rev 4
Reboot the machine, then reconnect.
Note: If you need to revert you can run the same command with 12 instead of 4.
Manually set and spindle speed (from the diagnostic menu) and confirm the value reported in the Escon software is RPM / 1.65, eg if you set 10,000 rpm, the motor should be around 6060 rpm.
Increase Your Feeds and Speeds!
You can use the escon software to monitor motor amps and estimated motor loading.
For smooth running, you want to try and keep the motor current under 4 amps.
Start increasing your feeds and speed while monitoring the motor current.
In the future I'll post so example feeds and speeds, but for the time being you can find them in the discord #mods channel.