Plotter(=Laser) problem with output for pen control
I want to make a plotter with a pen lifted by a magnet.
I configured a laser configuration with Laser enable pin "Heater 0 normally used for extruder 0".
That is D10 on ramps1.4 (ok?)
I want to use that output because the magnet needs some power.
Motors are working - but the output does not react.
My gcode:
M3 S200 -> Laser on (that is the feedback from the host, but I cannot measure currency in D10)
where is my mistake?
I configured a laser configuration with Laser enable pin "Heater 0 normally used for extruder 0".
That is D10 on ramps1.4 (ok?)
I want to use that output because the magnet needs some power.
Motors are working - but the output does not react.
My gcode:
M3 S200 -> Laser on (that is the feedback from the host, but I cannot measure currency in D10)
where is my mistake?
Comments
1. D10 is ok but if heater is also set to D10 (default) it will override every setting.
2. Laser turns only on when you move with G1 if using M3. Imagine a laser always being on is inherently unsafe. So add a G1 move. G0 moves will have it off, so yo have also a switch. Alternatively use slicer output - increasing E will also turn it on.
3. Needs laser mode to be enabled
1. how can I switch the heater to a different pin? or should I use heater 1 normally for bed?
#define NUM_EXTRUDER 0
in pins.h:
#define HEATER_0_PIN 10 <-should I change this?
2. Normally is the pen pressed with a spring to the ground. My magnet pulls back the pen when moving to a different place. So my idea was to control the magnet by a different G-command independent from the movement commands.
in repetier.h
M452 <- switch to lasermode
in command.s.ccp (line 15019
M3 S255 <- sound like control for the laser, that is also the echo
What G-command can I use to switch D10 on or off? my ideas was M3 S255 (on) and M3 S0 (off).
3. is enabled:
#define SUPPORT_LASER 1
#define LASER_PIN HEATER_0_PIN
#define LASER_ON_HIGH 1
Thanks for any hints..
Quote:
2. Laser turns only on when you move with G1 if using M3. Imagine a laser always being on is inherently unsafe. So add a G1 move. G0 moves will have it off, so yo have also a switch. Alternatively use slicer output - increasing E will also turn it on.
was to add a g1 move after the M3.
try code as follows:
G28
M452
M3 S255
G1 X50 Y50 F500
G0 X0 Y0 F500
and report what happens
(an ugly solution: I add to M3 in command.cpp: a hard digitalWrite(10,HIGH)
and according to M5 digitalWrite(10,LOW))
how do you test for power ?
with magnet connected or without?
if you test with magnet connected i hope you installed a flyback diode parallel to magnet,
otherwise you might kill the mosfet
I connect the magnet to D10 and used digitalWrite(10,HIGH) and digitalWrite(10,LOW) that is working.
Ok thanks for the hint with diode parallel to the magnet. I just checked google how to make it. Is 1N4001 ok?
whats your native language?
data of magnet:
http://tremba.de/zylindermagnete/db-zylindermagnete-ZMF-1632z-7.002.pdf
or a bigger one:
http://tremba.de/zylindermagnete/db-zylindermagnete-ZMF-2039d.002.pdf
Thanks for help .. (atleast a first time the diode survived!)
ich würde ne schottky diode nehmen , die 1n4001 ist "wald und wiese" und erwischt sicher nicht alle spikes.
schick mir mal deine configuration.h , das geht auch ohne digital write, ich vermute,dass du den d10 doppelt belegt hast.
was wäre eine passende schottky Diode ? (ich bin Maschinenbauer..)
"File is not allowed" habe sie in *.txt umbenannt..
igrendsoetwas muss es sein, das glaube ich auch!
beim testen habe ich den mal geändert:
#define LASER_PIN HEATER_1_PIN
das muss ich erst noch probieren, vielleicht liegt es daran
Jetzt ist mir noch unklar wie ich die Spannung am PIN verändere.
Eigentlich müßte M3 10 etwas anderes ergeben als M3 200.
Von der Zugkraft scheint das aber sehr ähnlich zu sein...
ich würde eine wie die nehmen:
https://www.reichelt.de/SB-SKE-4F-Dioden/SB-590/3/index.html?ACTION=3&LA=446&ARTICLE=16086&GROUPID=2991&artnr=SB+590&SEARCH=schottky+diode
muss aber nicht der typ sein, da geht fast alles was genug strom kann (in deinem fall also>3A)
spannungsfestigkeit >=50V
die spannung kannst du nicht ändern, die standard implementation ist "an" ab 200 ," aus" darunter.
M3 200 bringt gar nix, muss heissen M3 S 200
Bei Hardwarefragen kannst Dich auch per PN melden , Bin E-Techniker