Tuesday, March 19, 2024

 

Roughly confirming the 3 micron accuracy

So, at 30,500 steps per mm in the GRBL driver I'm getting repeatable movement in 50 micron steps from the control panel. Given I'm 1/256th stepping the motors and I reckon they're only really good for 1/4 stepping, that roughly works out at 3-4 micron accuracy. This coincides with the original estimate of 3 micron precision from the first stepper motor tests under manual control.

If I try to move faster than that things slip, which is probably me overdoing the GRBL acceleration and/or max travel speed, so I'll tweak those down a bit and move on to the better microscope. Once that's set up we'll try scraping some squares out on a smear of Sharpie marker on the slide and see how square-ish things are. Probably going to need a bit of improvement to the control panel motion settings too.


Monday, March 18, 2024

 

Unwanted adventures in inverse kinematics

Given up on Marlin. I've installed straight GRBL on the RAMPS assembly and have written an amateur inverse kinematics routine in python to drive GRBL X, Y & Z as the delta towers C, B, A (which seems to be engineering convention, C being on the X axis). Once I get a bit of help, it's probably best to peel the control functions out of OpenFlexure, but their codebase is somewhat impenetrable. Suggestions welcome.

# Function to Calculate Tower Joint Positions:
# - calculate_tower_joint_positions calculates the positions of the tower joints based on the given TCP location.
# - It utilizes inverse kinematics to determine the heights of the tower joints above the XY plane.
# - The function takes a TCP location tuple (x, y, z) as input and returns a list of tower joint heights.
def calculate_tower_joint_positions(tcp_location):
    link_length = 75  # units
    radius = 35  # units
    
    # Calculate the distance from the TCP to each tower base
    tower_distances = [math.sqrt((tcp_location[0] - radius * math.cos(theta))**2 + (tcp_location[1] - radius * math.sin(theta))**2) for theta in [0, 2*math.pi/3, -2*math.pi/3]]
    
    # Calculate tower joint heights above the XY plane
    tower_joint_heights = [tcp_location[2] + math.sqrt(link_length**2 - dist**2) for dist in tower_distances]
    
    return tower_joint_heights

# Test cases
test_locations = [(0, 0, 0), (-1, 1, 0), (0, 0, 10), (0, 20, 0), (5, 0, 0), (15, 0, 10)]

for location in test_locations:
    tower_joint_heights = calculate_tower_joint_positions(location)
    print("TCP Location:", location)
    print("Tower Joint Heights:", tower_joint_heights)
    print()



Sunday, March 17, 2024

 

The dodgy Marlin Delta configuration took off on one tower, drove it through the bottom of the stage, and snapped the anti-backlash 'O'-ring. That's going to be a beggar to replace. I thought I'd reset the axes position to current location with an G92 command, but it looks like the delta firmware may be ignoring that. More experimentation needed with the delta towers disconnected...


Saturday, March 16, 2024

 

I'm starting to get some form of workbench set up here. Wide angle view of the slide, narrow angle view down the microscope (3μm/pixel), and a control panel for the Delta Stage. Still fighting the delta software and for reasons unknown the wide angle mounts the wrong way up. Will have to print a new stand for it.

Maybe I should get two and rig them to a VR headset?





 

And just when I had enough to do, it turns out that running 2 USB video cameras (microscopes) at the same time is ... a challenge.

[update] ENOBACON suggested using vlc, and that runs multiple copies and cameras, yay!


Friday, March 15, 2024

 


 The probe arm now has 3 supports for proper rigidity. I've turned the acceleration of the motors down a bit and we'll see how much less wobble there is during movement.

You can see my crude attachment system for the hypodermic needle that allows me to change angles and swap tips. I will be mounting the micron tips inside hypodermic needles for support, and to allow me to bend them at angles.

Once I've got the delta software sufficiently smoothed I might try putting Sharpie on a slide and tracing a few tracks in it to see what we get. That might help with calibration later too.

Yes, all this stuff is not good for accuracy. I know. However it is damned convenient for development. A "proper" prototype won't have all the bendy wirey bits.



 

One of the press-fit small gears on the NEMA17 motors broke loose, so I've remodelled the gear to take an M3 nut and set screw. The STL is here: https://www.printables.com/model/797699

There is no convenient program I've found that just allows one to noodle around directing the axis movement for a gcode device on a serial port without having to download umpteen packages. So I've written one in python that should be portable. Ugly as sin at the moment and I'll share it when it looks passable.

Next up is adding a third brace to the probe arm made from 12ga wire. This should dampen vibration in all axes. Delta firmware tweaks continue, trying to get sufficient accuracy with enough range on the Delta Stage.

One annoying problem is that my USB serial connection to the RAMPS board keeps dropping out. I suspect this is due to a noisy 12V power supply, so I'll swap that out.

The shadow of the probe on the slide is proving to be so useful in guidance that I'm thinking of adding an LED on the probe arm just to cast a coloured shadow.

That'll keep me busy for a while.


Thursday, March 14, 2024

 

I've got the Delta Stage moving vaguely coherently by swiping a lot of Marlin Configuration from the Kossel printer configuration. Quite a bit of tweaking to do, but it moves in different directions.

The main problem is visibility. The depth of focus is poor, and the ink is not sufficiently opaque. I'll work on all that. Also I'm going to need a proper microscope calibration slide.


Tuesday, March 12, 2024

 


While I'm waiting for help on the Marlin Delta driver, I've soldered a 12ga wire brace to the probe arm and shortened it to 85mm. This reduces twang a *lot*. I've mounted a 22ga hypodermic on a croc clip, which clips to the probe arm so I can swap tips. The current tip is bent at 60 degrees so I can sneak it all through the lens turret on the microscope and get closer to vertical contact with the slide.

I've mixed up some machine oil with soot, which approximates the consistency of photosensitive resin. I keep it in a little dish made by wrapping an M8 nut in foil and dishing one side.

A small drop on the microscope slide serves as a reservoir, and contact with the drop gives me good feedback on the probe position (may be useful later, as is seeing the probe shadow). I'm manually tracking the probe until the driver software is sorted. Anyway, this lets me dip the 40μm probe tip then move it elsewhere and touch the slide. Bear in mind the tip is elongated on a hypodermic. This dipped tip gets me several consistent dots, about 30μm in size. Here's one viewed through the microscope:





This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]