Motion Sensor Jingle Player – Big Picture

The goal of this project is to create a motion detected alarm system with a button to turn the alarm on or off and toggle between different jingles.

When the PIR motion detector is triggered, a Honeytone speaker will play a jingle, controlled by a custom C++ library. The jingle won’t play if the alarm isn’t set; the user can tell because of an LED that is lit up when the alarm is on. The pushbutton, when long pressed, turns the alarm on or off; if short pressed, it will toggle between different preset jingles.

The project uses an Arduino board because of the built-in library to output single-frequency tones. Originally, the project also used interrupts, but it conflicted with the Arduino’s library; instead, logic for all inputs and outputs is handled within the loop() method.

The project was a success: the motion detector will trigger and the speaker play the selected jingle when the alarm is on, but won’t do anything when the alarm is off.

Basic Demonstration Video

Wireless Data Transmission – Big Picture

Wireless data transmission is achieved via optical means utilizing receiver and transmitter units. The transmitter unit consists of a laser diode and supporting power and switching circuit. The laser diode is supplied power from an Arduino. The 3.3V from the Arduino is voltage divided to near 3.0V to match with the laser diode specifications. The 3.0V is provided for the diode through a transistor, which also functions as a current switch controlled by software running on the Arduino. The circuit is used by the microcontroller to transmit binary data in the form of diode off (0) and diode on (1). The data is transmitted common asynchronous serial format (8N1). The receiver unit consists of photoresistors and an accompanying resistive circuit, arranged in a Wheatstone Bridge configuration. An Xplained Mini Board then uses both points ‘D’ and ‘B’ in the circuit to measure signal strength; one as a reference to ambient light, the other as a measure of ambient light plus signal light (i.e laser diode light). The Xplained Mini Board then decodes the bits received (8N1) and extracts the data bits, finally translating them back into ASCII characters that can be displayed via the serial terminal on the connected host device; TeraTerm in the case of this experiment

Coin Sorter/Counter – Big Picture

The project was done with an intent to build a simple coin sorting and counting machine based on Arduino. Infrared break-beam sensors are used to sense the motion of the coin that send an interrupt signal to Arduino, and the detected coin’s value is displayed on LCD 16×2. The initial step was to construct the machine with cardboard. A slightly slanted slider was attached to the board that let the coins fall smoothly into its designated place. Three different holes were cut depending on the ascending diameter of the coins. For the purpose of efficiency, three coins of varying sizes were considered. The next step was to position the pair of Infrared (IR) break-beam sensors, under each hole to detect the breakage of an IR beam. Receiver was set across from emitter, and both were interfaced to Arduino board with resistors, and soldered wires. Arduino program reads the interrupt caused by the coin and prints the value of each coin as they are inserted in to the slider. After numerous attempts, the goal of sorting and counting the coins with Arduino powered machine was accomplished.  

Timer and Stop Watch with LEDs – Big Picture

The goal of this project was to create a Timer and Stop Watch that uses the UART display, LCD and a push button to interact with the user. The main idea was to understand how to set interrupts to create a 1 second delay to maintain the proper time. Using the Atmega328PB board that was used throughout the semester, and LCD and the built in push button on the Atmega board, the user will be able to select the function for Stopwatch/Timer on the UART, press the push button to begin timer/stopwatch and watch the time count up/down on the LCD. This requires understanding on the registers to set the interrupts and configuring the code to display time in the proper format to the LCD. Later, a RGB led is used to flash from red to rreen to inform the user time is up. The idea was to create a elaborate light display to do so, but because of time constraints, a single RGB led was utilized.

Sleep Timer

The initial goal of this project was to build a standard Alarm Clock. To do this we would have to interface with an RTC chip using the I2C interface. A RTC Chip is a real time clock that can retain time data even after the power main power has been cycled. This function is performed through the use of a small battery. Unfortunately, we were never able to find the battery needed to operate this chip. This means that we would have to approach our project differently.

This is when we came up with the idea for a sleep timer. The user could set the desired amount of time, default 8 hours, and after the time ran out the alarm would sound. After the alarm was sounded, the user could choose to snooze or let the alarm run. If the alarm runs to completion, the LCD is updated with a “report” of the time slept, including snoozes. Below is a flowchart of the program:

Smart House – Big Picture

