T

Toolholder Interface

PLC signal · strain · firmware
loading

Live workflow + PLC signals

checking
live follow
A
Step A · idle
Waiting for live PLC data.
controller
CommandOut
CommandIn
PCB PLC_IN / I_RAW
live: waiting for RevPi CommandOut / CommandIn

Workflow follows PLC CommandOut and CommandIn only. PA3/NAU telemetry is unavailable; PCB LEDs show internal picked/wrong-tool threshold state.

Process flow

correct vs incorrect tool
A · idle
white

Step A auto-tares with blinking orange, then waits in white.

B · requested
solid green

PLC Command 1 arms this holder and saves the allowed reference.

C · tool removed
blinking blue

Strain changed while allowed. Holder waits for return.

Return branch
correct → PLC output 1 pulse → green flashes → white
incorrect → keep blinking blue

Correct return means strain comes back near the saved reference. Incorrect/wrong tool stays in wait-return branch until corrected, or Reset to Step A / Command 0 is sent.

Current command

backend —
loading…
output —input —

Quick controls

safe first

Command 0 sends the holder to Step A. Command 1 starts the allowed/tare cycle. Pulse 1 sec sends Command 1 briefly and then returns to Command 0. Command 1 turns RevPi CommandOut on, sending 24 V to PCB PLC_IN. The PCB 24V_OUT is read back as CommandIn. Threshold buttons only work when Step A is verified: CommandOut=0 and CommandIn=0. They send 8/9/10 short pulses; PCB confirms +5% with orange, -5% with purple, and factory default with cyan.

Live strain / NAU7802

filtered weight
recognized point
filtered counts
peak last 2s
source

Graph refreshes about 5×/second and current weight uses a 2s trimmed average noise filter and snaps to the nearest saved calibration point when close enough. Use Tare with no weight, then add known weights and press Add calibration point. Current weight updates automatically from the fitted calibration.

Calibration tool

Use with no known weight/load. Saves current average raw count as zero.

calibration loading…

Calibration points

saved
weight grawdelta
no points

Firmware / PICKit 5

loading firmware list…

Flashing forces command 0 first, then uses PICKit 5 over UPDI. Pin 2=VDD sense, pin 3=GND, pin 4=UPDI/PA0.

Job output

live
no firmware job yet

Signal path

RevPi DIO → PCB
RevPi output

CommandOut → PCB PLC_IN

Toolholder PLC_IN

24 V command signal

PCB 24V_OUT

read as CommandIn

Firmware expected

main.c state machine

Firmware LED meaning

states
white
Step A idle / command 0 / powered
blinking orange
Step A taring baseline — do not touch gauge
solid green
allowed / armed
blinking blue
tool removed / waiting for return
green flashes
correct tool returned; PCB sends CommandIn/output 1 pulse, then back to Step A white
red
unauthorized movement or error blink code

Hardware constants

ATtiny1614
MCU
ATtiny1614
programmer
PICKit 5 via UPDI / PA0
LED data
PB1
24 V out
PB0, enabled as PLC CommandIn feedback
NAU7802
0x2A, PA1 SDA, PA2 SCL, CH1 VIN1P/VIN1N