Saint Cloud State University, MN AAPT 2013 Summer Meeting Portland, OR July 17, 2013 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 Objective Improve experimental physics education at introductory level Goal Build a platform and content to improve experimental physics teaching and learning Reduce the cost of the platform to improve its accessibility Achievements Designed Open Source Physics Laboratory platform based on Open Source project Arduino Current revision (2) is low-cost and has many features Version 1.0 AAPT 2012 Version 2.0 1-2 hr Sonic Ch 2 Ranger (I2C) Ch1 Ch0 Enclose Power DIN-5 plugs won’t fall off like jumper wires on an Arduino AAPT 2013 Apparatus competition award and low cost winner 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 device Sensors can be constructed from parts for a few dollars Shipping is not included in the estimate Capability: Wired and wireless data transfer Elegant enclosure and rugged design Works with generic and Vernier analog and digital sensors Works with countless modern I2C sensors. Firmware includes a selection of sensors in menu Running your own sensors requires 4-5 lines of code Write your own project code Accuracy: 10-bit analog to digital converter with 5mV accuracy Digital timer around 30ppm at ¼ us Modern 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. 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 adopters Build a website to host and share content and updates Improve current design from feedbacks. Create assembled and headless versions Seek fund to improve and promote design and content Legal words Circuit board design will be released under Creative Commons Attribution Share-alike Arduino library is released under GNU Lesser General Public License OSPL firmware will be released under GNU General Public License Various libraries could have their own licenses Thank you! Additional slides An application: smart track Automatically reports location of a cart on a track Emulates a sonic ranger when connected to Vernier LabQuest to log position velocity and acceleration Running averages of positions Tare function See how sonic rangers work with Vernier LabQuest See how physics applies to real life situations Smart track Vernier cart Vernier track Vernier force gauges Vernier force gauge Vernier LabQuest (Optional) OSPL V1 Firmware: Standard upgradeable firmware is compatible with most Vernier analog sensors Many 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 Write your own firmware Read sensor voltage Convert reading x with y=ax+b Format result send to LCD or PC Delay (for mere humans) Send measurement to PC, 4 lines of code reading=analogRead(channel); result=a*reading+b; Serial.println(result); delay(200); Line 1: acquire data: Line 2: scale data for output: Line 3: output result: Line 4: pause momentarily for user: Display measurement on the LCD, 5 lines of code reading=analogRead(channel); result=a*reading+b; lcd.clear(); lcd.print(result); delay(200); Line 1: acquire data: Line 2: scale data for output: Line 3: clear LCD: Line 4: output result: Line 5: pause momentarily for user: Programming the OSPL Push to upload to OSPL Hardware aspect OSPL 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. 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 prewritten code for specific tasks. Open source benefit? Drastically reduce cost up to 90% on lab data acquisition systems and sensors Drastically expand sensor selections Use data acquisition software freely or make modifications to fit your need Students can even afford the hardware and explore physics at their own homes 3-axis accelerometer, 3-axis magnetic sensor, 3-axis gyroscope, barometer Paid $13, requires 4 wires. Design: Circuit board layout Schematic What is an Arduino? Arduino is an open-source, very easy to learn/use physical computing platform Arduino can sense many types of sensors and buttons (analog and digital) Arduino can be programmed to sense its inputs repeatedly Arduino has a serial port Arduino uses C/C++ as programming language Arduino has an active online community Structure of the current OSPL Microcontroller Core Power supply This contains the microcontroller (brain) and the power to the DAQ. The microcontroller is loaded with commercial or DIY firmware. Prototype LCD User panel Keypad Buzzer Din-5 connectors ¼” stereo jacks This connects to existing Vernier and Pasco sensors. Communication This connects to an adapter to talk with PC. Switchboard Expansion This is the user control panel. Different types of panels may be used, with different number of buttons, LCD sizes. AIP data