This is a list of Test preformed on each RPUlux after assembly.
- Basics
- Assembly check
- IC Solder Test
- Power Protection
- Power Without SMPS
- Bias +5V
- Set MCU Fuse and Install Bootloader
- Install SMPS
- Self Test
These tests are for an assembled RPUlux board 17323^0 which may be referred to as a Unit Under Test (UUT). If the UUT fails and can be reworked then do so, otherwise it needs to be scraped.
Warning: never use a soldering iron to rework ceramic capacitors due to the thermal shock.
Items used for test.
After assembly check the circuit carefully to make sure all parts are soldered and correct. The device marking is labeled on the schematic and assembly drawing.
NOTE: U2 is not yet on the board, so everything with +5V will not have power.
U2 is not yet populated. Check that a diode drop to 0V is present from a circuit board pad that is connected to each of the pins of U1, and U3 through U9 by measuring with a DMM's diode test set up for reversed polarity. Consult the schematic to determine which pins can be skipped (e.g. ground, power rail, ...).
This is a simplified In-Circuit Test (ICT). It could become more valuable if the node voltage driven with the current source is recorded for each tested location and then used with statistics to determine test limits for each location.
Apply a current limited (20mA) supply set with 5V to the PWR and 0V connector J7 in reverse and verify that the voltage does not get through. Adjust the supply to 36V and verify no current is passing.
Apply a current limited (20mA) supply set with 7V to the PWR and 0V connector J7 and verify that the voltage does get through. Adjust the supply so the LED is on and stable and measure voltage, adjust supply to 30V measure input current.
{ "LEDON_V":[10.7,10.7,10.7,10.7,10.7,],
"PWR@7V_mA":[1.9,1.9,1.8,1.9,1.9,],
"PWR@30V_mA":[3.0,3.2,3.1,3.2,3.2,]}
Apply a 30mA current limited 5V source to +5V (J6). Check that the input current is for a blank MCU (e.g. less than 7mA). Turn off the power.
{ "I_IN_BLANKMCU_mA":[3.8,3.6,3.2,3.4,2.9,]}
Install Git and AVR toolchain on Ubuntu (17.10, on an old computer try https://wiki.ubuntu.com/Lubuntu).
sudo apt-get install git gcc-avr binutils-avr gdb-avr avr-libc avrdude
Clone the RPUlux repository.
cd ~
git clone https://github.com/epccs/RPUlux
cd ~/RPUlux/Bootloader
Connect a 5V supply with CC mode set at 30mA to +5V (J6). Connect the ICSP tool (J10). The MCU needs its fuses set, so run the Makefile rule to do that.
make fuse
Next install the bootloader
make isp
Disconnect the ISP tool and measure the input current, wait for the power to be settled. Turn off the power.
{ "I_IN_16MHZ_EXT_CRYST_mA":[12.9,11.3,10.9,11.3,10.8,]}
Add U2 to the board now. Measurement of the input current is for referance (takes a long time to settle).
Install U2 and measure its output voltage and input current with the supply set at 12.8V and a 30mA current limit. Measure recover voltage after dropout (e.g. PWR voltage at which +5V recovers after droping).
{ "+5V_V":[5.00,4.98,4.95,],
"PWR12V8_mA":[8.6,8.0,7.6,],
"PWR-DR_V":[6.0,6.7,6.5,]}
Plug an RPUftdi shield with Host2Remote firmware onto an RPUno board and load I2C-Debug on it.
Use picocom to set the bootload address on the RPUftdi shield. The RPUftdi is at address 0x30 and the UUT will be at address 0x31.
picocom -b 38400 /dev/ttyUSB0
...
Terminal ready
/0/iaddr 41
{"address":"0x29"}
/0/ibuff 3,49
{"txBuffer":[{"data":"0x3"},{"data":"0x31"}]}
/0/iread? 2
{"rxBuffer":[{"data":"0x3"},{"data":"0x31"}]}
Exit picocom (Cntl^a and Cntl^x). Plug an RPUadpt shield with Remote firmware onto the UUT board. Note the RPUadpt address defaults to 0x31 when its firmware was installed.
Connect the Self Test Harness to the UUT. Connect a 12.8V supply with CC set at 300mA.
Once the UUT has power check that the VIN pin on the shield has power (this is not tested by the self-test so it has to be done manually).
Measure the +5V supply at J6.
Edit the SelfTest main.c such that "#define REF_EXTERN_AVCC 5000000UL" has the correct value. Next, run the bootload rule in the Makefile to upload the self-test firmware to the UUT that the remote shield is mounted on.
cd ~RPUno/SelfTest
gedit main.c
make bootload
Use picocom to see the SelfTest results on the serial interface.
picocom -b 38400 /dev/ttyUSB0
picocom v2.2
...
Terminal ready
RPUlux Self Test date: Mar 27 2018
avr-gcc --version: 5.4.0
I2C provided address 0x31 from serial bus manager
adc reading for PWR_V: 359
PWR at: 12.812 V
ADC0 GN LED /W SINK on and CS*_EN off: 0.000 V
ADC1 RD LED /W SINK on and CS*_EN off: 0.000 V
ADC2 R1 /W CS*_EN off: 0.000 V
ADC3 R1 /W CS*_EN off: 0.000 V
CS0 curr source on R1: 0.022 A
Green LED fwd V: 2.245 V
CS1 curr source on R1: 0.022 A
Red LED fwd V: 2.133 V
ADC2 reading used to calculate ref_intern_1v1_uV: 696 A
calculated ref_intern_1v1_uV: 1088918 uV
REF_EXTERN_AVCC old value was in eeprom: 4948800 uV
REF_INTERN_1V1 old value was in eeprom: 1078310 uV
REF_EXTERN_AVCC saved in eeprom: 4986100 uV
REF_INTERN_1V1 saved in eeprom: 1088918 uV
PWR_I with !CS1_EN use INTERNAL_1V1: 0.013 A
PWR_I with CH1 LED, 1V1, 1sec: 0.121 A
PWR_I with CH1 LED, 1V1, 3sec: 0.121 A
Approximate CH1 curr on a 3.2V LED: 0.344 A
Approximate CH1 curr /w weak pull-up on a 3.2V LED: 0.091 A
PWR_I with CH2 LED, 1V1, 1sec: 0.119 A
PWR_I with CH2 LED, 1V1, 3sec: 0.119 A
Approximate CH2 curr on a 3.2V LED: 0.337 A
Approximate CH2 curr /w weak pull-up on a 3.2V LED: 0.091 A
PWR_I with CH3 LED, 1V1, 1sec: 0.117 A
PWR_I with CH3 LED, 1V1, 3sec: 0.117 A
Approximate CH3 curr on a 3.2V LED: 0.331 A
Approximate CH3 curr /w weak pull-up on a 3.2V LED: 0.088 A
PWR_I with CH4 LED, 1V1, 1sec: 0.119 A
PWR_I with CH4 LED, 1V1, 3sec: 0.118 A
Approximate CH4 curr on a 3.2V LED: 0.336 A
Approximate CH4 curr /w weak pull-up on a 3.2V LED: 0.090 A
PWR_I with CH5 LED, 1V1, 1sec: 0.117 A
PWR_I with CH5 LED, 1V1, 3sec: 0.117 A
Approximate CH5 curr on a 3.2V LED: 0.332 A
Approximate CH5 curr /w weak pull-up on a 3.2V LED: 0.088 A
PWR_I with CH6 LED, 1V1, 1sec: 0.120 A
PWR_I with CH6 LED, 1V1, 3sec: 0.120 A
Approximate CH6 curr on a 3.2V LED: 0.342 A
Approximate CH6 curr /w weak pull-up on a 3.2V LED: 0.092 A
[PASS]
Before truning off the power check that the VIN pin for the shield has no power, the test turns it off. Then turn off the power supply.
# toss the change to main.c if you want
git checkout -- main.c