The entry from last week had the class completing a transition. We had to remove the servo motors from the maze project and install brush motors. Upon completion of that, we then were assigned to program the platform to drive the pattern of our initials on the floor.
This was a simple program to write. Initially a diagram of the letters was needed. Seeing as two of my initials are the same (JJM), all I needed was two diagrams listing all the steps. These diagrams are shown below.
The programming was very similar to the maze assignment. Most of the program was written in subroutines. The difference was in how these subroutines were written. The following is an example of the forward full speed subroutine: fwdfll: pwmout mol, 99, 400
pwmout mor, 99, 400
return
In the last assignment the motors were identified using "servopos." This time, that command was replaced by "pwmout." The 400 at the end is full power to the motor in this program. After each subroutine a pause command was added with a time ("pause 2000"). This was how the program was written. Each step was either a straight command or a turn command. Each was written as a subroutine, then placed in the program in the proper order, and assigned a time limit to accomplish the goal.
I had the program completed and was ready to test it out, but I had a major problem. On Sunday afternoon, while I was putting the robot away, I forgot to unplug the battery pack. It caught fire and comlpletely melted. The pictures below show the results of this fire. The first is the remains of the battery pack and the second is the damage the fire did to the wiring.
Thankfully, the fire did not damage anything on the board itself. Only the wires pictured above incurred damage. The wires were easily fixed by cutting and resoldering them together with new pieces. The results are visible below. The blue sleeves are where the wires were rejoined.
If you look closely at the picture below, there is a blue housing where the black and red power cable attaches to the platform. This is why the battery pack overheated and melted down. Where the wires are attached the ends there were very short, but loose wires hanging free. These crossed over and touched. This shorted the battery pack out. The reason for the frays is because of how the cable was created. It was a thick bundle of wire that did not fit into the housing correctly. We had to trim away excess strands until the core of the strands would fit in. What remained were these very short frays. They would not have been a problem except if the cable were jostled around. As the cable moved around, the wires would pull out slightly. After so long, the wires would pull out to far and the strands could touch. This problem was fixed by the professor. He had smaller cables that he gave out to the class. These smaller cables slid directly into the housing and attached snuggly. Important rule of thumb: ALWAYS UNPLUG THE BATTERY PACK WHEN DONE USING!
As a final note, when all repairs were completed. The program was finally reloaded into the platform, and the robot was successful in writing my initials.
No comments:
Post a Comment