Meetings
Dec 10
Members present: Kendrick, Dat, Usama, Steven
Today we began the final assembly of the mechanism in combination with the Arduino. Much of the time was spent calibrating the flex sensors (each one had a different range) to the position of the servo motors. We did, however, finish calibration and were able to record a few videos of the control glove and robotic hand working in tandem, if only for a few runs.
Dec 9
Members present: Usama, Dat, Kendrick, Steven
While Usama continued working on the Arduino code, Kendrick, Steven, and Dat continued physical assembly of the physical arm and fingers. Assembling the mechanism became very tedious and difficult due to the all of the small pieces of hardware required to fasten each of the parts together. A few parts also broke during both transportation and assembly. These two major issues, the strength of the parts and the amount of hardware required for assembly, are important considerations to note for the second prototype, which this project requires groups to think about, but does not require groups to pursue (since the semester is quickly coming to a close).
The rest of the week will be dedicated to finishing the assembly, evaluate the first prototype, and prepare for the presentation on Friday.
Usama:
Time spent: 12 - 14 hrs.
This week consisted of the largest amount of code development thus far. Having isolated many of the initial issues with the RF circuitry, it was time to begin coding for the final system. This involved the development of two separate codes, one for the transmitting arduino and the other for the receiving arduino.
Having learned from the previous week, I began by compiling code to effectively transmit data to power the movement of a single finger, i.e. a single servo motor. This approach allowed me to initially isolate and debug any and all transmitter / receiver issues. Once I had done this, I moved towards moving more than one finger, finding new obstacles along the way. It turned out that the process was far more challenging than I had initially expected.
For the transmitter, I began by performing an analogread and then converting the integers into a character array. I then transmitted this array to the receiver and decoded it there. I maintained serial prints on both sides of the system to monitor how the data was being sent and received, and whether or not the initial and final values were consistent with one another.
The system was relatively simple to code for one analog input and one output, given that the data needed only to be converted directly. I used the iota function to turn the integers into an array, and then on the other hand mapped that array into a corresponding integer array using the atoi function. This data then was directly output to the servo as a servo write where the data was mapped based on the pulse width modulation of the servo motor.
Because I did not have access to a fully assembled hand initially, I used a flex sensor and a potentiometer for the analog inputs on the transmitter end and a servo motor and an LED light to monitor the receiving end outputs. The LED light was programmed to turn on if the potentiometer exceeded a value of 510, thus allowing me to monitor the precision of the transmitter and receiver.
At this point, I reached a roadblock in the code. After exploring several methods, I used the Arduino Cookbook resource to find the best way to combine the two analog reads into one array. Using the string concatenate function, I was able to map multiple integer values into the same string array. I transmitted this array but I ran into issues on the other side when I tried to decompose the array into multiple integer values.
This issue plagued me for the better part of four hours, wherein I tried several ways to decompose the received array. I looked into pulling the strings apart based on a delimiter character and did not have success in this direction. Given a lack of basic knowledge in terms of computing function and coding basics, I found myself particularly stranded by the differences in how integers, characters, and bytes are processed and also by the differences in pointers and arrays, and how they interact with one another.
Ultimately, I reached out to Professor Sullivan for some insight, and with his assistance, devised a separate way of approaching the problem. I continued to combine the values into one array on the transmitter end, but on the receiver end utilized mathematical calculations to break down the large digit number into several smaller numbers. Rather than decomposing the array and assigning specific digits to variables, I treated the received message as one large number and used basic mathematical operations, such as division, to modify the numbers. I then assigned those values to separate variables and those variables became the variables that would control the servo writes.
Having done this, all that remained was transferring this foundational code to the actual Master Hand system. Dat and I collaborated for the better part of four hours in addition to the time I have listed for all the prior work, and we were able to systematically work through a finger at a time, isolating calibration issues along the way. Once we had properly calibrated the system, we were able to record several videos to document the progress we had made.
The main issues in calibrating the hand to the glove resided in how each finger was rigged to its corresponding servo. Once we had determined the unique ranges of each flex sensor being used, we were able to map those values to the corresponding servo.
*** [Insert Code] ***
No comments:
Post a Comment