Skip to main content

End-of-line functional test

This is the test that runs on every board before it ships. One AT1032S takes the place of the bench supply, the multimeter, the logic probe and the pass/fail lamp: it powers the board, measures its rails, exercises one logic path, and shows the verdict on its own screen and speaker. The operator never touches a PC.

The AT1032S powers an assembled PCB from its programmable supply, measures two on-board rails on analog inputs DA0 and DA1, drives a stimulus on DA2 and reads the board's response on DA3, then shows pass or fail on its own screen and speaker.

Power, measure, stimulate, read back, report. One instrument, one cable loom.

Wiring​

AT1032SDevice under test
PWR OUT + / −Board supply input
DA01.8 V rail test point
DA13.3 V rail test point
DA2Stimulus input
DA3Response output

The test sequence​

import { AT1000 } from '@ikalogic/at1000';

// ---- Everything you adapt for your own board lives here -------------------
const SUPPLY_V = 3.3; // board supply voltage
const CURRENT_MAX_A = 0.35; // above this, the board is faulty
const RAILS = [
{ io: 0, name: '1.8 V rail', min: 1.70, max: 1.90 },
{ io: 1, name: '3.3 V rail', min: 3.15, max: 3.45 },
];
const STIMULUS_IO = 2;
const RESPONSE_IO = 3;
const SETTLE_MS = 200;
// ---------------------------------------------------------------------------

const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

const devices = await AT1000.findDevices();
if (devices.length === 0) {
console.log('No AT1000 device found.');
process.exit(1);
}

const tester = await AT1000.open(devices[0]);
await tester.reset();

const supply = tester.power.dut(0);
const stimulus = tester.gpio.digital(STIMULUS_IO);
const response = tester.gpio.digital(RESPONSE_IO);
const screen = tester.hmi.screen();
const speaker = tester.hmi.audio();
const knob = tester.hmi.knob();

await stimulus.configure_output({
voh: SUPPLY_V, vol: 0, vih: 2.0, vil: 0.8, value: false,
});
await response.configure_input({ vih: 2.0, vil: 0.8 });
for (const rail of RAILS) {
await tester.gpio.analog(rail.io).configure_input();
}

// Runs one board and returns the list of failures, empty when the board passes.
async function testBoard() {
const failures = [];

await supply.enable(SUPPLY_V);
await sleep(SETTLE_MS);

const current = await supply.read_current();
console.log(`Supply current: ${current.toFixed(3)} A`);
if (current > CURRENT_MAX_A) {
failures.push(`overcurrent ${current.toFixed(3)} A`);
await supply.disable();
return failures; // stop straight away on a faulty board
}

for (const rail of RAILS) {
const volts = await tester.gpio.analog(rail.io).read();
console.log(`${rail.name}: ${volts.toFixed(3)} V`);
if (volts < rail.min || volts > rail.max) {
failures.push(`${rail.name} at ${volts.toFixed(3)} V`);
}
}

// Drive the stimulus high and confirm the board answers.
await stimulus.write(true);
await sleep(20);
if ((await response.read()) !== true) {
failures.push('no response to stimulus');
}
await stimulus.write(false);

await supply.disable();
return failures;
}

console.log('Ready. Press the knob to test a board.');

while (true) {
await screen.colors({ text: '#FFFFFF', background: '#2B3B4B' });
await screen.print('Insert board\nPress to test');

const event = await knob.wait_event(2000);
if (event === null) continue; // nothing happened, keep waiting

await screen.clear();
await screen.print('Testing...');

const failures = await testBoard();

if (failures.length === 0) {
await screen.colors({ text: '#FFFFFF', background: '#1B7F4B' });
await screen.print('PASS');
await speaker.play({ sound_id: 'success', volume: 90 });
console.log('PASS');
} else {
await screen.colors({ text: '#FFFFFF', background: '#EE5454' });
await screen.print('FAIL\n' + failures[0]);
await speaker.play({ sound_id: 'failure', volume: 90 });
console.log('FAIL:', failures.join('; '));
}

await sleep(2000);
}

Adapting it to your board​

  • SUPPLY_V and CURRENT_MAX_A set the operating point and the fault threshold.
  • RAILS lists every rail you want measured, with the pin it is wired to and its tolerance window. Add as many as you have spare analog inputs.
  • STIMULUS_IO and RESPONSE_IO are one input/output pair. Repeat the pattern for every logic path you want covered.
  • Copy the script onto the device to run it as a standalone project, and the fixture needs no PC at all.

API used on this page​