The goal of this project was to create a smart house that could be controlled using a smartphone, which was achieved using Assembly, C, and Arduino Languages. In this project both the Atmega328PB and Arduino Uno R3 boards were used in conjunction. This was done to show how different languages can be used alongside each other by connecting inputs and outputs. The Arduino was used to connect our circuit to an app via Bluetooth to control the lights and door lock of the house. The ATmega328PB board was used along with an LCD to display when the door was locked or unlocked.

Light Show using I2C protocol

The basis of the project was to utilize Inter-Integrated Circuit  (I2C) protocol to send lighting animation commands from a central control board to other boards. Here is our schematic of the lighting display.

In a broad description, I2C protocol allows for a master board to communicate to other boards in the form of read and write requests. Each of these boards can be assigned a unique address, allowing for the master to specify destinations for its commands. This protocol requires the use of inbuilt hardware, specifically the Twin Wire Interface (TWI) module on the atmel328p, to operate.

The above figure and following paragraph describes an ideal master to slave write transmission. First the master would send a start command onto the data bus. Each board on the bus then automatically acknowledges the master with an acknowledge bit. Then the master loads one of the boards’ address into the TWI data register and then sends that onto the data line. If a board has an address that matches, that board sends an acknowledge bit. Then the master would load a data byte into the TWI data register, followed by sending that byte onto the data bus. This data is then loaded by the target board into its own TWI data register. The master then can repeatedly send data bytes to same address, send another start command to specify a new board address, or send a stop command to relinquish control of the data bus.

Being able to utilize I2C protocol can be extremely powerful in the right circumstances. Certain sensors rely on I2C protocol. And given that a single bus can support up to 127 boards, you could connect that many chips or sensors, greatly expanding the capabilities of the central board with only two pins. It also is able to support multiple masters on a single data bus. Finally, the communication requires little resources from the sensor boards especially during a master write demonstrated above.

I2C does have its drawbacks. It is meant for communication between chips on the same board. Trying to communicate on a data bus longer than 2-3 feet results in misreads. The protocol does have an in-depth description within the data sheet, but when trying to implement we faced a lot of issues with the sensor board not sending acknowledgement bits.

If you want to learn more about how to implement I2C in your project, first check out a tutorial to wrap your head around the protocol. Then consult the documentation for your board to gain a specific understanding of I2C protocol for your board. It should be located under Twin Wire Interface (TWI). Your micro controller may even have multiple TWI modules, like the atmel328pb. Then I would recommend checking out this library to help with implementing your own I2C functions.

Bike Odometer & Speedometer- Big Picture

The chosen task by Team 14 was to create a bicycle odometer & speedometer for use in everyday life. This would allow the hard working men and women of America to stop getting into accidents while calculating the velocity they are traveling with rate and distance. This could potentially save many lives and it is the honor of Team 14 to do this great work. Team 14 hoped that by creating this project, they would learn more about real world applications for the material learnt in the class. The project was performed by first creating the code for the odometer and speedometer, and next was the task of creating a stable mount for attaching the components to the bicycle itself. Lastly was field testing to guarantee it works. The equipment used by Team 14 for the project includes: A bicycle, an ATMEGA328P Xplained Mini, a Hall effect sensor, an LCD display, as well as a few miscellaneous electrical components such as resistors.




Optical Theremin – BIG PICTURE

The proposed idea was to create a Theremin, an electronic musical instrument which is used with only gestures and no physical contact. The goal of the project was to successfully implement the idea while only using the knowledge from the previous lab work and creating a successful product. Therefore, the equipment necessary to complete the project was Atmel Studio and certain hardware components such as wiring, resistors, and amplifiers. As for the software aspect, the concepts of a previous lab were used to implement the proposed idea due to the similarities of the two. As a result of the effort into the project, the goal was accomplished as the Theremin was fully implemented. It was successful because of the way each gesture creates specific musical notes.

Carnival Arm: Overview

We performed the project with the intent of applying some of what was learned throughout the semester. It was originally conceived with the idea of using a servo motor and sensors, at which point it was only a question of how to use them in a practical way. We decided on a carnival game (of sorts) that involves placing a ball on a rotating slide and aiming it toward an opening to a buzzer sensor/shock sensor combination. If the player hits the buzzer, a random number generator determines whether the buzzer goes off (win) or does nothing (loss). In other words, the game relies on a combination of skill and chance. In true carnival game fashion, the player gets three chances to to make the buzzer go off. We used two computers, two microcontrollers, two breadboards, a shock sensor, a passive buzzer, a servo motor, foam golf balls, and a variety of household items