diff --git a/docs/equipment/inline-optical-qc.md b/docs/equipment/inline-optical-qc.md index 956d62c..2fecec9 100644 --- a/docs/equipment/inline-optical-qc.md +++ b/docs/equipment/inline-optical-qc.md @@ -219,27 +219,23 @@ belt crosses that line: underside at about 8°, true dark-field. - **Warp lasers:** two lasers under the record trace circles at 90 and 130 mm radius during the turn. -- **Spindle drive:** the spindle servo's encoder clocks both line-scans - and the lasers. +- **Spindle drive:** an encoder on the spindle shaft clocks both + line-scans; the lasers are sampled with the servo position (see the + spindle servo below). - **Lift drive:** the lift is a guided pneumatic cylinder, and the spindle is belt-driven from a servo set to the side. That keeps the bottom camera's view cone clear, which the elevation shows. +- **Thermal camera (option):** hangs at the tunnel entry. It only makes + sense at a press-side station; cooled records show no temperature + pattern, so the launch setup leaves it out. -**Spindle servo.** A 100 W AC servo kit is enough: -StepperOnline A6-RS100L2A1-M17, a 40 mm motor (0.32 N·m rated, +**Spindle servo and camera clock.** The spindle runs on a 100 W EtherCAT +servo kit, StepperOnline A6-EC100L2A1-M17: a 40 mm motor (0.32 N·m rated, 1.12 N·m peak, 17-bit magnetic encoder, 0.03 kg·cm² rotor) with the -A6-200RS drive for pulse, RS-485 or analog control. It costs USD 108.78 -from the China warehouse -([StepperOnline](https://www.omc-stepperonline.com/a6-series-100w-rs485-ac-servo-motor-kit-3000rpm-0-32nm-17-bit-absolute-encoder-ip67-a6-rs100l2a1-m17), -October 2026). +A6-200EC drive. It costs USD 123.29 from the China warehouse +([StepperOnline](https://www.omc-stepperonline.com/a6-series-100w-ethercat-ac-servo-motor-kit-3000rpm-0-32nm-17-bit-absolute-encoder-ip67-a6-ec100l2a1-m17), +October 2026). The conveyor uses the same kit, so one spare covers both. -- **Camera clock:** the A6-RS drive puts the motor encoder out as divided - A/B/Z pulses, up to 4 Mpps - ([A6-RS manual](https://www.omc-stepperonline.com/download/A6-RS_series_servo_drive_manual.pdf)). - They go straight to the encoder inputs of both line-scans (Basler racer - 2 encoder control, - [Basler](https://docs.baslerweb.com/encoder-control)), and the PLC - drives it by pulse and direction. - **Belt ratio 1:6** (for example 15 to 90 teeth). The record alone is about 20.5 kg·cm² (180 g at 150.8 mm radius); with the spindle head the load is about 25 to 35 kg·cm² (estimate). That is about 1,000 times the @@ -249,26 +245,31 @@ October 2026). - **Torque is no limit.** Reaching one turn a second in 0.15 s takes about 0.13 N·m at the spindle and 0.02 N·m at the motor (our arithmetic), well under the rating. -- **Not the EtherCAT twin.** The A6-EC100L2A1-M17 (USD 123.29) has the - same motor, but its drive has no divided encoder output: CN1 carries - five inputs, two of them touch probes, and three outputs (A6-EC - manual). It also needs an EtherCAT master, which the planned PLC is - not. It only fits if the whole station moves to EtherCAT, with a - separate spindle encoder for the cameras. -- **Thermal camera (option):** hangs at the tunnel entry. It only makes - sense at a press-side station; cooled records show no temperature - pattern, so the launch setup leaves it out. +- **Camera clock from a spindle encoder.** The A6-EC drive has no + divided encoder output: its CN1 port carries five inputs, two of them + touch probes, and three outputs + ([A6-EC manual](https://www.omc-stepperonline.com/download/A6-EC_series_servo_drive_manual.pdf)). + So an incremental encoder (RS-422 line driver, 2,500 to 5,000 pulses a + turn) sits on the spindle shaft. Its A/B signals clock both line-scans + directly (Basler racer 2 encoder control, + [Basler](https://docs.baslerweb.com/encoder-control)), so line timing + never passes through software, and it measures the spindle itself + rather than the motor behind the belt. Its index pulse goes to the + drive's touch-probe input, which latches the servo position at the same + mark every turn. The scan, the laser traces and the servo then share + one angle reference. **Sensor list.** Everything that measures the record, and everything the -PLC needs to run the station. Lights, drives and cylinders are in the +station controller needs to run the station. Lights, drives and cylinders are in the [bill of materials](inline-qc-station/inline-qc-station-bom.csv). | Sensor | Qty | Example | Where | What it measures | USD each | |---|---|---|---|---|---| | 4k monochrome line-scan camera, GigE, 50 mm lens | 2: top and bottom | Basler racer 2 r2L4096, Hikrobot MV-CL042-91GM | inspection zone, on opposite radii (top 330 mm above the record) | surface: non-fill, stitching, flow lines, specks, bubbles, under dark-field, bright-field and transmitted light on alternate lines; eccentricity from the groove spiral | 857 to 1,088 (Basler web shop); lens 300 to 800 (estimate) | | 8 MP colour area camera, GigE, 16 mm lens, ring light | 2: top and bottom | Basler ace 2 a2A2840-14gcPRO | label gate, 520 mm from the infeed | right label on the right side, print, label centring; the top camera also reads the stamper number in the run-out | 1,119 (Basler web shop); lens and ring light 300 to 800 (estimate) | -| Laser distance sensor | 2 | Micro-Epsilon optoNCDT 1420 | under the record, at 90 and 130 mm radius | warp: height traced round two circles during the turn | from EUR 470 list; ILD1420-25 about 1,600 at a reseller | -| Encoder of the 100 W spindle servo (17-bit) | 1 | StepperOnline A6-RS100L2A1-M17 kit | motor, 1:6 belt to the spindle; divided A/B/Z output from the drive | angle of the turn; clocks both line-scans and the lasers | in the kit, 108.78 | +| Laser distance sensor | 2 | Micro-Epsilon optoNCDT 1420 | under the record, at 90 and 130 mm radius; analog output to the EtherCAT analog input | warp: height traced round two circles during the turn | from EUR 470 list; ILD1420-25 about 1,600 at a reseller | +| Servo encoder, 17-bit | 2: spindle and conveyor | StepperOnline A6-EC100L2A1-M17 kit | in each motor; position over EtherCAT | spindle angle for the sequence and the warp traces; conveyor travel | in the kit, 123.29 | +| Incremental encoder, RS-422 line driver, 2,500 to 5,000 pulses a turn | 1 | Omron E6B2-CWZ1X class | on the spindle shaft | A/B clock both line-scans; the index latches the servo position through the drive's touch probe | 60 to 300 (estimate) | | Diffuse photoelectric sensor | 3 | any industrial make | looking up through the open centre: infeed, label trigger, outfeed | a record at the infeed starts the cycle; the trigger fires the label cameras; a full outfeed holds the next record | 50 to 150 (estimate) | | Through-beam photoelectric sensor | 1 pair | any industrial make | across the conveyor at the inspection position | the record's leading edge; stops the belts over the chuck | 50 to 150 (estimate) | | Cylinder position switch | 6 | SMC D-M9 class | lift (up, down), reject pusher (home, out), mandrel (open, clamped) | confirms each move before the next step | 25 to 60 (estimate) | @@ -276,10 +277,11 @@ PLC needs to run the station. Lights, drives and cylinders are in the | Thermal camera (option, not in the launch setup) | 0 or 1 | Optris Xi 400 | over the unload position, at a press-side station only | temperature map of a warm record, trended against warp | from EUR 1,950 | | Laser line profiler (alternative to the two lasers) | 0 or 1 | Keyence LJ-X8000, LMI Gocator 2500, Micro-Epsilon scanCONTROL | across the radius | full height and thickness map | 8k to 20k (estimate) | -So the launch station carries four cameras, two lasers, the servo -encoder, four photoelectric sensors, six cylinder switches and the door -switch. The cameras and lasers go to the edge PC; the rest goes to the -PLC. +So the launch station carries four cameras, two lasers, two servo +encoders and the spindle encoder, four photoelectric sensors, six +cylinder switches and the door switch. The cameras go to the edge PC, +the spindle encoder straight to the line-scans, and everything else onto +EtherCAT. **Cycle per record (estimate).** @@ -297,14 +299,53 @@ every 28 s; together that is 5 to 6 records a minute, against the 10 to 12 the station can take. The PC finishes the verdict while the record is lowered and carried to the pusher. -**Control.** A small PLC (Mitsubishi FX5U or Delta class, both common in -Thailand) runs the conveyor, lift, mandrel, spindle and pusher, plus the -safety circuit (e-stop, door switch, safety relay). The NixOS edge PC -under the outfeed takes the four GigE cameras on PoE, the lasers and the -light controllers. It sends pass or fail with a reason to the PLC, and -the result string and images to the factory system (see -[digital factory](../digital-factory.md)). Utilities are 230 V single -phase at about 1 kW and 6 bar compressed air (estimates). +**Control: EtherCAT** (decided October 2026; it replaces the small PLC +of the first draft). + +- **Station controller:** a fanless mini PC, Intel N100 class with two + Intel i226 ports, from USD 162 on Alibaba to USD 279 to 469 at retail + ([listing](https://cards.keenable.ai/w/01a15225-b50f-7e20-b3c2-e5fdaafae28c), + [plugpcs](https://plugpcs.com/mini)). It runs NixOS with the PREEMPT_RT + kernel, declared in the plant's clan like the edge PC. It is the + EtherCAT master and runs the station sequence, which we write + ourselves; there is no PLC. +- **Master software,** open source either way: + - **EtherCrab:** a pure Rust master (MIT or Apache-2.0) with + distributed clocks, CoE and basic CiA402 drive support + ([GitHub](https://github.com/ethercrab-rs/ethercrab)). It fits the Rust + stack of the factory application, and is the first choice. + - **IgH EtherCAT Master:** the mature fallback (GPL-2.0, its library + LGPL-2.1), packaged in nixpkgs + ([MyNixOS](https://mynixos.com/nixpkgs/package/linuxKernel.packages.linux_6_18.ethercat)). + Its native igc driver for the i226 is listed for the 6.12 kernel, so + with IgH, pin the 6.12 LTS kernel + ([IgH device drivers](https://docs.etherlab.org/ethercat/1.6/doxygen/devicedrivers.html)). +- **On the bus, in one line:** the spindle drive, the conveyor drive, and + an EK1100 coupler with EL1809 (16 inputs: photoelectric sensors, + cylinder switches, door and e-stop status), EL2809 (16 outputs: valves, + stack light) and EL3102 (two analog inputs for the warp lasers; + [Beckhoff](https://www.beckhoff.com/en-us/products/i-o/ethercat-terminals/el-ed3xxx-analog-input/el3102.html)). + The cycle is 1 ms with distributed clocks. The spindle runs in cyclic + synchronous position mode, the conveyor in cyclic synchronous velocity. +- **Warp traces:** the lasers are sampled in the same cycle as the + spindle position, so each trace comes with its angles: about 1,000 + points a turn at 1 ms (our arithmetic). The EL3102 takes ±10 V; if the + lasers are ordered with a current output, an EL3152 (4 to 20 mA) takes + its place. +- **Safety stays hardwired:** the e-stop and the door switch sit on a + safety relay that drops a contactor in the drive supply. The 100 W kit + has no STO input; in the A6-EC list, STO versions start at 400 W. +- **Edge PC:** the NixOS edge PC with the GPU, under the outfeed, takes + the four GigE cameras on PoE and the light controllers. It talks to the + station controller over plain Ethernet (record in place, turn done, + verdict with the reason) and sends the result string and images to the + factory system (see [digital factory](../digital-factory.md)). Keeping + the master off this PC keeps the GPU load away from the real-time loop. +- **HMI:** a browser page from the station controller on the 10 inch + touch panel. + +Utilities are 230 V single phase at about 1 kW and 6 bar compressed air +(estimates). ![Front elevation, front panels removed](inline-qc-station/inline-qc-station-front.png) @@ -320,12 +361,12 @@ By group, per station: |---|---|---| | Frame | 0.8k to 1.6k | 32 m of 40 × 40, 3.8 m of 40 × 80, angle brackets, feet | | Enclosure and guards | 0.3k to 0.7k | black panels, polycarbonate, door switch | -| Conveyor | 0.5k to 1.4k | round belts, pulleys, slide strips, drive | -| Handling | 1.8k to 4.4k | guided lift cylinder, 100 W spindle servo kit, spindle head with mandrel, rodless cylinder, pneumatics | +| Conveyor | 0.4k to 1.1k | round belts, pulleys, slide strips, 100 W EtherCAT servo drive | +| Handling | 1.9k to 4.5k | guided lift cylinder, 100 W EtherCAT spindle servo, spindle head with mandrel, rodless cylinder, pneumatics | | Vision | 7.7k to 12.5k | 2 line-scans, 2 colour cameras, lenses, 2 coaxial, 4 dark-field and 2 backlights, 2 ring lights, controllers | -| Sensors | 1.4k to 4.3k | 2 laser distance sensors, presence and stop sensors, cylinder switches | -| Control | 3.5k to 7.8k | PLC, edge PC with GPU, HMI, safety, cabinet and wiring | -| **Total** | **16k to 33k (0.53M to 1.08M THB)** | thermal camera (USD 2.1k to 3.0k) not included | +| Sensors | 1.5k to 4.6k | 2 laser distance sensors, presence and stop sensors, cylinder switches, spindle encoder | +| Control | 3.6k to 8.0k | EtherCAT controller and I/O, edge PC with GPU, HMI, safety, cabinet and wiring | +| **Total** | **16k to 33k (0.53M to 1.09M THB)** | thermal camera (USD 2.1k to 3.0k) not included | **Open points for the machine builder.** @@ -453,7 +494,7 @@ simulated. | Item | Estimate | |---|---| -| Hardware per station, from the [bill of materials](inline-qc-station/inline-qc-station-bom.csv) | USD 16k to 33k (0.53M to 1.08M THB) | +| Hardware per station, from the [bill of materials](inline-qc-station/inline-qc-station-bom.csv) | USD 16k to 33k (0.53M to 1.09M THB) | | First station: frame build and machined parts, lighting trials, software, training data | 2 to 4 person-months, USD 15k to 40k (our own team with a local machine builder) | | Launch plant: one station for both presses, after cooling | the hardware above, USD 16k to 33k, plus the first-station work (about USD 31k to 73k in all, 1.0M to 2.4M THB) | @@ -487,7 +528,14 @@ vision share is not yet confirmed. cycle, side; see [digital factory](../digital-factory.md)). 4. **Warp sensors.** Choose between two point lasers and a line profiler once the trials show whether a thickness map is worth the extra cost. -5. **Acceptance test.** Write it before ordering. It should cover the +5. **EtherCAT bench.** Before the frame is built, run one A6-EC kit, an + EK1100 with the three terminals and the spindle encoder from the mini + PC with EtherCrab: distributed clocks at 1 ms, cyclic synchronous + position on the drive, the touch probe latching the encoder index, and + the cycle jitter measured under load. The drive's EtherCAT description + file is on the StepperOnline product page. If EtherCrab falls short on + the drive, repeat the test with the IgH master. +6. **Acceptance test.** Write it before ordering. It should cover the detection rate per defect class on the trial set, the false-reject rate on good records (black and specials apart), and every result matched to its record key. diff --git a/docs/equipment/inline-qc-station/inline-qc-station-annotated.png b/docs/equipment/inline-qc-station/inline-qc-station-annotated.png index 6ebca73..1a55fae 100644 Binary files a/docs/equipment/inline-qc-station/inline-qc-station-annotated.png and b/docs/equipment/inline-qc-station/inline-qc-station-annotated.png differ diff --git a/docs/equipment/inline-qc-station/inline-qc-station-bom.csv b/docs/equipment/inline-qc-station/inline-qc-station-bom.csv index f367fbf..34a04f7 100644 --- a/docs/equipment/inline-qc-station/inline-qc-station-bom.csv +++ b/docs/equipment/inline-qc-station/inline-qc-station-bom.csv @@ -8,9 +8,9 @@ Enclosure,"Clear polycarbonate guard, reject zone",1.4 m2,,30,70,42,98,per m2; e Enclosure,"Door hinges, handle, safety door switch",1 lot,,120,350,120,350,estimate Conveyor,"PU round belt 6 mm, welded endless",2 x 3.8 m,,15,40,30,80,"each; PU round belt listings (RS, Amazon) plus welding" Conveyor,"Round-belt pulleys, shaft, bearings, UHMW slide strips, side guides",1 lot,,250,700,250,700,"pulleys USD 5 to 11 each (ServoCity, REV); rest estimate" -Conveyor,"Conveyor drive: small gear motor with drive, or servo",1,,250,600,250,600,estimate +Conveyor,"Conveyor drive: 100 W EtherCAT servo kit (same as the spindle), cyclic synchronous velocity",1,StepperOnline A6-EC100L2A1-M17,123,300,123,300,"USD 123.29 kit, China warehouse (StepperOnline, Oct 2026); high end allows for shipping, duty and a small belt reduction (estimate)" Handling,"Guided lift cylinder, 20 mm bore, 75 mm stroke",1,SMC MGPM20-75,330,450,330,450,SMC MGPM20-30 USD 322 (Misumi US) to 390 (Motion); 75 mm stroke a little more -Handling,Spindle servo kit 100 W with drive; the drive's divided encoder output (A/B/Z) triggers the line-scans; 1:6 timing belt to the spindle,1,StepperOnline A6-RS100L2A1-M17 (A6-200RS pulse/RS485 drive),109,250,109,250,"USD 108.78 kit, China warehouse (StepperOnline, Oct 2026); high end allows for shipping and duty (estimate)" +Handling,"Spindle servo kit 100 W, EtherCAT (A6-200EC drive), cyclic synchronous position; 1:6 timing belt to the spindle",1,StepperOnline A6-EC100L2A1-M17,123,300,123,300,"USD 123.29 kit, China warehouse (StepperOnline, Oct 2026); high end allows for shipping and duty (estimate)" Handling,"Spindle head: bearing housing, timing belt, label pad, pneumatic expanding mandrel",1,machined parts,600,1800,600,1800,estimate Handling,"Rodless cylinder 25 mm, 350 mm stroke, with paddle",1,SMC MY1B / CY3B class,400,900,400,900,estimate Handling,"Valve terminal, FRL, tubing, fittings",1 lot,,400,1000,400,1000,estimate @@ -26,10 +26,12 @@ Vision,Strobe and light controllers,2,,300,800,600,1600,estimate Sensors,"Laser distance sensor, 50 mm range",2,Micro-Epsilon optoNCDT 1420,520,1600,1040,3200,"list from EUR 470 (Micro-Epsilon); ILD1420-25 about USD 1,600 (Radwell)" Sensors,Photoelectric presence sensors and one through-beam,5,,50,150,250,750,each; estimate Sensors,"Cylinder position switches (lift up/down, pusher home/out, mandrel open/clamped)",6,SMC D-M9 class,25,60,150,360,each; estimate +Sensors,"Spindle incremental encoder, RS-422 line driver, 2,500 to 5,000 pulses a turn: A/B clock both line-scans, index to the servo touch probe",1,Omron E6B2-CWZ1X class,60,300,60,300,estimate Sensors,"Thermal camera (option, not in the total)",0 (1 optional),Optris Xi 400,2100,3000,0,0,"from EUR 1,950 (Optris); USD 2,995 (moviTHERM)" -Control,PLC for sequence and safety I/O,1,Mitsubishi FX5U-32MT or Delta class,500,1096,500,1096,"FX5U-32MT/ES USD 1,096 (Mitsubishi US shop); resale from about USD 470" +Control,"EtherCAT station controller: fanless mini PC, Intel N100 class, 2x Intel i226, NixOS with PREEMPT_RT, open-source EtherCAT master (EtherCrab or IgH)",1,Topton / CWWK N100 2x i226 class,162,470,162,470,"from USD 162 (Alibaba listing) to 279 to 469 at retail (plugpcs.com, Newegg), Oct 2026" +Control,"EtherCAT I/O: EK1100 coupler, EL1809 16 DI, EL2809 16 DO, EL3102 2 AI (warp lasers), end terminal",1 set,Beckhoff,430,780,430,780,EK1100 USD 131 (industrialsupplygroups); EL1809 EUR 78 net (industry-electronics); EL2809 USD 99 net (TME); EL3102 EUR 111 (automation-base) to USD 290 (plcpartssolution); Oct 2026 Control,"Edge PC with GPU, 4 GigE PoE ports, NixOS",1,,1500,3200,1500,3200,"qscompute buying guides 2026: USD 1,490 to 3,200" -Control,"HMI touch panel, 10 inch",1,,400,900,400,900,estimate -Control,"Safety relay, e-stop, door interlock wiring",1 lot,,300,600,300,600,estimate +Control,"HMI touch panel, 10 inch, showing the station's browser page",1,,400,900,400,900,estimate +Control,"Safety relay, e-stop, door interlock wiring, contactor in the drive supply (the 100 W kit has no STO)",1 lot,,300,600,300,600,estimate Control,"Cabinet, power supply, breakers, terminals, wiring, stack light",1 lot,,800,2000,800,2000,estimate -Total,"Hardware per station, thermal camera excluded",,,,,16073,32734,sum of the lines above +Total,"Hardware per station, thermal camera excluded",,,,,16112,32938,sum of the lines above diff --git a/docs/equipment/inline-qc-station/render_annotated.py b/docs/equipment/inline-qc-station/render_annotated.py index 6ad65ab..d5cad02 100644 --- a/docs/equipment/inline-qc-station/render_annotated.py +++ b/docs/equipment/inline-qc-station/render_annotated.py @@ -27,8 +27,8 @@ ANCHORS = [ ("lscan_bot", V(778, -31, 547), "Line-scan camera, bottom", "the underside, in the same turn"), ("lasers", V(880, -130, 925), "Laser warp sensors", "edge run-out and dish, to 0.1 mm"), ("pusher", V(1320, -300, 1020), "Reject pusher", "pushes a failed record down a chute into the bin behind"), - ("outfeed", V(1715, -140, 902), "Outfeed", "good records wait for the spindle"), - ("cabinet", V(1420, -200, 450), "Control cabinet", "PLC, drives and the NixOS edge PC"), + ("outfeed", V(1715, -140, 902), "Outfeed", "good records wait for sleeving"), + ("cabinet", V(1420, -200, 450), "Control cabinet", "EtherCAT controller, drives and the NixOS edge PC"), ("hmi", V(1770, -404, 1235), "Touch screen", "every verdict with its reason"), ("estop", V(1140, -386, 970), "Emergency stop", "and a safety switch on the tunnel door"), ("stack", V(1120, 274, 1720), "Stack light", "green: pass, red: reject"),