spirit rover ... goes backwards.

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
dirtysocks
Posts: 3
Joined: Sun Oct 22, 2017 3:57 am

spirit rover ... goes backwards.

Postby dirtysocks » Sun Oct 22, 2017 4:02 am

Finished putting the rover together. Demo mode works great! But in roving/light seeking mode it goes backwards. How do I fix this? What went wrong?

Bastian
Posts: 21
Joined: Sun Oct 22, 2017 5:30 pm

Re: spirit rover ... goes backwards.

Postby Bastian » Sun Oct 22, 2017 7:05 pm

First thought: check the jumpers under the left wing. If you, by accident, switched the polarity, the motors will work reversed.

User avatar
TomTheWhittler
Posts: 29
Joined: Wed Sep 13, 2017 5:04 am

Re: spirit rover ... goes backwards.

Postby TomTheWhittler » Sun Oct 22, 2017 7:35 pm

If the your Spirit Rover demo performs like it does in the youtube video
https://www.youtube.com/watch?v=JnGBNoFt7Ok

Then I would say the robot it wired correctly.
What I did find out is that it will go into confused mode in light seeking mode continually backing up if the surface you have the Rover on is speckled in any way. I was demoing mine to some friends on my dark brown speckled quartz counter top. It kept thinking the speckles were the edge of the surface and kept backing up.
Research is the only place in a company where you can continually have failures and still keep your job.
I knew immediately that was where I belonged.

Bastian
Posts: 21
Joined: Sun Oct 22, 2017 5:30 pm

Re: spirit rover ... goes backwards.

Postby Bastian » Sun Oct 22, 2017 9:51 pm

Agree.

In my case such behaviour already occured in mode 2 at a tiled floor. Seems like the ir-line-followers are rather sensitive.
(The youTube mentions it as well: preferably a solid white surface.)

- Does the Spirit really run backwards (a couple of cm and more) or is it just a sort of shaking to the back?
- Comment out the bottom sensors in the demo script and re-upload the sketch; does it show the same behaviour?

dirtysocks
Posts: 3
Joined: Sun Oct 22, 2017 3:57 am

Re: spirit rover ... goes backwards.

Postby dirtysocks » Mon Oct 23, 2017 2:05 am

connections were checked and fine : red to +ve / black to -ve (the wires matched the instructions); it didn't shake itself backwards, it drove backwards : "light seeking mode" became "run away from light" mode. It backed up when put on mono-colour foam board. We did get it to go forward by changing the signs in the motor calls in the preloaded demo. Still curious as to why.

Bastian
Posts: 21
Joined: Sun Oct 22, 2017 5:30 pm

Re: spirit rover ... goes backwards.

Postby Bastian » Mon Oct 23, 2017 8:45 am

Pff …. :?

line 258ao makes the bot turn towards the highest value revieved, but it should always move forward:
lightSeekMotorSpeed (=90) +/- lightSeekTurnStrength (=50).

Since this is producing a reversed action, I can think of some possible causes:
- Reversed polarity. Most likely, but you ruled that out.
- Software bug
- Hardware bug

The software is based on the Ringo, so I think bugs will most likely not exist anymore.
(I didn.t check the register calls in comms.ino, line 313ao though.)

To close it a bit down to either motors or ambient sensors, you might run 2 little tests with the base sketch:

Checking motor control by something like this:
motors(90,90); delay (300); DriveArc(180, 150, 0, 1000, 250); Delay(300);
(Move forward, turn +/- 180 degrees to the right, move forward, and so on)

If the bot moves backwards and there’s no inverted polarity, in my case I think could live with the fact that the motors need inversed commands.
If the bot turns to the left, I suspect the motors are probably switched while mounting somehow or they suffer from the same phenomena.

Checking the ambient sensors with a loop somewhat like this:
PIC_ReadAllAmbientSensors(); Serial.print (ambLeft); Serial.println(ambRight);delay(500);
While using a flashlight on the sensors, the values produced can be read in the serial monitor of the ide.
Like with the motors, if the values or directions are reversed, I think in my case dealed with coding inversed commands. :oops:

Kevin
Posts: 179
Joined: Tue Jul 28, 2015 12:56 am

Re: spirit rover ... goes backwards.

Postby Kevin » Mon Oct 30, 2017 5:12 pm

This is strange. Normally when we have one of our Wink/Ringo robots drive backward, it's because the polarity is reversed, or the motors are reversed.

Is it possible the connector you think is going to the left motor is actually going to the right motor? It's easy to get those wires mixed up when connecting them. Having left/right swapped would cause this problem.

-Kevin

dirtysocks
Posts: 3
Joined: Sun Oct 22, 2017 3:57 am

Re: spirit rover ... goes backwards.

Postby dirtysocks » Sun Nov 05, 2017 4:03 am

I think the left & right motor cables must be switched: the polarity matches the pictures, so that seems the logical explanation.
To get the correct behaviour we have to switch left-right and forward back in the motor controls.
Thanks to Bastion for suggestions: they really helped figure out what was wrong.


Who is online

Users browsing this forum: No registered users and 2 guests