ECE ILLINOIS
ECE 445 Spring 2016 Smart closet Group 24 Luchuan Zhang Yiwei Li
Motivation Partially see clothes Closet too large to pick clothes Unable to memorize all worn time for each clothes
Introduction A direct display for all clothes in a personal closet. Automatically drive clothes Organize and record all information for users.
Objectives Record each clothes’ worn times Automatically take photos for user's clothes A LED system to highlight the clothes A 7" touchscreen display
Block diagram
System Overview Hardware Power supply, Microcontroller, Motor driver, LED, distance sensor PCB design Software User interface Logic control
Power Supply A 5V 3A adaptor power the motor and LED A 5V 2A adaptor power Rasberry pi
Microcontroller (Rasberry Pi) Power by 5V 2A Can send and receive digital signal Send PWM signal Camera socket HDIM port
Stepper motor 4 phase 2 coils stepper motor Four steps to drive it forward
Schematic diagram for motor driver
Calculation for motor driver ( Vcc )
Calculation for motor driver (resister value)
LED NeoPixel chip Power: 5V Input: PWM signal
Example Code LED_COUNT = 10 # Number of LED pixels. LED_PIN = 18 # GPIO pin connected to the pixels (must support PWM!). LED_FREQ_HZ = # LED signal frequency in hertz (usually 800khz) LED_DMA = 5 # DMA channel to use for generating signal (try 5) LED_BRIGHTNESS = 200 # Set to 0 for darkest and 255 for brightest LED_INVERT = False # True to invert the signal (when using NPN transistor level shift) strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS) strip.begin() strip.setPixelColorRGB((self.input-1), 0,0,0) strip.show()
Distance sensor Detect object range: 2cm to 10 cm
Level shifter Motor driver GPIO PIN distance sensor
Graphical User Interface Written in Python Using Tkinter Library Features: Buttons, dialogue window, scroll bar, radiobuttons
Sample Code root = Tk() root.wm_geometry("800x400") root.columnconfigure(0, weight = 1) root.rowconfigure(0,weight = 1) class main(Frame): def __init__(self, *args, **kwargs): Frame.__init__(self, *args, **kwargs) container = Frame(self, width = 800, height = 480) container.pack(side = "top", fill="both", expand = True) container.grid_rowconfigure(0, weight=1) container.grid_columnconfigure(0, weight=1) self.frames = {} for F in (StartPage, PagePick, PageReturn, PageDelete): frame = F(container, self) self.frames[F] = frame frame.grid(row=0, column=0, sticky="nsew") self.show_frame(StartPage) def show_frame(self, cont): frame = self.frames[cont] frame.tkraise()
Flow chart
Conclusion and future work All functions work. Build an ios app. Remotely control closet and get information. Add mechanical equipment to automatically pull clothes off from closet.
Credits Luke Wendt Professor Jonathan
Thank You!