Wednesday, May 13, 2015

Final Project: Final Product and Future Improvements

Final Product Description:
Our final mat has a two part design one being the spinner and the other being the mat itself. The spinner is used as a visual cue to the children that can accompany a verbal cue from the teacher. The spinner is large enough to be visible, but small enough to be portable so it can be removed from the children's level if necessary. Also, the spinner can be spun by a child or simply moved by the teacher as Sonja does in the demonstration video. The mat has two red and blue sides corresponding to the red and blue of the spinner. Each side is touch sensitive and will light up as the child sits down on the mat then turn off for the remainder of the lesson. In this way, the mats entice the children to sit on them while avoiding becoming a distraction during the lesson.

Highlighted Steps:
  • 1st CSC visit
    • We went to the CSC to observe the children and listen to the teacher talk about the needs of the classroom and aspects of working with children that we may have not thought of
  • Brainstorming 
    • Sonja and I drew up as many ideas and approaches that we could think of for the design. We considered light, weight and touch sensors before settling on the buttons. We also had grand ideas about creating a wireless system with the spinner that corresponded to the colors.
  • 2nd CSC visit and meeting with Teacher
    • We met with the teacher to go over our idea and take some measurements such as the maximum size of the mats and the average weight and size of a child of that age group.
  • Mock-up
    • We created a foam core model of our design in order to think about the logistics of construction and decide what materials we needed.
  • Code Work
    • we wrote a code for the buttons and lights that would make the light tags light up when the child sat then turn off for the remainder of the class.
  • Building
    • After gathering all our materials we started assembling our mat. There were a lot of logistical problems that we had to work out that were not considered when initially thinking about our design. We made sure that the final mat was clean cut, neat, easily accessible for repair and child friendly.
  • Presentation and Demo! 
    • Sonja and I demonstrated our product to the class and a few guest visitors. 
Final Demo Video:
Here is the demo! The lights are not very bright, but hopefully you can see them light up.

Photo of our Mat:



Photos of Us with our Mat:





Further Improvements:

  • Compress the components to make the mat thinner and easily manageable for children to move around themselves. 
  • Also make the mate lighter, as of right now it is a little too heavy. 
  • Make the lights more flush to the mat itself to make sure that the children cannot pick at them
  • Use Brighter lights
  • Make the mat sealable so that it is accessible for repair, but not easily opened by the children.
  • Match the Colors of the mat and the spinner.
  • Make sure absolutely no wires are exposed. 


Reflection: 
Working on this project as our capstone for the course was great way to end the semester. I think it really helped to solidify and integrate all of the knowledge that we have gained over the past semester in a variety of areas. Although at times this class, and the final project, were extremely frustrating the reward for successfully addressing a problem outweighed the pain of the struggle. I am quite happy with our final project, even though I realize that it is not yet usable in a real classroom. I think that our work on this project could potentially inform the students after us and help them to create a better version than we did. The idea that next years students could work on our project emphasizes to me that engineering is all about works in progress.

Final Project: The Building Process

The Goal: 
Create a mat that follow our design while also being safe and usable for the children in the classroom environment.

The Spinner:
Although we decided against our original plan to use the spinner to wirelessly decide the color the mat would be sensitive to, we wanted to keep the spinner as part of the design in order to provide a concrete visual reminder to accompany the verbal cue given by the teacher. This way there would be reminders from multiple sensations which the teacher said was best for the children's learning.

Also in our initial design we were going to use the traditional carnival wheel style of spinner with pegs and a rubber wedge that would pass along the pegs and choose a color. After thinking it over, we decided to simplify the design by creating a spinner without pegs that just used gravity to slow. If the delrin caused it to spin for too long then we could add a piece of foam or carpet like spot to create more friction to slow it down. Below I have included the solid works parts for the spinner and the test piece I made.








In order to create the red and blue sections of the spinner we originally thought that spray painting them would be best, but then we realized that making stickers in the shape that we wanted would be better. It just so happened that they was vinyl sticker rolls in the classroom already so we didn't need to buy anything! I created a stencil then cut out the vinyl and stuck directly onto the delrin. The final product  and stencil is shown below.



