Open mme384 opened 5 years ago
If I remember correctly, the clock is intentionally slowed down to give the firmware on the HAT enough time to avoid clock stretching and avoid hitting the clock stretching bug.
Thank you for your answer. I.e., I can not increase the I2C baud rate. Any other suggestion how to improve the performance of the stepper motor HAT?
Thanks.
Hi there
How can I get the sense HAT working with increased I2C baud rate?
I started with an inverted pendulum project were I have a RPI 3 B+, a RPI sense HAT and an Adafruit Motor HAT. I stacked the RPI sense HAT on the GPIOs of the RPI 3 B+ and the Adafruit Motor HAT on the GPIOs of the sense HAT (I use an extra tall stacking header from Adafruit). At I2C default baud rate my stepper motors jerk quite significantly. Thus, I set the I2C baud rate to 1000000 to improve the situation. When I increase the I2C baud rate the sense HAT is not detected and I get the error message below. Actually when I power up the RPI the LEDs of the sense HAT stay on. The Adafruit motor HAT works much better than with the default I2C baud rate (even though not perfect yet). OSError: Cannot detect RPi-Sense FB device
I set the baud rate with following line in the /boot/config.txt file: dtparam=i2c_arm_baudrate=1000000
Stacking the sense HAT and the Adafruit Motor HAT works if the default I2C baud rate is set (by uncommenting the above line) and with line below in the boot/config.txt file. So its not a hardware issue. However. I have read in this blog to not use this line. dtoverlay=rpi-sense
Further details:
Adafruit Motor HAT https://www.adafruit.com/product/2348
Stepper Motors https://www.u-buy.ch/en/catalog/product/view/id/1514538/s/stepping-motor-nema-17-stepping-motor-26ncm-36-8oz-in-12v-0-4a-3d-printer-cnc/
Output of command sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- 46 -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- 5c -- -- 5f 60: 60 -- -- -- -- -- -- -- -- -- 6a -- -- -- -- -- 70: 70 -- -- -- -- -- -- --
(I guess 60 & 70 are the motor HAT address. The others are for the sense HAT.)
Output of command uname -a Linux raspberrypi 4.14.62-v7+ #1134 SMP Tue Aug 14 17:10:10 BST 2018 armv7l GNU/Linux
Output of command vcgencmd version Aug 16 2018 17:30:30 Copyright (c) 2012 Broadcom version 31e0613622dc2f2463bf3dd74e6c897d91201a4d (clean) (release)
Output of command sudo dtc -I fs /proc/device-tree