Difference between revisions of "Smart Blinds"
Line 82: | Line 82: | ||
====Sensor Readings==== | ====Sensor Readings==== | ||
The luminosity is measured by the photo-resistor, from which the function will read the analog input and convert to the correct voltage reading. Then based on the linearity of the photo-resistor measurement, the function uses a scale of 0 to 9 to describe the luminosity, with 0 representing complete darkness and 9 representing full daylight. The temperature sensor utilizes the same overall method but the voltage is converted to a more accurate result in Fahrenheit unit. In order to measure the real time temperature and luminosity more precise, both temperature and luminosity sensors will take in 1000 readings over a period of 3 minutes and use rolling average to filter out the extreme readings caused by noises in the system. | The luminosity is measured by the photo-resistor, from which the function will read the analog input and convert to the correct voltage reading. Then based on the linearity of the photo-resistor measurement, the function uses a scale of 0 to 9 to describe the luminosity, with 0 representing complete darkness and 9 representing full daylight. The temperature sensor utilizes the same overall method but the voltage is converted to a more accurate result in Fahrenheit unit. In order to measure the real time temperature and luminosity more precise, both temperature and luminosity sensors will take in 1000 readings over a period of 3 minutes and use rolling average to filter out the extreme readings caused by noises in the system. | ||
− | [[File: ReadLight.PNG]][[File: ReadTemp.PNG]] | + | [[File: ReadLight.PNG ]][[File: ReadTemp.PNG]] |
====Motor Control==== | ====Motor Control==== |
Revision as of 18:42, 12 November 2018
Smart Blinds Weekly Log
Presentation
Codes and design
Contents
Proposal
Overview
The goal of this project is to create a set of blinds that is able to automatically adjust the tilting angles of the slates with real time luminosity. The blinds will also feature an timing function which will drive the blinds to open and close at certain time according to user's preference. The apparatus will contain a stepper motor to open the shades and an Arduino processor will be incorporated to measure the luminosity. In order to achieve the project goal, data obtained by the Arduino sensor will be processed and transmitted to the step motor. A temperature sensor will also be added to obtained real time temperature input, so that our device will more accurately adjust its functions. Besides, a user interface containing a LCD display and five bottoms will be incorporated to show the luminosity and the temperature and to let users to open or close the blinds as needed.
If time allows we will add these additional features:
- timing functionality
- design the control mechanism to work with a variety of blinds
Team members
- Xinquan Liu (Toby)
- Sam LaSota
TA: William Berndt Parkinson
Objectives
Electronics and programming
- Find the position to place the temperature and luminous intensity sensor so that it will yield the most precise feedback
- Program the Arduino to obtain the correct inputs of temperature and luminous intensity
- Analyze the data obtained and filtered the noise in the signals
- Transform the inputs of temperature and luminous intensity to proper outputs to the stepper motor
- Analyze the data obtained and filtered the noise in the signals
- Make sure the stepper motor interact correctly with the Arduino
Mechanics
- Build the frame and the blinds
- Connect and test the stepper motor on the blinds
- 3D print parts needed for connection
- Find the correct tilting angles with regard to solar zenith angle
- Adjust the stepper motor to obtain the right tilting angles
- Make sure the right connection between step motor, power source, transistor, and the Arduino
- Visually appealing setup
- Save energy as much as possible
Challenges
- Build the frame and fit in the blinds
- Learn the basis of stepper motor and its connection
- Generate enough torque to tilt the slates
- Adjust the output of motor to gain the right angle
- Find the correlation between the temperature, luminous intensity and the proper tilting angle of the blinds
- Probably will require many experiments and tests at different times of the day
- Program the Arduino to collect and process the data
- Collect precise and enough data to determine the output from Arduino to the motor
- Filter the noise in the data so that the motor will only function when needed
- Transform the input data to the right output signals and transmit them to the motor
- Translate stepper motor torque into blind control using 3-d printed parts
Budget
- Achim Home Furnishings 1-Inch Wide Window Blinds, 24 by 64-Inch, White $11.99 (provided)[1]
- Motor and Driver $8.59 (Amazon)[2]
- 28BYJ-48 DC 5V Stepper Motor
- ULN2003 Driver Test Module Board
- 28BYJ-48 DC 5V Stepper Motor
- Arduino Uno $17.99(Provided)
- Digital Light Intensity Sensor Module for Arduino UNO $5.99[3]
- 8RGB LCD Shield Kit w/ 16x2 Character Display(for user interface) $23.95 [4]
Total: $38.6 (Actually spent)
Gantt Chart
Design and Solutions
Mechanics
The first step to achieving our goal of controlling the blinds with the stepper motor was to build and assemble the components properly.
- Building The Sensor
- The light and temperature sensor was built using a simple circuit shown here
- Soldering the connections was straightforward
- Assembling The LCD Shield
- The assembly of the LCD Shield was a matter of following the Adafruit guide
- Soldering the connections was a lot more involved and required a decent amount of time
Electronics and Programming
The device is controlled by an Arduino Uno Board. The programming of the the device consists of three parts 1)The reading from sensors 2)The control of the motor 3)The control of the display.
Sensor Readings
The luminosity is measured by the photo-resistor, from which the function will read the analog input and convert to the correct voltage reading. Then based on the linearity of the photo-resistor measurement, the function uses a scale of 0 to 9 to describe the luminosity, with 0 representing complete darkness and 9 representing full daylight. The temperature sensor utilizes the same overall method but the voltage is converted to a more accurate result in Fahrenheit unit. In order to measure the real time temperature and luminosity more precise, both temperature and luminosity sensors will take in 1000 readings over a period of 3 minutes and use rolling average to filter out the extreme readings caused by noises in the system.
Motor Control
The devise uses 28BYJ-48 Stepper Motor with ULN2003 driver(The complete tutorial and library can be found in the reference). The driver and the library allow us to set the maximum speed of the stepper motor and its acceleration. The moveTo() function will set the stepper motor to the desired location in radians, with 4096 steps a full rotation. The distanceToGo() function allow us to monitor the current state of the motor and to decide when the motor has stopped running. With several trials, we found the correct location of the stepper motor, which corresponds to the angle of the slates of the blinds. After, the reading of temperature and luminosity is complete, the program will set the motor to a certain location to control the blinds, based on our experiments before.
User Interface and Display
For the display and user interfaceRGB LCD Shield Kit w/ 16x2 Character Display(The complete tutorial and library can be found in the reference). The user-interface consists of a LCD screen and five buttons. Our program mainly uses the up and down buttons to open and close the blinds. The display is also used to show the temperature and luminosity. The function for the user interface in the program is userControl(), which is operated during the ten minutes interval between each reading of temperature and luminosity.
References
Motor Tutorial and Arduino Library
User Interface Tutorial and Arduino Library
A project from before: Sunlight Alarm