Setting up ADXL345 on BTT/Biqu Manta M8P

Disclaimer: This is going to be long and.I will post the walk-through in parts as time becomes available. I’d appreciate if a moderator can lock this topic to prevent others from posting before I conclude.

Intro

Having spent a significant amount of time trying to make an ADXL345 work with a Manta M8p board work, I feel that I could share a how-to, that hopefully will help other people navigate the lack of documentation and responsiveness from BTT.

Making this setup is particularly difficult due to a combination of factors:

  • Poorly documented board: The manual only shows how to install a version of ADXL sold by BTT, which is built with pin labels that are not standard, that is, figuring out the equivalent pin mapping for every other board on the market is at best, confusing.
  • The board has problems with it’s SPI implementation that’s completely ignored by BTT. BTT’s github repo for this board has many people running around like headless chickens (including myself) trying to make this setup work and whilst some people share what worked for them, it’s usually without enough context to allow for others to adapt to their particular scenario. Since BTT completely ignores the issues on their repo, people are left on their own to figure things out, since their support email seems to be a dead letter box.
  • On top of that, there are different versions of the board, which influences how to find workaround SPI issues. Moreover, the drop in replacement for the Pi, the CB1, makes alternative solution not applicable to them, as I believe, a majority of Manta users use it instead. The CB1 pinout is only similar to the Pi only at face value. For whatever insane reason, the pinout labeling for the CB1 is completely different from the Pi, not all of them are connected and for a long time there wasn’t even a mapping available. The CB1 itself has different versions, with pinout changes between them, which just compounds the configuration differences, making it ever more difficult to apply other solutions to one’s particular case. At this point the loony bin starts to become a realistic outcome of this undertaking.
  • I am betting the average printer Joe does not have nearly enough experience with SBC development to figure out the nasty details that comes with working with this board. There are several key concepts that need to be in place to be able to debug with some sort of efficiency. And these are not easy and fast to come by.
  • Whilst klipper documentation is quite good, it’s not enough to account for all the different ways to setup an accelerometer. Which is understandable, as the mileage may vary a lot.

My plan is to address the issues mentioned above to help users of the board navigate towards the solution that works for them as I also cannot give examples of all possible ways to install the ADXL345 chip on this board. But I can, give the base concepts to allow for an adaptive solution and mention issues and common pitfalls that me and others have gone through trying to set this up.

By no means I am an expert on microelectronics and I will say things that may not be completely accurate, but they won’t detract from reaching a solution.

I hope this helps and that people get to keep their hair when they already made the mistake of acquiring this board.

To be continued…