Hybrid View
-
02-09-2021 #1
Hi John,
Yes all good here thanks just very busy on other projects and work.
On getting the error signal out of the java app and into your hardware there are two choices,
1. Integrate a serial library,
2. Make a small change to the app to print the error to standard out and then pipe this directly into a serial comm port.
I don't really have time to do this or test it right now but someone else could have a go, (2) is much easier if you don't want to mess about with the code too much, there is a tutorial on windows comm port piping here:
https://batchloaf.wordpress.com/2013...rt-in-windows/
Cheers, Joe
-
02-09-2021 #2
-
07-03-2023 #3
Hi Bryan Howard
Gee It was great to see this project moving again.
Devmonkey inspired me when he first posted this great idea
I am still very keen to build an open source surface straightening device using a webcam and stretched wire. Using a small milling cutter to flatten a surface point by point. All I need is a signal that tells me the webcam software has found center of the wire, from a PC or microprocessor via a hardware port. Ideally a digital Value +- signal to enable me to find the wire more easily when moving the camera over the wire.
I know I can build the hardware and provide the XYZ Motion control, Its just the webcam reading code that is beyond me.
Extensive testing that proves the accuracy of stretched wire was done, all my results were posted earlier on this thread a few pages back.
I also posted an early concept open source 3D model on Github
Cheers
John
-
07-03-2023 #4
I think I might have seen the model on GrabCad as well? I think having a PC and sending values to a microcontroller like an arduino would be the way to go. Then your microcontroller would be driving the steppers/servos. Communication would look like this in Python:
import serial
# configure the serial connection
ser = serial.Serial('COM3', 9600) # change 'COM3' to the appropriate serial port name
# send the message
ser.write(b'Hello, world!\n') # the 'b' before the string converts it to bytes
# close the serial connection
ser.close()
-
09-03-2023 #5
Using wire has the advantage over a laser beam when it comes to defining the boundary of the image formed on the webcam Microscope sensor. the thickness of the wire is known. and depending on the magnification of the microscope it will cover a certain number of pixels. There will always be aberrations; if the image not perfectly focused or if the lines in the camera sensor are not perfectly aligned to the wire. The the existing algorithm corrects for a fuzzy image rather elegantly.
Placing a black background behind the (illuminated wire) provides a very sharp contrast.
As I posted I got very good results using a manual lash up. using a micrometer. This method will provide all the data needed to flatten a surface. (Sag in the wire amounts to a couple of tenths over 2400mm, 8feet) You can use the Catenary formula to correct your measurements if you require higher accuracy.
The machine I posted on Grabcad simply automates the process and employs a small cutter to flatten a surface in this case held vertically, No sag to worry about. It moved the camera (It is mounted on the cutting head slide) until it is centered on the wire then makes a tiny cut. It will be a slow process, several hours but in the end there will be a very flat surface developed.
If this goes ahead I better dig up the ball screws and linear bearings I bought for this project. :)Last edited by John McNamara; 09-03-2023 at 04:25 AM.
-
09-03-2023 #6
GrabCad Model
I made a 3d Model to be made from laser cut parts that should be able to prove the viability of using stretched wire and a webcam microscope sensor.
The design uses two webcams to sense two suspended vertical wires with a weighted end suspended in Oil. This will guarantee that the two wires are parallel in two planes. This will eliminate any twist in generated surface, it will be a true plane.
I designed the mechanism using a laser cut frame and 100mm square tube and parts I have on hand.
There is minimal machining to do mainly small size lathe work.
To clear up any uncertainty The webcam sensor is moved mechanically until the image of the wire is Is centered on the webcam sensor. The size of the image will be determined by the magnification used. Small errors in the optics can be ignored as we are always using the same part of the lens.
https://grabcad.com/library/machine-...linear-rails-1
-
24-11-2021 #7
Hi everyone,
Just read this thread from beginning to end nonstop... what a clever way to use cheap, easily obtainable parts to achieve such precise measurements. I will definitely be trying the wire app method when it comes time to setup my machine. Thank you for sharing all your hard work.
-
15-12-2021 #8
Thanks for this great thread. So if going the wire route, is it best to use the USB microscope?
Sent from my SM-G991W using Tapatalk
-
28-02-2023 #9
This is a great tool. There are some things I’d like to add to it, so I started writing my own version of it in python.
Written in python, uses imageio and the ffmpeg backend to capture the camera (opencv is slow and clunky). Multi threaded, I’ve got the camera part of the tool running in its own thread. Some things
I ran into some problems with the java tool as the measurement was off from the real world. I measured a glass slide with a dial indicator and compared that to the calculated scalar value i used for a physical pixel size it was off. The difference I think is due to the java tool reading the webcam sensor at 640x480 but the webcam I’m using has an FHD sized sensor 1920x1080. When it reads at a lower resolution it’s reading a center crop of the sensor so you’d need to account for the reduction of size of cropping the sensor vs using the full sensor.
Working on the sampling part of the GUI now. I think I’ll keep the functionality mostly the same as the java tool but add some extra things like filtering out a percentage of edge cases when it’s multisampling.
Thinking it's probably a good idea to setup PyInstaller so I can build the python app into an exe file. That way people can just download and run without needing to know anything about python.
The python code can be found here:
https://github.com/bhowiebkr/laser-level-webcam
Here's a video of how the tool functions in early development.
-
07-03-2023 #10
Great to see you playing around with this method. I ended up using the wire version with a microscope to straighten the master rail, i.e. 1D. The original version you are copying works fine but unless you have access to a precision scanning laser it can't be used for 2D leveling (bringing two rails into plane), the optics in a normal line leveling laser are insufficient as the line is not straight enough.
Also we would need a different type of sensor to pick up a scanning laser.
What are you planning to use it for?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
WANTED: K40 laser
By dfox1787 in forum Items WantedReplies: 0Last Post: 23-10-2018, 08:34 PM -
Newbie - Help With Laser Cutting Speed And Power - 60W Laser
By nickpscott in forum Laser Machines & BuildingReplies: 2Last Post: 11-11-2015, 10:07 PM -
FOR SALE: K40 laser not working (laser fires)
By calida in forum Items For SaleReplies: 0Last Post: 31-03-2015, 08:45 PM -
WANTED: GCc Laser Pro or Epilog Laser Cutter Machine
By Brownhills school in forum Items WantedReplies: 1Last Post: 10-05-2012, 04:30 PM -
help with cnc laser
By swinds in forum Laser Machines & BuildingReplies: 11Last Post: 09-01-2012, 10:15 PM
Bookmarks