Archim Laser configuration

It is my understanding, to get a 5v Laser working on the Archim board, we should edit the firmware to reassign the fan controls from the existing 12v fan pin to a pin that provides 5v so that we can use those gcodes to control the laser. It is suggested? on the project page to use pin 53.

Electrical engineering is not my strong suit. I have some questions concerning this.

  1. Where is pin 53 on the Archim board? My Google-fu is not providing me the information that I am looking for. At a guess, I see a 5v pin in the PWR EXP section (see image blow), is this pin 53? (How could I find that kind of information in the future?)

  2. Is there any other configuration needed? I read a few topics that mention Configuration_adv.h, but no concrete settings to change, or is it just the one line in the pins header?

  3. The lasers have a two wires, TTL + and -. However “Pin 53” is singular. My novice assumption is that the + goes to Pin 53, but that would leave the - homeless. Assuming the image above is the correct location for Pin 53, would that make the next pin (GND) the location for the TTL -?

I do not have the tools or electrical engineering knowledge required to use trial and error, so I want to eliminate any unknowns or guesses. Does anyone have experience with the Archim board that could answer these questions?

I don’t have an answer for you per say, but you may find some useful information in my post.

Looking at the: I see an entry
for (digital?) pin 53 as PB14. Unfortunately I couldn’t find information in pins_ARCHIM1.h for pin 53 or PB14 (unused?); however in pins_ARCHIM2.h I did find an entry which lists it as being on J20 17

If I find PB14 (and J20 17) on the schematics for the Archim 1, I see that its here:

Which, using the first pin as a guide, should be here on the board:

If the above trail of breadcrumbs is correct, I would plug the… TTL (+) ? into this pin? Where would the TTL (-) go?

The Archim1 schematic:

Pin map:

Pb14 is digital pin 53 on the Archim1

As for hooking it up the way you are describing…I don’t know. It looks like you need to PWM a 5v signal to set laser strenghth. @jeffeb3 might have an answer.

Yeah I have those links, which is how I found the information in my previous post; but I am still not certain which pins to connect to.

What is the difference between digital and physical pins, and which does Ryan refer to here: ?

Whoops, I saw you mentioned you were looking at archim2, but I missed that you said the .h file and not the pin map.

They aren’t in the archim1.h, but they are still controllable. The physical pin is the pin on the board, the digital pin is how you call it.

So M42 P53 S128 would set the laser to 50%
M42 P53 S255 for full power
And M42 P53 S0 for off.

Or I believe you can change the firmware to use the fan gcodes to activate that pin.

I believe you would hook up your ttl+ to the 5v pin in the power expansion block, and then the ttl- to the j20 17. And then you should be able to control it without making any firmware changes by using the gcode above.

I would wait for someone else to chime in though to verify if that’s correct, as I’m not confident in the answer.

1 Like

I would prefer this method (using G42 P53), so I don’t have to maintain additional changes that I might forget to apply to the firmware on each update, if thats a viable option; but I am not adverse to modifying the firmware if thats the only or best option.

You can also contact ultimachine. They have been really responsive to any of my questions.

I think it is M42, not G42.

The TTL(-) would go to ground.

The M42 has a little quirk though, which us that it will bypass the planner and toggle immediately. It is fine it you are basically toggling it at the start and end of a job, or just cutting out parts. But if you are using a laser and trying to do engraving, it will be ahead of the movements.

It shouldn’t take long with a multimeter, and a computer to figure out M42 on your board though.

1 Like

Whoops, fixed my post to say M42. And I learned that quirk today! I had to sprinkle in some M400 commands to ensure everything in the planner had finished before executing the next line.

I do recall reading that some commands are not buffered, they are immediately executed, causing issues like that. I don’t plan on doing any engraving, but I would like events like this to come in the order that they appear in the g-code, so that would mean changing the FAN control to pin 53 in the firmware, rather than tagging on to the M42 control.

Shoot. Now I can’t remember what we found out. I am pretty sure the laser stuff just got overhauled too. The fan might also skip the planner. :grimacing:. You might try it with the M42 and see how it goes. If that doesn’t work, you may need to enable the actual laser features.

What are the actual laser features? I have read mention of additional configuration in Configuration_adv.h but everything related to lasers appeared to already be set.

I will play with Pin 53 and see if I can find the actual pin its on. In the mean time, it may seem like a dumb question, but if I want TTL control on the laser, I have to power the TTL with 5v and still power the DC IN with 12v?

I don’t know. I just read that they fixed the M3 problems we were having where it was seriously delaying on intensity change.

I am not a laser expert, I just try to guess on this stuff.

You will need to give it 12V to power it, and the 5V is really just a signal to tell it when to turn on or off.

@jeffeb3 or @vicious1 if you know the answer to this

I have tested with a multimeter after making the firmware change, and setting the FAN pin to pin 53 in the firmware does indeed control this particular pin:

There are two problems though.

  1. The output seems to be (max) ~ 3.27
  2. The output is binary. At M107 S0 to S127, its 0.01, and at S128 to S255 its 3.27, there is no in between.

Do either of you have suggestions for a solution to this?

It sounds like you are not getting pwm. Either the pin doesn’t support pwm, or a chunk of software has it wrong and doesn’t think it supports it.

From the light reading I did on PWM, it does seem that its not working on that pin.

Is there any way (outside of support from Ultimachine) to figureout if its incapable, or just incorrectly configured?

Either way, the 3.3v has me concerned. Thats only 66% of the 0-5v expected by the TTL controller, would that not limit the power output of the laser?

It depends. If it was measuring the amount of time it was “on” vs. The amount of time it was “off”, then it would be “on” when the voltage was over 2.5V.

Your multimeter will not be able to see the real waveform, but it should be varying smoothly from 0 to 3.3V. The laser is hopefully smarter than that.

The pin needs to be 5 v. Be sure you have the or try sometimes 1026 ? Instead of 256

All of the pins in J20 seem to be 3.3v pins, I can only find one 5v pin on the board (not Pin 53) and its “always on”?