Alright I have upgraded my 3d printer and have swapped out my GRBL board on my lowrider2 to the Creality 4.2.7 board which is an STM32f103ret6 running marlin.
I have a 7w laser that I am trying to configure to work with the pinout of the board.
The board has a BLtouch port that has 2 hardware PWM Pins I believe the BLtouch IN is on pin PB1 and the BLtouch OUT is on PB0. There is also a filament runout sensor that that is on PA1 of the STM32f103ret
SO in the marlin pin_CREALITY_v4 I edited line 64 to…
#define SPINDLE_LASER_PWM_PIN PB0 // BLTouch OUT “SERVO0_PIN” default
changed to SPINDLE_LASER_PWM_PIN
I plan on using either the PB1 as the SPINDLE_LASER_ENABLE … since I read somewhere in marlin comments that the enable has to be a digital pin… I plan on using a TTL relay that I have in stock to enable disable the power. would it be possible to use the " filament runout sensor on PA1 as the SPINDLE_LASER_ENABLE pin on the STM32103ret6, I would change Line 75-77:
//
// Filament Runout Sensor CHANGE TO SPINDLE_ENABLE
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA4 // “Pulled-high”
#endif
to something like…
#ifndef SPINDLE_LASER_ENA_PIN
#define SPINDLE_LASER_ENA_PIN PA4 // “Pulled-high”
- not sure if this pin is pulled-high by hardware or software ^^^
but I found a similar fix @
McUtty/Marlin2.0-Laser-with-M3-M4-M5-G-Code-for-Power: Marlin 2.0 optimised for Laser Engraver (1 X Axes Motor, 2 Y Axes Motors, Optional Z Axes) (github.com)
or in Configuration_adv.h line 2962 in marlin bugfix 2.0
enable/define SPINDLE_SERVO? Currently with just the SPINDLE_LASER_PWM_PIN and line 2960 in configuration_adv.h I have LASER_FEATURE enabled. I am getting error on compile stating
#error “(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN or SPINDLE_SERVO to control the power.”
Im confused in the SPINDLE_LASER_ACTIVE_STATE on line 2962 which is set low by default. Id assume the PWM would enable disable the laser depending on the PWM state.
only thing I can think is to add that SPINDLE_LASER_ENA_PIN to either the PA1 or PB1 with the relay, or could I set it to the same PIN # as the SPINDLE_LASER_PWM_PIN maybe with some VAR that state if >0 enabled
before I go and mess up all the code tinkering I rather see if anyone has any suggestions,
on the GRBL shield with ver GRBL 1.1 I was using It with laserGRBL and it set the endstop z+ I belive its Arduino D11 and I didnt have any enable disable pin just used the M3 M5 S Gcode commands…
The laser had 0 documentation and It has a weird driver I cant find documentation on… everything I found using that board type is using the part cooling fan with the m103 106 commands but… this thing drive thing is “12v input” but when I probe the laser out it’s 7.06v on the laser out… the pwm has 3 pins going into it 12v pwm ground
So I’m not sure if I can use those pins seeing as that driver module is operating the fan on the driver board and on the laser with 12v and the laser is being driven by that pwm which is maxed at 7v I guess I could put a buck converter on the part fan to drop to the 7v and plug the fan into the hot end heat sink fan port and bypass the driver that came with the laser. But in my research I saw that someone had issues with using the part cooling fan on the 4.2.7 board because it was only outputting a pwm @ 7khz or so and wasn’t enough to power the laser…
if not I can just keep using the grbl board , just trying to reuse something I already own to work as a standalone board, I am planing on putting an extruder and hot end on the low rider for large prints for mold making. And rather just have my carriage assembled with all the tools on it so i can just send gcode and not have to swap tools on and off.
Thanks,
Sean