The Mat:
Trying to figure out what material to make the base of the mat out of was pretty challenging. at first we thought delrin would be good but we were worried it would be difficult to make a really strong box with delrin and that it would be too heavy. Then we thought maybe thin wood would work, but that wasn't good because if it splintered then it could be a safety hazard. We finally decided that the bottom of a bin that we cut the top off of. Then we made a smaller delrin box that would contain the bread board, the battery pack and the arduino. We made small holes in the top of the box to rest the button sensors and we ended up cutting out access squares to get to our bread boards to adjust the wires. For easy access we hinged the arduino box to the bin. We used the top of the plastic bin to stabilize the red and blue mat sections so that sitting in just one section would make the button compress. We then hinged the mat and plastic combo to the edge to open up for easy access. I added Popsicle sticks to the edge to give it a little more height to make the angle less steep.

The wiring proved to be pretty frustrating. It got pretty complicated and sometimes a connection would become loose our disconnect entirely. Also, we made the wires too short to lift up the delrin box we made so that made things frustrating to fix. Otherwise, the soldering went fairly well

Below I have included pictures of the solid works parts and the various stages of construction as well as several views of the wiring and soldering components of the process.







Reflection: 
I found the process of physically building our mat very liberating. Seeing our idea go from hurried sketches on a paper to a physical and usable object was one of my favorite aspects of this project. As always there were some unforeseen problems and bumps along the way. Some examples include making the wires longer so that we could have lifted the internal box without disconnecting the wires. Another was making sure that the screws in the hinges didn't interfere with the motion of the lid. This required a lot of guidance from Larry since he showed us how to grind down screws as well as do all the other things we needed to do. This process also emphasizes in my mind the necessity of prototyping and creating test pieces before the final product.

Final Project: Code Work

The Goal:
To write a code that would function well with our final idea and meet the needs of our design logistically.

Reference Codes:
The first thing that we did was look back at old codes we have done in the class in order to see if there was anything we could implement into this code. The SOS code that I have included below reminded us how to make a function within the code itself. This function technique can be seen in our later codes.


Initial Code:
This was our first try at the code for this project. First we create the appropriate integers (buttonState1, 2...) and set them equal to zero to make it start counting at zero, Next we declare the LED lights as outputs since they are receiving input to make them light up and we declare the buttons a inputs since they are getting pushed. Then we begin the loop by making the arduino read the state of the buttons. After this, we create a set of if statements that basically say if the two buttons on one side are both on then the light will turn on for 2 seconds then off for 1 second and if this this condition is not true then the LED should be "LOW" meaning it is off. If this code were to be actually implemented we would extend the second delay to ensure the mat stays off throughout the rest of the lesson so it is not a distraction. The same if statement is then made for the other side.


Final Code:
We modified the code slightly for our final by adding internal functions like those in the SOS code. Most of the code is the same except for the introduction of the functions "short1," "short2," "long1," and "long2."



Further Improvements: 

  1. As I stated above, if this code were to be actually implemented then the refractory period after the light initially comes on would span the entirty of the lesson so it would not become a distraction to the kids.
  2. Another thing we could do would be to alter the code so that when one side was pressed then the other side would be inhibited completely. As of right now if both sides are pressed then one side will light up followed by the other side. The two would alternate back and forth until they were no longer pressed. Since in reality the refractory period would be much longer, it stops becoming an issue. 
  3. It would also be interesting to make the code so that only one button on the side needed to be pressed to make the code execute. We didn't feel that for our purposes this was necessary because anywhere pressure was applied both buttons on that side would be pressed since the mats were backed by stiffer plastic and since the buttons themselves are very sensitive. 


Reflection:
After the complex coding needed for the sciborg, this code seemed much simpler, however there were still small nuances in the coding language that tripped us up at times like the use of &&.

Friday, May 1, 2015

Arduino Day 5: Brightness Sensor

