I am part of the Purdue University ROV team and we are using T200 thrusters this year on our ROV. We are trying to control the thrusters with a 3.3V stm32f4 microcontroller with a I2C level shifter from spark fun https://www.sparkfun.com/products/12009. For some reason I have not been able to get it working. I am able to test that the motors work by changing the speed with an arduino.
The oddest thing is that I can read the read bytes from the motor, while still not able to set the speed. Any suggestions or knowledge into this issue would be much appreciated.
I am using an stm32f4 specific library, which is why some of the commands might look strange, but the master transmit has been tested and I know it works with all of the 3.3V sensors I have. temp is the packet of data that i2c will send.
Also, I took pictures of the arduino and the stm chip both sending and i2c command to set the thrusters to speed 7000. The main difference is the clock line, where the arduino has some spacing after each byte while the stm chip does not. I think that spacing is important but I am not sure if it actually is important and how to get it to happen with the stm chip.
Attached are the two pictures I took from my logic analyzer.
I want to control the Thruster T100 with a Nucleo STM32 F411 RE via I2C. I spend much time in it and tried much ways, but the ESC dont sent a ack back. With a Arduino Due the Thruster works well. I use a homemade 3,3V to 5V I2C-Adapter.
Is there any solution until now?
@Ryan McBee Do your Thruster work with the STM32 F4 meanwhile?
I have not found a solution yet. From what I have tested I believe the issue is with the stm32 chips. I believe that they are unable to account for the clock stretching that the thrusters require. Here is a link to more information on clock stretching Clock Stretching – I2C Bus. I think the issue with the clock stretching is inherit to chip. I tested my logic level shifter with a 3.3 V tensy lc and the clock stretching went across the line fine. That is as far as I have discovered. I am busy for the next few months and will probably not have any more time to explore how to fix this.