Dealing With Missing Pin Allocations

Blindsided by missing pin allocations? Perhaps you’re working on a piece of hardware and you notice that the documentation is entirely wrong. How can you get your device to work?

[Dani Eichhorn]’s troubles began when running an IoT workshop using a camera module. Prior to the work, no one had through to check if all of the camera modules ordered for the participants were the same. As it turns out, the TTGO T-CAM module had a number of revisions, with some even receiving a temperature/pressure sensor fixed on top of the normal board.

While the boards may have looked the same, their pin allocations were completely different.Changing the pin numbers wouldn’t have been difficult if they were simply numbered differently, but because the configurations were different, errors started to abound: Could not initialize the camera

As it turns out, even the LillyGo engineers – the manufacturers of the board – may have gotten a bit lost while working on the pin allocations, as [Eichhorn] was able to find some of the pins printed right onto the PCB, hidden behind the camera component.

To find information not printed on the board, a little more digging was required. To find the addresses of the devices connected to the I2C bus, running a program to find peripherals listening on the bus did the trick. This was able to print out the addresses of the SSD1306 OLED display driver and the microphone for the board at hand.

To find the pins of peripherals not printed on the PCB or hidden on the silkscreen, a GPIO scanner did the trick. This in particular worked for finding the PIR (passive infrared) motion sensor.

We picked up a few tips and tricks from this endeavor, but also learned that reverse-engineering anything is hard, and that there isn’t any one method for finding pin allocations when the documentation’s missing.

3 thoughts on “Dealing With Missing Pin Allocations

  1. I have to say it’s a weird way to link to the story. Linking on “IoT workshop“ suggests we’ll get more information about the workshop, not about tackling this problem. I’d link from “a little more digging was required”, or almost anything in the last paragraph.
    Thanks for sharing this, though. Good info in the story.

  2. The guy with the swiss accent (Andreas Spiess) did some recent video about camera modules for IoT or something and had trouble with some module. Maybe it was this one? Too lazy too check but maybe somebody remembers…
    An I2C-scanner is a usefull piece of code to have for such problems.

  3. Ahh, the price of cheap components with awful to nil documentation. “Just throw it out there, the community will waste their time figuring it out. That way we can sell more, on other people’s efforts!”

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.