Light-Sensing Blind Controls: Schematics

Above is the schematic for the stepper motor controller, 120V to 24V converter, as well as the microcontroller and various inputs. The difference between open and closed states for the blinds was set in the code. The solar cell’s purpose was to provide a voltage that would be read by the microcontroller, allowing a reading for the sunlight to be obtained. The potentiometer’s purpose was to control the threshold that was compared to the solar cell to determine how closed/open the blinds should be. The encoder was used to simply add/subtract a value to the open/closed states, making the stepper motor’s open-closed window more clockwise/counter clockwise. The buttons were used to lock the stepper motor in its fully closed/open position, making the board ignore the input from the solar cell. Overall, there were 2 ADC’s used for the project to read from the solar cell and the potentiometer.

ECE412 Final – Automatic Toilet Paper Dispenser

Big Picture

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. 

Sample Demo

Schematic

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.

Code

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.

Timer and Stopwatch with LED’s – Schematic

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.

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.

Timer and Stop Watch with LEDs – Code

The code above is used to maintain and countdown time for the timer/stopwatch in this project. It is set in the interrupt and is calculated for every second. Due to the nature of the LCD, it is required to use and display the time using an array. Therefore, the ten’s place of the minute, one’s place of the minute, ten’s place of the seconds and one’s place of the seconds is used to calculate time along with the interrupts. For the purpose of this project, the maximum value of time is 59 minutes, therefore the if else statement above considers the value in the format of ##:## and counts up from the one’s place of the seconds and once that reaches 0, increments the ten’s place by one and then repeats this til stop watch is stopped.