Tuesday, March 26, 2024

 

Approximate approximations

Following input from the OpenFlexure folk (hi Richard!) I found their code uses approximations, which line up with my IK model ... except where I forgot to rotate an axis properly. Yah. My 2-point 3D rotation maths is busted for unclear reasons, but once that's fixed we should have much more reliable positioning.

Also the OpenFlexure team might be lending some part-time support, which will be most welcome.


Monday, March 25, 2024

 

Stage kinematics from the source

 Dr Bowman of the OpenFlexure project was kind enough to share some simplified kinematics to me, which sound a lot easier than the approximations I was about to start on: https://openflexure.discourse.group/t/delta-stage-geometry/628, and a couple of his research team sound keen to get involved. Easter is going to get in the way I'm sure, but this should help with progress.


Sunday, March 24, 2024

 

IK Model Flaws

The IK model I made doesn't hold true on the mm scale. No idea why. Could be a flaw in the model, could be I've missed a mechanical aspect of the design. It might be the extension beam. So I'm going to pull that off and do some basic testing of the bare platform. If necessary I'll set up a calibration grid and fudge the control values to make it work. I'm about to get insanely busy with family stuff though, so blog postings may slow down. If anyone wants to work on the project though, I'll make time to set 'em up.


Friday, March 22, 2024

 

Contacts unreliable but X and Z moving in sync

My idea of using electrical probing to find a conductive surface doesn't work. The probe bends visibly before my conductivity meter beeps. But using the small USB microscope to observe contact worked OK. Any electrical experts out there feel free to suggest solutions that don't involve wetting the contacts with mercury or gold-plating everything.

So I have distance indicators on the big microscope stage. I used that to measure how far the probe moved on the Z axis when the control panel moved the mechanism by a theoretical 2mm. It moved 1.39mm +/- 0.01mm. Then I did the same with the X axis, which tries out all the trigonometry code. It moved 1.4mm +/- 0.05mm. Amazingly, actual movement coincides on both axes! If I set the GRBL steps/mm scaling right, we should be nearly there.

One problem clear in the microscope is that the probe wobbles in the XY plane when moved in the Z plane by +/- 0.05mm approx. I don't know if this is inherent to the delta stage design, or if I've stuffed something up. It might be due to the huge offset probe arm. We shall see.


Thursday, March 21, 2024

 

Remembering the Maths lessons from 40 years ago...

I've reached the point where the classic delta approximation isn't good enough for calibrating, so I had to make my own mathematical model. ChatGPT was of limited use, so I had to do it the old-fashioned way. Took a while (3 pages of gibberish scrawl) but I got there. I think. Long time ago, inverse kinematics not my speciality...

Next step after verifying a few test cases is to integrate that with the Control Panel and see if I can get to predictability rather than just repeatability and small increments.

I've put a wire on the needle probe so I can hook it up, and I'll put a piece of copper-clad PCB on the microscope stage. This should let me figure out when I get the driver calibrated enough to run along a reasonably flat surface. That was done by poking a bit of 28ga nichrome ("vape wire") inside the needle and wiring it to the croc clip that attaches the probe to the beam.

If all that works, we can try drawing things properly and I'll gitlab the Control Panel for general amusement. If it doesn't work, well, the Control Panel now has a big, red "STOP" button on it that resets the serial port and kills the GRBL driver!


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:





Monday, March 11, 2024

 

Forgot to mention the attaching the OpenFlexure Delta stage gears to a NEMA17 round shaft. Basically I warmed up the stepper shaft with a mini blowtorch and pushed the gears on. I try-fitted the motor to the Delta Stage Adaptor, added a drop of ordinary superglue, and pushed the gear into the right position. It drags the glue into the join and holds well enough for now. Probably should render something with proper inset nuts and retaining screws.


Speaking of dodgy fixings, the Delta Stage is currently on a thick piece of MDF with the microscope to isolate it from the bench bending when I lean on it (yes, that causes micron-sized movement). The microscope has a decent base, but the Delta Stage feet are slick PLA so after knocking the first one onto the floor I put some double-sided sticky tape under them. Very Heath Robinson/Rube Goldberg, but seems to work quite well.


 

Well there's a surprise. The μRepRap just got a mention on Hackaday https://hackaday.com/2024/03/10/%ce%bcreprap-taking-reprap-down-to-micrometer-level-manufacturing/ - if you're not familiar with it, it's an awesome site for hackers and makers so do visit. If you're from there and visiting here, please join in the fun.

The house is without reliable power at the moment though, and the place is pulled apart for rewiring putting the brakes on dev work. 9kW of solar panels going in, so not complaining.

Still having problems getting Marlin to drive the Delta configuration at all. Might revert back to driving XYZ and get on with stiffening up the probe's arm. For initial testing I'll just be using a hypodermic point until I have a reliable Delta driver that won't try to drive one of my sub-micron probe tips through the glass slide!


Sunday, March 10, 2024

 

 A word or three on microscopes: You need one to work on the micron scale obviously, but which one? Well, you don't want a one-piece USB microscope. These frankly lie about magnification. A factor of "300x" compares the view of the object unaided to the view through the eyepiece. Problem: USB microscopes have no eyepiece. So the magnification they quote is totally dependent on the size of your screen, and how much you zoom the app. There is a limit, of course, on the number of pixels in the microscope camera.

What you want to know is how many microns there are to a pixel on your screen. Manufacturers are reluctant to give that information. So try to get one that gives an image of a calibration slide or other known object. Knowing the resolution (typically it's a 5MP camera with about 2500 pixels across) you can calculate how many pixels go across a millimetre. To do micron scale work, you need 1,000 pixels per millimetre. This is not often found on one-piece USB microscopes.

This doesn't mean they are useless - a wider field of view is useful, they are easily positioned, and development work at 10 microns is a good starting point. However, for the fine stuff you'll probably need a "real" microscope. These can be fitted with a USB camera, but use the magnification optics of the actual microscope. I use one that has a real magnification of 500x and that lets me view microns.

Note that you will get a far better view looking through the eyepiece than you will using a USB camera on the microscope. Your retina has a much higher resolution than affordable image sensors.


Friday, March 08, 2024

 

Annoying start to μRepRap - I swept the thing off the bench and smashed it. Had to print a new Delta Stage. So I took the opportunity to reinforce the motor attachment points on the stage so that they can better hold the weight of a NEMA17 stepper motor.

Original Delta Stage here https://build.openflexure.org/openflexure-delta-stage/v1.2.2/, my hack to it to fit NEMA17 motors here https://www.printables.com/model/797699-openflexure-delta-microscope-mods-to-fit-nema17-st

I am experiencing difficulties getting Marlin to drive the delta stage. Any help appreciated.

On the side, I'm also assembling a new Prusa Mk4 printer which I can dedicate to this work.


Thursday, March 07, 2024

 

 Hello RepRappers!

It's been a while. However, there is a new RepRap project: https://reprap.org/wiki/RepRapMicron

The aim is to produce a RepRap capable of manufacturing things with an accuracy of better than one micron (1/1000th of a millimetre). This will use existing RepRap components, 3D printed components, and things that the average person can get hold of and afford.

Can we do it? One way to find out...


Vik :v)


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

Subscribe to
Posts [Atom]