Open Source PhysicsLaboratory Data Acquisition System V 2.0 Dr. John Liu Department of Chemistry and Physics, Saint Cloud State University, St. Cloud, MN AAPT annual meeting July 2013 Pictures Introduction Open source physics laboratory data acquisition system V 2.0 (OSPL V2) is a physics laboratory data acquisition electronics platform supplement/alternative to commercial platforms such as PASCO Probeware or Vernier LabQUEST. You can build a unit yourself that costs as little as $30. OSPL V2 is an update from the OSPL V1 that won AAPT apparatus competition in 2012. It can be used with sensors/actuators to perform experiments, process data, and even make your own creative projects. It is portable for activities outside physics lab rooms. Both circuit board and firmware/code are open source. (A) Circuit board (unpopulated) (B) Assembled kit (C) Assembled kit in enclosure 10cm Objectives (D) Displaying temperature, force, and pressure (E) Schematic diagram (F) Circuit board design Improve experimental physics education at introductory level Improve hands-on skills of physics instructors and students Build a platform and community to promote teaching and learning experimental physics using cost-effective electronics Build a community to support constructing, using, and improving OSPL system and software design Reduce the cost of and time to build an OSPL unit so it is accessible to anyone interested in experimental physics Analog input accuracy The accuracy of analog input is 5mV. We used a Vernier dual-range force sensor at 10N range to test our system. Masses were loaded to the force sensor in 20 gram increments and force reading was taken from the system. The horizontal axis is the weight of the mass on the force sensor. The vertical axis is the force read from our system. We found a very good agreement between the two with scaling parameters provided in Vernier’s manual. Digital input accuracy Plans Benefit of open source hardware and software OSPL has a 16MHz clock and can easily achieve 10us accuracy. With special programming one can achieve 1/4us accuracy. The above accuracy applies to photogates, sonic rangers, rotary sensors, and other simple digital on/off and pulse width sensors. Modern I2C interface sensors digitize measurements themselves so OSPL receives measurement at 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. TTL serial port sensors such as some GPS and sonic rangers with baud rate below 38400 will report full sensor accuracy. Explore more Vernier analog and digital sensors, due to their simplicity to integrate with OSPL. Expand to more modern sensors. Write enough sample codes to kick start projects. Design sample projects for instructors and students to try out. Build a website to host the content Branch out a “headless” system (no display or buttons but wirelessly connects to mobile devices) for even lower cost and improve current design with feedbacks. Software freedom • Included firmware works with a large number of sensors • Software development environment is open source • To program the unit yourself, 4-5 lines of code is enough! • More sample code for more complex tasks free to download • Compatible with Arduino that has the biggest online DIY community and resources for beginners from any background Hardware freedom You only pay parts and board production ($30) and spend time You may modify the circuit in any way that suits your own needs. Circuit board is very easy to soldereven by kids, 1-2 hours, no prior experience needed Freedom to choose from many sensors that cost only small fractions of those sold to the educational market. Design the coolest physics projects with the freedom of OSPL 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. Projects and activities with OSPL • Code to sense and display an input Included firmware can be used in labs to display up to 3 sensors on LCD, or transfers readings to PC/tablet via wireless or wired connection. See fig. C and D. Make a simple data logger with as few as 4-5 lines of code Make a weather station with compatible sensors 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 for user Compatible sensors Vernier sensors All analog sensors with a linear voltage to measurement relation are compatible, such as force sensor, temperature probe, voltage probe, pressure sensor, accelerometers, barometer etc. BTA-DIN adapter is needed for BTA interface analog sensors ($5) Most digital sensors such as sonic ranger, photogate, rotation sensor, drop counter etc. Pasco sensors Pasco photogates, strobe light, sonic ranger etc. High quality low cost sensors I2C interface sensors: accelerometer, barometer, magnetic sensor, gyroscope. One such board that includes all of above costs $13 on ebay. Lots of analog and digital sensors can be used. The user just needs to develop as few as 4-5 lines of code and do the wiring. Project highlights Conclusions and future directions Our design is solid, easy to build and compatible to many sensors. The accuracy is more than sufficient for student labs The new design and ready-to-use enclosure drastically reduced time and complexity to build a unit by a beginner The wireless connectivity offers lots of project opportunities We will develop lab activities and procedures for instructors We will test more sensors and write code for OSPL to use them We will develop more sample project codes for DIY projects We will seek funding to promote the OSPL 10DOF project uses a $13 sensor board with 3-d accelerometer, 3-d magnetic sensor, 3-d gyroscope and barometer and Bluetooth wireless to relay data to PC. Smart track uses force gauges to sense the location of a cart on a track and displays it on LCD or emulates a Vernier sonic ranger. Center of mass visualizer uses force gauges to sense x,y of center of mass and sends to a PC, which then overlays the location on live video.