Completed alongside Michael Kistler
The goal of this final project was to develop a “smart prosthetic” that could sense when it was grabbing an object and know how much pressure to apply to lift the object without breaking it. The device had to be able to operate in wet conditions, and thus was tested on a waterbead, as well as incorporated both feedback control and biological control to emulate the functionalities of a real arm.
Biological Control
For this project, we used biological control by using a Myoware muscle sensor. We chose to do EMG signals because we had solid success using this signal for an earlier project in the course. It was suggested that we use a Myoware, and we are very grateful for that suggestion because it made the signal detection much simpler.
Our thresholds for the Myoware signal were a baseline (or non-moving) signal, a signal when we made a fist, and a signal when we flexed our bicep. With the Myoware, our signal stayed much more constant than it had with the Biopac sensors. One issue we ran into was that the threshold for making a fist seemed to be more variable. When we set it originally, we had to make sure it was high enough that a random muscle twitch, movement, or adjustment of the wire would not be higher than the threshold, but also that the action of making a simple fist would be high enough. With the Myoware attached to our bicep, it was hard to detect just making a fist. Making a fist uses the muscles in your forearm but not your bicep. What we learned- more so through moving our arm and we learned the science behind it later- is that your bicep is the primary supinator of your forearm and also helps to bend your elbow. As you can see in Figure 5, those are both of the adjustments we found to be most effective to reach a good threshold. We also made sure that the serial plotter was printing the signal from the Myoware so that we could check if it was hitting the threshold when necessary. A second issue we ran into was that the threshold for the full bicep flex meant that the signal would have to first cross the threshold for making a fist. When we had each step of our code set up to just depend on the signal level from the Myoware, the code would do what we wanted it to do when we made a fist when we were actually fully flexing. This is because our code took a rolling average from the signal, meaning that it would hit the threshold for making a fist first. To avoid this, we added a variable that would only allow you to move between sections when you had completed the last. This is further discussed in the later section on our code.
Joystick & Button Control
In addition to the Myoware control, we also used a joystick to control the base and arm servos. This allowed us to have more control over the movement and positioning of the device. As we discuss further in our code overview below, we used both the button and a flex of the bicep to solidify the position of the device in separate sections.
Feedback Control
Initially, we attempted to stay away from the force sensor because we wanted to try something unique. Thus, we intended to use a hall effect sensor and PID control in our feedback system. A hall effect sensor detects the presence and magnitude of a magnetic field. This sensor is based on the premise of the hall effect, which is the production of a voltage difference known as the Hall voltage caused by an electric current transverse to and a magnetic field perpendicular to the current across a conductor. This sensor would read the output voltage that is directly proportional to the strength of the detected field. An initial concern included a possible strange effect on the magnetic field from the waterbead, however we chose to test it anyway.
During initial testing, we put a magnet on one finger and a hall sensor on the other. We attempted to measure the relative change in voltage output from the Hall sensor as the magnet came closer to the sensor when the fingers bent. There were multiple issues inherent with this method. The first was simply that the hall sensor had a large amount of noise in the readings. In an attempt to decrease the inconsistencies in the sensor readings, we built a low-pass filter to attempt to filter out some of the noise. While we did see some decrease in noise, the inconsistency of the sensor readings did not significantly change. This led to the second and more pressing issue. Given the inherent finger-like nature of our design, the fingers would not move in a linear fashion. This made obtaining a consistent sensor reading nearly impossible. After this realization, we pivoted to the use of a force sensor.
In our first iteration with the force sensor, we implemented the force sensor at the tip of the finger that first came in contact with the waterbead. Again, given the inherent finger-like nature of our design, we had trouble obtaining consistent force sensor readings, so we ended up placing the force sensor in the space between the fingers. An additional component we added to the design was two bumpers on each side of the force sensor to guide the waterbead to be directly over the top of the force sensor. Even with the addition of the bumpers, we still struggled to apply enough force through the waterbead into the force sensor. This is most likely consistent with our discussion above about the limitations inherent with only 180 degrees of rotation in the servo motors. If we were to have to use a servo motor that can continuously rotate in 360 degrees, we could have applied far greater force. To navigate this issue without completely purchasing new motors, we just started the fingers with an even further amount of tension in the fishing wire and a slight bend in the fingers. We then ran multiple iterations on multiple water beads (yes, many were broken), until we determined a force value that was strong enough to lift the waterbead without dropping it. We did not really struggle with applying so much force that we would break the waterbead, but rather not applying enough force to properly grip it without dropping it. After a lot of tests, we found the perfect value that would grab the waterbead and lift it- approximately 435 bits. Our code was fairly simple. After the signal to begin grabbing the waterbead was sent, the motors would run until the waterbead was pressed against the force sensor. After this, the fingers would be held in that position and the arm would lift into the air and be ready to be controlled.
We got featured on the Instagram!
Code Overview
Our code was broken up into three sections (defined by while loops); setting up the gripper with the joystick and grabbing the orbeez, moving the gripper to the other platform, and letting go of the gripper. The code moved section to section based on the variable adjustGripper, which would increase in response to a met condition confirming the system could move on to the next section.
Section 1: Setting Up the Gripper & Grabbing the Orbeez
In the first section, we used the joystick and the button to move the gripper. We could first move the base of the device and when we pushed the button, it would hold the current position and allow us to move the arm up and down. We would then push the button again and set the position. At this point, we would make a fist. This is where our closed loop feedback would work. It would close the fingers until the force threshold was met, and then bring the arm up to 90 and increase adjustGripper to 1.
Section 2: Moving the Gripper
To enter the next section, you had to have adjustGripper set to 1 and you had to do a full flex of your bicep. This would allow us to move one of the servos toward the other platform, flex our bicep, move the other servo, and flex again. After those requirements had been met, adjustGripper increased to 2.
Section 3: Releasing the Orbeez
When adjustGripper was 2 and you made a fist, the code would enter section 3. This section would fully open the fingers and then reset all necessary variables so that you could restart the process.