410 likes | 597 Views
Fabulous Weather-Sensing Data-logger !. Introducing the…. 100% designed and manufactured at the Vigyan Ashram FabLab!. Topics. What it is and how to use it (Demos) Why we made it How it works (sort of) How we made it How you can make more!.
E N D
FabulousWeather-SensingData-logger! Introducing the… 100% designed and manufactured at the Vigyan Ashram FabLab!
Topics • What it is and how to use it (Demos) • Why we made it • How it works (sort of) • How we made it • How you can make more!
Memory = Memory = ????? kB 16 kB
Information 0V, 5V,1001001 = A, B, C, D 5V 0V Aa k p ma 1 1 0 0 1 0 1 0 1 0 fablab 01101101011110 Aamabaa 0110110101001110
Code = Instructions • How to wash your plate: • Rinse plate with water . • Empty water into bucket. • Wait in line for sink. • At sink, apply soap to plate. • Scrub plate. • Rinse with water. • Submit for inspection
It All Comes Down To: Hardware Software (Stuff you can touch) (Stuff you can’t touch) Firmware (Something in between)
The designprocess(i.e. why did we have to spend ALL that time in the FabLab?)
What and Why? Questions Questions Questions Questions Problem Definition: What are we trying to do and why? Questions Questions Questions Questions Questions Questions Questions Questions
How? Hardware, Software and Firmware Specification: How are we going to do it? Breaking The problem Into Parts That We Can D e a l W i t h
Using What? Setting Up the Design Environment: Finding and learning the tools we need.
With What? Parts Procurement: Getting the bits and pieces we need
Design Build Test Evaluate Answers Answers Answers Answers Answers Implementing the solution Answers Answers Answers Answers Answers Answers Answers Answers Answers
An Indication of Complexity • Software: 2000 lines of code! • Firmware: 1500 lines of code! • Hardware: Three prototypes Many many hours of design, testing and debugging.
High level state diagram v5 Initialization STATE REQUESTS “Show sensor readings” request Task done Receive setup data Do setup -on uart rx “S” Upload Data – On uart rx ‘U” Setup request Task done Main loop Idle Upload request Sensor Test – on “ST” key press Display status – on “DS” key press Upload data Task done Status request Task done Task done Log Data – on logging Interval ” Clear memory – On uart rx “C Display status Status request Test request Sensor test Log interval timeout Start/Stop logging – on button press Task done Task done Eventually we may want to allow data logging to cause an exit from Display Status and Sensor Test Modes Task done Take readings and log data Start/Stop Logging INTERRUPTS (ISRs) • ISRs process button pushes, Uart , timers.(Specific states may have some interrupts disabled). • ISRs set flags that are examined within states at appropriate times. • No state transitions occur before tasks complete. • State transitions are determined only in one of the two idle states. UART: on any character Timer interrupt every 0.01 sec
Vigyan Ashram Weather LoggerSoftware application state diagram Help pages [B]ack Quit [Q]uit [H]elp Main Menu Failed to connect and user does not want to retry, or, Device is still logging and user does not want to stop logging. Establish Connection To Datalogger [S]etup , [U]pload [C]lear Memory [B]ack Success Success Setup Success Clear Memory Upload Completed task Completed task or [B]ack
Flowchart for “Establish Connection” state Main Menu [S]etup , [U]pload [C]lear Memory Establish Connection: Send ‘Q’ to logger [R]etry Send ‘S’, ‘U’ or ‘C’ Receive ‘A’ck Logger response? Invalid or no response Setup or Upload or Clear memory modes End comm with logger User presses any key Ask user: Retry / Back? Receive ‘L’ (logging enabled) Success msg Ask user: Stop logging or Go Back? [B]ack [S]top logging Ask chip to stop logging Error msg Send ‘D’ Logger response? Timeout Receive ‘D’ Success msg User presses any key [B]ack • Notes: • Every time we ask the user for input, we provide a message if the input is not valid.
Future Additions • Other sensors • Rain gauge • Solar radiation sensor • Wind speed/direction sensor • USB • Wireless
Please Keep In Touch Michelle: mthong@gmail.com Scottie: psysquirrel@gmail.com