Wiring up laser psu with active L fire button and 0-5v PWM Intensity #62
Replies: 5 comments 6 replies
-
Which pin is used for what is neither known by the core or defined by it - you have to consult the board map file you are using or look at the output from the new The USE_SPINDLE_DIR_AS_ENABLE_PIN comment is a remnant from the Grbl codebase that I have overlooked. I will remove it in the next build. |
Beta Was this translation helpful? Give feedback.
-
not sure this is the correct place, I've run into this before but cant find or remember the fix, I need to use pb9 for pwm, and when I pu that in my board file, I get timer errors. If I'm seeing and remembering correctly it has to do with driver.h Here: Again not 100% sure the fix. If you can point me in the correct direction or help me remember. |
Beta Was this translation helpful? Give feedback.
-
May i ask how you did that.... Am I looking in the wrong place? When I
initially did a build with spindle pwm on pb9 i recieved all kinds of
errors. Related to timer. Then I added an enrty below
elif spindle_pwm_port_base == gpiob_base for pin ==bp9 and they went away,
but havent set tim correctly.
Where did you do the change, i dont see it.(trying to learn).
…On Sun, Nov 19, 2023, 6:27 PM Terje Io ***@***.***> wrote:
An entry for PB9 has to be added, it is bound to timer 4 channel 4. And
the debounce timer has to be changed away from timer 4.
—
Reply to this email directly, view it on GitHub
<#62 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF5JEYDIJ433YYEV3IO6HQ3YFKPVVAVCNFSM5CVWE2IKU5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TONRRGQYTAMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
SPINDLE_PWM_PIN == 9 // PB9 - TIM4_CH4
#define SPINDLE_PWM_TIMER_N 4
#define SPINDLE_PWM_TIMER_CH 4
#define SPINDLE_PWM_TIMER_INV 0
#define SPINDLE_PWM_AF_REMAP 0
#endif
#endif
This seemed to work however m3 s0 turns on laser, m3 s1 or greater
turns it off. And yours above did not work(was time_n =1, a typo?).
Getting closer. Thx
…On Sun, Nov 19, 2023, 7:04 PM Terje Io ***@***.***> wrote:
I did not add the code, I only suggested how. However, you may try this:
...
#elif SPINDLE_PWM_PORT_BASE == GPIOB_BASE
#if SPINDLE_PWM_PIN == 0 // PB0 - TIM1_CH2N
#define SPINDLE_PWM_TIMER_N 1
#define SPINDLE_PWM_TIMER_CH 2
#define SPINDLE_PWM_TIMER_INV 1
#define SPINDLE_PWM_AF_REMAP 0b01
#elif SPINDLE_PWM_PIN == 9 // PB9 - TIM4_CH4
#define SPINDLE_PWM_TIMER_N 1
#define SPINDLE_PWM_TIMER_CH 4
#define SPINDLE_PWM_TIMER_INV 0
#define SPINDLE_PWM_AF_REMAP 0
#endif
#endif
I am not able to verify this until I am back home so I leave that to you
for now. And do not forget to change the debounce timer to an unused one.
—
Reply to this email directly, view it on GitHub
<#62 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF5JEYDSZD7VG3PQFKKKEO3YFKUBZAVCNFSM5CVWE2IKU5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TONRRGQZDOMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I got it figured out. Like you said $16 to invert. In driver.h added the
elsif for pb9 and used 4,4,0,0 for tim,ch,inv,etc. Also now that i have the
board tested with $35 set also, I can return to machine for further
testing. Hope to move forward with mechanic mods and then stm32f466. We can
chat more when you get back if you want to add changes to main.
Thanks for your help.
…On Sun, Nov 19, 2023, 8:22 PM Terje Io ***@***.***> wrote:
m3 s0 turns on laser, m3 s1 or greater turns it off.
You have to invert the enable signal? $16=1.
(was time_n =1, a typo?).
Where is that code?
—
Reply to this email directly, view it on GitHub
<#62 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF5JEYCSQK5X5V7FIOVLN2LYFK5ERAVCNFSM5CVWE2IKU5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TONRRGQ3DMNY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Trying to wire up a new laser PSU. I believe when I last did this I used one pin on the teensy to enable the laser and a PWM pin to control the intensity. I believe the gcode from lightburn would just enable the laser once at the beginning of the file and then control firing the laser using S values. Now I'm starting with a fresh grblhal install and I can't remember how I set it up. I see on the config file the following:
// NOTE: If VARIABLE_SPINDLE is enabled(default), this option has no effect as the PWM output and // spindle enable are combined to one pin. If you need both this option and spindle speed PWM, // uncomment the config option USE_SPINDLE_DIR_AS_ENABLE_PIN below.
however, I can't find USE_SPINDLE_DIR_AS_ENABLE_PIN anywhere else in the repo. How should I be wiring it up? This is the PSU I'm using. The pinouts are described.
https://www.cloudraylaser.com/collections/power-supply/products/cloudray-35-50w-myjg-ng-co2-laser-power-supply?variant=32921182765196
Beta Was this translation helpful? Give feedback.
All reactions