Product is H-Bridge STM32F010, found at:
https://shop.m5stack.com/products/h-bridge-unitstm32f030
#hbridge #v1.0
Version is V1.0
Hi,
I have been writing to this device on the default Address 0x20. It doesn't seem to respond to 8-bit commands consistently. It seems to drop some of them in a pattern. It responds to commands commanding the bridge forward very well. But it doesn't respond reliably to commands when the bridge is driven in the reverse direction.
For example, when I change the bridge direction, it often automatically changes the duty cycle to a lower duty cycle.
I've been verifying this by using a scope, a multimeter, and observing the voltages across a 1 Ohm test resistor. I supply between 3 and 10 Volts with a bench supply and verify the current with the multimeter inline. So I am confident of the current matches the supply. And on the scope, the duty cycle of the signal tracks the current well. It's just that the duty cycle changes when I change the direction of the bridge to reverse. And whlie in reverse direction, it doesn't pickup the new PWM values. It recovers to normal when I switch back to forward bridge direction.
I am driving this from the Tulip Creative computer. It's a newer device, but I have reliably used the M5_8Encoder with this device. It works almost perfectly, only a stray I2C error one in a few hours. There is one additional device on this I2C bus, I believe the stylus interface. I'm not sure if it's interfering! I'll have to ask the creators or look in the docs. Anyway, if you have any more suggestions or info, please let me know. I have been using the documentation at https://static-cdn.m5stack.com/resource/docs/products/unit/Hbridge Unit/arduinoCase-168057629657611.png
Can you please let me know if that is up to date? And what is the MSB and LSB when making 16-bit reads and writes? Is 8-bit known to be working and is 16-bit? so far I have only tried 8-bit registers.
Also, the current measurement seems to not track the current well on the scope and multimeter. I do see changes here and there, but only a few bits when the current changes from about 0 to 3 Amps.
I will attach the python code I'm running and maybe you can tell me if something sticks out as incorrect, please? I would appreciate it. Thank you very much!