170 likes | 295 Views
Nick Wittemen, EE Chris Merola, EE José Figueroa, EE Matt Ryder, EE. iLights. Comprehensive Design Review. Our Design. iTunes Plug In PC User Interface Phase Controlled Lighting Controls multiple incandescent lights Provides interactive listening environment. Block Diagram.
E N D
Nick Wittemen, EE Chris Merola, EE José Figueroa, EE Matt Ryder, EE iLights Comprehensive Design Review
Our Design • iTunes Plug In • PC User Interface • Phase Controlled Lighting • Controls multiple incandescent lights • Provides interactive listening environment
iTunes Plug-in • Dynamic Link Library (.DLL) file loaded by iTunes • Runs as a visualizer plug-in, able to access frequency data • Exports frequency data via COM port at rate of visualizer update (set to max, up to 60 fps)
Project Sources • Visual Studio Project • Based on VizKit, open source framework built to iTunes Visualizer SDK guidelines • Provides well documented method for implementing an OpenGL visualizer • Serial Communication • Uses Cserial, free source to implement serial port on Windows • Have also used POSIX library (termios.h) for possible expansion to OSX but this library will not compile under Visual Studio for Windows
FFT Data • iTunes makes FFT data available to visualizer plug-ins while they are displayed • Sent VisualPluginRenderMessage by iTunes at frame rate specified • This message passes a pointer to FFT • 512 linearly spaced frequency steps, 1 byte each, amplitude only • This is enough information for what we want to do • When sent render message we process the data and transmit as ANSI string (char[9]) • [(11)(22)(33)(44)(\0)]
Zero Cross Detection • Our zero cross detector takes advantage of Atmega168 internal clamping diodes • Keeps voltage on input pins between Vcc+0.5V and Vg-0.5V • Using this we are able to connect N terminal to our ground and L to an input pin, produces 5V square wave • Circuit uses series 1Meg resistors on each pin. This will limit current to diode spec of 1mA max up to 1000V
Hardware: Triac BTA20-700CW Snubberless • Triacs allow switching of an AC signal • Triggered by the Arduino and zero-cross detection • Phase Control possible (dimming) • Integral/area under curve proportional to current through load • Sensitive Gate Triggering (35mA) • Using an opto-isolated triac driver allows for safe and effective handling of power signals
System Uses 2 Microcontrollers • Microcontroller responsible for light dimming must handle 120 interrupts per second and then trigger lights with precise timing • Handling so many interrupts caused problems with serial communication • Solution was to divide up tasks: • First Arduino waits for serial data from computer, sets pin to signal second Arduino that data is available • Second Arduino checks “data available” pin when it has time, after handling light dimming and before next interrupt
Arduino 1 • Waits for incoming data on serial port • Parses incoming string stores as 4, 6-bit values (only 6 pins per port available on arduino) • Communicates with second arduino using (2) 6-bit parallel ports and 2 control pins • Control Pin 1 -> Data Available, tells arduino 2 that data is ready • Control Pin 2 -> Send next byte, received from arduino 2 to signal next available message
Arduino 2 • Receives input from first Arduino on parallel ports, convert to 6-bit input to timing value from look-up table • Performs zero cross detection for triac timing • Internal clamping diodes combined with external resistors reduce 120VAC to 5VDC square wave • Trigger interrupts on rising and falling edges • Send trigger signals at proper times for light dimming
Design Considerations • EagleCAD schematic almost complete • Need to model DC power supply and off-board connectors • 120VAC lines will be on inner layer of board to minimize trace spacing • Dielectric constant of PCB material is much higher than that of air • Also reduces risk of shock • 120VAC trace width must be about 3mm to reduce resistance and heat buildup.
Summary Demonstration Comments / Questions?