StarterOrion has split personality


#1

Just put together Starter Orion Tank. When in default program mode all is well. When in mblock program mode like move forward one side of tank tread goes forward and the other side goes backwards making it go around in a circle. If I give the tread that goes backwards a -minus number it goes forward, this is not how it should work. How can I fix this?


#2

Well, it actually makes perfect sense. :slight_smile:

The motors are mounted in an opposing configuration, but they are the essentially the same motor so if you set the power to 100 then the motor will spin clockwise at a rate of 100 regardless of the orientation of the motor. So if you have both motors in an opposing configuration (one on each side of the robot), then giving both motors a power of 100 will cause the turning behavior you are seeing. As you discovered, you need to make one of the motors turn in the opposite direction by negating the number (in this case, -100). The motors themselves have no way to know what their configuration is so the developer must take responsibility for that behavior.

The other main boards (mCore, Auriga, MegaPi) have a helper function called run that essentially does the same thing under the covers but the Orion is an older board that never got that block. it’s easy enough to implement (see below) although you may have to do some fiddling depending on which motor is designated as M1 and M2.


#3

Thanks, Chuck.

I should have thought of that, it does make sense.

I am going to take the lazy mans way out and reverse the black and white leads on the motor that run backwards. Then I can give both motors a + number for forward and a - number to go backwards. I just won’t use the default program anymore. But I will save your program sketch for later.

ANOTHER QUESTION
Is it necessary to unplug the 6 cell battery pack when uploading a program to the Orion board. I do it because the 9v battery pack is higher than the 5v on the usb connection. I do it to protect my 27 inch iMac’s usb circuit. Am I being overly cautious.


#4

You are probably wise to err on the side of caution. However, I think (coff coff) that there may be overload protection on the board. @tech_support, is that case?


#5

Hi SVrobot and Chuck,
Thank you for all of your support.
As Chuck said, motors are “mirror installation”, so speed should be opposite. And we’ll do some test to know which one is M1 and M2.
The second question, it is ok without taking out 6 batteries when upload program to starter, please don’t worry, no damage will be caused.


#6

Thanks for the reply’s so far, but one more question on the topic of electrical powering the Orion board while uploading a program.

My most recent project I found required steady power meaning a wall - 12 volt transformer power rather than the 6 battery, battery pack. Is it still OK to upload a program while the 12volt transformer is plugged into the Orion board. I am using a 27 inch iMac and don’t want to do any damage to the mother board. So far I have been uploading while the 12v is disconnected but its only a matter of time before I forget to unplug the 12v before uploading, so that is why I’m asking.


#7

It is ok to upload a program while 12 volts transformer is plugged in.
Orion supports 6-12 volts. The higher voltage it is, the higher speed it can get when set in same speed value.


#8

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