Solid State Relay to control Spindle

I’ve no specific answer for your error, but when I have a problem like this, I backup to a version I know compiles, and then add changes back in slowly compiling at each stage to identify what causes the failure. The error seems to indicate the issue is with whatever changes you made for the display.

This is probably saying the obvious, but have you checked that location for a “dogm_bootscreen.h” file. Maybe the file is there under a different name?

It is looking for _Bootscreen.h, which is the v1logo. You can either copy that from a working version, or disable it in configuration.h (it’s called something like custom bootscreen).

2 Likes

Yes… that’s it! I copied the boodscreen and it compiled, thanks for the help!

Then I did the ‘spindle’ changes and at first it failed on the Z_Max endstop not being defined.
So did that and I got another error message:

c:/users/bambi/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/LPC1768/src/src/feature/spindle_laser.cpp.o: in function `SpindleLaser::init()':
C:\Users\Bambi\Documents\MPCNC\Firmware\Marlin-bugfix-2.0.x/Marlin\src\feature/spindle_laser.cpp:68: undefined reference to `set_pwm_frequency(short, int)'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\LPC1768\firmware.elf] Error 1
=============================================================================================================================================== [FAILED] Took 23.18 seconds =============================================================================================================================================== 

Environment    Status    Duration
-------------  --------  ------------
LPC1768        FAILED    00:00:23.181
========================================================================================================================================== 1 failed, 0 succeeded in 00:00:23.181 ==========================================================================================================================================

Oke… I fixed the problem by changing the PWM to ‘true’ instead of ‘false’:

#define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power

It finally compiled and the firmware it flashed to the board!
I’ll have a look tomorrow if the relais works.

This is what it says in the pins folder:

#define SPINDLE_LASER_PWM_PIN                 P1_18  // Hardware PWM

#define SPINDLE_LASER_ENA_PIN                 P1_29  // Pullup!

//#define SPINDLE_DIR_PIN                       32

Is it correct to use PIN P1_29 to enable and disable the relais/spindle?

And another question… I think I need to set this to ‘HIGH’? It was ‘LOW’ by default:

#define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if the on/off function is active HIGH

Oke so another change:

I disbaled the PWM, uncommented it in the pins folder and in the cofiguration_adv uncommented //#define SPINDLE_LASER_FREQUENCY 2500.
That seems to work and now I got it wired up (to the Z_MAX endstop).

Now the question/problem:
when I set the relay/spindle to active high (also the jumper on the relay):
#define SPINDLE_LASER_ACTIVE_STATE HIGH
when I connect my board to power I hear a click and LED2 is bright on the relay, but nothing changes with M3/M5

when I set the relay/spindle to active low (also the jumper on the relay):
#define SPINDLE_LASER_ACTIVE_STATE LOW
when I connect my board to power I don’t hear a click on the relay and I see a green LED, when I use M3/M5 I see something change (LED2 goes on and off but not so bright) but no click.

Do I need tot set it to active low or high?

I connected S to In, G to DC- and V to DC+

Generally speaking a single pole double throw relay will have 5 terminals. 2 are for the coil, these are the two you want to connect to the board (since it is DC make sure to connect with proper polarity or you won’t get a light on the relay). The other 3 terminals (usually labeled “no” “nc” and “common” are where you hook up your laser/spindle. You would hook the power to the “common” terminal and laser to either “nc” or “no” since this is a spindle enable you will want it to fail safe. So you want to use the “NO” terminal and set the firmware for active high (meaning when the output is high the relay closes and the spindle is active)

My relay has 3 terminalson one side (DC+, DC- and In) and 3 on the other side (NO, COM, NC)
I connected S to In, G to DC- and V to DC+

This is the relay I got:

What spindle are you using? This is only rated for a 3A inductive load.

1 Like

Makita RT0700C

1 Like

That router requires 6.5A I would not use that relay to switch that router on and off you are asking for somthing to burn up.

You should chose a relay rated for a 7A or greater inductive load.

I’m on 230VAC, so 3 x 230 = 690W, my router needs 800W :frowning:

This is the exact one I got… it’s rated for a 10A right?

That makes it worse at 230vac it 0robably will only handle 1.75A and I don’t have specs on the current draw of the 230v makita but I imagine it is at least 3A.

710W it says.

That one does not implicitly say, but I would guess not. That is probably a resistive load rating.

Keep in mind it’s not just about the Watt raiting. An inductive load (like a motor) has a large in rush current. So it will pull much more current then normal for the first second. In those cases you want to get a relay that is either rated for inductive equipment or buy a relay with a much larger current rating.

1 Like

I guess it’s the same as the first link I posted… so probably also 1.75A. Yes I looked up inductive vs resistive loads, now I get it.

Should I use a SSR instead? I don’t know if there are relais that can hold that much inductive load…

1 Like

Oh there are, look up 30A relay and you will find some that should work. You could also use what is called a “motor contactor”

Also you could try using the one you have, it is just likely to burn up the relay.

I have a ‘motor contactor’ aswell, I use one in combination with a on/off swith to turn everyrhing on.

Oke I will buy a 30A relais, but first I want this one to work… could you help me with that?

That should work that is rated to 10x the normal current.

1 Like