Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jakeread/displacementexercise
  • rcastro/ussm
  • palomagr/displacementexercise
3 results
Show changes
Commits on Source (62)
Showing
with 177411 additions and 42 deletions
**.3dmbak
**.rhl
archive/
**cam/
**node_modules/
\ No newline at end of file
## DEX LOG
## 2019 11
https://github.com/ChrisEberl/Python_DIC
### Vision Controller Hello-World
We're currently working to build a computer vision based displacement sensing method for the DEX. Since our machine (or, many machines manufactured by novices / in the public domain) are liable to flex (indeed, nothing is infinitely stiff!), the thought is to measure local displacements of the sample, at the sample, rather than measuring open-loop through the machine's structure.
To spin this up, I've written a small / barebones subpixel template tracker in the browser, in cuttlefish. This is conveniently lightweight - the whole cycle (image collection -> analysis) can happen at ~ 10Hz, which is not splendid, but not diabolical either.
![vd](video/2019-11-17_micrometers-cv.mp4)
Here we can see a desktop test - I am reading the X- position from my tracking system on to a chart, and moving the tracker on a linear stage. This system resolves ~ 15um, which is not bad for a proof of concept.
## 2019 10
Re-did the machine last week, now much simpler:
![dex](images/2019-09-27_DEX-CAD.png)
## Comparison to Instron 4411 (2019 10)
To see how we do against a real instron, I tested identical samples on the DEX as well as on an Instron '4411' with a 5kN load cell. In the plot below (I'm using cuttlefish to plot the .csv that I saved from Bluehill, the Instron software), the leftmost plot is taken on the 4411, and the lazier slope belongs to the DEX.
While the samples fail around the same load, the difference in elongation is ~ 1.5mm wide: this is almost surely the machine's own deflection, stretch in the belts, etc.
![dex-compare](images/2019-10-17_data-compare.png)
This obviously warrants correction. One way to do this is to build a stiffer machine, however, we will be chasing up the cost and complexity if we do this. Rather, we should throw some more control at it. To start, we can circle back to our attempts at [subpixel tracking](https://gitlab.cba.mit.edu/calischs/subpixel_tracking), or attach a small linear stage directly to our fixturing elements. For this, I am imagining something like the [AMS5311](https://ams.com/as5311), which should do some 12 bits inside of a 2mm throw (for 0.4um resolution). Either can be added to existing systems, given network controllers / modular browser code. Since I want to integrate it elsewhere, it's likely that the camera option comes first.
**update** the new machine uses a ballscrew transmission, not a belt (as used here) which should elminate most of the creep tested here against the 4411. forward progress has been made with a vision based controller, to improve further, but has not been characterized yet.
#### Some Force Maths (and a .xlsx file)
- want (?) from ex. nylon dogbone
- for this, w/ motor doing 1.5NM, how much reduction ?
Have this spreadsheet already, that's great. The D683 dogbone is ~ 8mm wide, and it would be great to test parts at 4 layers of 0.2mm - 0.8mm thick. That's skinny, but here we are: these are all under ~ 500N. OK.
For that oomph, with a 22T drive pinion, I'll want a 6:1 reduction and a NEMA23 motor (just a short stack) pushing 1.26NM through to a max. 660N linear force. OK, glad to have checked, nice to know about the N23 - I had been thinking of N17s - and will have to watch about getting that 6:1.
## uSSM #3
![img](images/ussm3_chassis.jpg)
Theres a few new criteria that ussm-3 aims to achieve:
- Manufactured only using simple shop tools, PLA 3d printers, and a standard bed size (24'x 24') laser cutter.
- Pulling force of around 600N
In order to be laser cuttable, acryllic and delrin were the main two materials considered. Delrin was the go to option to avoid shattering.
This design uses mainly the following adapted gantry system: [gantry](https://gitlab.cba.mit.edu/jakeread/rctgantries) along with this beam design: [beam](https://gitlab.cba.mit.edu/jakeread/rctgantries/tree/master/beams) for rigidity.
The main idea is to attach a beam to the linear axis and use it as a carriage to hold fixturing for tensile testing on the top half and compression testing in the bottom half. The gantry system shown above does not supply enough torque, so an adapted version was made shown below.
![u3_carriage](images/motorcarriage_vertical.jpg)
The uSSM #3 design takes advantage of the beam design by attaching 4 different beams to a larger "O-face", with webs in the corners to prevent torsion. The larger face itself is split into a bottom and top in order to make assembly easier, make each piece smaller to fit into laser cutter bed, and to have the possibility of changing top for larger specimens. The beam design also utilizes custom joinery talked about in the [beam](https://gitlab.cba.mit.edu/jakeread/rctgantries/tree/master/beams) repository. This makes the machine take some time to build, but it allows delrin sheets to be used, allowing many fabs with laser cutters to be able to make this machine.
![u3_corner](images/uSSM3_corner.jpg)
### fixturing
Fixturing is being designed to use mainly 3D printed parts. First up, PLA is being in the jaws to see if it can withstand the 600N load alongside a few other McMaster parts and this [load cell](https://www.amazon.com/Pressure-Force-S-type-Sensor-Cable/dp/B01F6IOWDG/)
![u3_fixturing]( images/USSM3_fixturing.jpg)
## Drawingboard Return
With \#2 feeling somewhat unloved ('both overdesigned and underdesigned'), I'm back at the basics for \#3. There's a few major selections, and decisions to make:
### Material Selection
-> ALU, FR4(G10), Acrylic?
While aluminum is my go-to for machine design, and is ostensibly possible to mill on a shopbot by a motivated user (see [jens](https://github.com/fellesverkstedet/fabricatable-machines/wiki/Fabricatable-axis)), there is some hesitation to use it.
| Material | Young's Modulus (GPA) | Specific Young's | Cost for 6mm x 24x24" | Machinability |
| --- | ---: | ---: | --- | --- |
| ABS | 2 | ? | 52 | Not Dimensionally Stable, but OK to Machine |
| Nylon 6 | 3 | 2.5 | 130 | Painful |
| HDPE | 1 | ? | 23 | Easy |
| Acetal (Delrin) | 2.8 | ? | 89 | Breezy, also lasers, and non-cracking |
| Cast Acrylic | 3.3 | 2.8 | 46 | Breezy, esp. w/ Lasers |
| 6061 ALU | 69 | 22 | 87 | Breezy with WJ, Painful on Shopbot |
| FR1/CE (Canvas / Phenolic) | 6 | ? | 81 | TBD, probably WJ Pain and Ease on SB |
| FR4/G10 (Fiberglass) | 22 | ? | 98 | Painful on a WJ, Slightly Easier on a Shopbot |
[data](http://www.acculam.com/data-chart.html)
That said, ALU lands pretty well 1 order of magnitude above Canvas Phenolic ('FR1' or 'CE') for strength, while costing a similar amount of dollars. Fiberglass is a nice candidate, so machining G10 is likely a worthwhile experiment. However, both composites have anisotropic-ness and are sensitive to the size of local features (and to localized loads), making them less favourable.
!TODO: beam equations for the above, to size req' depth
!TODO: shear forces for the same,
!TODO: cost not-mcmaster, and acrylic, some composite like hydrostone w/ fiber
- ... composite vendors at fabclass website
### Transmission Design
#### How Many kNs ?
We want lots of force, with very fine control of position. This means a nice linear transmission. To estimate the forces we might want to see, I wrote a quick table of forces required to rip apart ~ 3mm square (0.001mm^2) samples of a few materials.
| Material | Yield (MPA) | F at Break (N) |
| --- | ---: | ---: |
| ABS | 40 | 360 |
| Nylon 6 | 70 | 630 |
| HDPE | 15 | 135 |
| 6061 ALU | 310 | 2790 |
| 4140 Stainless | 655 | 5895 |
| 6AL-4V Ti | 950 | 8550 |
Brinell hardness tests range from 10N through to 30kN (for steel and cast iron) but non-ferrous materials normally see 5kN only.
So, a ballpark of ~ 10kN would be ideal - this is a big number - off the bat I'm going to estimate that 5kN will be a more reasonable target. 1kN is enough for a complete set of plastics, but that's only allowing for a realtively small sample.
-> Ballscrews, Belt Rack and Pinion, Rack and Pinion
Generating kNs of force is no easy feat, especially when we want to do it *very smoothly* while displacing very small amounts.
I will start by mentioning that this is dead easy with ballscrews. With a 1605 ballscrew, (16mm diameter, 5mm per turn) and a NEMA23 with 3Nm of torque, we can generate about 3kN of linear force (per motor) - to land at 5kN total no problem.
However, these are somewhat cumbersome and expensive - and they land in fixed sizes. Towards more parametric machines, we can look at a rack and pinion type axis.
[ballscrew maths](http://www.nookindustries.com/LinearLibraryItem/Ballscrew_Torque_Calculations)
Because tooth geometry very sensitively affects linear-ness of drive, especially where (down below the mm) we will be driving an entire instron test-cycle inside of one tooth-phase, I want to discount a traditional rack and pinion right off.
I am curious about a belt-driven rack, similar to [this design](https://gitlab.cba.mit.edu/jakeread/rctgantries/tree/master/n17_linearPinion).
!TODO: compare by transmission ratios (abstract from motor) and cost of parts.
!TODO: belt spec for hight (huge) load belts: tooth shear, and stiffnesses.
#### Motor Torques
To generate the force required, we're going to need some motor / transmission oomph. Here's a list of typical NEMA size motors, and the torques they can generate. The [atkstepper](https://gitlab.cba.mit.edu/jakeread/atkstepper23) can supply enough current to power any of these.
| Motor | kg | Nm |
| --- | ---: | ---:|
| N23 56mm | 1.2 | 1.3 |
| N23 100mm | 1.8 | 3.0 |
| N34 68mm | 1.8 | 3.4 |
| N34 156mm | 5.4 | 13.0 |
| N42 150mm | 10.9 | 22.0 |
### Racks and Pinions
We'll be using two linear stages (one on either side of the platform), so, from our N34 156mm motor with 13Nm of torque we'll need 26, 5.2 and 2.6mm lever arms respectively for 1, 5 and 10kN total force.
Considering practical limits on pinion diameter (with a shaft of 14mm, and 19 3mm-pitch teeth, we'll have an 18mm diameter pinion - 9mm lever arm) we will only realistically achieve 1.44kN of linear force per motor with direct-drive rack and pinion on a Nema 34 size motor. This makes a 3kN machine, but to add some safety factor we're at at 2kN goal with this approach.
The next step would be to check against tooth shear stress for 3mm pitch.
From reasonable WEDM (time) and Waterjet (washout) limits, I expect the thickness of any fabricated pinion to have a limit around 12mm. To make this all simple, I'll say 10mm. For the waterjet, this is a bit of a stretch (get it?)...
To guess at resolutions, we'll take our sample above in aluminium having a length of 100mm - with elongation at break being 12%, we're interested in a 12mm 'long' stress / strain curve. For 1000 pts on this curve, we're interested in a step size of 12 microns.
From our 18mm diameter pinion having a circumference of 56mm, this means 4667 counts per revolution. In a 200-step motor, we would need 32 microsteps per revolution - most drivers will go to 256 - but microstepping isn't exactly linear. To do this really well, we will want to finish work on closed loop stepper driving, where we can use a 14-bit encoder to control around ~ 4096 counts reliably.
All in, a direct rack and pinion drive can land us at a 2kN machine with some desired resolution, but we're at or near most of the limits here.
### Belts
![img](images/belts.jpg)
Since I was spinning this up to test on a belt-driven gantry system, I was able to confirm that this is a bad idea. We defeat the elastic stretch of the belt by measuring at the specimen (not through the machine's structural loop) but a meagre GT2 belt profile skips teeth pretty quickly as we approach any tens of kilos of load.
### Ball or Leadscrews
Racks aside, a ballscrew is the obvious way to do this. Ballscrews can be had for less than hundereds of dollars. Besides transmitting motion smoothly, their ratios are favourable. For example, with a 5mm pitch ballscrew having an efficiency of 85%, we can drive 14kN with our 13Nm motor - so 28kN for the machine.
For the same ballscrew, to achieve 12 micron resolution we'll only need 416 steps in each rotation - this is easy to get.
## Design Spec / Notes
The goal here is to design and build a machine, which can be fabricated in $250k size fab labs, that can generate stress-strain curves for a wide set of materials as well as perform hardness testing.
To ballpark, I'd like to see 100mm diameter plates having a total travel from 0mm separation -> 500mm, this leaves enough room for fixturing etc.
Sam's note: the ballscrews should be 'pulling' in all cases. Against their fixed, driven side. This is a good note, thank you sam.
### Phoning Home
Samples are ~ < 1mm thick, and data from Materiom shows loads all falling well under 100N. IMO, the machine should be spec'd somewhere positive of 500N pulling force, so that we can reasonably pull apart big plastic samples. That said, 500N < 5kN.
Down here, once-reduced belt-and-pinion rack drives feel good. Since I'm looking for a medium high-force actuator to solve a 3D Printing-Bed problem elsewhere, I'm going to try to combine work here again, and develop a 3d-printing + laser-cutter friendly high force linear system. Conservative spec will allow me to even do this with N17 motors,
---
## Step Two: Force Measurement
For load measurement, Sam has worked through a great [loadcell](https://gitlab.cba.mit.edu/calischs/loadcell) design.
![cell](images/sam-as5011-loadcell.jpg)
Ok, doing this with a wheatstone-bridge type load cell now.
I believe I want my ADC to have the green line 'on top' and white on the bottom, of a differential channel.
---
## Fixturing
![img](images/jaws.jpg)
! important
---
# uSSM \#2
![img](images/20190429-DSC04334.jpg)
**status** machine is designed, fabricated, waiting for adaption of fixturing from 'the generalist' and for squid works controllers.
## Dedicated uSSM
Here I'm using some
- Ballscrews, SFU2005 C7 700mm Long [ebay, $150](https://www.ebay.com/itm/SFU2005-Rolled-Ballscrew-C7-Anti-Backlash-Ballnut-L300-350-400-450-500-600-1000/202274175696?hash=item2f187afad0:m:m2SEqt9q_ykYYkrO5ZM9deA:rk:1:pf:0)
- Nema 23 Motors w/ .25" Shaft
- GT2 5mm 6.35mm Bore Pulley 12T for 15mm Belt 'A 6A55-012DF1508'
- GT2 5mm 12mm Bore Pulley 48T for 15mm Belt 'A 6A55M048NF1512'
- GT2 5mm 15mm Belt with 55T 'A 6R55M055150'
- http://shop.sdp-si.com/catalog/product/?id=A_6R55M055150 55T 15mm Closed GT2 Belt
- http://shop.sdp-si.com/catalog/product/?id=A_6A55-012DF1508 12T 0.25" bore Pulley 15mm
- http://shop.sdp-si.com/catalog/product/?id=A_6A55M048NF1512 48T 12mm Bore
- http://shop.sdp-si.com/catalog/product/?id=A_6A55M044NF1512 44T
- http://shop.sdp-si.com/catalog/product/?id=A_6A55M050NF1512 50T
## FEA
I ran a quick simulation to see that this flexure was OK. Here it is loaded in the direction it is meant to be stiff in, with 2.5kN applied vertically. There are two of these members being tested so this would be equivalent to 5kN of force, about where I expect this thing to top out. Displacing about 40uM (I'm looking at the face-to-face distance between the loaded zone and the fixed zone, not that rotation that appears from my non-rigorous fea constraints) with 70MPa stress maximum.
![fea](images/uSSM-v15-beamfea-5kn.png)
![fea](images/uSSM-v15-beamfea-5kn-faceon.png)
And out of plane, with 250N applied, about 20uM displacement. So 1/10th the load and 1/2 of the displacement, it's at least 5x stiffer in one DOF than the other. Is that grounds for a decent flexure?
![fea](images/uSSM-v15-beamfea-500n.png)
![fea](images/uSSM-v15-beamfea-500n-faceon.png)
---
# uSSM \#1: Generalist does uSSM
To test requisite parts for a small stress and strain machine, I attached some jaws and a load cell to [this 'generalist' machine](https://gitlab.cba.mit.edu/jakeread/mothermother).
![machine](images/ussm-at-mm.jpg)
I used [automatakit](https://gitlab.cba.mit.edu/jakeread/automatakit) network controllers and [atkapi](https://gitlab.cba.mit.edu/jakeread/atkapi) to program the beginnings of a materials testing system: here I'm just stepping the axis along 25 steps at a time and capturing a photo on each step. No data yet.
![cam](images/ussm-1-camera.jpg)
![bone](images/ussm-2-bone.jpg)
![neck](images/ussm-3-neck.jpg)
![gif](video/first-pull.mp4)
We're going to try to track the endpoints with CV, rather than fancy encoders etc. Sam has done some prior work on this, [here](https://gitlab.cba.mit.edu/calischs/subpixel_tracking).
---
# Microphone Stiffness Testing
[Alysia did this in FabAcademy](http://archive.fabacademy.org/2017/fablabsantiago/students/356/project.html) and it would probably be a fun piece of kit / example for the NIST Project. Looks pretty simple... and compelling.
# micro Stress vs Strain Machine
# The Displacement Exercise (DEX)
## Spec!
The DEX is an open source piece of materials testing equipment. The machine can be manufactured by anyone with access to a laser cutter with at least a 24x12" bed, or a milling machine of similar or larger size, and nearly any FDM 3D Printer. A bill of materials of purchased parts required to complete the machine is below, totaling some ~ $500 USD.
The goal here is to design and build a machine, which can be fabricated in $250k size fab labs, that can generate stress-strain curves for a wide set of materials as well as perform hardness testing.
The machine uses a NEMA 23 stepper motor and a small ball screw to exert force on samples, and any off the shelf load-cell to measure stress. At the lab, we use [squidworks](https://gitlab.cba.mit.edu/squidworks/squidworks) controllers to operate the machine, but a standalone controller written for Arduino and with a JS frontend is [here](controller).
![img](images/sketch.png)
![img](images/detail-ish.png)
![dex](images/2020-02-11_dex-render.png)
To ballpark, I'd like to see 100mm diameter plates having a total travel from 0mm separation -> 500mm, this leaves enough room for fixturing etc.
![dex-alive](images/2020-07-12_dex-on-desk-01.jpg)
## Generating kN
![control](images/2020-07-11_dex-tools.png)
We want lots of force, with very fine control of position. This means a nice linear transmission. To estimate the forces we might want to see, I wrote a quick table of forces required to rip apart ~ 3mm square (0.001mm^2) samples of a few materials.
## Operating Principle
| Material | Yield (MPA) | F at Break (N) |
| --- | ---: | ---: |
| ABS | 40 | 360 |
| Nylon 6 | 70 | 630 |
| HDPE | 15 | 135 |
| 6061 ALU | 310 | 2790 |
| 4140 Stainless | 655 | 5895 |
| 6AL-4V Ti | 950 | 8550 |
A [stress - strain plot](https://en.wikipedia.org/wiki/Stress%E2%80%93strain_curve) is a very useful piece of information when characterizing materials.
Brinell hardness tests range from 10N through to 30kN (for steel and cast iron) but non-ferrous materials normally see 5kN only.
![ss curve](images/stress-strain.jpg)
So, a ballpark of ~ 10kN would be ideal - this is a big number - off the bat I'm going to estimate that 5kN will be a more reasonable target. 1kN is enough for a complete set of plastics, but that's only allowing for a realtively small sample.
To generate these curves, the DEX slowly pulls samples (normally some 'dogbone' shape [below](#testing-notes)) apart, while measuring the amount that it stretches (~ the strain), and the amount of force it exerts as it is stretched (~ the stress). These types of machine are common in industry, often referred to by their leading brand name 'Instron', or as 'Universal Testing Machines' (UTM).
To generate the force required, we're going to need some motor / transmission oomph. Here's a list of typical NEMA size motors, and the torques they can generate. The [atkstepper](https://gitlab.cba.mit.edu/jakeread/atkstepper23) can supply enough current to power any of these.
## Comparison to the Instron 4411
| Motor | kg | Nm |
| --- | ---: | ---:|
| N23 56mm | 1.2 | 1.3 |
| N23 100mm | 1.8 | 3.0 |
| N34 68mm | 1.8 | 3.4 |
| N34 156mm | 5.4 | 13.0 |
| N42 150mm | 10.9 | 22.0 |
I compared results from the most recent DEX build to the Instron 4411 we have in the lab. Some errors still exist: it could be the case that the load cell needs better calibration: my largest calibration weights are near 2kg, but these loads approach 8kgf. I'm not sure how much nonlinearity exists in COTS (and cheap) loadcells like this, but I have *heard* they are *fairly* linear, so certainly we can do better than heresay. There is certainly some flex in the machine itself, but much less than earlier versions. To improve this, the DEX can be fabricated in Phenolic or some other composite, rather than Acrylic as used here. Finally, fixturing could be greatly improved, I believe some creep exists in the jaws as well. I have ordered some parts to test better (off the shelf) steel clamps.
### Racks and Pinions
![dt1](data/2020-07-12_compare-dex-4411/2020-07-12_compare-dex-4411-01.png)
![dt2](data/2020-07-12_compare-dex-4411/2020-07-12_compare-dex-4411-02.png)
We'll be using two linear stages (one on either side of the platform), so, from our N34 156mm motor with 13Nm of torque we'll need 26, 5.2 and 2.6mm lever arms respectively for 1, 5 and 10kN total force.
## Hardware
Considering practical limits on pinion diameter (with a shaft of 14mm, and 19 3mm-pitch teeth, we'll have an 18mm diameter pinion - 9mm lever arm) we will only realistically achieve 1.44kN of linear force per motor with direct-drive rack and pinion on a Nema 34 size motor. This makes a 3kN machine, but to add some safety factor we're at at 2kN goal with this approach.
### CAD
The next step would be to check against tooth shear stress for 3mm pitch.
CAD for the machine is available in this Repo, [under `cad/`](cad/) - the `.f3z` file is a Fusion 360 parametric model of the machine, and the `.3dm` model is a complete Rhino3D Model, with purchase parts included. To source parts, consult the BOM below.
From reasonable WEDM (time) and Waterjet (washout) limits, I expect the thickness of any fabricated pinion to have a limit around 12mm. To make this all simple, I'll say 10mm. For the waterjet, this is a bit of a stretch (get it?)...
![dex](images/2020-02-11_dex-parts.png)
To guess at resolutions, we'll take our sample above in aluminium having a length of 100mm - with elongation at break being 12%, we're interested in a 12mm 'long' stress / strain curve. For 1000 pts on this curve, we're interested in a step size of 12 microns.
### BOM
From our 18mm diameter pinion having a circumference of 56mm, this means 4667 counts per revolution. In a 200-step motor, we would need 32 microsteps per revolution - most drivers will go to 256 - but microstepping isn't exactly linear. To do this really well, we will want to finish work on closed loop stepper driving, where we can use a 14-bit encoder to control around ~ 4096 counts reliably.
Part numbers are from [McMaster Carr](http://mcmaster.com) unless otherwise linked.
All in, a direct rack and pinion drive can land us at a 2kN machine with some desired resolution, but we're at or near most of the limits here.
| Part | Spec | Count | Notes | PN / Link | Cost / Per |
| --- | --- | ---: | --- | ---: | ---: |
| Acrylic Sheet | 24x12", 0.25" Thick | 2 | - | 8505K755 | $19.93 / 1 |
| PLA 'Tough' | | ~ 300g | Many 3DP Mechanical Bits | [Matter Hackers M6E9T65K](https://www.matterhackers.com/store/l/light-blue-pro-series-tough-pla-filament-175mm-1kg/sk/M6E9T65K) | $52.00 / 1kg |
| 625ZZ Bearings | 5x16x5 | 13 | - | [VXB 625ZZ](https://www.vxb.com/20-625ZZ-Shielded-5mm-Bore-Diameter-Miniature-p/625zz20.htm) | $24.95 / 20 |
| Bearing Shims | 5x10x0.5 | 26 | - | 98055A098 | $8.62 / 50 |
| Carriage Shoulders | M4x5x6 | 13 | - | 92981A146 | $2.16 / 1 |
| NEMA 23 Stepper Motor | 56mm Can Length | 1 | Spec Shaft with Pinion | [Stepper Online](https://www.omc-stepperonline.com/nema-23-stepper-motor/nema-23-bipolare-1-8deg-1-26nm-178-4oz-in-2-8a-2-5v-57x57x56mm-4-fili.html) | $14.83 / 1 |
| GT2 Pinion | 20T | 1 | Spec Shaft with NEMA 23 | [Amazon](https://www.amazon.com/Saiper-GT2-Teeth-6-35mm-Synchronous/dp/B07MGMBX3N/) (or) [RobotDigg](https://www.robotdigg.com/product/226/20-Tooth-2GT-Pulley-10pcs-per-lot) | $9.96 / 5 |
| GT2 Closed Loop Belt | 200T (400mm long), 6mm Wide | 1 | - | [Amazon](https://www.amazon.com/400-2GT-6-Timing-Belt-Closed-Loop/dp/B014U7OSVA/) (or) [RobotDigg](https://www.robotdigg.com/product/286) | $15.88 / 10 |
| 1204 x 400mm SFU Ball Screw Kit | | 1 | | [Amazon](https://www.amazon.com/SFU1204-Ballscrew-RM1204-Housing-Machine/dp/B076PCVC8F/)
| M3 Inserts | Tapered, 3.8mm Tall | 200 | - | 94180A331 | $12.92 / 100 |
| M4 Inserts | Tapered, 4.7mm Tall | 16 | - | 94180A351 | $14.96 / 100 |
| SHCS | M3x16 | 100 | Pinning T- to the wall, and pulley endmatter | 91292A115 | $5.87 / 100 |
| M3 Washers | 18-8 Standard Flat | 300 | - | 93475A210 | $1.62 / 100 |
| SHCS | M4x16 | 6 | Mounting Ball Nut | 91292A118 | $8.13 / 100 |
| SHCS | M5x20 | 4 | Motor Mounting | 91292A121 | $9.03 / 100 |
| Locknut | M5 | 4 | Motor Mounting | 93625A200 | $6.46 / 100 |
| SHCS | M8x30 | 2 | Loadcell Fixturing | 91292A149 | $10.13 / 25 |
| Feet | M4 Stud, 15x15mm | 3 | - | 93115K881 | $1.78 / 1 |
| Shaft Collar | 8mm Diameter, Flanged | - | - | 9723T12 | $60.14 |
| Loadcell(s) | 10, 30, or 50kg | 1 | Choose Range for Sensitivity | [Amazon 50kg](https://www.amazon.com/Pressure-Force-S-type-Sensor-Cable/dp/B01F6IOW3G/) [Amazon 30kg](https://www.amazon.com/Pressure-Force-S-type-Sensor-Cable/dp/B01F6IOWDG/) [Amazon 10kg](https://www.amazon.com/Pressure-Force-S-type-Sensor-Cable/dp/B01F6IOW4K/) | $39.00 / 1|
| Loadcell Amplifier | HX711 | 1 | - | [Sparkfun 13879](https://www.sparkfun.com/products/13879) | $9.95 / 1 |
| Power Supply | 350W 24V LRS-350-24 | 1 | - | [Amazon](https://www.amazon.com/MEAN-WELL-LRS-350-24-350-4W-Switchable/dp/B013ETVO12/) | $32.25 / 1 |
### Ball or Leadscrews
### Choice of Sheet Material
Racks aside, a ballscrew is the obvious way to do this. Ballscrews can be had for less than hundereds of dollars. Besides transmitting motion smoothly, their ratios are favourable. For example, with a 5mm pitch ballscrew having an efficiency of 85%, we can drive 14kN with our 13Nm motor - so 28kN for the machine.
Here, I list Acrylic Sheet as the main chassis material. With acrylic, the machine can be manufactured easily on a laser cutter. However, it should also be possible to build the DEX with different sheet material. Lately, I have been using Phenolic as a chassis material: it can be milled on a ShopBot or similar router, and performs much better than Acrylic, with around 11GPA flexural strength (vs. Acrylic's ~ 3GPA). Acrylic is best bonded with Acrylic Cement, a solvent that welds the plastic to itself. Phenolic is best bonded with a two-part epoxy: I use a 20 minute working life epoxy, and nearly any type will do.
For the same ballscrew, to achieve 12 micron resolution we'll only need 416 steps in each rotation - this is easy to get.
## Control and Interface: Standalone
## Step Two: Force Measurement
I recently built a [standalone controller](controller) for this thing, it's written in Arduino and vanilla JS for Node (to serve the app and connect to the machine) and the Browser.
For load measurement, Sam has worked through a great [loadcell](https://gitlab.cba.mit.edu/calischs/loadcell) design.
![dex-alive](images/2020-07-12_dex-on-desk-02.jpg)
![cell](images/sam-as5011-loadcell.jpg)
## Control and Interface: Squidworks
## Fixturing
DEX is designed to run a [squidworks](https://gitlab.cba.mit.edu/squidworks/squidworks) controller. The `dex` branches of [cuttlefish](https://gitlab.cba.mit.edu/squidworks/cuttlefish) and [ponyo](https://gitlab.cba.mit.edu/squidworks/ponyo) contain code that is known to work with the machine. For more info on the controllers, please consult those repositories. In all, controlling the machine can be achieved in any number of ways, on needs only to control one stepper motor and read one load cell.
! important
\ No newline at end of file
![c1](images/2019-10-17_dex-controller.png)
![c2](images/2019-10-17_dex-controller-zoom.png)
#### Vision for Displacement Sensing
We're currently working to build a computer vision based displacement sensing method for the DEX. Since our machine (or, many machines manufactured by novices / in the public domain) are liable to flex (indeed, nothing is infinitely stiff!), the thought is to measure local displacements of the sample, at the sample, rather than measuring open-loop through the machine's structure. I started this with a small sample code, noted in [the log](LOG.md), and have gone through integrating this into the machine's controller.
![dex-vision](images/2019-11_dex-cam.jpg)
The controller involves a calibration stage, where I operate the machine in open-loop, stepping in increments with no load exerted on the machine. I track the marker's displacements, building a map between the known ballscrew displacements and the tracked pixel positions.
![dex-calib](images/2019-11_dex-vision-calibration.png)
Once I have this calibration, I save the function fit, and use it to read positions back while the machine is loaded.
![dex-use](images/2019-11_dex-vision-controller.png)
This nearly works, but needs some improvement. To go about doing this at a higher fidelity, I am working on integrating Python scripts into squidworks controllers, which will let me tie OpenCV codes into dataflow controllers. Another escalation will involve using DIC (digital image correlation) codes to observe the entire structure's deflections during testing, which should render even higher quality testing results.
## Testing Notes
The D683 ASTM Dogbones:
![dogbones](images/astm_d-638_bonesizes.jpg)
File added
File added
File added
This diff is collapsed.
This diff is collapsed.
File added
This diff is collapsed.
File added
# DEX Controller
I've decided to roll a standalone controller for DEX. I've made a little ad-hoc breadboard circuit to connect one stepper driver, one load cell amp, to an Adafruit Feather M4 - an arduino variant.
The controller is fairly simple. The embedded code (which can be built with Arduino) reads command codes from the usb-serial port. These commands tell the machine to:
- move a number of steps
- tare the loadcell
- read the loadcell
Instructions to the machine are done in low-level appropriate data types: steps are steps, not mm. Readings are returned as raw ADC readings. Conversions between machine-units and real-world units are done in JavaScript.
One javascript launches a webserver: that's `js/dexs.js` - you should be able to run it (after installing node) by navigating to the `js` directory here and doing `node dexs.js`. It will announce an IP address and port, point your browser at that. Important! Launch the tool when the DEX machine is already plugged into USB.
The client javascript can jog the machine, tare the loadcell, and perform tests. Tests are saved as .csv files.
Hopefully enough of the code is self-explanatory, more documentation can come if it's requested.
![controller](/images/2020-07-11_dex-tools.png)
![controller](/images/2020-07-12_dex-on-desk-02.jpg)
## Install
``Install Node.JS``
``npm install express``
``npm install ws``
``npm install serialport``
``npm install esm``
\ No newline at end of file
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
# Continuous Integration (CI) is the practice, in software
# engineering, of merging all developer working copies with a shared mainline
# several times a day < https://docs.platformio.org/page/ci/index.html >
#
# Documentation:
#
# * Travis CI Embedded Builds with PlatformIO
# < https://docs.travis-ci.com/user/integration/platformio/ >
#
# * PlatformIO integration with Travis CI
# < https://docs.platformio.org/page/ci/travis.html >
#
# * User Guide for `platformio ci` command
# < https://docs.platformio.org/page/userguide/cmd_ci.html >
#
#
# Please choose one of the following templates (proposed below) and uncomment
# it (remove "# " before each line) or use own configuration according to the
# Travis CI documentation (see above).
#
#
# Template #1: General project. Test it using existing `platformio.ini`.
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio run
#
# Template #2: The project is intended to be used as a library with examples.
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# env:
# - PLATFORMIO_CI_SRC=path/to/test/file.c
# - PLATFORMIO_CI_SRC=examples/file.ino
# - PLATFORMIO_CI_SRC=path/to/test/directory
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
This directory is intended for project header files.
A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.
```src/main.c
#include "header.h"
int main (void)
{
...
}
```
Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.
In C, the usual convention is to give header files names that end with `.h'.
It is most portable to use only letters, digits, dashes, and underscores in
header file names, and at most one dot.
Read more about using header files in official GCC documentation:
* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into executable file.
The source code of each library should be placed in a an own separate directory
("lib/your_library_name/[here are source files]").
For example, see a structure of the following two libraries `Foo` and `Bar`:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
and a contents of `src/main.c`:
```
#include <Foo.h>
#include <Bar.h>
int main (void)
{
...
}
```
PlatformIO Library Dependency Finder will find automatically dependent
libraries scanning project source files.
More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:adafruit_feather_m4]
platform = atmelsam
board = adafruit_feather_m4
framework = arduino
/*
utils/cobs.cpp
Jake Read at the Center for Bits and Atoms
(c) Massachusetts Institute of Technology 2019
This work may be reproduced, modified, distributed, performed, and
displayed for any purpose, but must acknowledge the squidworks and ponyo projects.
Copyright is retained and must be preserved. The work is provided as is;
no warranty is provided, and users accept all liability.
*/
#include "cobs.h"
// str8 crib from
// https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing
#define StartBlock() (code_ptr = dst++, code = 1)
#define FinishBlock() (*code_ptr = code)
size_t cobsEncode(uint8_t *ptr, size_t length, uint8_t *dst){
const uint8_t *start = dst, *end = ptr + length;
uint8_t code, *code_ptr; /* Where to insert the leading count */
StartBlock();
while (ptr < end) {
if (code != 0xFF) {
uint8_t c = *ptr++;
if (c != 0) {
*dst++ = c;
code++;
continue;
}
}
FinishBlock();
StartBlock();
}
FinishBlock();
// write the actual zero,
*dst++ = 0;
return dst - start;
}
size_t cobsDecode(uint8_t *ptr, size_t length, uint8_t *dst)
{
const uint8_t *start = dst, *end = ptr + length;
uint8_t code = 0xFF, copy = 0;
for (; ptr < end; copy--) {
if (copy != 0) {
*dst++ = *ptr++;
} else {
if (code != 0xFF)
*dst++ = 0;
copy = code = *ptr++;
if (code == 0)
break; /* Source length too long */
}
}
return dst - start;
}
/*
utils/cobs.h
consistent overhead byte stuffing implementation
Jake Read at the Center for Bits and Atoms
(c) Massachusetts Institute of Technology 2019
This work may be reproduced, modified, distributed, performed, and
displayed for any purpose, but must acknowledge the squidworks and ponyo projects.
Copyright is retained and must be preserved. The work is provided as is;
no warranty is provided, and users accept all liability.
*/
#ifndef UTIL_COBS_H_
#define UTIL_COBS_H_
#include <arduino.h>
size_t cobsEncode(uint8_t *src, size_t len, uint8_t *dest);
size_t cobsDecode(uint8_t *src, size_t len, uint8_t *dest);
#endif