Weather-Sensing Fabulous Weather-Sensing Data-logger! Introducing the… 100% designed and...

Post on 21-Jan-2016

219 views 0 download

Tags:

Transcript of Weather-Sensing Fabulous Weather-Sensing Data-logger! Introducing the… 100% designed and...

FabulousWeather-Weather-SensingSensing

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!

What is a What is a Weather-SensingWeather-Sensing

Data-logger,and how is it and how is it

used? used?

Why do we need Why do we need a a Fabulous

Weather-SensingWeather-SensingData-logger? ?

How does it work?How does it work?(What’s going on down there?)(What’s going on down there?)

The CircuitThe Circuit

CPU = BrainCPU = Brain

=

Clock = Heartbeat

=

Buttons = Ear

=

LCD = Mouth

=

Memory = Memory

=

16 kB ????? kB

Sensor = ear/eye/skin/nose/etc

=

Information0V, 5V,1001001

0V

5V A, B, C, D

Aa k p ma

0110110101001110

01101101011110

1 1 0 0 1 0 1 0 1 0

fablab

Aamabaa

=

Code = InstructionsHow 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

Communication

=

It All Comes Down To:

Hardware(Stuff you can touch)

Software(Stuff you can’t touch)

Firmware(Something in between)

So there you have it! So there you have it!

The designThe designprocessprocess

(i.e. why did we have to (i.e. why did we have to spend ALL that time in the spend ALL that time in the

FabLab?)FabLab?)

What and Why?

Problem Definition:What are we trying

to do and why?Questions

Questions

Questions

Questions

Questions

Questions

Questions

Questions

Questions

Questions

QuestionsQuestions

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 theDesign Environment:

Finding and learning thetools we need.

With What?Parts Procurement:Getting the bits and

pieces we need

Design Build Test Evaluate

Implementing the solution

Answers

Answers

Answers

Answers

Answers

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 v5Initialization

Upload data

Sensor test

“Show sensor readings” request Receive setup

data

Take readingsand log data

Display status

Status request

UART: on any

character

Timer interrupt

every 0.01 sec

INTERRUPTS (ISRs)

Task done

Task done

Setup request

Upload request

Task done

Task done

Task done

•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.

Idle

Task done

Status request

Test request

Log interval timeout

Eventually we may want to allow data logging to cause an exit from Display Status and Sensor Test Modes

Task done

Task done

Main loop

Do setup-on uartrx “S”

SensorTest – on “ST”

key press

Display status – on “DS”

key press

LogData – on

logging Interval

UploadData –

On uart rx ‘U”

STATEREQUESTS

Start/StopLogging

Clear memory – On uart rx

“C

Start/Stop logging – on button press

Vigyan Ashram Weather LoggerSoftware application state diagram

Help pages

Main Menu

Setup

EstablishConnection

To Datalogger

Quit

UploadClear Memory

[S]etup , [U]pload[C]lear Memory

[Q]uit

Failed to connect and user does not want to retry, or,Device is still logging and user does not want to stop logging.

Success

Success

Success

[H]elp

[B]ack

[B]ack

Completed task

Completed task or [B]ack

[S]etup , [U]pload[C]lear Memory

Ask user:Retry / Back?

[R]etry

Loggerresponse?

[B]ack

Invalid or no response

Ask user:Stop logging or

Go Back?

Ask chip to stop logging

Establish Connection:

Receive ‘L’(loggingenabled)

Receive ‘A’ck

Loggerresponse?

Timeout

Error msg

Main Menu

Send‘S’, ‘U’ or ‘C’

[S]top logging

Send ‘D’

Receive ‘D’

Success msg

End comm with logger

Send ‘Q’ tologger

Setup orUpload or

Clear memorymodes

Success msg

Flowchart for“Establish

Connection”state

User presses any key

User presses any key

Notes:-Every time we ask the user for input, we provide a message if the input is not valid.

[B]ack

How to make How to make your own your own Fabulous

Weather-SensingWeather-SensingData-logger? ?

Mill!Mill!

Drill! Drill!

Solder! Solder!

Enclose!

Results

Results

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