Team Solar CDR Solar Energy Predictor Capstone Spring 2009 Daniel Seltzer Jim Love Rob Chadil Eric Dickey Brief Overview A portable device used to accurately estimate the amount of solar energy that can be harvested at an arbitrary location. The device should take into account solar panel tilt, elevation, and geographic location. System output will show the power a solar panel could theoretically harvest over the course of a year at the chosen location. System Organization Circular Fisheye Lens Camera (IP) Data Capture Device FPGA Graphic LCD Pic Buff (SRAM) SD Card Microcontroller Single Board Computer Compass Tilt Sensor GPS Number Character Pad Display Sensor Module Software Modules Image Processing – Sky/Obstruction Alg. Camera Orientation Compensation Sun Tracks Algorithm Final Power Calculation User Interface Windows Laptop Battery Power System Windows Application Status of UI Design Completed: • All Algorithms for the analysis have been written in MatLab, C# or C. • User Interface Layout is complete • User Interface Button Calls are working or in pseudo code • Data Structures are Coded Work to be Done: • Saving projects Data Management Site 1 Panel 1 Panel 2 Image 1 Image 2 Image 1 (metadata, (metadata, (metadata, images) images) images) Choosing An Image File Selecting an Image File Import • Import Jpeg image • Extract Meta Data Process • Perform Sky Detection • Calculate True North form Magnetic North Select Image Details Image Details Running Analysis Running Analysis For the date range: Setup Process • Calculate Sun Position • Translate to Image Location • Detect if obstructed with image • Add energy to calculation • Add data to graph Output: Total Energy over Range and Graph Single Board Computer S’2009 Team Solar Status of SBC Design Completed: • Camera communication and video capture through RTSP • Mjpeg video to jpeg frame conversion • Logging functions finished and working Work to be Done: • • • • S’2009 Modify jpeg metadata Communicate with sensor module Write to SDCard Purchase SBC Team Solar Single Board Computer • Main task is to serve as a client to IP cameras RTSP video feed. • openRTSP is used to capture a one second mjpeg movie segment. • A single frame is then pulled out of the video. • This frame is packaged and then written to an SDCard for transfer. S’2009 Team Solar SBC software ACTI.h • Camera diagnostics functions • Camera communication functions • Camera/Lens configuration information Image.h • Jpeg and mjpeg manipulation function • Checks that all movies and images are well formed • Extracts frames from video, and inserts metadata into images Logs.h • An extensive set of logging functions is used to aid in debugging the SBC S’2009 Team Solar Windows SBC Communication SBC packages image, sensor data, and camera configuration into an Exif format image. This format it widely used by digital cameras to include metadata into jpeg images. Windows can then deal with camera image like any other jpeg, and metadata is readable by any Exif data reader. S’2009 Team Solar Exif 2.2 JPEG Image Format Start of Image{ JPEG header; Start of Frame{ APP1{ Exif Data goes here; } APP2{ And here as well; } Start of Scan{ Image Data; } } } S’2009 • Tags for lens, GPS data, other location info, date of photo, and camera configuration are predefined in Exif standard. • This makes our images metadata readable by a wide range of image manipulation programs. Team Solar SBC Sensor Module Communication Sensor Module •RS232 serial is used between SBC and sensor module •Both BD9 and ribbon cable connectors on Sensor module allow for easy debug, as well as clean connection with SBC S’2009 Team Solar SBC Sensor Module Communication 1 • Daemon on SBC waits for incoming data from Sensor Module. 2 • Sensor module passes SBC sensor data and a file name 3 • After receiving this, SBC captures picture, and stores it under given filename 4 • SBC sends thumbnail of captured picture back to Sensor module for display on graphic LCD S’2009 Team Solar Sensor Module S’2009 Team Solar Status of Senor Module Schematic • Full sensor module schematic complete • Awaiting final design of graphic LCD implementation PCB Layout • PCB layout is underway but not yet complete • Need to add graphic LCD components to design • Expect to be complete by weeks end Firmware • Low level firmware for ARM7 is complete • Need to write code for interfacing with GPS Receiver and Compass Module Sensor Package RS-232 GPS Receiver ARM7 packages data and sends it to SBC UART 32 Bit Parallel ARM7 offloads image to SRAM Microcontroller 32 Bit ARM7 50 MHz User Interface I2C Compass Module LCD Screen 8 bit GPIO Keypad Image from FPGA GPS Receiver Transmit Data Output UART0 Receive Data Input UART0 Compass Module Serial Clock Pull Up Resistor (10k Ω) Serial Data Power Supply and Voltage Regulators +1.8V and +3.3V voltage regulators +5-9V DC barrel plug Keypad 8-bit GPIO 4-bit OR gate to create interrupt Parallel I/O Structure 800 x 480 Color LCD 7 Serial I/O Control Microcontroller Signals GPIO Interrupt SPI Bus Control Address Bus 8 2 4 4 19 I/O Data I/O 5 I/O 24 I/O I/O Cyclone II FPGA 1 I/O I/O Buffer 24 32 I/O I/O I/O Data Bus 19 4 Data Address Bus Control 32 SRAM (512k x 16) x 2 Bus Timing: ARM7 --> SRAM CPU Clock Chip Select Output Enable Write Enable Address Bus Data Bus Buffer State Valid Address Change Valid Data High Z Bus Timing: LCD Horizontal Clock HSync Valid Data (line) Data Bus Data Enable μC Bus Active 216 Clock Cycles High Z 800 Clock Cycles Active 40 Clock Cycles Bus Timing: LCD Vertical HSync Vsync Data Bus Data Enable Valid Data (area) Project Budget Image Capture Components IP Camera Fisheye Lens Single Board Computer $250.00 $120.00 $350.00 Sensor Module Components PCB (4 layer) Microcontroller/FPGA Memory IC's Misc. Components Compass GPS Receiver Graphic LCD Keypad $75.00 $40.00 $50.00 $50.00 $150.00 $0.00 $0.00 $0.00 10% Margin of Error Available Funds $108.50 ($800.00) Budget Deficiency $393.50 Project Schedule CDR 2/24 Milestone 1 Milestone 2 Expo 3/17 4/14 4/30 Sensor Module PCB Rev 1. Schematic and Layout Ordered Sensor Module powered and with component interface code written Sensor module software complete Linux Functional on SBC. Image Capture/Processing on Debian Machine functional. Image capture from single board computer Sensor module fully integrated with single board computer Algorithms completed in MATLAB Basic user interface on windows computer, algorithms converted to C# User interface completed Full system test completed Concerns Sensor Module • Lack of experience in designing PCB and making sure all components are placed, soldered properly. • Assuring that we meet design requirements, and that components are accurate enough to make good solar predictions. • Making sure that all the components can communicate with each other, the microprocessor, and most importantly package that data and send it to the SBC. Windows UI • Long development time due to all the small details that plague user interfaces Single Board Computer • Getting openRTSP to compile on ARM9 SBC Questions? S’2009 Team Solar