QuickBuild Benchtop CNC Enclosure for less than $350 – coolant ready

This is a blog post to support the quick build video showing how I built an enclosure for my Taig benchtop mill. I used commonly available parts from local hardware stores. The list of items I used is below the video.

YouTube Video

Parts List

Scroll right to see the links to the items.

StoreForDescriptionQtyPrice TotalItem#
StoreForDescription Qty Price  Total Item#Link
LowesFrame2-in x 4-in x 8-ft 6 $10.27 $ 61.62468930Severe Weather 2-in x 4-in x 8-ft #2 Prime Pressure Treated Lumber in the Pressure Treated Lumber department at Lowes.com
LowesFrame4-in x 4-in x 6-ft 2 $13.27 $ 26.54468950Severe Weather 4-in x 4-in x 6-ft #2 Pressure Treated Lumber in the Pressure Treated Lumber department at Lowes.com
LowesFrame2x2x8″6 $3.98 $23.8845132-in x 2-in x 8-ft White Furring Strip in the Furring Strips department at Lowes.com
LowesSidesWhite Wall Panel1 $32.61 $ 32.618566https://www.lowes.com/pd/48-in-x-8-ft-Embossed-White-Wall-Panel/1000174771
        
LowesLight3′ Shop Light1 $16.98 $  16.982592123Utilitech 3-ft Cool White LED Linear Shop Light in the Shop Lights department at Lowes.com
LowesDrainSink tailpipe1 $2.98 $2.9824628Keeney 1-1/2-in Plastic Sink Tailpiece in the Under Sink Plumbing department at Lowes.com
LowesDrain1-1/2-in Plastic sink Plug1 $7.28 $7.2824623Keeney 1-1/2-in Plastic Po Plug in the Under Sink Plumbing department at Lowes.com
Home DepotSealingClear Silicone Sealant1 $6.77 $6.77362646GE Advanced Silicone 2 10.1 oz. Clear Exterior/Interior Window and Door Sealant-2708920 – The Home Depot
Home DepotDoor SliderAluminum Trim Channel1 $ 12.84 $12.84229347https://www.homedepot.com/p/Everbilt-3-8-in-W-x-1-2-in-H-x-48-in-L-x-1-16-in-Thick-Aluminum-Trim-Channel-800167/204604759
Home DepotDoor HandleSatin Nickel Wire Drawer Pull2 $ 3.16 $ 6.32408767https://www.homedepot.com/p/Liberty-4-in-102mm-Center-to-Center-Satin-Nickel-Wire-Drawer-Pull-P604BCC-SN-C/203244366
        
LowesSides30-in W x 36-in L Clear Acrylic Sheet2 32.98 $65.9611233https://www.lowes.com/pd/OPTIX-0-08-in-T-x-30-in-W-x-36-in-L-Clear-Acrylic-Sheet/3179381
LowesDoors36-in W x 48-in L Clear Polycarbonate1 $79.98 $79.98239982LEXAN 0.093-in T x 36-in W x 48-in L Clear Polycarbonate Sheet in the Polycarbonate & Acrylic Sheets department at Lowes.com
        
     Total  $343.76  

Implementing Anti-Cogging on the ODrive Robotics Controller

This post is a companion post to my YouTube video on how to enable anti-cogging on your ODrive robotics High Performance Motor controller.

You can find the source coee from the video below. Note these are based on my settings from the ODrive D5065 Motor so your settings will vary from mine.

Quick disclaimer: We are playing with high currents and strong motors. take every safety precaution possible. make sure your equipment is secure, and not able to hurt anyone. I take no responsibility for you following this guide, do your own research, check my code and always test carefully.

The code is just below the video

This is my first real YouTube Video! please be nice and Subscribe, Like and Comment to help me along.

ODrive Anti-Cogging Code

# Start the ODrive Tool odrivetool shell #Wipe the configuration odrv0.erase_configuration() #Set up some basic parameters, these work for me on my D5065 odrv0.axis0.motor.config.current_lim = 40 odrv0.axis0.controller.config.vel_limit = 15 odrv0.axis0.motor.config.calibration_current = 20 odrv0.config.brake_resistance = 2 odrv0.axis0.motor.config.pole_pairs = 7 #This is the ratio of torque produced by the motor per Amp of current delivered to the motor. This should be set to 8.27 / (motor KV). # In my case this is 8.27 / 270 odrv0.axis0.motor.config.torque_constant = (8.27 / 270) odrv0.axis0.motor.config.motor_type = MOTOR_TYPE_HIGH_CURRENT #Set up some encoder parameters odrv0.axis0.encoder.config.cpr = 8192 odrv0.axis0.encoder.config.use_index =True #Save the config odrv0.save_configuration() #Proper Tuning odrv0.axis0.controller.config.vel_gain=0.32/2 #[Nm/(turn/s)] odrv0.axis0.controller.config.vel_integrator_gain = (0.5 * 10 * 0.32/2 ) #[Nm/((turn/s) * s)] odrv0.axis0.controller.config.pos_gain=15 #[(turn/s) / turn] #Run the calibration odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE #At this point you can test with the following commands to see how the motor performs, it should be stuttery odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL odrv0.axis0.controller.input_vel = 0.2 #Save the config and reboot odrv0.save_configuration() odrv0.reboot() # Anticogging Setup # https://github.com/odriverobotics/ODrive/blob/ebd237673a483dec87b0d372dd09dfbf0bc7dd64/docs/anticogging.md #tell the odrive we are pr-calibrated so we don't need to recalibrate every time odrv0.axis0.encoder.config.pre_calibrated = True odrv0.axis0.encoder.config.use_index = True odrv0.axis0.motor.config.pre_calibrated = True #NOTE: THE FOLLOWING COMMANDS MIGHT MAKE YOUR MOTOR SPIN WILDLY FOR A SECOND IF YOU HAVE MOVED IT SINCE TURNING IT ON #Put the controller in position control mode odrv0.axis0.controller.config.control_mode = CONTROL_MODE_POSITION_CONTROL odrv0.axis0.controller.config.input_mode = INPUT_MODE_PASSTHROUGH odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL #Temporarily increase the gain so that the calibration happens quickly odrv0.axis0.controller.config.pos_gain = 200.0 odrv0.axis0.controller.config.vel_integrator_gain = (0.5 * 10 * 0.32/2 )*10 #THIS IS THE MAGIC - Start the calibration odrv0.axis0.controller.start_anticogging_calibration() #Put the gain back to what it was before odrv0.axis0.controller.config.vel_integrator_gain = (0.5 * 10 * 0.32/2 ) odrv0.axis0.controller.config.pos_gain=15 # Wait until odrv0.axis0.controller.config.anticogging.calib_anticogging == False # you can type # odrv0.axis0.controller.config.anticogging.calib_anticogging # and just up arrow and enter till it turns false #Now tell the ODrive we are pre-calibrated for anti-cogging so we don't need to do it every time we power on odrv0.axis0.controller.config.anticogging.pre_calibrated = True #Save the new config and reboot odrv0.save_configuration() odrv0.reboot() # ######################################### # Startup procedure from now on # ######################################### # Do an index search so the controller can orient the cogging map odrv0.axis0.requested_state = AXIS_STATE_ENCODER_INDEX_SEARCH # Put the controller in velocity mode odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL #try a slow speed - it should be much smoother! odrv0.axis0.controller.input_vel = 0.2
Code language: PHP (php)