The final design made use of a PIR Motion Sensor. The sensor is powered to 5V, grounded, and connected to digital input pin 2 on the Arduino board. The motion sensor has two potentiometers on its side, one which controlled the sensitivity and another which controlled the delay between detection signals.
The motion detector is able to detect motion from across a room, which caused some issues with staying as still as possible while trying to test and eventually led to the design of cardboard walls for the sensor. The walls act as blinders to narrow the sensor’s detection range and simplifies testing. In a general purpose design, the walls would make sure the sensor only detects motion it’s supposed to.
The transmitter unit must be constructed in such a way that a laser diode may be powered on and off in order to send the previously mentioned high/low states. For that reason, the circuit consists of a power circuit, which utilizes an NPN Bipolar Junction Transistor as a current switch. This means that depending on the applied voltage, the Transistor will allow or prevent current from flowing to the laser diode, effectively allowing a microcontroller to turn the laser diode on and off. An accompanying program is then written to allow the laser diode to transmit the data bits of ASCII characters received via serial link from host device and the transmitting microcontroller. The user simply enters whichever ASCII characters they desire to transmit. The microcontroller interrupts on any given serial event and immediately begins transmitting the character received.
The receiver unit was constructed using a Wheatstone Bridge circuit. The Wheatstone Bridge is a resistive circuit. Therefore, resistors and resistive sensors, such as photoresistors, make up each branch of the circuit. R2 and Rx in the circuit are similar photoresistors in order to allow for automatic adjustment to dynamic ambient light conditions. The versatility and relative accuracy of the Wheatstone Bridge allow for the photoresistors, which change resistance inversely with the amount of light shined on them, to change the overall circuit resistance allowing obvious high and low states to develop. These can then be interpreted by a Microcontroller such as the Xplained Mini Board with the appropriate software.
The hardware we used for this project was an Arduino, Adafruit IR Break Beam Sensor, resistors, and a 16×2 LCD. Originally, we used IR LED lights and a simple IR sensor. This proved to be highly inaccurate and inconsistent. The Adafruit IR break beam sensor was exponentially more reliable and worked all the time. To figure out how to wire these components, we referenced the Arduino documentation. The documentation is extensive and extremely helpful for anything related to Arduino.
In this project we used windows and Arduino and we started out with high hopes and big plans. We began brainstorming ideas for the project and originally planned to use a load sensor or another proximity sensor of some sort to be able to weigh, or ultimately tell when you were out of toilet paper. We decided that a load cell was too hard to incorporate mechanically and even if it was it wouldn’t be accurate enough to sense a few sheets of toilet paper. After we trashed that idea, we decided we would still have a sensor for when it was empty but we would use a interrupt sensor and a series of pullies tied in with the motor to show that the motor was turning but no more toilet paper was coming out. Well this plan also failed due to lack of time and mechanical availability. So we decided to try to perfect the simple action of automated toilet paper dispensing.
The hardware of this project was mostly recycled from other projects. The Styrofoam casing and motors came from a previous project that was about RC cars using DC motors. Our hardware was fed through the existing and new holes and the board and wiring was all implemented on the opposite side to what the user would see. The motor was wired through a transistor and diode to protect the DC motor in case of feedback. We originally had a 5V power source but the output was too low for the motor to turn with the toilet paper attached. The PWM ports on the Arduino were used to change the power used for the DC motor. The photo infrared sensor acts as a trigger to activate the toilet paper dispenser for 3 seconds.
The code for this project is a mixture of checking for interrupts in the PIR and if there are changes then the toilet paper dispensing is triggered and then resets after it is done. It is very similar code for paper towel dispensers that you would see in almost all public bathrooms. Our PIR was very sensitive so often the it would trigger multiple times in a row, but otherwise the code worked perfectly. There were plans to add a buzzer to the rig as shown in the code, but it never made it to the final product. Everything was coded in Arduino.
The schematic used in this project was based off of the same general schematic used for the previous two labs. Some extraneous portions of these previous schematics were removed, but the basic circuit connecting the board to the LCD with a potentiometer for dimming was left untouched. The notable addition made by our group was the common cathode RGB LED connected to PC0, PC1, and PC2, along with three current limiting resistors connecting the three leads to the board. This LED, though admittedly not used to its full potential, was used to indicate pauses in the operations of functions as well as the completion of the timer function.
The concept of this project is a carnival arm that can set off a buzzer if a user can drop a ball into a cup. The project uses two Atmega328PB boards. One board has a servo motor that that works by connecting it to ground, 5v, and to PB1. The second board is connected to a passive buzzer at 5v, ground, and PD1 as well as a shock sensor at 5v, ground and PB2.
For our project we used the schematic from Lab 4 and then added on to it. The piezo buzzer took a while for us to integrate because we weren’t sending the correct waveform from PC0. In the end we used a waveform of 75ms at 2khz.
We planned to use the I2C interface to serve as a means of communication for each candle. Two data lines are used: a clock line and and data line. These two line are shared with every device including the master and slave boards. The master board can request to write or read data to each slave board. The signal consists of multiple sets of two bytes of date. The first seven bits in the first byte is the address of the slave board that is being addressed. The last bit is signaling whether it is requesting for the following data to be written or read. The second byte is the data the master is trying send. If the slave successfully received the data bit then it will send an acknowledgment bit to the master board.
We ran in to difficulties trying to simultaneously interface with P and PB variant boards because they require different address name schemes.
For the Hardware portion of the prototype, we used a variety of objects.The largest of these was a standard bicycle that we used as a base for the odometer and the speedometer to sit upon. Next we used two breadboards to start, however this was later slimed to one breadboard to hold the wiring and transistors for the project. We also used an ATMEGA328P Xplained mini board to process the inputs and outputs we needed for the project. Miscellaneous electrical components include some resistors, wires, potentiometer, an LED display and a capacitor. The most unique component used would be the Hall effect sensor, which is in layman’s term a magnet sensor. As a magnetic field gets in range of the sensor, the total output voltage of the Hall effect will be changed due to the strength of said field.