- Fixed the servo
- Have the code written out (though numbers are not exact)
- Have the supporting structure ready in SolidWork
- Indicator installed
This blog post covers:
- Re-visit CSC to find out the correct values for the code
- Finish the supporting structure
- Finish the visual demonstration
- Revise the code
- Install the devices
- Any other touch ups
Visiting the CSC
We had three main tasks visiting the CSC. First is to double-check with Becky to make sure that our visual makes sense. Next is to observe how children wash their hands to make sure that the time we used for each step makes sense. Our last objective is to do some reading with the sensor to find the correct values for our code.
The first is with the visual. At this point, we made two versions. The only difference is whether the child needs to turn off water before they get soap and rub their hands. Becky suggested that we omit turning off water, because it would be a lot for the children to do. Also, health code also tells us that the step should be omitted.
Next is watching the children. I must admit that I'm most excited about this part. It turned out that while everyone knows that they should use soap and then rinse off the soap, we did not observe any child that follows the proper steps and use the correct timing. In fact, they all washed their hands incredibly quickly. No one exceeded 20 seconds while most finished at around 10 seconds. It's no surprise that our device would be helpful! However, we still want to make sure that we give the children enough time for each step, because they might have been rushing because they were nervous to "show" us how children wash their hands. Also, we observed that some children may miss the soap or the tap at the first try.
Our last task was to measure the width of the counter and to get some reading from the ultrasonic sensor. The counter is 20.25'' wide and the reading one gets when someone is pressing against the counter is around 25-28.
**During this time, a child became very interested in our installation. Becky told us that he was very interested in how things work. This became important when we finished the rest of the installation.
The Supporting Structure
Even though our box could not be simpler, we still encountered some problem. First is that the front wall is too close to the edge. Our idea of installing the visual is to stick it against the edge of the bottom. Our first drawing had the front wall too close to the edge and the visual would run into the gear train. We re-measured our dimension and moved up the slots for the front wall by 2cm.
![]() |
| Before |
![]() |
| After |
Another problem was that the pegs on our walls for heat staking were too short. This was very surprising since the measurement worked fine for the indicator, which is what we used as our test piece. But since it didn't work on the bigger pieces, we had to fix the measurement again, elongating the pegs.
![]() |
| Before |
![]() |
| After |
After we finished the box, we then installed the gear train with bushings and the servo with hot glue.
![]() |
| Installation of the servo. |
We initially wanted to use the super glue we used before to secure the servo. However, that glue takes a long time to dry. We do not have the luxury to set the installation aside for hours to dry, since we must make sure that our servo stay horizontally so that the axles can go through, and that the input gear must meet the output gear correctly. We then used hot glue, which secures just as well and dries much faster.
The Visual Demonstration
After our visit to the CSC, we decided on the 7-step hand-washing demonstration with each picture having the width of 2''. Each picture is outlined with thick black line to avoid confusion. The strip is in two lines in Word because we could not fit the whole strip in one piece of paper.
Now keeping in mind that we want everything to be as water proof as possible, we decided to laminate the picture. First we wanted to use card stock because it is thicker and stiffer. It turned out that printing color on the card stock we have with the printer at the Science Library, the quality is very bad. We then thought we can print the picture on regular paper, and back it with card stock. However, when we laminated the strip, it turned out that the material is too thick, and the laminate would not melt properly to seal the paper in. We eventually had to settle with visual on a regular piece of paper and then laminated. This turned out to be fine, since the lamination makes the paper thicker and stiff enough to stand up straight.
The Code
Here is our final code.
There are a few changes in this code.
First of all, for all numbers in the code:
- We changed the code into a 7-step process since we initially wrote it in 8. We put in the correct value for the sensor and the delays for each step.
- Recall that our reading was from 25-28 when someone is right against the counter. Here we decided to use 30, in case the counter is wet and the child does not want to press against the counter. Also in case, for some reason, the child is not standing right in front of the sensor.
- For each step, although we noticed that most children do them fairly quickly, we still left enough time for the children to make mistakes. We would rather to have them wait for a few seconds than to panic because they cannot catch up with the machine.
- Based on our installation of the servo, the position of the servo in fact should start at the higher number and then goes down. We also repositioned the chain at this point to make sure that when the servo starts at 175, it starts at the center of the first picture. It turned out that from 175 --> 10, the indicator would move perfectly from the center of the first picture to the center of the last picture.
Second is that we added another if loop in the while loop for when the sensor detects someone. Initially we thought that if the sensor detects a value greater than 30 during the while (value <30) loop, it will jump out of the loop and go to while (value>30). However that did not happen. Since we want to make sure that the sensor would double-check if the person is still present (so that the process doesn't get activated each time someone walks by), we added the if loop.
Third is that we added an LED to the process. Since each step of the hand washing process takes a few seconds, it may be confusing to know whether the process is correctly activated. We decided to add an LED that would blink when it first detects someone and then stay on after the confirmation of person during the rest of the process (i.e. after the first step). We will explain the installation of the LED in the next section.
Installation of devices
The bones of the structure is already explained at the supporting structure section. We will explain the meat and the guts of our device here.
Since we want our teaching device to be as versatile as possible, we decided to use velcro to secure the visual, so that the teacher can easily change the picture to any other linear demonstration. It may require some changes in the code for timing purposes, but such can be easily done in our lab.
The guts
Initially we wanted the battery box to be one of the sides, but it turned out not to be the most ideal, because the box has to be close to the Arduino, which has to be close to the servo. If the battery box were on the side, all of the weight of the device would concentrate on one end. We then put it in between the two walls where the battery box, in fact, fits perfectly. The box would not shift easily unless shaken rigorously. However, it is still very easy to take out, in case the batteries die.
Next to the battery box was the Arduino. Since they are relatively expensive, we cannot just glue it on the Delrin. Instead, is it screwed onto lego pieces which are then secured on the Delrin by velcro. One can easily take out the Arduino to upload any new program.
Then we have the protoboard. It is the closest to the edge, because we also need to connect it to the ultrasonic sensor, which is below the bottom of the box. It also connects to the servo and the LED. It sticks on the Delrin with the sticky back that it comes with.
The Servo
This is already explained in the supporting structure section.
The Sensor
The sensor is right below the visuals, screwed onto a lego piece, which is also secured onto the Delrin with velcro. Note that we cut a window from the laminate so that the sensor would not confuse it with a person.
We soldered the red LED we used in class with wires and then secured it with electric tape at the center in the back of the front wall. The light bulb is visible, but the wiring is protected from water.
We colored our sensor black so that it is not distracting but still visible. We left the top open for easy access to the guts. We do not worry much about water getting into the device from the top since it is very unlikely that the children can splash water into the guts from the top. Here it's more important to allow accessibility.
To put up the device, we decided to use velcro in the back. Since the axle sticks out a tiny bit, we used some velcro command strip for thickness, and then added the regular velcro on the top. There are four command strips on the left because that is where most of the weight is. We actually have two long strips velcro. The other strip is in the box along with extra command strips for the teacher to use when installing in the bathroom.
The side was the most troublesome part. We did not want to close it, especially after seeing the boy who really wanted to know how things work. However, we are a little concerned about water getting into the side. Since we did not have much time, we decided to use plastic wrap. Clearly, this was not the prettiest design, but it does the job. If we had more time, we probably would have built a side with a window.
Here is our final product.
The guts
Initially we wanted the battery box to be one of the sides, but it turned out not to be the most ideal, because the box has to be close to the Arduino, which has to be close to the servo. If the battery box were on the side, all of the weight of the device would concentrate on one end. We then put it in between the two walls where the battery box, in fact, fits perfectly. The box would not shift easily unless shaken rigorously. However, it is still very easy to take out, in case the batteries die.
Next to the battery box was the Arduino. Since they are relatively expensive, we cannot just glue it on the Delrin. Instead, is it screwed onto lego pieces which are then secured on the Delrin by velcro. One can easily take out the Arduino to upload any new program.
Then we have the protoboard. It is the closest to the edge, because we also need to connect it to the ultrasonic sensor, which is below the bottom of the box. It also connects to the servo and the LED. It sticks on the Delrin with the sticky back that it comes with.
The Servo
This is already explained in the supporting structure section.
The Sensor
The sensor is right below the visuals, screwed onto a lego piece, which is also secured onto the Delrin with velcro. Note that we cut a window from the laminate so that the sensor would not confuse it with a person.
We soldered the red LED we used in class with wires and then secured it with electric tape at the center in the back of the front wall. The light bulb is visible, but the wiring is protected from water.
Additional Touch-ups
We colored our sensor black so that it is not distracting but still visible. We left the top open for easy access to the guts. We do not worry much about water getting into the device from the top since it is very unlikely that the children can splash water into the guts from the top. Here it's more important to allow accessibility.
To put up the device, we decided to use velcro in the back. Since the axle sticks out a tiny bit, we used some velcro command strip for thickness, and then added the regular velcro on the top. There are four command strips on the left because that is where most of the weight is. We actually have two long strips velcro. The other strip is in the box along with extra command strips for the teacher to use when installing in the bathroom.
The side was the most troublesome part. We did not want to close it, especially after seeing the boy who really wanted to know how things work. However, we are a little concerned about water getting into the side. Since we did not have much time, we decided to use plastic wrap. Clearly, this was not the prettiest design, but it does the job. If we had more time, we probably would have built a side with a window.
Here is our final product.















No comments:
Post a Comment