Simple motor controller 24v12 noise?

Hi folks,

I have a problem with a 24v12 motor driver.
The motor almost instantly stops when SMC gets a command to move.
Red LED is then on and it wants a safe start command.
The motor is running fine in the opposite direction.
I can move the motor in the problem direction (very low % power), but if I go above ca. 20% it stops.
SMC software says “Serial error” and “noise” (both with a “no” in front). No other errors are shown.
What does that “noise” at serial ports mean? The manual has nothing about this…
The serial signals looks nice and clean (38400 baud, 3.3V levels) on the scope, I use binary commands.
That problem even occurs if I try to run the motor with the SMC software via USB!

I am tinkering around with that beast for two days now…hope somebody has an idea.

Power is a 24V bench supply with more than enough power. Error line is already disabled, and no kill switches are configured.

Kind regards,
Wolferl

Hi folks,

In addition to the above I did a trace of the binary serial data (Pololu protocol):

AA 0D 21 00	status?
-> 00 00		ok
AA 0D 05 00 50	motor 80%
AA 0D 21 0C	read AN1
-> 3C 0B
AA 0D 21 00	status?
-> 00 00		ok
AA 0D 05 00 63	motor 99%
AA 0D 21 0C	read AN1
-> 45 0B		motor moves a bit
AA 0D 21 00	status?
-> 01 00		ERROR: "safe start violation"
AA 0D 05 00 00	motor stop
AA 0D 21 0C
-> 44 0B

There is a potentiometer attached to the drive (via gear), connected to AN1. So we can see that the motor did a short “jump”, which is also audible.
I also monitored the RESET line with a logic analyzer, there are no spikes or impulses there.

Regards,
Wolferl

Hello, Wolferl.

Could you try swapping the motor leads to see if the problem follows the direction of the motor? Additionally, could you try disconnecting the motor to get a sense of whether it could be a problem with the SMC or the motor.

What device are you using to send the serial commands to the SMC? You might try lowering the baud rate to see if that helps.

-Brandon

Hi Brandon,

Swapping the motor wires is not easily possibly (cable harness), but I can completely unplug the motor, so I tried that.
The effect is the same! It shuts off immediately in one direction (red LED on).
In contrary to my original post I was driving the SMC with 115200 baud. I now tried 38400 baud (working, but same effect) and lower baudrates too.
I found it interesting that the SMC board does not work with baud rates of 19200 or lower (I am using the auto-baud feature of the SMC)…is that normal?
The SMC is controlled by a FlyPortPRO module (http://wiki.openpicus.com/index.php/FLYPORTPRO).
The FlyPort works with 3.3V and it has 4 serial ports, one of them is exclusively for communicating with the SMC.
Both modules are sitting on a backplane PCB with ground plane.

Kind regards,
Wolferl

The automatic baud rate detection should work at lower rates than 19200. I suggest simplifying the system as much as possible. Could you try removing your FlyPortPRO module from the setup and controlling the SMC over USB with the “Manually set speed” slider in the “Status” tab of the Simple Motor Control Center (with the motor disconnected)? If you still get an error, could you post a screen shot of the “Status” tab?

-Brandon

Hi Brandon,

[quote=“BrandonM”]The automatic baud rate detection should work at lower rates than 19200.
[/quote]

Hm…that’s interesting. I’ll have to investigate that further…

[quote=“BrandonM”]Could you try removing your FlyPortPRO module from the setup and controlling the SMC over USB with the “Manually set speed” slider in the “Status” tab of the Simple Motor Control Center (with the motor disconnected)? If you still get an error, could you post a screen shot of the “Status” tab?
[/quote]

I tried that, and that works properly. So to me it seems it has to do with something the FlyPort sends to the SMC.
So, can you specify what the serial error “noise” exactly means?

I appended some screenshots where you see the configuration of the SMC as requested.
See next post to see the error (forum allows nly 3 attachments).

Kind regards,
Wolferl






ok, here are the screenshot before and after moving the motor, showing the error condition.




I was able to solve the problem with slower baud rates. After sending a command string I was not waiting long enough for the answer bytes…my bad :frowning:

Communication with SMC is now ok with 9600 baud too. But the motor move problem still exists.
Here is another screenshot after SMC has stopped the motor and the red LED went on (see red rectangle).


Thank you for the screenshots and extra information.

The serial noise error corresponds to the noise error bit reported by the STM32’s UART. You can find more information about this in the “Receiver” section (27.3.3) of the “RM0008 Reference Manual”

Since it works when you remove your FlyPortPRO module, I agree that it seems to be a problem with something that the FlyPort is sending to the SMC. I am glad you were able to get it working at a lower baud rate by catching that mistake. Do you have an oscilloscope available? If you do, could you use it to look at the serial line from the FlyPort to the SMC? Since it works in one direction and not the other it might be related to the specific bytes that are being sent, so if you do not have an oscilloscope, you might try using the compact or ASCII protocol to see if it behaves the same.

-Brandon

Hi Brandon,

Thanks for the document…it gave me the idea of hooking up my logic analyzer and triggering it when the ERR line goes high. At the moment when the output PWM started there was lots of noise in the system which disturbs the SMC’s UART. This was visible on the analyzer.
The cause were two 100nF capactors from both motor outputs to GND. I removed both caps and now the system is working fine. Case closed :slight_smile:

Thanks for your help!

Kind regards,
Wolferl

I am glad you were able to figure out what was causing the problem and get it working. Thank you for letting us know.

Good luck with your project!

-Brandon