Laser wiring?
-
@dc42 said in Laser wiring?:
The heater pins on the expansion are active low, so you will get a glitch turning the laser on while the Duet initialises itself. I suggest you do the same as we do for the heater mosfet drive circuits, which is to use a 74HCT02 gate powered from 5V to gate the signal with +3.3V, and invert it and level shift it to 5V.
How would I go about wiring this configuration up? I have a laser module that takes a 5v PWM signal that I'd like to get hooked up.
-
Take a 74HCT02 (or some other form of NAND/NOR/inverter logic gate), and feed in your control signal from the Duet. The output of the logic gate then goes to the 5V-PMW input of the laser.
A typical 74HCT02 (Quad 2-input NOR gate) gets connected to +5V and GND.
1A and 1B get connected together and then to your Duet output pin.
1Y goes to the 5V-PWM laser input.
(as the 74HCT02 as 4 such logic gates, you can also use 2A+2B with 2Y, 3A+3B with 3Y, etc.)
Just look up the pin assignment in the 74HCT02 datasheet (e.g., https://assets.nexperia.com/documents/data-sheet/74HC_HCT02.pdf on page 2) -
@resam thanks
I wasn't sure how to wire up the 1a,b inputs, but you've cleared that up for me!
-
Does #1 in the image look correct? Also, would #2 work? It was taken from the power mosfet drivers from the Duex boards (there's also a cap between 5V and GND I missed out).
I tried #2, because I figured but it seems the laser off on 0 and 100%, and on full everywhere between.
I can try #1, but want to make sure it's correct this time before wiring it up.
-
I'm using #1, but with the HEATER_3 pin, if I remember correctly.
Not sure how FAN2- behaves in this circuit... -
@resam D'oh, Looks like I got turned around - Will try on heater now.
-
On my system:
M452 P3
to enable "laser mode" on heater 3.
M3 S1
turn on the laser at the lowest intensity.
M3 S255
at full intensity.
M5
andM3 S0
is laser off. -
It works! I think I'm going to have to write this up later and put it up here/on the wiki for others to reference. @dc42 is there any downside to using circuit #2 in my previous reply above vs the "simpler" one? If not, I'll stick with #2.
@resam said in Laser wiring?:
On my system:
M452 P3
to enable "laser mode" on heater 3.
M3 S1
turn on the laser at the lowest intensity.
M3 S255
at full intensity.
M5
andM3 S0
is laser off.Yup, that's what I've got now
-
We use circuit #2 In the heater wiring, because users occasionally short +3.3V to ground because of incorrect endstop wiring or other reasons, and when that happens we don't want all the heaters to turn on at full power. The same considerations apply to a laser, so I suggest circuit #2.
-
@dc42 Great, that's what I went with, and it works
Thanks all for the help. I've got a bunch of cable management to do today, and once that's done, the real testing will begin. If the tests all work, I'll write it up and post it here for some vetting, and if it looks good, I (or someone) can put it up on the wifi
-
Prepping the documentation here - https://gist.github.com/keyz182/34601ec4ba4a19c55a177d0d1738d5a3
Any notes or corrections welcome. Once done and peer-reviewed I'll get it moved to the wiki.
-
Nice!
I think you got the
GND
andV_IN
connection mixed up on theLASER_OUT
header...? -
@resam Good catch, fixed
-
Just realised I selected the 74HCT02D, rather than the 74HCT02. It's datasheet claims it's both TTL and CMOS compatible.
I ordered a few boards from JLPCB because I've never done board design before, and figured this would be a good start.
I think it should work, as the output is dependent on VCC rather than anything else, and other than also having CMOS input compatibility, it seems the same. Can someone with more knowledge in electronic weigh in to say if it's a choice that'll work, or if I need to change it?
-
@keyz182 said in Laser wiring?:8
74HCT02D
should be fine, the datasheet shows the "D" to mean its SIOC foot print. What determines the logic levels is the HC/HCT (74HC02 vs 74HCT02)
https://en.wikipedia.org/wiki/7400_series#7400_series_derivative_families
-
@t3p3tony Awesome, thanks.
Do you think the "Circuit operational theory" section I just added looks correct? I want to make sure people are able to understand why they're doing something, not just that they should do it.
https://gist.github.com/keyz182/34601ec4ba4a19c55a177d0d1738d5a3
-
by connecting the heater PWM to two input pins of the 74HCT02, we get an inversion of the PWM, such that when PWM out is pulled low, the 74HCT02 output is driven high.
This is a little confusing as written because the diagram shows PWM connected to only one input. maybe re-order the text so it is clear what the 3.3V is doing first?
-
@t3p3tony rearranged slightly now - https://gist.github.com/keyz182/34601ec4ba4a19c55a177d0d1738d5a3
I still haven't been able to fully test this yet, I ran out usable filament to print a cable chain mount (I have ABS, but needed to use the room today).
Hopefully I'll get things all tested tomorrow, and can augment the guide with some examples of using e.g. Inkscape to do both vector and raster.
-
Added to the wiki - https://duet3d.dozuki.com/Item/Using_a_PWM_driven_laser_module
-
@keyz182 thanks, I moved it to a wiki page as it's not really an item: