Welcome! Log In Create A New Profile

Advanced

Gen7 + Teacup: DC motor control

Posted by Igor Lobanov 
Gen7 + Teacup: DC motor control
June 24, 2012 09:17AM
Dear All,

I'm looking into building drilling and milling head for my Prusa and need to control a DC motor. I'm using Gen7 electronics and Teacup firmware for printing and my initial prototype of the head is driving the motor using heater2 (bed). I'm just setting bed temperature to anything non-zero and off it goes with 12V raw power.

The problem is that I can't control the speed of the motor. This page gives an indication that Teacup firmware has 'untested' DC motor control functionality. However, there's nothing about in on Teacup Firmware wiki page, nor does Google find anything interesting.

So two questions for the community:
1) What is 'DC motor control' in Teacup firmware and how to put it into use? (Hey, I volunteer for testing!)
2) Is it possible to somehow use the function with Gen7 electronics without major modification?
Re: Gen7 + Teacup: DC motor control
June 26, 2012 07:19AM
With "DC motor" means an extruder with DC motor. Early RepRaps had these.

To get an adjustable DC motor, you need to connect the motor to one of the PWM-able pins. Both heater outputs of the Gen7 do this. Then, uncomment #define TEMP_NONE in config.h and define a heater with thermistor type TT_NONE. I've attached a config.h which has no heaters, just a DC motor configured.

To control the motor, use M104 S0 ... M104 S255.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Attachments:
open | download - config.h.WolfStrap (22.3 KB)
Re: Gen7 + Teacup: DC motor control
June 26, 2012 06:24PM
Thank you Traumflug, works perfectly. The only thing is that I need to use M140 instead of M104 as I drive spindle using bed MOSFET.
Sorry, only registered users may post in this forum.

Click here to login