24
AAPT 2013 Summer Meeting Portland, OR July 17, 20 Dr. John Liu Saint Cloud State University, MN Wireless Open Source Physics Laboratory Data Acquisition System

AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Embed Size (px)

Citation preview

Page 1: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

AAPT 2013 Summer Meeting Portland, OR July 17, 2013

Dr. John LiuSaint Cloud State University, MN

Wireless Open Source Physics Laboratory Data Acquisition System

Page 2: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Laboratory education?!Every natural science discipline relies heavily on

experimental findings thus emphasizes laboratory education

Introductory laboratories only last 1 to 3 hours per week

Students don’t have access to equipment outside lab periods

Some schools can’t afford enough electronic lab equipment

We need a platform that is cost-effective to deploy in labs and can improve student experimental skills outside labs

The solution is open source physics laboratory platform

Page 3: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

ObjectiveImprove experimental physics education at

introductory level

Build a platform and content to improve experimental physics teaching and learning

Reduce the cost of the platform to improve its accessibility

Goal

Designed Open Source Physics Laboratory platform based on Open Source project Arduino

Current revision (2) is low-cost and has many features

Achievements

Page 4: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Version 1.0AAPT 2012

Page 5: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Version 2.0

1-2 hr

Sonic Ch 2 Ch1 Ch0 PowerRanger (I2C)

Enclose

AAPT 2013Apparatus competition

award and low cost winner

DIN-5 plugs won’t fall off like jumper wires on an Arduino

Page 6: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Cost:$60 if you wish to purchase a kit ready for

assembly$30ish parts if you purchase your own parts

for 25 units Standalone mode needs no PC or mobile

deviceSensors can be constructed from parts for a

few dollarsShipping is not included in the estimate

Page 7: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Capability:Wired and wireless data transferElegant enclosure and rugged designWorks with generic and Vernier analog and

digital sensorsWorks with countless modern I2C sensors.Firmware includes a selection of sensors in

menuRunning your own sensors requires 4-5 lines

of codeWrite your own project code

Page 8: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Accuracy:10-bit analog to digital converter with 5mV

accuracyDigital timer around 30ppm at ¼ usModern I2C and TTL sensors such as

accelerometers and GPS digitize measurements themselves so OSPL achieves maximal sensor accuracy.

With I2C analog-to-digital converter, OSPL can go beyond 5mV analog accuracy, for as little as a few dollars of parts.

Page 9: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Next step?Integrate more sensors to OSPL firmware.Write sample code of various lengths to

provide scaffolds for users to learn.Offer kits (limited assembled units) for early

adoptersBuild a website to host and share content and

updatesImprove current design from feedbacks.Create assembled and headless versionsSeek fund to improve and promote design and

content

Page 10: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Legal wordsCircuit board design will be released under

Creative Commons Attribution Share-alikeArduino library is released under GNU Lesser

General Public LicenseOSPL firmware will be released under GNU

General Public LicenseVarious libraries could have their own

licenses

Page 11: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Thank you!

Page 12: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Additional slides

Page 13: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

An application: smart trackAutomatically reports location of a cart on a

trackEmulates a sonic ranger when connected to

Vernier LabQuest to log position velocity and acceleration

Running averages of positionsTare functionSee how sonic rangers work with Vernier

LabQuestSee how physics applies to real life situations

Page 14: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Smart trackVernier cart

Vernier track

Vernier force gauges

Vernier force gauge

Vernier LabQuest (Optional)

OSPL V1

Page 15: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Firmware:Standard upgradeable firmware is

compatible with most Vernier analog sensorsMany of the above sensors can be selected

from a list.Sensors not yet on the list will require a

simple conversion: x=a*reading+b is needed.Vernier sonic ranger (needs additional cable)I2C sensors including 3-axis accelerometer,

3-axis magnetic sensor, 3-axis gyroscope, barometer, and a lot more will be included in future firmware release

Use your own sensor is very easy with 4-5 lines of code

Page 16: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Write your own firmware

reading=analogRead(channel); Line 1: acquire data: result=a*reading+b; Line 2: scale data for output: lcd.clear(); Line 3: clear LCD: lcd.print(result); Line 4: output result: delay(200); Line 5: pause momentarily for user:

Read sensor voltage

Convert reading x with

y=ax+b

Format result send to LCD

or PC

Delay (for mere

humans)

reading=analogRead(channel); Line 1: acquire data: result=a*reading+b; Line 2: scale data for output: Serial.println(result); Line 3: output result: delay(200); Line 4: pause momentarily for user:

Display measurement on the LCD, 5 lines of code

Send measurement to PC, 4 lines of code

Page 17: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Programming the OSPLPush to upload to OSPL

Page 18: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Hardware aspectOSPL hardware includes designing a data

acquisition (DAQ) system and adapting to various sensors (SEN).

SEN mostly outputs analog voltage to represent measurement, such as 0.25V for 25DegC.

Some SEN have simple digital logic, such as photo gates (on/off) and sonic rangers (timed pulse).

DAQ reads analog voltages and follows simple digital logics to present meaningful data to experimenters.

DAQ may also log and transfer data to a computer.

Both DAQ and SEN need to cheap and good quality.

Page 19: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

System specification: Microcontroller: ATMEGA328P-PU compatible with Arduino Uno Program memory: 32KB, rough max 3,000 lines of C/C++ code. Variable memory: 2KB, roughly stores up to 1,000 data points. EEPROM: 1KB, roughly stores up to 500 data points. Supports up to 3 autoID analog sensors (Vernier resistor-based) or up to 6

analog sensors without autoID Supports up to 8 digital inputs or outputs for photo gates, counters and

sonic rangers. Support I2C sensors that are widely available at very low cost On-board 16X2 character LCD monitor with back light On-board speaker for simple tones LCD back light jumper to disable back light to preserve battery Wireless and wired data transmission with a PC/Linux/Mac Rotary encoder for easy menu navigation (up/down/select) Elegant enclosure ready to use Massive amount of library and sample codes as templates to start a project

or load pre-written code for specific tasks.

Page 20: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Open source benefit?Drastically reduce cost up to 90% on lab data

acquisition systems and sensorsDrastically expand sensor selectionsUse data acquisition software freely or make

modifications to fit your needStudents can even afford the hardware and

explore physics at their own homes

3-axis accelerometer, 3-axis magnetic sensor, 3-axis gyroscope, barometerPaid $13, requires 4 wires.

Page 21: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Design:

Schematic

Circuit board layout

Page 22: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

What is an Arduino?Arduino is an open-source, very easy to

learn/use physical computing platformArduino can sense many types of sensors and

buttons (analog and digital)Arduino can be programmed to sense its

inputs repeatedlyArduino has a serial portArduino uses C/C++ as programming

languageArduino has an active online community

Page 23: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

Structure of the current OSPLP

roto

typ

e

Core

Microcontroller

Power supply

User panel

LCD

Keypad

Buzzer

Switchboard

Din-5 connectors

¼” stereo jacks

Expansion Communication

This is the user control panel. Different types of panels may be used, with different number of buttons, LCD sizes.

This connects to an adapter to talk with PC.

This connects to existing Vernier and Pasco sensors.

This contains the microcontroller (brain) and the power to the DAQ. The microcontroller is loaded with commercial or DIY firmware.

Page 24: AAPT 2013 Summer Meeting Portland, OR July 17, 2013 Saint Cloud State University, MN

AIP data