-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Extra IO - PCA9685 - i2c address range is too limited so I cannot reach my LU9685 board #5216
Comments
Added a fix: #5217 I extended the range to include If we really need such a long list, maybe we should just add a numerical input there instead of a large selection list. P.S. |
Dear TD-er, its 0x80 (or 128) for the board I use, its an LU9685 board, looks just like the PCA9685 they are all over aliexpress and usually on black PCB. I have tested that in a number of scripts. But the i2c test on EASPeasy doesnt detect it (it works though : it detects my SHT41 on 0x44). Does that test go to 0x80 or does it also stop at 0x7F ? Not sure what maximum is good for the config of the i2c address in ESPEASY, but obviously 0x80 would offer me 1 board so 16 servos, it would work just fine but as it often goes : more is better. Greetings from Belgium ! |
The test does stop at 127 as far as I remember. That's something that will take a bit longer to look into. |
No idea if this will work, or even successfully build. |
Hm, maybe this board requires 10-bit addressing? But that's not supported yet. |
I did some searching, but could not find any datasheet on this chip. Like I mentioned before some datasheets refer to the I2C address including the read/write direction bit. Can you pull A0...A4 to GND and see if it shows up on address 0x3E (dec. 62)? |
AFAICS, these |
So when I run a test on i2c discovery indeed the module responds to 0x10 (16) as well as 0x90 (144) when I bridge A4 and when I also bridge A3 it responds to 0x18 (24) and 0x98 (152). With or without the bridging it also keeps responding to 0x00 and 0x80 all call address. |
So I will revert the changes to have it to scan for addresses > 127 as that simply cannot/shouldn't work. I can extend the range. But maybe it is then better to have just a numeric field as having a combobox with 64 values is not really a good solution from an UX point of view. I will also search for what is special about address 0 as that's explicitly not included in the I2C scanner and I don't know why. |
Found this overview on Adafruit site about devices per I2C address. |
That 0x3E is indeed the 'left-shifted' address, used by some manufacturers. |
Yep, I don't think we will ever support 10-bit addressing for I2C, as I don't recall to ever have seen a chip supporting 10 bit and not 7/8 bit addressing. |
Had a quick look at the datasheet of the PCA9685, but, despite the somewhat similar type name, I can find no similarities to the command list shown above. That's probably the reason there is no overlap in the I2C addresses, as this is no in-place replacement for the PCA9685. There is no reasonable possibility that ESPEasy plugin P022 Extra IO - PCA9685 will work with this LU9685, that chip/board will require its own plugin. (No plans to support this, for now.) Found only a few, non-exhaustive, code examples for this chip, one simple Arduino example that uses serial communication, and this example seems to be usable for a single purpose only. |
I also had a look at the very very limited number of code examples on GitHub. However the implementation of the calls to set the servo outputs is extremely simple. |
Fixes: letscontrolit#5216 Command example: ``` lu9685servo,<pin>,<angle> ``` To disable pin, set angle to `-1`
OK, I think you can guess what the outcome is of the discussion Ton and I had... See: #5218 Can you try this GH Actions build? Currently there is only a single command implemented:
To disable a pin, you can give When
The plugin is included in "Climate" and "Collection G" builds and of course the "MAX" builds. |
Describe the bug
When I select a new device "Extra IO - PCA9685" (16 port PWM breakout - servos control), the dropdown allows selection of the i2c address from 0x40 to 0x7E. That covers the adafruit/PCA9685 chip but omits the higher range used by the very similar LU9685 chips (very cheap on ali, default address is 0x80 and above). Could you please increase the range in the drop-down by 1 more bit ?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the max to be 0xFF
Screenshots
Used platform (please complete the following information):
Platform Specifics (when applicable, please complete the following information):
Additional context
I have been using ESPeasy for over 10y now. Love it !! Thank you very much.
The text was updated successfully, but these errors were encountered: