1

Topic: Could use some help with Smoothieware.

I recently revamped my CTC and upgraded the controller to take advantage of Bigfoot stepper drivers and their ability to run at 256 bit microstepping. My issue is getting the hotend cooling fans to work. I can get the one for extruder 1 to work but when I try the one for extruder 0 both fans come on. My current code is below for temp control and fan control. Not sure where I am going wrong and any help would be appreciated.

# Hotend temperature control configuration
temperature_control.hotend.enable            true             # Whether to activate this ( "hotend" ) module at all. All configuration is ignored if false.

temperature_control.hotend.ad8495_pin    0.24             # Pin for the thermistor to read
temperature_control.hotend.heater_pin        2.4            # Pin that controls the heater
temperature_control.hotend.sensor        ad8495       # see http://smoothieware.org/temperaturecontrol#toc5
##temperature_control.hotend.beta             4066             # or set the beta value
temperature_control.hotend.set_m_code        104             #
temperature_control.hotend.set_and_wait_m_code 109            #
temperature_control.hotend.designator        0               #

#temperature_control.hotend.p_factor          13.7           # permanently set the PID values after an auto pid
#temperature_control.hotend.i_factor          0.097          #
#temperature_control.hotend.d_factor          24             #

#temperature_control.hotend.max_pwm          64               # max pwm, 64 is a good value if driving a 12v resistor with 24v.

# Hotend2 temperature control configuration
temperature_control.hotend2.enable            true             # Whether to activate this ( "hotend" ) module at all. All configuration is ignored if false.

temperature_control.hotend2.ad8495_pin    0.25             # Pin for the thermistor to read
temperature_control.hotend2.heater_pin        2.5             # Pin that controls the heater
temperature_control.hotend2.sensor        ad8495       # see http://smoothieware.org/temperaturecontrol#toc5
##temperature_control.hotend2.beta             4066             # or set the beta value
temperature_control.hotend2.set_m_code        104             #
temperature_control.hotend2.set_and_wait_m_code 109            #
temperature_control.hotend2.designator        1              #

#temperature_control.hotend2.p_factor          13.7           # permanently set the PID values after an auto pid
#temperature_control.hotend2.i_factor          0.097          #
#temperature_control.hotend2.d_factor          24             #

#temperature_control.hotend2.max_pwm          64               # max pwm, 64 is a good value if driving a 12v resistor with 24v.

temperature_control.bed.enable               true            #
temperature_control.bed.thermistor_pin       0.23             #
temperature_control.bed.heater_pin           2.7              #
temperature_control.bed.thermistor           EPCOS100K    # see http://smoothieware.org/temperaturecontrol#toc5
#temperature_control.bed.beta                4066             # or set the beta value

temperature_control.bed.set_m_code           140              #
temperature_control.bed.set_and_wait_m_code  190              #
temperature_control.bed.designator           B                #

#temperature_control.bed.max_pwm             64               # max pwm, 64 is a good value if driving a 12v resistor with 24v.

# Switch module for fan control
switch.fan.enable                            true             #
switch.fan.input_on_command                  M106             #
switch.fan.input_off_command                 M107             #
switch.fan.output_pin                        0.26              #

switch.misc.enable                           true            #
switch.misc.input_on_command                 M42              #
switch.misc.input_off_command                M43              #
switch.misc.output_pin                       1.22              #

# automatically toggle a switch at a specified temperature. Different ones of these may be defined to monitor different temperatures and switch different swithxes
# useful to turn on a fan or water pump to cool the hotend
temperatureswitch.hotend.enable                true             #
temperatureswitch.hotend.designator          0                # first character of the temperature control designator to use as the temperature sensor to monitor
temperatureswitch.hotend.switch              fan            # select which switch to use, matches the name of the defined switch
temperatureswitch.hotend.threshold_temp      50.0             # temperature to turn on (if rising) or off the switch
temperatureswitch.hotend.heatup_poll         15               # poll heatup at 15 sec intervals
temperatureswitch.hotend.cooldown_poll       60               # poll cooldown at 60 sec intervals

