makerbase-mks / MKS-Robin-Nano-V3.X

Robin nano V3 is an upgraded version of Robin Nano V2.0. The upgrade changes are quite large, including upgrading the MCU to the M4 core, and adding support for USB disk.
GNU General Public License v3.0
141 stars 69 forks source link

PWM TTL For laser #8

Open Ainmimdal opened 3 years ago

Ainmimdal commented 3 years ago

Hi, I need to supply 5v pwm signal to control my laser. Supposedly this board is said to have PWM TTL support compared to the robin nano V2, but I checked my board and the only empty pins I see are the three next to the fan LEDs. The silkscreen on the board says PA0 PE5 and PB0 which is the same for the heaters. I don't see any spindle/laser definitions in the example configs either.

Ainmimdal commented 3 years ago

I tried using the PB0 and the PWM works but M3 S0255 only shows 60% on the laser. Im using NEJE PWM/TTL module, it can accept 5v-12v of pwm. The heater socket outputs 15v when using M3 S0255. My multimeter cant read the voltage on the pwm pin. Can anyone confirm the voltage on this pin? I don't want to fry my laser controller.

Ainmimdal commented 3 years ago

After reading issue #7, Using TX3 (PB10) pin works. I still don't understand why the advertised PWM pins are the same pin for heaters.

MKS-Sean commented 3 years ago

image Hello, what I marked with a red box is the TTL pin that drives the MOS tube, which can be configured as a laser control pin

Ainmimdal commented 3 years ago

Yeah, I tried those pins but the laser only goes up to 60% with those pins. Any components connected to the heater port will turn on if I use those pins. My solution is using the UART pins which outputs pwm correctly.

moibatista commented 3 years ago

I have the MKS Robin Nano v3, with original configuration. I don't change anything. How I can use de TTL pin? How I can active this pins? I need to know the Gcode to control this pin. With M3 say me incorrect command.

Ainmimdal commented 3 years ago

I use TX3 pin (next to the esp) and in marlin, you have to find the file pins_MKS_ROBIN_NANO_V3.h, find #define SPINDLE_LASER_PWM_PIN and change to #define SPINDLE_LASER_PWM_PIN PB10 . You can search more on the internet about changing the laser settings in configuration_adv.h

CLP58 commented 2 years ago

I use TX3 pin (next to the esp) and in marlin, you have to find the file pins_MKS_ROBIN_NANO_V3.h, find #define SPINDLE_LASER_PWM_PIN and change to #define SPINDLE_LASER_PWM_PIN PB10 . You can search more on the internet about changing the laser settings in configuration_adv.h

I tried using the TTL PWM pin as they say, but found the same thing as you, only 60% power. How did you fix it please? I used the UART the same way you did and only had 60% power.

CLP58 commented 2 years ago

I found that it only has 3.3V on the logic pins, so it only ends up with 60% power no matter which pin it is defined to. Officially rated at 5V input @MKS-Sean

danorder commented 8 months ago

did you change the jumper to 5v.