Thoughts on Automated Testing - Page 1
Forum section: electronics / general

author: fastbike
author_rank: Regular Contributor
timestamp: August 12, 2023, 10:14:09 pm
content: I have a small control network module that I'm prototyping and will be doing my first production run later this year. The board has 2micros: STM32F042 for the external network comms and ATSAMD21 for the application (internal comms between the chips via SPI).I'm looking for ideas on how to test the assembled modules, using a custom designed testing jig and some software to drive it.The board has the following features:- 16 IO pins (both digital and analog) (via a 2x8 2mm pitch PCB header)- 24V DC power input- 5V DC output (via buck boost circuit)- 3V3 DC output via LDO regulator- CANBus external communication connectivity using theNoCan protocol- SWD programming headersI'm thinking of a custom test jig with pogo pins set out to match the physical connectors:- 2x8 (2mm pitch) for the IO- 1x8 (2mm pitch) for the power, network etc- 2@ 2x3 (1.27mm pitch) for the SWD- 2 (1.5mm dia) mounting hole (no electrical connection, just for alignment)I can imagine I'll need to power it up, with a current limiting supply and measuring the actual drawn current until that matches the expected draw (around 9mA for hand assembled prototypes at idle).Then I'd want to flash the (STM32) comms controller with the program that drives the network comms, and the bootloader on the (SAMD21) app controller.From this point I can load an application program across the control network onto the SAMD21, which could then exercise the IO. (The NoCan protocol provides an http endpoint that can be used to both upload new application software as well as reading and writing values to the IO, depending on the app software).So an external app could be scripted to power up the board, checking for current draw, flash the initial software and then exercise the IO. And write the results to a disk/DB for archival /QA purposes.Have I missed anything here ?Are there other things I need to be thinking about ?Edit: correction to part numbers

author: loki42
author_rank: Frequent Contributor
timestamp: August 13, 2023, 12:17:46 am
content: Sounds good. Pogo pins are good and we use them a lot but make sure you've got a step that tests the physical IO as well. If it's through hole parts especially as there's lots of chance for not correctly connected parts or even ones that were damaged by reflow / wave etc. Oh and big groups of pogos break a lot less than small ones. 2x2 is better than 4x1 in my experience.

author: fastbike
author_rank: Regular Contributor
timestamp: August 13, 2023, 02:20:27 am
content: Quote from: loki42 on August 13, 2023, 12:17:46 amThanks for that feedback. I'm thinking of making the test jig compatible with an Arduino MKR Zero (I have one on hand) which has the USB connectivity plus plenty (22) of IO to test the DUT. Including ADC and DACI'll need to see if I can use it to program the STM32F device, and the initial programming of the SAMD21 device. My test sw can then use the MKR's USB channel to configure/program/test the initial tests, followed by over the wire programming of the desired application (via the http channel).Now, any hints on using an Arduino MKR to program other devices over SWD ? Or I could just Google it !

author: fastbike
author_rank: Regular Contributor
timestamp: August 13, 2023, 04:17:24 am
content: This looks interesting for burning a bootloader into the SAMD21 on the DUT.https://avdweb.nl/arduino/samd21/samd21-programmerI'll need to see if it also works for the STM32

author: Gribo
author_rank: Frequent Contributor
timestamp: August 14, 2023, 03:37:37 pm
content: If possible, make everything accessible from one side. This will simplify fixture design.50 mil probes are delicate, make sure they are easily replaceable.

author: fastbike
author_rank: Regular Contributor
timestamp: October 29, 2023, 05:40:54 am
content: I've found a very useful blog post which has given me some ideas to follow up.Posting here in case someone else is on the same journey as me.https://www.instructables.com/How-to-build-a-custom-bed-of-nails-tester-for-your/