Difference between revisions of "OpenFlexure"

From Microwiki
Jump to: navigation, search
 
(11 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
*McMaster: printing in PLA since its what I have
 
*McMaster: printing in PLA since its what I have
  
 +
 +
Travel range
 +
 +
*Block stage: 2x2x2mm
 +
*Delta stage: 12x12x4mm
 +
 +
<br />
 
==Reception==
 
==Reception==
 
BreakingTaps
 
BreakingTaps
Line 10: Line 17:
 
*discord: "main issue I had was speed, it's just very slow if you are scanning the entire volume"
 
*discord: "main issue I had was speed, it's just very slow if you are scanning the entire volume"
  
βˆ’
G
 
  
 +
gekkio
 +
 +
*I don't mind being named, but my comments should have a disclaimer that my setup is pretty poor and some problems might be self-caused instead of being OpenFlexure's fault πŸ˜…
 
*my main goal is to get it working well with a 40x objective, but it has proven to be quite challenging:
 
*my main goal is to get it working well with a 40x objective, but it has proven to be quite challenging:
 
*- my setup is pretty poor and cheap, and the stage and the sample are always tilted slightly. Calibration can alleviate this problem, but it's annoying how much this affects focus when using that 40x objective
 
*- my setup is pretty poor and cheap, and the stage and the sample are always tilted slightly. Calibration can alleviate this problem, but it's annoying how much this affects focus when using that 40x objective
Line 38: Line 47:
 
*Gently pop off blue cover
 
*Gently pop off blue cover
 
*Cut middle PCB trace
 
*Cut middle PCB trace
 +
**<nowiki>https://twitter.com/johndmcmaster/status/1562535251968045057?s=20&t=PJqUpSjrx6IMwXh-XUHDFw</nowiki>
 
*Unsolder all 5 leads and remove the connector
 
*Unsolder all 5 leads and remove the connector
 
*Solder GRBL controller compatible wires onto the 4 outer termianls
 
*Solder GRBL controller compatible wires onto the 4 outer termianls
Line 52: Line 62:
 
==Block Stage==
 
==Block Stage==
 
https://openflexure.gitlab.io/openflexure-block-stage/
 
https://openflexure.gitlab.io/openflexure-block-stage/
 +
 +
McMaster BOM
 +
 +
*Mechanical purchase
 +
**3 Viton O-ring 30 mm ID x 2 mm width (34 mm OD)
 +
***Viton (official):: https://www.mcmaster.com/9263K119/
 +
***Nitrile: https://www.mcmaster.com/9262K196/
 +
****Some people better luck with this
 +
**7 M3x6mm screw
 +
***<nowiki>https://www.mcmaster.com/91292A111/</nowiki>
 +
**3 brass M3 nut
 +
***<nowiki>https://www.mcmaster.com/90690A037/</nowiki>
 +
**3 M3x25mm hex head screw
 +
***https://www.mcmaster.com/91287A022/
 +
**6 M3 washers
 +
***<nowiki>https://www.mcmaster.com/93475A210/</nowiki>
 +
**6 M4x6mm button head screws
 +
***<nowiki>https://www.mcmaster.com/92095A188/</nowiki>
 +
*Mechanical STL
 +
**You need three of each gear. Either print one of the 3x models or three of the 1x models
 +
*Eectrical
 +
**Arduino Nano compatible board
 +
***https://www.amazon.com/gp/product/B07VX7MX27
 +
***Every board is compatible enough
 +
**Electreim 28BYJ-48 5V ULN2003A JST Stepper Motor Driver Shield for Arduino Nano
 +
***https://www.ebay.com/itm/174691515202
 +
**3 28BYJ-48 micro geared stepper motors
 +
***https://www.amazon.com/gp/product/B01CP18J4A/
 +
*Software
 +
**Leave the original bootloader intact
 +
**git clone https://gitlab.com/bath_open_instrumentation_group/sangaboard.git
 +
***I'm using f6f854e
  
  
Line 59: Line 101:
 
**Preferred material: TBD (PLA or PETG)
 
**Preferred material: TBD (PLA or PETG)
 
**Supports: no
 
**Supports: no
 +
***If you can't be an example be a warning: https://twitter.com/johndmcmaster/status/1562517053755379714
 
**Had to generate small gear myself from git + OpenSCAD
 
**Had to generate small gear myself from git + OpenSCAD
 
**TODO: post .stl collection
 
**TODO: post .stl collection
Line 88: Line 131:
 
Sample output:
 
Sample output:
  
βˆ’
  Sangaboard Firmware v0.5.1
+
<pre>
βˆ’
  Type 'help' for a list of commands.
+
Sangaboard Firmware v0.5.1
βˆ’
  Type 'help' for a list of commands.
+
Type 'help' for a list of commands.
βˆ’
 
+
Type 'help' for a list of commands.
βˆ’
  Board: Sangaboard v0.2
+
 
βˆ’
 
+
Board: Sangaboard v0.2
βˆ’
  Sangaboard Firmware v0.5.1
+
 
βˆ’
 
+
Sangaboard Firmware v0.5.1
βˆ’
  Commands (terminated by a newline character):
+
 
βˆ’
  mrx <d>                        - relative move in x
+
Commands (terminated by a newline character):
βˆ’
  mry <d>                        - relative move in y
+
mrx <d>                        - relative move in x
βˆ’
  mrz <d>                        - relative move in z
+
mry <d>                        - relative move in y
βˆ’
  mr <d> <d> <d>                - relative move in all 3 axes
+
mrz <d>                        - relative move in z
βˆ’
  release                        - de-energise all motors
+
mr <d> <d> <d>                - relative move in all 3 axes
βˆ’
  p?                            - print position (3 space-separated integers
+
release                        - de-energise all motors
βˆ’
  ramp_time <d>                  - set the time taken to accelerate/decelerate in us
+
p?                            - print position (3 space-separated integers
βˆ’
  min_step_delay <d>            - set the minimum time between steps in us.
+
ramp_time <d>                  - set the time taken to accelerate/decelerate in us
βˆ’
  dt <d>                        - set the minimum time between steps in us.
+
min_step_delay <d>            - set the minimum time between steps in us.
βˆ’
  ramp_time?                    - get the time taken to accelerate/decelerate in us
+
dt <d>                        - set the minimum time between steps in us.
βˆ’
  min_step_delay?                - get the minimum time between steps in us.
+
ramp_time?                    - get the time taken to accelerate/decelerate in us
βˆ’
  zero                          - set the current position to zero.
+
min_step_delay?                - get the minimum time between steps in us.
βˆ’
  test_mode <s>                  - set test_mode <on> <off>
+
zero                          - set the current position to zero.
βˆ’
  version                        - get firmware version string
+
test_mode <s>                  - set test_mode <on> <off>
βˆ’
 
+
version                        - get firmware version string
βˆ’
  Input Key:
+
 
βˆ’
  <d>                            - a decimal integer.
+
Input Key:
βˆ’
 
+
<d>                            - a decimal integer.
βˆ’
  --END--
+
 
 +
--END--
 +
</pre>Ran command "mrx 10" to start testing movement
 +
 
 +
Motor test: https://www.youtube.com/watch?v=kvwJRnc8nQo

Latest revision as of 21:29, 26 August 2022

Material?

  • PLA is more standard, PETG is more flexible
  • McMaster: printing in PLA since its what I have


Travel range

  • Block stage: 2x2x2mm
  • Delta stage: 12x12x4mm


Reception

BreakingTaps


gekkio

  • I don't mind being named, but my comments should have a disclaimer that my setup is pretty poor and some problems might be self-caused instead of being OpenFlexure's fault πŸ˜…
  • my main goal is to get it working well with a 40x objective, but it has proven to be quite challenging:
  • - my setup is pretty poor and cheap, and the stage and the sample are always tilted slightly. Calibration can alleviate this problem, but it's annoying how much this affects focus when using that 40x objective
  • - the stage O-rings break quite often...there was a thread on the OF forums about O-ring sizing and material choices, and I bought some alternatives that I just haven't yet had time to test
  • - repeatability seems poor and drift seem quite high, at least with that 40x objective. I was hoping that going bipolar and using a better driver board would fix this, but I'm still not seeing great results. Maybe the stage itself is the limiting factor now. Or maybe I've just been unlucky with O-rings and have always had at least one broken πŸ˜… it's not immediately obvious when an O-ring is breaks, so this is actually a plausible explanation
  • - temperature seems to affect things too. When the motors heat up, it seems like the plastic is affected, which is probably the cause for some of the problems
  • oh yeah, and one thing about repeatability: it depends on the move directions. If I move back and forth using just one motor as a test, I get better repeatability than if I choose every time a random direction and move back and forth to/from it. In practice this means every move will slightly affect the next one...I'm not sure if this is just about backlash, or if the stage itself has something to do with it


F

  • it was a size problem. The whole thing would fit on my first Amscope if I removed the bottom illumination lens, but then I never found a proper way to hold it in place at the right height. I'm limited to 3D printing (no tools to make aluminum parts), so I just gave up and went for the ready-made aliexpress stages.


onilink_

  • Yeah I got some bad returns too about openflexure (vibration, slow, not precise enough). I had bought all the parts and was planning to build one but I stopped.

Motor control

GRBL

Can convert the motors from unipolar to bipolar to be compatible with more standard motor controllers

Procedure

  • Gently pop off blue cover
  • Cut middle PCB trace
    • https://twitter.com/johndmcmaster/status/1562535251968045057?s=20&t=PJqUpSjrx6IMwXh-XUHDFw
  • Unsolder all 5 leads and remove the connector
  • Solder GRBL controller compatible wires onto the 4 outer termianls
    • Keep the cable order


Testing via pyuscope

  • ./test/grbl/g1.py 'G91 Z5.0 F100'
    • ok
  • ./test/grbl/g1.py 'G91 Z5.0 F200'
    • missing steps

Block Stage

https://openflexure.gitlab.io/openflexure-block-stage/

McMaster BOM


General notes

  • Printing
  • Using Arduino shield: Electreim 28BYJ-48 5V ULN2003A JST Stepper Motor Driver Shield for Arduino Nano
    • Basically compatible with Sangaboard. Motor direction might be reversed
    • More info here: https://openflexure.discourse.group/t/is-this-like-the-sangaboard/776/12


Compiling / flashing software

  • https://kitspace.org/boards/gitlab.com/bath_open_instrumentation_group/sangaboard/sangaboard_v0.4/
  • Open Arduino sketch
    • .ino file
  • Select Arduino Nano Every board (under second board menu)
  • Build
    • You'll get warnings about emulated instruction set, ignore
  • Flashing using Arduino ISP
    • "avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description" essentially means success


Test software

  • Open serial port
    • ex: screen /dev/ttyACM0 115200
  • type "help" and press enter


Sample output:

Sangaboard Firmware v0.5.1
Type 'help' for a list of commands.
Type 'help' for a list of commands.

Board: Sangaboard v0.2

Sangaboard Firmware v0.5.1

Commands (terminated by a newline character):
mrx <d>                        - relative move in x
mry <d>                        - relative move in y
mrz <d>                        - relative move in z
mr <d> <d> <d>                 - relative move in all 3 axes
release                        - de-energise all motors
p?                             - print position (3 space-separated integers
ramp_time <d>                  - set the time taken to accelerate/decelerate in us
min_step_delay <d>             - set the minimum time between steps in us.
dt <d>                         - set the minimum time between steps in us.
ramp_time?                     - get the time taken to accelerate/decelerate in us
min_step_delay?                - get the minimum time between steps in us.
zero                           - set the current position to zero.
test_mode <s>                  - set test_mode <on> <off>
version                        - get firmware version string

Input Key:
<d>                            - a decimal integer.

--END--

Ran command "mrx 10" to start testing movement

Motor test: https://www.youtube.com/watch?v=kvwJRnc8nQo