Laser problems

Répondre
jodougie2812
Messages : 30
Enregistré le : 01 déc. 2020 10:27

Laser problems

Message par jodougie2812 »

Hello. I don't know if I'm in the correct place on this forum but I need help with the laser on my RCNC32
I've mounted at 15 watt laser and connected it to the board. Following the instructions on the firmware section.
The laser works but in the negative..
When I switch on it immediately lights up at full power.
Using LaserGRBL to burn a test diagram. The laser switches on and off but is on when it should be off..... and off when it should be on. Burning the background instead of the lines.
I hope that makes sense......
Is there a setting I need to change in GRBL. I have loaded the latest version of the firmware onto the card
Any help appreciated
Avatar du membre
HTheatre
Messages : 5912
Enregistré le : 31 mars 2019 08:21
Localisation : Rivesaltes

Re: Laser problems

Message par HTheatre »

Hi jodougie2812,

Yes, you have to take a look in GRB where the PWM signal have to be inverted.
The only way to check and modify it, if necessary, is to flash again the STM-32. I updated the assembly manual for that.
Take a look at the submanual dedicated to the STM-32 programming à the end of the assembly manual (link in my sign).

Moreover, if you reflash the STM-32 with the last firmware of the STM-32 available on the mstrens' GitHub page, do not forget to activate the laser mode before reflashing or connecting to GRBL via USB (in this case the command to send to GRBL will be $32=1)

See ya,
jodougie2812
Messages : 30
Enregistré le : 01 déc. 2020 10:27

Re: Laser problems

Message par jodougie2812 »

Thanks. I will have a look.. im not sure how to invert the PWM . Hopefully it may become clear when I take a look tomorrow
Thanks
jodougie2812
Messages : 30
Enregistré le : 01 déc. 2020 10:27

Re: Laser problems

Message par jodougie2812 »

Hello again.
I've looked at the GRBL using Antonio and am completely confused.
Can you give me an idea as to what I should be looking for.
Where I should find it and
What I should change it to.
Any help is appreciated. I think my brain may be too old for this steep learning curve
Thanks
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: Laser problems

Message par mstrens »

In the config.h file from the STM32 you have those lines:
// added by MS in order to allow to invert the PWM signal
// uncomment to invert PWM signal (it is implemented only for STM32F103 board.
#define INVERT_SPINDLE_PWM
jodougie2812
Messages : 30
Enregistré le : 01 déc. 2020 10:27

Re: Laser problems

Message par jodougie2812 »

Wow this is difficult
I followed the instructions. Using Attolic True Studio.
I open config.h and remove the # from the #define INVERT_SPINDLE_PWM command
I then rebuild the project and it generates 2 errors

expected '=', ',', ';', 'asm' or '__attribute__' before 'uint8_t' in nuts_bolts.h and
unknown type name 'define' on line280
If i put the # back in front everything builds successfully.
Help please :)
Modifié en dernier par jodougie2812 le 22 févr. 2021 10:17, modifié 1 fois.
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: Laser problems

Message par mstrens »

In fact you do not have to remove the #.

When you have
#define INVERT_SPINDLE_PWM
then the signal is inverted

In order NOT to invert it, you must have (adding // in front)
//#define INVERT_SPINDLE_PWM

Depending on your laser you need the one or the other.
So try with one, and if the signal is inverted, try the other one
jodougie2812
Messages : 30
Enregistré le : 01 déc. 2020 10:27

Re: Laser problems

Message par jodougie2812 »

thanks i will give it a go
jodougie2812
Messages : 30
Enregistré le : 01 déc. 2020 10:27

Re: Laser problems

Message par jodougie2812 »

Thanks. That worked.
Répondre