The Assignment: 
Our challenge was to get the sciborg to follow a white line using a brightness sensor first using bang bang control and then using proportional control.

Bang Bang:
The line following code proved to be very difficult to write. Our initial thought was to have the sciborg know the values for light and for dark so that if it detected dark then it would execute one part of the code and if it saw light then it would execute another. We thought that if it was on a light (white) section then the sciborg would travel forward and if it detected dark, then we wanted the sciborg to "sweep" the area by turning one way for a little bit then another way for a little bit, but then the sciborg would stop the "sweep" if it detected white and then it would move forward. In our initial code the sciborg was very jerky and would not follow the white line if it turned.

Our final code shown below allowed the sciborg to complete the course in about 3 minutes.

The idea behind this code was to make the sciborg "sweep" left and right in order to find the line. We set the value that the sciborg traveled straight on as edge of the line, rather than the line itself because it is very difficult to get the sciborg to detect the white line for long enough to move effectively.


Proportional:
This code was also very difficult to write. We had a lot of trouble getting the sciborg to travel forward and sometimes it would just turn in a circle not even behaving as if it sensed the line at all. Kat helped us try to fix it, but she couldn't figure out why it wasn't working either. We played around with the gain, the speed, and with the range of sensor values but nothing made it travel the entire way down. We did get one code to travel almost all the way down the path. It got stuck on the very last part, but otherwise it was successful. I have included that code and the video below.



Reflection:
The thing which this exercise reminded me over and over again is that what we think the code is doing is often very different from what it is actually doing. Also, when it comes to sensors, it is very difficult to set limits on the numbers the sensors read definitively to make an effective code. For example, when the although the lights were always on in the room while we ran the sciborg it made a slight difference whether or not there was ambient light from outside. Also, the distance of the sensor from the ground played a huge role in the accuracy of our code. All these little real world variations made coding difficult.

It also makes me wonder about the difficulties in creating an actual product using sensors that must operate under many variant conditions. This is actually a problem which my neuroscience professor has talked about before. For example, as humans we take for granted that we are able to tell whether something is dark or light based on comparisons our brain makes without our knowledge. A computer system, for all its complexity, does not have the same ability to integrate information as the human brain. The arduinos we are using have a similar problem. They read a single number without comparing it to the surroundings and adjusting it.

Final Project: Mock Up

The Assignment:
We were challenged to create a physical mock up of our design in order to begin to think in detail of the materials we will need and the way we will go about constructing it.

Our Mock Up:

As you can see from our mock up, we planned to have a stiff bottom material which the sensors and the arduino board would be fastened to. The next layer would have another stiffer material capable of pushing on the sensors. The red and blue side would be separated to prevent interaction with the wrong sensors. Above that would be the red and blue pads and the two corresponding lights. The spinning wheel would have had a sensor on the same prong that housed the rubber piece that would slow the wheel when it hits the pins in order to land on a color. The sensor would have picked up the color then communicated to the mat to decide which color to be sensitive.

Revisions to Our Idea:
Due to time and resource restraints we were forced to simplify our idea. We will no longer require that the wheel communicate with the mat board. Instead the mat will be independent. The teacher will instruct the students to sit on a particular section. The students will then sit on that section and cause the button to light up for a certain amount of time then turn off. If they change sides then the other side will be activated in the same way. Also while one side's light is on, the other side cannot be activated as to prevent kids from going back and forth to make the light turn on.

Physical Design Revisions:
We decided to use a plastic bin for the stiffer component of our design. The plan is to cut the top part of the bin and use the new shallow tray as the base of our mat. The lib can be cut as well to make up the second stiff layer.

Materials List:
*indicates we already have this in the We-Lab.
  • yoga mats (1 red, 1 blue)
  • plastic bin and plastic lid *
  • arduino board*
  • 2 LED light tags
  • small button sensors*
  • strips of fabric


Reflection:
I found the mock up exercise very helpful because it helped us visualize our idea and work out any logistical problems that we otherwise would have missed. It also helped Sonja and I get on the same page concerning our idea to make sure that we both have a clear idea of what the plan is.