temperatureswitch.hotend2.enable                true             #
temperatureswitch.hotend2.designator          1                # first character of the temperature control designator to use as the temperature sensor to monitor
temperatureswitch.hotend2.switch              misc            # select which switch to use, matches the name of the defined switch
temperatureswitch.hotend2.threshold_temp      50.0             # temperature to turn on (if rising) or off the switch
temperatureswitch.hotend2.heatup_poll         15               # poll heatup at 15 sec intervals
temperatureswitch.hotend2.cooldown_poll       60               # poll cooldown at 60 sec intervals
Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

2

Re: Could use some help with Smoothieware.

Hi Carl,

I know it's not much help to say I couldn't see anything wrong but at least that means it's not an obvious oversight on your part. The bit you've posted looks all good to me. I'd be stumped as well.

3 (edited by yizhou.he 2019-01-15 01:31:38)

Re: Could use some help with Smoothieware.

for switch module name, you use fan and misc, maybe fan is reserved for both fan, try name it fan1 and fan2. You need to change other code accordingly.

switch.fan1.enable                        true
switch.fan1.output_pin                    2.7
etc ...

switch.fan2.enable                        true
switch.fan2.output_pin                    2.6
etc ...

(Da Vinci 1.0, Jr. 1.0 RAMPS, miniMaker) X4, (Creality CR-10S, CR-10 mini, Ender-3) X4, Anycubic MEGA X4, Anycubic Chrion X1, ADMILAB Gantry X2 (MonoPrice Maker Select V2, Plus, Ultimate)X4--Select mini X1, Anycubic photon X4, Wanhao duplicate D7 X1.
iNSTONE Inventor Pro X2, CTC Dual X2, ANET-A8, Hictop 3DP-11, Solidoodle Press, FLSUN I3 2017X1

4 (edited by carl_m1968 2019-01-16 00:14:43)

Re: Could use some help with Smoothieware.

Ok, I got it working. Here is the correct code for those who may have this same issue.

# Hotend temperature control configuration
temperature_control.hotend.enable            true             # Whether to activate this ( "hotend" ) module at all. All configuration is ignored if false.

temperature_control.hotend.ad8495_pin    0.24             # Pin for the thermistor to read
temperature_control.hotend.heater_pin        2.4            # Pin that controls the heater
temperature_control.hotend.sensor        ad8495       # see http://smoothieware.org/temperaturecontrol#toc5
##temperature_control.hotend.beta             4066             # or set the beta value
temperature_control.hotend.set_m_code        104             #
temperature_control.hotend.set_and_wait_m_code 109            #
temperature_control.hotend.designator        1            #

#temperature_control.hotend.p_factor          13.7           # permanently set the PID values after an auto pid
#temperature_control.hotend.i_factor          0.097          #
#temperature_control.hotend.d_factor          24             #

#temperature_control.hotend.max_pwm          64               # max pwm, 64 is a good value if driving a 12v resistor with 24v.

# Hotend2 temperature control configuration
temperature_control.hotend2.enable            true             # Whether to activate this ( "hotend" ) module at all. All configuration is ignored if false.

temperature_control.hotend2.ad8495_pin    0.25             # Pin for the thermistor to read
temperature_control.hotend2.heater_pin        2.5             # Pin that controls the heater
temperature_control.hotend2.sensor        ad8495       # see http://smoothieware.org/temperaturecontrol#toc5
##temperature_control.hotend2.beta             4066             # or set the beta value
temperature_control.hotend2.set_m_code        104             #
temperature_control.hotend2.set_and_wait_m_code 109            #
temperature_control.hotend2.designator        2           #

#temperature_control.hotend2.p_factor          13.7           # permanently set the PID values after an auto pid
#temperature_control.hotend2.i_factor          0.097          #
#temperature_control.hotend2.d_factor          24             #

#temperature_control.hotend2.max_pwm          64               # max pwm, 64 is a good value if driving a 12v resistor with 24v.

temperature_control.bed.enable               true            #
temperature_control.bed.thermistor_pin       0.23             #
temperature_control.bed.heater_pin           2.7              #
temperature_control.bed.thermistor           EPCOS100K    # see http://smoothieware.org/temperaturecontrol#toc5
#temperature_control.bed.beta                4066             # or set the beta value

