STM32 Performance Slowing down over time

Hello all!

I am running a differential drive robot using an STM32 chip soldered on a customized PCB. The STM controls an array of Infra Red Sensors for line following and 2 DC Motors with encoders.

After around 2-3 hours of operation, the robot starts to have some delays in following the line and stopping. I am seeing a slower processing of the encoders and IR sensors over time which results in a huge delay in sending the commands.

I tried decreasing the speed by 50%, and the robot operated for a longer period of time.
Any idea what might be the problem for this decrease in performance over time?

1 Like

Battery running down.

2 Likes

I am tracking the battery and no problem with the voltage. Any other causes?

1 Like

So once its slowed down, after 2-3 hours running, is it still slow running after you do a complete powerdown and restart ?

Please post technical information that might help us solve your problem.

After restarting the robot it starts driving normally again.

The only thing I tried is after decreasing the speed by 50%, I ran the robot for 40 hours until I stopped it. I had no problem during this 40 hours.

I asked for technical information about your project. I think I'll take the rest of the day off.

Can you please specify what exactly do you need to know? (Hardware, software...)

Please read and follow the instructions in the "How to get the best out of the forum" post, linked at the head of every forum category.

A great way to think about this - imagine that you are presented with this problem in a short forum post. What would you need to know, to solve it?

You might have a code problem.

But you have revealed almost zero details of your project, and not when or how the problems developed, so thats only a guess.

(Hint)

STM makes about 100 STM32's too... which one?

@anon57585045 @srnet @jremington
The robot uses an STM32F103ZCT6 that takes care of:

2 DC Motors being handled by a controller. The STM reads the encoders from the controller which are correct and reliable values as per the testing has shown.

2 IR sensors array (polulu 15 IR Sensor array) of 15 sensors each. The STM read the values of the IR and controls the speed of the motors accordingly to keep the robot following the line. It is using the built in function from the Polulu sensor.

The robot uses the IR Sensors to stop at the right position (i check how many sensors read the line since at the stopping the line is wider). Now in case the sensor messed up, the encoders will detect it since it moved more or less than it should and the bot will be able to move to the right position again.

The issue I am facing is that after a certain time (mostly in 2 hours but its decreasing after more tests) the robot messes up the stopping position (it keeps driving) and the encoders takes time to start recovering. Even after the recovering the sensor doesn't see the line anymore. As if nothing is working.

I tried decreasing the speed by 50% and the issue did not happen anymore for more than 2 days of running the bot. And from the looks of it, it seems like everything is delayed, this is why i suspect that it could be the STM slowing down after a certain time.

How can I debug this? Check memory usage over time for example?

1 Like

So many ways. One is just spotting it in the code. Another, serial debug statements. Is anything on the processor board getting hot? Did you read the guide as suggested in reply #10?

I really dislike guessing, but with no details on circuitry and no software listing; my suspicions are that you are drawing to much output current and "something" is heating up causing the uC to become erratic or simply shutdown.

In my shop, I would bring out the IR thermal camera; but, then again, I tend to do a rather detailed analysis of power parameters during the prototyping stage of designs. You can always use your finger to probe the temperature of the various components :grimacing:

(SERIOUSLY please do not actually use your finger ... you could suffer a severe burn.)

You could try measuring the total current being drawn if you have a decent DVM with a high-current DC section.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.