2022-11-23 05:50 AM
Good day.
So I am busy with my final year project, where the goal is to control the speed of a DC motor by reading the armature voltage and current, and then estimating the speed of the motor. I am using the STMCubeMonitor to provide a reference speed, and then the estimated speed is plotted vs the reference speed in the Cube Monitor. I have 1 USB port available on my laptop, therefore I tried using a USB Hub to connect my external mouse and the STM32. When I have this configuration, as soon as a reference speed is entered, the motor does as expected and increases the PWM to reach the desired speed by varyng the voltage, but then the STM disconnects and the monitor stops. I then tried unplugging my mouse, and pluging the STM32 straight into the laptop's USB port. The STM then does not disconnect anymore, but as soon as I set a reference speed, my trackpad stops working and jumps around like crazy and therefore can't enter another reference speed. I have read some issues people are having and someone mentioned that I need to set some parameters for the STlink to work and that the STM still receives enough power to run. I have had the exact same setup yesterday, and everything was working as expected so I would really appreciate if anyone could help me with any possible solutions. More information about the project can be provided if needed.
Solved! Go to Solution.
2022-12-15 09:03 AM
Hello
It seems that there is something weird around USB. It looks strange, may be there could be some ground loop between the PC and other equipment ?
Are you using an external power supply for the motor or do you have connection with other equipment ?
If yes, and if you have a laptop, you can try to disconnect the PC power supply and run on batteries. (disconnect also network cable, external HDD, anything linked to outside world.)
And are you using a hub with power supply or is it power by the pc ?
Best regards
Stephane
2022-12-15 09:03 AM
Hello
It seems that there is something weird around USB. It looks strange, may be there could be some ground loop between the PC and other equipment ?
Are you using an external power supply for the motor or do you have connection with other equipment ?
If yes, and if you have a laptop, you can try to disconnect the PC power supply and run on batteries. (disconnect also network cable, external HDD, anything linked to outside world.)
And are you using a hub with power supply or is it power by the pc ?
Best regards
Stephane
2023-09-27 08:42 AM
Closing the ticket, no update since a while