temperature_control.bed.set_m_code           140              #
temperature_control.bed.set_and_wait_m_code  190              #
temperature_control.bed.designator           B                #

#temperature_control.bed.max_pwm             64               # max pwm, 64 is a good value if driving a 12v resistor with 24v.

# Switch module for fan control
switch.fan1.enable                            true             #
switch.fan1.input_on_command                  M106             #
switch.fan1.input_off_command                 M107             #
switch.fan1.output_pin                        0.26              #

switch.fan2.enable                           true            #
switch.fan2.input_on_command                 M42              #
switch.fan2.input_off_command                M43              #
switch.fan2.output_pin                       1.22              #

# automatically toggle a switch at a specified temperature. Different ones of these may be defined to monitor different temperatures and switch different swithxes
# useful to turn on a fan or water pump to cool the hotend
temperatureswitch.hotend.enable                true             #
temperatureswitch.hotend.designator          1               # first character of the temperature control designator to use as the temperature sensor to monitor
temperatureswitch.hotend.switch              fan1            # select which switch to use, matches the name of the defined switch
temperatureswitch.hotend.threshold_temp      50.0             # temperature to turn on (if rising) or off the switch
temperatureswitch.hotend.heatup_poll         15               # poll heatup at 15 sec intervals
temperatureswitch.hotend.cooldown_poll       60               # poll cooldown at 60 sec intervals

temperatureswitch.hotend2.enable                true             #
temperatureswitch.hotend2.designator          2                # first character of the temperature control designator to use as the temperature sensor to monitor
temperatureswitch.hotend2.switch              fan2            # select which switch to use, matches the name of the defined switch
temperatureswitch.hotend2.threshold_temp      50.0             # temperature to turn on (if rising) or off the switch
temperatureswitch.hotend2.heatup_poll         15               # poll heatup at 15 sec intervals
temperatureswitch.hotend2.cooldown_poll       60               # poll cooldown at 60 sec intervals

The the real issue was that in the following additional code some pins where not assigned correctly.

# Example viki2 config for an azteeg miniV2 with IDC cable
panel.lcd                                    viki2             # set type of panel
panel.spi_channel                            0                 # set spi channel to use P0_18,P0_15 MOSI,SCLK
panel.spi_cs_pin                             0.16              # set spi chip select
panel.encoder_a_pin                          3.25!^            # encoder pin
panel.encoder_b_pin                          3.26!^            # encoder pin
panel.click_button_pin                       2.11!^            # click button
panel.a0_pin                                 2.6               # st7565 needs an a0
panel.contrast                              8                 # override contrast setting (default is 9)
panel.encoder_resolution                    4                 # override number of clicks to move 1 item (default is 4)
#panel.button_pause_pin                      1.22^             # kill/pause set one of these for the auxilliary button on viki2
#panel.back_button_pin                       1.22!^            # back button recommended to use this on EXP1
panel.buzz_pin                               1.30              # pin for buzzer on EXP2
#panel.red_led_pin                            0.26            # pin for red led on viki2 on EXP1
#panel.blue_led_pin                           1.21             # pin for blue led on viki2 on EXP1
panel.red_led_pin                            1.19           # pin for red led on viki2 on EXP1
panel.blue_led_pin                           1.20             # pin for blue led on viki2 on EXP1
panel.external_sd                            true              # set to true if there is an extrernal sdcard on the panel
panel.external_sd.spi_channel                0                 # set spi channel the sdcard is on
panel.external_sd.spi_cs_pin                 1.23              # set spi chip select for the sdcard
panel.external_sd.sdcd_pin                   1.31!^            # sd detect signal (set to nc if no sdcard detect) 1.18
panel.menu_offset                            1                 # some panels will need 1 here

The issue here was the pin for the red led was also set for .26 which is why the LED never came on but the wrong fan would. The red LED should come on when any temp is above 55c. Blue was also assigned to 1.21 which is wrong for the X5 GT and the VikiII display. I commented out the wrong lines and added the correct ones.

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

5

Re: Could use some help with Smoothieware.

Wow.  Good detective work.

-Kevin