What is missing from the connection schematics are the limit switches which conect from ground to pin 9 and 10 since i use two steppers and of course the jumper on the relay module is not there anymore.
I placed grbl 1.1 on arduino and customized it for my needs.
Everything is working except activating relay module for the electromagnet.
The relay module is activated by coolant flood m8. Every time i start it it goes in alarm 1 - hard limits reached.
If i remove the 24v going through the relay normal open conection the relay works just fine.
This is the project. A five bar paralel robot that picks and places the colored ball bearings with the help of electromagnet and the open cv that will tell the robot where to pick and where to place the balls based on input.
As i said, everything works but this relay module. Basically every time i try to activate this relay module and let 24v pass to the electromagnet, it triggers alarm 1, hard limit reached.
Definitely a hardware one. Because if i remove the conection between electromagnet and relay, thus no current flows through closed relay, the m8 gcode command closes the relay without an issue. Must be what Paul suggested but since i have no clue in electronics per se, since i am just a user of allready made electronics, didn t know what to do.
Basically i need to filter out some spike the electromagnet creates somehow when activated.
Well, i hope at some point i can show you he end result. This is supposed to be an educational platform, through python, arduino and grbl.
In theory this platform will help a student tinker with python, gcode, open cv, steppers, servo, all with direct feedback and with no safety issues. Not like a cobot or industrial robot. A bit of pneumatics is missing from the project
About the EMF, this is something from the world of electronics, something that i couldnt pursue, perhaps only few topics here and there just to solve issues. I am a musician with a passion for small automation. I dont have the energy to take on such a huge domain like electronics. I can do automations, cnc based machines and for other purposes, i can design the parts in solidworks, i can program electronics but just as far as the need for that automation pushes me to.
In general, like www helps in a lot of ways, if you don t know something, find someone that does.
Tomorrow i will try your solution since i couldnt find a diode today.
not sure why you ask a hardware question on a programming forum
does your power supply have sufficient current capacity to power your electromagnet? do you know how much current your electromagnet draws at the supply voltage?
True, wrong group choice when posting this topic. It is not a programing issue. None the less, i got a good suggestion which i believe will solve the issue.
The power supply works perfect without the limit switches. Thats why at first i did not see any issue. Once the switch limits installed, the relay module triggers the hard limit reached alarm.