[HOWTO] 40-pin GPIO & ADLX345 on CB1 #47
Replies: 9 comments 8 replies
-
Work very well with my M8P with CB1. Thanks for the afford. |
Beta Was this translation helpful? Give feedback.
-
hi guys, thanks for the great infos! planning to use a blue adxl like this one with a manta m4p+cb1.I have one question: this shows a diagram to the Pi compute module. Does anyone knows where to find a diagram to wire the ADXL on the Manta GPIO please? sorry noob here ^^. |
Beta Was this translation helpful? Give feedback.
-
Hey, thanks for all the info! Does anyone know if any of the CB1's GPIO pins are PWM? I'd like to control a fan and some LEDs using mosfets triggered by GPIO pins. |
Beta Was this translation helpful? Give feedback.
-
hello; First, forgive Google for the translation and second, thanks for what you published. It worked for me the first time. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
No, it's connected via SPI port it has via flat cable connector in the back
of the board. Judging by the gpioinfo output, it is routing through CB1
GPIO pins.
It is on SPI1 bus, which is all the the CB1 provides. To connect through
it, I must use the overlay otherwise the screen doesn't work.
I don't know where SPI0 are for the stepper drivers and SPI2 is the MCU
only available SPI port. This SPI2 port doesn't work and I am not sure why.
The MCU simply won't boot. My assumption is that the board itself is bugged.
…On Tue, 13 Jun 2023, 19:51 freakyDude, ***@***.***> wrote:
Thanks
Maybe the tft with overlay anyway .. What I was trying to say was, you
don't need to configure a overlay for the adxl as you tried in your posted
example config above
You may need the overlay for you tft.. But also in this case, isn't it
connected to the exp pins from the manta instead of the gpio?
—
Reply to this email directly, view it on GitHub
<#47 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI7TXYQSWGTH65NKX7ANXTTXLCSDRANCNFSM6AAAAAAQ6FDKOU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Googling and thanks to this post, I was able to activate the two adxl in my mantae3ez, one for the spi and the other for the mcu. in case it is useful to someone [mcu adxl] [adxl345 hotend] [adxl345 bed] [resonance_tester] boardenv.txt overlays=spi-spidev SPI1_CLK=PH6 |
Beta Was this translation helpful? Give feedback.
-
Will this work on a BTT Pi V1.2 with TFT35 SPI LCD? |
Beta Was this translation helpful? Give feedback.
-
For those still struggling with manta, forget it. SPI doesn't work. The only way I made it work was through CB1. Before I could post the solution, I burned my board and lost my cfg file. But I eventually found this article, which takes a very similar approach: https://www.3docity.com.au/blogs/3dprinting/adxl345-and-bigtreetech-cb1-input-shaper-setup |
Beta Was this translation helpful? Give feedback.
-
Hello,
I started this new thread in order to regroup all the info and made them are easier to source.
40-pin connector / GPIO
As somebody already discovered, the CB1 uses a custom IO pinout for the 40-pin connector. All the IO "naming" that works on standard Raspberry doesn't work on CB1. I discovered a way to get some working IO pins.
Here it's the pinout (from the official Manta M4P user manual)
You have to take the name after the underscore for the PIN you need. Then use this table https://wiki.pine64.org/wiki/SOPine_GPIO_Alternate_Functions_Table to get the
GPIO<number>
.I tried with some "PC" pins and it seems to work.
Example: pin n.15 ->
GPIO22_PC10
->PC10
->GPIO74
If you are having some troubles getting GPIO working under Moonraker, check this issue: #44
ADXL345
stas2z already provided the instructions (#9 (comment)). I did a new more comprehensible wiring scheme.
It works also with official BTT images (I tried with latest v2.2.0 release). If you flash the "Klipper" image all the required libraries, NumPy and the linux MCU host are already installed. If you are using the "minimal" image you have to install them by following the Klipper documentation: https://www.klipper3d.org/Measuring_Resonances.html
Since the
raspi-config
command is not available, I added the following entries in my/boot/BoardEnv.txt
to enable SPI:Here's my current
adxl345.cfg
file (that you can #include in yourprinter.cfg
or paste the content directly in that):Beta Was this translation helpful? Give feedback.
All reactions