Case study · Boards · ESP32 PLC
Press the board on the nails. The PLC reads every contact.
An ESP32 PLC runs a bed-of-nails test station for five new products.
A board can look perfect and still have one bad contact.
By hand, it is slow and error prone. So a press brings the board to the nails, and the PLC reads them.
This case study comes from a real project: a manufacturer of electrical devices such as circuit boards, power supplies and electronic components. The customer is not named. The station, the checks, the operator screen and the results come from the case. The panels below are illustrative: the values, the timings and the I/O counts are examples. No photos of the station are published.
The challenge
Five new boards. Each one tested before packaging.
The company had a new range of five products. Before shipping, each board had to pass different types of tests, to meet the quality standard of the company, of its customers and of the market. The test sits at the end of production, just before packaging.
Manual and slow
Before the project, the boards were tested by hand. It took a long time, and errors slipped through.
Many points, one verdict
Each board has many points to check. The station must check the continuity and the resistance of each connection, and give one result per board.
Do not damage the board
The fixture moves the board up and down. Sensors watch the ends of the path, so the press never goes further than it should.
Ready to grow
Demand was expected to grow, and a manual test would not scale. The station had to be designed for expansion from the start.
The result
The automated station proved highly effective. The company now meets the growing demand for its five new products. Errors during testing went down significantly and test times went down, so the company can verify the quantity of products that its production plan expects.
How it works
Three parts: the press, the contacts and the station.
Three panels, one for each part of the station. Press the buttons. They are illustrative simulations: the timings, the test points, the values and the I/O counts are examples. The case does not publish the test program.
Down to the nails, only as far as the sensors allow.
The PLC drives pneumatic cylinders that move the fixture holding the board. The fixture travels up and down along a predefined path, and sensors watch the limits of the path so the board is not damaged. A typical way to do it: the test starts only when the bottom sensor confirms that the fixture reached the end of its path. Run a cycle, then try a board that is not seated.
- Pneumatic cylinders move the fixture
- Sensors at both ends of the path
- No bottom sensor, no test: the fixture goes back up (example)
PLC events (example)
Illustrative simulation. Example values, not data from the case. The 2 s limit and the travel time are examples. The case does not publish the valves or the timings.
Continuity and resistance, point by point.
On the nails, the test points of the board touch the pins. Wires run from the pins back to the PLC, which checks the continuity and the resistance of each connection. The operator selects the test parameters on the touch screen. In this example, picking the product sets them. Pick a product, then test a board.
- The product sets the points and the windows
- Continuity: the connection must be closed
- Resistance: the value must sit in its window
Test results (example)
Illustrative simulation. Example values, not data from the case. Example points and windows (±5 %). The case does not publish the measuring circuit or the test limits. A typical way: a known voltage through a reference resistor, read on a 0-10 V analog input.
Try a full test sequence with faults in the end-of-line test simulator.
Conveyors, distributor, two fixtures: count the I/O.
The station was designed to grow. Two conveyor belts and a distributor spread the boards to different test devices. They have sensors and the ESP32 PLC controls them. The case says that one PLC per workstation can manage up to four conveyors, one distributor, two test fixtures, the I/O of the bed of nails and the output to the screen. Change the station and check the I/O on an ESP32 PLC 58.
- Up to 4 conveyors and 1 distributor
- Up to 2 test fixtures
- Measured points on analog inputs (example)
Conveyor belts
Test fixtures
Measured points per fixture
Illustrative simulation. Example values, not data from the case. Example I/O per device: conveyor, 1 output and 1 sensor; distributor, 2 outputs and 2 sensors; fixture, 1 valve, 2 limit sensors, 1 test supply and 2 lamps; 1 analog input per measured point. The case does not publish its I/O list. The link to the screen is not published; here it uses Ethernet, not I/O.
System architecture
How does a PLC test an electronic board on a bed of nails?
Put the board in a fixture that pneumatic cylinders move up and down. Watch the ends of the path with two sensors. At the bottom, the test points of the board touch a bed of nails, and wires bring each contact back to the PLC. In this case an ESP32 PLC moved the fixture, checked the continuity and the resistance of each connection, and sent the results to a 10" industrial Panel PC, where Grafana showed them. The case does not name the PLC model or the link between the PLC and the Panel PC.
| Signal | Between | Type | Purpose |
|---|---|---|---|
| Press valve | BetweenESP32 PLC → solenoid valve | TypeDigital output (typical) | PurposeMoves the fixture down and up |
| Top limit | BetweenSensor → ESP32 PLC | TypeDigital input | PurposeFixture at the top: safe to load the next board |
| Bottom limit | BetweenSensor → ESP32 PLC | TypeDigital input | PurposeEnd of the path: the board sits on the nails |
| Test contacts | BetweenBed of nails → ESP32 PLC | TypeWires to the PLC (circuit not published) | PurposeContinuity and resistance of each connection |
| Test parameters | BetweenPanel PC → ESP32 PLC | TypeTouch screen selection (link not published) | PurposeProduct and tests to run |
| Results | BetweenESP32 PLC → Panel PC | TypeData shown by Grafana (link not published) | PurposeResults in real time for the operator |
| Belt and distributor sensors | BetweenSensors → ESP32 PLC | TypeDigital inputs | PurposePosition of the boards on the line |
| Belts and distributor | BetweenESP32 PLC → drives and actuators | TypeDigital outputs (typical) | PurposeSpread the boards to the test devices |
Why it works
Safe motion first, then a verdict for every board.
The path has limits
The cylinders move the fixture along a fixed path, and two sensors watch its ends. The board reaches the nails without going further than it should.
The PLC reads every contact
Each pin is wired back to the PLC. The same program moves the fixture and checks the continuity and the resistance of each connection, so the motion and the test stay in step.
Few buttons for the operator
The interface has a short list of menus and actions, because most of the process is automatic. Operators need little training to use it with confidence.
Five products, one station
The operator chooses the test parameters on the touch screen. A new product is a new set of parameters, not a new station.
Built to grow
Conveyor belts and a distributor go on the same PLC as the fixtures. One PLC per workstation keeps each station the same.
Learn the pieces
See how a PLC writes a test report for each part, and how an ESP32 PLC logs data over MQTT and keeps it on an SD card when the network is down.
Hardware
A PLC for the station, a Panel PC for the operator.
ESP32 PLC 58
The case used an ESP32 based PLC to move the fixture, read the contacts and control the conveyors and the distributor. It does not publish the model. The ESP32 PLC 58 is the model of the family with the most I/O, for the largest station the case describes.
- Role in this station
- Drives the press, checks each contact and runs the belts and the distributor
- Processor
- ESP32 dual core, up to 240 MHz, 16 MB flash, 520 KB SRAM
- Inputs
- 37: 16 analog/digital (0-10 V, 11-bit) and 21 digital optoisolated, 5 to 24 Vdc, 6 with interrupt
- Outputs
- 24: 9 analog/digital/PWM (0-10 V, 12-bit) and 15 digital optoisolated, 5 to 24 Vdc
- Communications
- Ethernet 10/100, Wi-Fi 2.4 GHz, Bluetooth LE, RS-485, RS-232, TTL, I2C, SPI
- Power and mounting
- 12 to 24 Vdc, DIN rail TS35, IP20; real-time clock
The ESP32 PLC 58 has no relay outputs. The valves and the drives switch through its 5 to 24 Vdc digital outputs or through external relays: check the current of each load against the datasheet. A station with one fixture and fewer points can use a smaller model, such as the ESP32 PLC 42 (26 inputs, 16 outputs).
TouchBerry Pi Panel PC 10.1" FLEX
The case shows the results with Grafana on a 10" industrial Panel PC, and the original case shows the TouchBerry Pi 10.1". The operator picks the test parameters on its touch screen and sees the results in real time.
- Role in this station
- Operator screen: test parameters and results
- Display
- 10.1", 1280 x 800, capacitive touch, 900 nits
- Computer
- Raspberry Pi 4, Linux preinstalled
- Own I/O
- 3 digital inputs, 2 analog inputs (0-10 V or 4-20 mA), 5 digital outputs
- Communications
- Gigabit Ethernet, 2 x USB 2.0, 2 x USB 3.0, one serial port (RS-485, RS-232 or TTL)
- Power and front
- 12 to 24 Vdc, UPS for safe shutdown; front IP20 or IP65
The case does not publish how the PLC sends the results to Grafana. A typical way: the PLC sends each result over Ethernet, a database on the Panel PC stores it, and Grafana shows it.
Questions about this case
What is a bed-of-nails test fixture?
A plate with spring-loaded pins placed at the test points of a board. The board is pressed onto the pins, and each pin carries one contact to the test system. One press reaches many points at once. In this case, pneumatic cylinders press the fixture onto the nails and an ESP32 PLC reads the contacts.
Can a PLC check continuity and resistance?
Yes, with a simple measuring circuit. A typical way: a known voltage goes through a reference resistor and the point under test, and an analog input of 0 to 10 V reads the result. The ESP32 PLC 58 has 16 such inputs at 11 bits. For very low resistances or tight tolerances, use a dedicated instrument and let the PLC run the sequence. The case does not publish its circuit.
Why does a pneumatic test fixture need limit sensors?
To know where the fixture is. A sensor at the top says it is safe to load the next board. A sensor at the bottom says the board reached the nails. In this case, sensors watch the limits of the path so the board is not damaged. A typical rule: no bottom sensor, no test.
How does Grafana show PLC data?
Grafana reads from a data source, such as a database, and draws dashboards in a browser. A typical way: the PLC sends each result over Ethernet, for example with MQTT or Modbus TCP, a program on the Panel PC writes it to a database, and Grafana shows it. In this case Grafana ran on a 10" industrial Panel PC. The case does not publish the link.
How many I/O does a test station need?
Count each device. The panel above uses an example: 1 output and 1 sensor per conveyor, 2 outputs and 2 sensors for the distributor, a valve, 2 limit sensors, a test supply and 2 lamps per fixture, and 1 analog input per measured point. With 4 conveyors, 2 fixtures and 8 points each, that is 10 digital inputs, 16 analog inputs and 14 outputs, inside the 37 inputs and 24 outputs of an ESP32 PLC 58.
Which ESP32 PLC suits a test station?
It depends on the I/O. The case does not publish its model. For a station with up to 4 conveyors, a distributor and 2 fixtures, the ESP32 PLC 58 has the most I/O in the family: 37 inputs and 24 outputs. A station with one fixture and fewer points can use an ESP32 PLC 42, with 26 inputs and 16 outputs. Both have Ethernet for the link to the operator screen.
Download the case study
4-page PDF with the challenge, the logic, the architecture and the hardware. No form required.
Testing boards or assemblies?
Tell us what you test. An engineer will answer.
Tell us the product, how many test points it has, what each point must measure and how the boards reach the fixture. We will propose the PLC, the I/O and the operator screen.
- You get an answer from our technical team
- PLC, I/O and operator screen for your station
- Arduino, ESP32 or Raspberry Pi based PLCs