MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.17k stars 19.21k forks source link

[FR] Software correction for laser SLA distortion #6001

Closed sfj13 closed 3 years ago

sfj13 commented 7 years ago

First off, amazing work on Marlin. I have had a great experience with the firmware and I appreciate all the development that has gone into it.

I am developing a low cost SLA printer using stepper motors and mirrors mounted in a galvanometer scanhead type arrangement to manipulate a laser.

There is a non linear non symmetric distortion that occurs with a galvonometer setup. This is present due to the distance from the mirrors to different points on the build plane changing as the laser moves. The effect is that a square would end up looking parabolic on its sides as if you were to stretch the corners out.

I created a relationship between the mirror angles of a galvanometer type setup and where the laser will hit on the build plane. I am looking for help or advice implementing this correction into Marlin.

If anyone is interested in helping me set this up, my printer is working and ready to test this type of correction.

This could have applications for laser cutters that use a galvanometer for positioning as well.

I am very limited in my coding experience so I am reaching out to see if anyone is interested in this.

I think an implementation would do something like this...

Take the current X and Y coordinates and calculate mirror angles from them. Calculate the mirror angles from the coordinates of the destination that is desired. Use the difference in mirror angles to calculate the number of steps required to make the move.

For large moves, the move will have to be broken up into smaller moves to preserve a linear interpolation between the two points. If I understand correctly, delta type printers do something similar.

The calculation has four intermediate values that need to be calculated before the mirror angles can be found. These involve inverse tangent and inverse sine calculations and taking the square root as well. Would this be too computation intensive to be calculated as the G code is processed?

I'm trying to do this myself currently but my coding skills are lacking and I don't have detailed knowledge of Marlin.

Thank you for taking the time to read my post and any information is greatly appreciated.

Bx3mE commented 5 years ago

Yes

RavenWarrior commented 5 years ago

Nope. I can’t find it

RavenWarrior commented 5 years ago

Oh quool

Bx3mE commented 5 years ago

Just posted..

Bx3mE commented 5 years ago

Please add your pictures there....

RavenWarrior commented 5 years ago

How the hell do I upload photos? Tell me I don’t need karma

Bx3mE commented 5 years ago

Have you been nice in your previous life? lol - nope - but i guess you found it?

RavenWarrior commented 5 years ago

Lol, yea. Got the hang. If in doubt, google it... unless it’s “diy laser galvo 3d printer” google doesn’t help with that’s ( ^-^)

RavenWarrior commented 5 years ago

I’ve got a lot of info from the www that I’ve collated into a pc file. So if you want any info on what that circuit is doing, just ask and thou shall receive

RavenWarrior commented 5 years ago

I think it’s a digital to analog circuit that multiplies/scales the input. But I never got far because that esp32 didn’t wana play. I’ll have to get my head around it all again as I left it gathering dust. But I think it’s basically an lm324 used as an op amp and the esp32 was supposed to convert digital to analog.

erikturn commented 5 years ago

Something else that needs to be done is temperature monitoring of the laser module, so you can smartly insert wait times for cooling, or vary the movement speed and power of the laser when it is getting too hot. That will help the lasers not burn out due to overheating during long prints. A lot of higher power lasers tell you not to run the laser for more than 1 hour at a time; careful temperature control could fix that.

Bx3mE commented 5 years ago

To be precise you should monitor both the photodiode inside quality LDs and the package heatsink. The key to a long life for a LD is proper usage according to specification which differs between diodes. Most diodes i have are run at 85% of spec and have very long life....

boelle commented 5 years ago

wrong labels on this one

MadMatej commented 4 years ago

Dear Marlin team, Thank you for the best firmware. I run it on my FDM printers. Now I build my first SLA with servo driven mirrors. Servos are driven like steppers with EN/STEP/DIR signals.
I do have some minor coding skills, but not so much that I could implement mirror angle correction in FW by myself. In general is similar like scara kinematic translation to cartesian. Can you guide me to implement it?

Thanks again, Matej

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.