Author Topic: Automating AVR Programming - Production Programming  (Read 3055 times)

0 Members and 1 Guest are viewing this topic.

Offline bipolunipolTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Automating AVR Programming - Production Programming
« on: December 21, 2021, 01:59:22 pm »
Hello!

I am preparing a small production series of devices. They will include the ATTINY414 microcontroller. Now I would like to create a fixture for testing (measuring voltages and currents) and programming devices: after inserting the PCB into fixture, I would like to upload the test program (AVR microcontroller with 1-wire UPDI for programming), measure the currents and voltages, upload the target program and measure the currents and voltages again.

And now I am wondering how to automate it so that I do not have to read the measurements from the meters myself and manually start the programmer?

Is there any software that can help me automate the AVR programming and testing process?
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 11427
  • Country: fi
Re: Automating AVR Programming - Production Programming
« Reply #1 on: December 21, 2021, 02:13:22 pm »
Normal scripting tools get you far; .sh in unix, maybe Powershell if you are a Windows guy.

I have done this with .sh scripts and once their capabilities run out, custom C programs, but that's only because I like to work with C. Many would choose Python scripting instead.

In any case, if you are capable of writing the AVR firmware in C, some production automation code (in C or whatever) should be easy compared to that.

Basically, get some SCPI power supplies and multimeters etc. Like
echo "OUTP ON" > /dev/ttyUSB0

Then just call avrdude in your script. You can loop it until it returns success, this way simply detecting when the AVR is connected to the fixture.

 
The following users thanked this post: bipolunipol

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 8582
  • Country: ro
Re: Automating AVR Programming - Production Programming
« Reply #2 on: December 21, 2021, 02:41:43 pm »
- custom mechanical fixture (can be handmade if the batch is small, a fixture with a hinge)
- no connectors (use pogo-pins instead)
- design the board such that it allows in circuit programming, with the board fully assambled
- write your own scripts to program the AVR (use AVR DUDE in command line mode)
- write some extra SCPI scripts to automate powering up and measuring (you have to have SCPI enabled instruments)
- give an unique ID to each board and each production batch, log and store all the individual test results
- do NOT include any manual interventions or human decisions during the test procedure, other than placing the board inside and closing the lid of the mechanical fixture

Connect all to a PC and make the scripts such that when the lid of the test fixture is closed, the test procedure starts automatically, and return to the operator only a binary PASS/FAIL verdict.
 
The following users thanked this post: Siwastaja, bipolunipol

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 3895
  • Country: gb
Re: Automating AVR Programming - Production Programming
« Reply #3 on: December 21, 2021, 03:14:51 pm »
custom bed-of-nails program & test pcb, perhaps with 3D printed pcb holder
+
scpi psu
+
keysight 34970A  or 34972A with scanner card 34901A, io card 34907A
+
avr dude
+
python to glue it all together and make a nice pdf test report for each board


scpi psu and 34970A etc can be had on ebay, perhaps all for less than GBP1000
 
The following users thanked this post: bipolunipol

Offline bipolunipolTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: Automating AVR Programming - Production Programming
« Reply #4 on: December 21, 2021, 03:54:46 pm »
Thank you for your help!

Regarding the programmer - I have MPLAB Snap In-Circuit Debugger / Programmer (PG164100). Will it be possible to make use of such a programmer and control its work from the level of the mentioned scripts? (AVRDUDE e.g. does not support new TINY414 chips and this programmer.)

And regarding pogo-pins - will it be a good solution to use a ready-made TC2030 connector, attached to the designed fixture? After inserting the PCB, this connector will be adjacent to the board.
 

Offline Gribo

  • Frequent Contributor
  • **
  • Posts: 683
  • Country: ca
Re: Automating AVR Programming - Production Programming
« Reply #5 on: December 21, 2021, 04:45:56 pm »
Microchip (AVR) Studio has the ATprogram utility. You can use it to program and set the fuses however you want. I recently built a 6-up programmer using 6 Atmel ICEs. You can call them by the Atmel ICE SN.
Pay attention that certain Intel boards in Windows 10  have a limit on the number of identical devices connected to a single USB hub (4 work, 6 won't).
I am available for freelance work.
 
The following users thanked this post: bipolunipol


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->