Tuesday, October 30, 2012

"Secret Knock" Detecting Door Lock

     Many students at college have a really hard time keeping up with their keys or even locking there keys in their rooms. A good solution to this would be the "secret knock" detecting door lock. This device would allow the user to program a secret sequence of knocks for the Arduino to listen for. When the correct sequence of knocks is obtained, the Arudino will then send power to a servo attached to a door lock, thus unlocking the door. The main purpose of this would be just a cool project that college students could use instead of keys.
This is a sample of a "secret knock" detecting door lock.

     This project only requires a handful of hardware components. These components include LED's, a Piezo element, a push button, a servo, and of course, a door and lock.

Interactive Object - Willy Wonka Vending Machine

     The interactive object I decided to review was the Willy Wonka Vending Machine. This machine is located inside the food court and Mount Berry Square Mall. Many people use this machine each day to buy the candy that they desire. The machine offers a selection between eight different types of candy. The majority of people who use it are either parents or small children. You can also choose to pay with cash or credit card, whichever is more convenient.
    When secretly observing people using the machine, I found that most people would go get change so that they could pay with cash. I think this is generally because that most vending machines don't accept credit cards. Maybe there should be a large block of text on the machine that says credit cards accepted. The main difficulties of this machine is determining which candy to buy. It seemed as though most people could use this machine fairly easy since the instructions are very simple. The instructions were written for small children since they would be the most likely to use it.
     The instructions are shown on a large touchscreen. The machine first prompts the user to choose to pay with cash or credit card. An amount is then displayed on the screen and the user either swipes their card or inserts enough money to purchase the candy. The user then selects the desired candy, and the machine determines the correct candy to dispense, and puts it in a plastic cup.
     This machine generally good design since it does its job well. It is not difficult to use and its a lot of fun!

Tuesday, October 9, 2012

Automatic Pot Stirrer

     When we were asked to create a kitchen object, Cal and I thought for a while and came up with numerous ideas. We finally decided on an idea which was the automatic pot stirrer. We thought that many people get distracted while cooking or have other things to do while they are cooking. Some things require constant stirring while others need to be stirred every 5 minutes, 10 minutes, and so on. Our idea was that we could create a stirrer that could be set up to a timer. We then began working on our project.
This is what most people think of when they think of a mixer.

      We began by setting up all of the components without hooking them up to the pot. This was so that we could write our program and make sure we could get it to operate in the desired manner. We began by wiring up a potentiometer to our Arduino. We then connected a continuous servo to our circuit. These were the only major components needed to complete our project.
     After we had everything wired up, we began writing code. After a few minutes of brainstorming and implementing, our code was done. Everything acted in the way we desired so we began building the automatic pot stirrer.
Here is the pot stirrer after the mount for the servo was connected.
   We ran into a few problems with our program for our pot stirrer. The major problem was that if the potentiometer was changed while it was in the waiting period. It would have to fully cycle again before the timer would change. After our presentation, Dr. Hamid gave us some advice, so we changed our code. Now, our stirrer will immediately change the timing cycle at the time the potentiometer changes. The other problem was that the spatulas we used were very close together. This could be changed by making a bigger diameter plastic circle to attach to the gear on the servo.
Here is the automatic pot stirrer all hooked up and ready to go!

Shift Register Lab

     There is one key question that comes up at times when working with an Arduino. What happens if you need to hook up more components to your Arduino than you have pins for. In the recent labs, this was not a problem since we only hooked up a few components at a time. The shift registers used in this lab were used to control 8 bits at a time. This means that you can control 8 bits an only take up a few pins on the Arduino. This works by a process called synchronous serial communication. This means you can pulse one pin up and down by communicating a data byte to the register bit by bit.
     For our first shift register, we were asked to hook up 8 red LED's and 8 220 ohm resistors to our Arduino. The short pin was connected to ground and the other pins were connected to the shift register. Power along with ground was applied to the shift register by using the necessary connections as described in the directions. By using a shift register, we were able to hook up 8 LED's while only taking up 3 DigitalPins on our Arduino.
    This is the "Hello World" example program for the first shift register.

     When we began adding the second shift register, the same steps were used, but we used green LED's so that we could see the difference in the two sets of examples.
     We ran into a few problems when creating our shift registers. The major problem was basically wiring it up. There are many wired needed to hook up a single shift register. When adding the second register, the number of wires was insane.

