This yr’s Hackaday Supercon, the primary since 2019 because of the pandemic, used to be an overly identical affair to these of the previous. Nearly each hardware-orientated hacker match has its personal customized digital badge, and Supercon used to be no other. This yr’s badge is a simulation platform for a hypothetical 4-bit CPU created via our personal [Voja Antonic], and introduced an actual problem for probably the most attendees who had by no means touched system code all through their youth. The problem set used to be to get a hold of probably the most attention-grabbing hack for the badge, so collaborators [Ben Hencke] and [Zach Fredin] set about nailing the ‘expandr’ class of the contest with their optical punched card reader bolt-on.
Peripheral connectivity is relatively restricted. The theory used to be to construct a bolt-on board with its personal native processing — the usage of a PixelBlaze board [Ben] introduced alongside — to care for the entire scanning main points. Then, as soon as this system at the card used to be learn, unload the entire thing over to the badge CPU by the use of its serial interface. With out get entry to to their same old amenities again house, [Ben] and [Zach] clearly needed to improvise with no matter that they had with them, and no matter may well be scrounged off different badges or different {hardware} mendacity round.
One large factor used to be that most of the people don’t most often lift photodiodes with them, however thankfully they remembered that an LED can be utilized as a photodiode when reverse-biased correctly. Feeding the sign advanced over a one Meg resistance, right into a transconductance amplifier courtesy of a donated LM358 there used to be sufficient variation for the STM32 ADC to reliably come across the adaptation between unfilled and stuffed check-boxes at the filled-in program playing cards.
The CPU required 12-bit opcodes, which clearly implies 12 photodiodes and 12 LEDs to learn every phrase. The PixelBlaze board does now not have this many analog inputs. A easy trick used to be as a substitute of getting discrete inputs, all 12 photodiodes have been stressed in parallel and fed right into a unmarried enter amplifier. To tell apart the other bits, the illumination LEDs as a substitute have been charlieplexed, thus handing over the person bits as a series of values into the ADC, for next de-serialising. The demonstration video displays that it really works, with a program loaded from a card and kicked into operation manually. Such a laugh!
Punch playing cards most often have a hollow thru them and may also be learn robotically, and are an effective way to configure testers like this attention-grabbing vacuum valve tester we lined a twinkling of an eye again.