DIT112-V20 / group-06

MIT License
1 stars 6 forks source link

Shake does a long backwards move randomly #25

Closed JenniNord closed 4 years ago

JenniNord commented 4 years ago

Car seems to be moving far backwards randomly.

JenniNord commented 4 years ago

Seems to be a battery issue.

platisd commented 4 years ago

Seems to be a battery issue.

Care to elaborate?

JenniNord commented 4 years ago

Seems to be a battery issue.

Care to elaborate?

@platisd The car behaves strangly when it's not plugged in on usb (running on the batteries). It shoots backwards "randomly" when performing either dance move Shake or Shuffle. With randomly I mean that the behavior doesn't seem to be consistent. Sometimes it's after the first loop, sometimes after a couple of loops... We have videos displaying the behavior.

Since it never happens when the car is plugged in, we assumed it had to do with low battery power but after charging them it still has the same behavior.

Any ideas? :)

platisd commented 4 years ago

During the last lecture I mentioned of a known problem, i.e. that when the car suddenly changes direction, the motors may pull too much current not leaving enough for the microcontroller. This causes the microcontroller to either behave strangely or reboot (which depending on how you've programmed it may show up as "strange behavior". Could this be the issue? If you send me a link to the move that causes this I will be able to tell.

JenniNord commented 4 years ago

It sounds like that is the problem since both of the moves we are having problems with changes direction (forwards/backwards) a lot... We will discuss this in our next team meeting and possibly rethink those moves! Thanks for the fast reply! :)

platisd commented 4 years ago

There are two ways to fix this easily. If a sudden change of direction is detected (especially if the car is moving at a "large" speed)

  1. Then stop the car, insert a small delay and then move it towards the opposite direction.
  2. Stop the car and gradually increase the speed

The easiest (and probably the best in most cases) is the former option.