Tuesday, October 2, 2012

Analog Output

     Analog output is a very useful tool when it comes to building things. Analog output is used when we need to change the range of the output value. For instance, if the brightness of a lamp needs to be changed, if the correct components were wired up to it, we could make this happen.
     In the first section of this lab, Cal and I wired up our breadboard and Arduino to begin working on the pulse-width modulation. This portion was used to control the speed of a motor, as well as the duty-cycle of the motor. The image below shows our final wiring of this motor. The potentiometer was used to determine the speed of the motor. Our motor would run for 50 msec and then stop for the same amount of time.
Final assembly of the PWM motor.
     After the PWM portion of the lab was completed, we moved on and began working with servos. Servos are motors, but servos make use of gears which gives them much more torque. A standard servo has a range of movement from 0 to 180 degrees. However, there are continuous servos which can rotate 360 degrees. The position of the servo is based on a timed interval. This means that some servos must be programmed differently than others. Below is a video of our servo in action!


    The final section of this lab dealt with a piezo element. In this part of the lab, Cal and I learned how the Arduino could control the notes of sound. A piezo elemnt makes a clicking sound each time it has current running through it. If the pulse is at a certain frequency, a note is played. In essence, different frequencies mean different notes. Cal and I wired up our piezo element and copied the sample code from the lab. Upon running this code, our piezo element played "Twinkle, Twinkle Little Star" as shown in the video below.



Norman Response

  • Simple objects should be self-explanatory when being used.
  • Things now are being built for beauty instead of functionality.
  • The parts on an object that are essential to make that object function must be highly visible.
  • Whenever the number of actions exceeds the number of controls, that screams difficulty.
  • Natural mapping leads to immediate understanding because it is all self-explanatory.
  • If an object has the necessary feedback, his object becomes much easier to use because it gives the user a sense of what they are doing.
  • Objects are often built with good intentions and principles, just poor design.

Lab 4 - Analog Input

     This lab dealt with analog input for our Arduino. The difference between analog and digital inputs is that analog inputs take in a certain amount of voltage and convert it to a digital number while digital inputs can not change voltage. A good example of this is a potentiometer can change the voltage running through it from 0 to 5 volts.
     Cal and I started off this lab by wiring a potentiometer, an LED, and a resistor to our breadboard. We then got to see first-hand how the potentiometer worked. As the dial was turned, the intensity of the light would increase/decrease depending on which way the dial was turned. This was the increase/decrease in voltage across the potentiometer.
     Next, we moved on to the photo resistor section of the lab. This required some of the same components such as the LED and the 560 Ohm resistor. However, there were a few new components to the circuit. These components were a photo resistor and a 10K Ohm resistor. The photo resistor uses the same principles as the potentiometer, but uses light intensity to change the voltage. A low voltage was produced when the sensor is under bright light and a high voltage is produced when the sensor is under low-light. This is sort of confusing since common sense would think it would be the other way around.
This is the LED being lit up while minimum light is being input into the photo resistor.








    
This is the LED being lit up while a high amount of light is being picked up by the photo resistor.








     After completing the photo resistor circuit, Cal and I moved on to the temperature sensor. The temperature sensor we used has three pins (ground, 5 volts, and signal). This sensor outputs 10 millivolts per degree centigrade on the signal pin. This allows this sensor to measure temperatures below freezing. The proper code was obtained from the maker of the sensor's website which allowed us to view the current degrees Fahrenheit of the environments we were measuring.
     The final section of the lab consisted of wiring in a pressure sensor. This sensor was very similar to the potentiometer. Instead of turning a knob, this changes voltage by using pressure applied to the sensor. The resistance is high when there is no pressure, and the resistance is low when there is high resistance.