Robustness and Validation - nolanhergert/HeadlightBlocker GitHub Wiki

image

Point light sources from camera should roughly line up with what is perceived on LEDs, and vice versa. If they are consistently inconsistent (EMI or camera broken or something), then show an error on LCD somehow.

The timing of sending information to the lcd controller is very important in one particular situation...when in "sunglasses" mode. Which seems fairly likely actually. It might be worth delaying camera until after LCD update, interesting...

Production firmware

  • I2C to camera works to read register with known value, else panic. DONE!
  • LCD loopback? Keep shifter going. Costs some pins, but maybe can double up on camera pins if high z
  • Camera returns known complicated test image to confirm data interface and lilos/interrupt robustness and jitter while LCD interrupts are running full tilt. PN9 is a pseudorandom one that looks good, although it is complicated.
  • Secondary light sensor using phototransistor. There were some reasons from Google AI somewhere here....

Algorithm

Gracefully downgrade if LCD is too dark? Else panic.

Certifications?

While I might not technically be subject to ISO 26262, it'd be good to read and abide by.

As far as getting people to trust the product, maybe Underwriters Labs? I think the biggest vote of confidence is a recommendation from a friend though.

STM32 Notes

Pretty good app note, AN4435. https://www.st.com/resource/en/application_note/an4435-guidelines-for-obtaining-ulcsaiec-607301603351-class-b-certification-in-any-stm32-application-stmicroelectronics.pdf

  • Mostly contains code for self-testing the chip functionality at manufacturing time and occasionally at runtime.
  • Doesn't contain much advice on, say, watchdog timer proper usage, like Jack Ganssle's article: https://www.ganssle.com/watchdogs.htm

Manufacturing tests

Point is not really to "PASS" an item, but rather to quickly expose and root cause manufacturing issues so you can increase your yields. Great video: https://youtu.be/bXa4KaSH4tk?si=gAbagMobs7vGB2QM

* It used to be that you'd have to get someone in Shenzhen to machine you a test jig for your board and use one of those board bearing press things to test your board. You can just buy linear bearings!
* It used to be that you'd have to get the SZ folks to get pogo pins for you to design with. You can just design with them now!
* I thought that only big kids could serialize boards individually / have a production tracking system. Nah, you can do that too.
* Speaking of serializing boards, I thought that only big kids used part numbers and revision numbers. Nah, your stuff looks more pro if you do it, and it's also useful. Takes no time.
* Custom wire harnesses! You can do them! For like $2.50 each, in even qty <1000, and like $5 each in qty <50!

Expensive tests

  • Thermal cycling
  • IP water resistance, to some extent