chemberry: a raspberry pi microcontroller for microscale

1
Chemberry: a Raspberry Pi microcontroller for microscale laboratory experiments Kevin Krause Department of Computer Science, Carthage College Celebration of Scholars 2018: Exposition of Student & Faculty Research, Scholarship & Creativity Abstract Research and work in the chemical field relies heavily on computational devices. Without the aid of elaborate computers such as mass spectrometers, FTIR spectrometers, NMR instruments and various other apparatuses, chemical breakthroughs would be nowhere near where they are today. Breakthroughs in drug design and pharmacology are often assisted by computer simulations. Therefore, in an academic setting, it is important that chemistry students master the theory while also mastering usage of these complex computers. However, the interfaces to these computers and software can inhibit students’ growth and confidence. Chemberry can address this issue by making it easier and more convenient for chemistry students to participate in microscale laboratory experiments. Key Technologies Used Java 8 An OO (object-oriented) language used to program the UI/UX, TCP sockets, and serial connection. Makes extensive use of class hierarchy, encapsulation, inheritance, and polymorphism. C / C++ A multi-paradigm, low-level language implemented in operating systems and embedded devices. Used in the Arduino to read voltages and currents produced by the sensors. Raspberry Pi and Arduino Microcontrollers; small computers typically used to manipulate and access other pieces of hardware. Development suite Github desktop, Visual Studio Code, NetBeans, Cygwin, Arduino IDE, RXTX, JFreeChart, OneWire Project Objectives Facilitate small scale chemistry experiments Electronically record, analyze, and transmit data without pen and paper hassle Scale and customize experiments Reduce “hovering”; let students be independent Encourage multiple disciplines to work together API build and documentation will allow future students to continue work on this project Acknowledgements Thank you Professor Kivolowitz and Professor Mahoney for your software expertise and the chemistry department for inspiring my passion for chemistry. Additionally, thank you friends and family for your encouragement in this endeavor. Other acknowledgments, including use of 3 rd party APIs, can be found on my Github. Raspberry Pi is a trademark of the Raspberry Pi Foundation. Above: the whole setup; three sensors connected to and powered by the Arduino, which is connected to and powered by the Raspberry Pi. The “Configuration” button leads to a screen where students select which instrument they are using. The data collected is sent via Wifi to their instructor, who is running another program (“Chemberry Professor”). Additionally, more instruments can be configured and used through the numerous pins, inputs, and “sockets” contained within the Arduino as well as the Raspberry Pi. The water resistant touchscreen display is ideal for laboratory conditions. Top left: pH probe; top right: EC probe; right: temperature sensor. The pH and EC probes connect via BNC to their respective circuit boards, while the temperature sensor connects using an adapter. The circuits are completed using a positive and negative wire lead as well as an “input,” from which the Arduino reads voltages and then sends them to the Raspberry Pi. Above: code that executes when the “Measure” button is pressed on the client program. If no sensor has been configured, an error is thrown. Otherwise, the program determines if the user is measuring once or measuring over time as well as checking if a previous measurement is complete. Right: Arduino and Raspberry Pi 3 Model B boards. The Raspberry Pi has more cores, processing power and RAM than the Arduino, but the Arduino greatly simplifies creating circuits and using electronics. The Arduino

Upload: others

Post on 02-Feb-2022

0 views

Category:

Documents


0 download

TRANSCRIPT

Chemberry: a Raspberry Pi

microcontroller for microscale laboratory experiments

Kevin KrauseDepartment of Computer Science, Carthage College

Celebration of Scholars 2018: Exposition of Student & Faculty Research, Scholarship & Creativity

AbstractResearch and work in the chemical field relies heavily on computational devices. Without the aid of elaborate computers such as mass spectrometers, FTIR spectrometers, NMR instruments and various other apparatuses, chemical breakthroughs would be nowhere near where they are today. Breakthroughs in drug design and pharmacology are often assisted by computer simulations. Therefore, in an academic setting, it is important that chemistry students master the theory while also mastering usage of these complex computers. However, the interfaces to these computers and software can inhibit students’ growth and confidence. Chemberry can address this issue by making it easier and more convenient for chemistry students to participate in microscale laboratory experiments.

Key Technologies Used• Java 8• An OO (object-oriented) language used to program the

UI/UX, TCP sockets, and serial connection.• Makes extensive use of class hierarchy, encapsulation,

inheritance, and polymorphism.• C / C++• A multi-paradigm, low-level language implemented in

operating systems and embedded devices.• Used in the Arduino to read voltages and currents

produced by the sensors.• Raspberry Pi and Arduino• Microcontrollers; small computers typically used to

manipulate and access other pieces of hardware.• Development suite• Github desktop, Visual Studio Code, NetBeans, Cygwin,

Arduino IDE, RXTX, JFreeChart, OneWire

Project Objectives• Facilitate small scale chemistry experiments• Electronically record, analyze, and transmit data without pen

and paper hassle• Scale and customize experiments• Reduce “hovering”; let students be independent• Encourage multiple disciplines to work together• API build and documentation will allow future students to

continue work on this project

AcknowledgementsThank you Professor Kivolowitz and Professor Mahoney for your software expertiseand the chemistry department for inspiring my passion for chemistry.Additionally, thank you friends and family for your encouragement in this endeavor.Other acknowledgments, including use of 3rd party APIs, can be found on my Github.Raspberry Pi is a trademark of the Raspberry Pi Foundation.

Above: the whole setup; three sensors connected to and powered by the Arduino, which is connected to and powered by the Raspberry Pi. The “Configuration” button leads to a screen where students select which instrument they are using. The data collected is sent via Wifi to their instructor, who is running another program (“Chemberry Professor”). Additionally, more instruments can be configured and used through the numerous pins, inputs, and “sockets” contained within the Arduino as well as the Raspberry Pi. The water resistant touchscreen display is ideal for laboratory conditions.

Top left: pH probe; top right: EC probe; right: temperature sensor. The pH and EC probes connect via BNC to their respective circuit boards, while the temperature sensor connects using an adapter. The circuits are completed using a positive and negative wire lead as well as an “input,” from which the Arduino reads voltages and then sends them to the Raspberry Pi.

Above: code that executes when the “Measure” button is pressed on the client program. If no sensor has been configured, an error is thrown. Otherwise, the program determines if the user is measuring once or measuring over time as well as checking if a previous measurement is complete.

Right: Arduino and Raspberry Pi 3 Model B boards. The Raspberry Pi has more cores, processing power and RAM than the Arduino, but the Arduino greatly simplifies creating circuits and using electronics. The Arduino