This project is a website that bridges the gap between the Arduino (an open-source robotic interface) and a Tektronix oscilloscope (used to monitor sensors with "laboratory" precision). It was a senior design project that entails building a device that can test pharmaceutical tablets with ultrasound. The project utilizes technology from:
- BreakoutJS (Arduino USB-to-websocket client and Javascript library)
- HighchartJS (data-visualization)
- Tektronix API (for oscilloscope connectivity - this is the first open-source project to do this via AJAX)
- jQuery (for user experience)
- Bootstrap (for style)
- fft.js (a Fourier Transform library for frequency analysis).
Right now all the Arduino connectivity features are complete. Users can control stepper motors from a web GUI that allows them to define the angular velocity and acceleration of a stepper motor. It also allows the user to control two pins on the Arduino using PWM (Pulse Width Modulation). It also provides real-time monitoring of two different pin voltages.
For now, the Tektronix API interface is currently hardcoded to take 100,000 point spectral envelopes through concatenation. This encompasses over 5 million data points since the envelopes represent the minimum and maximum value over 512 sample pulses. This is done in less than a minute.
The pharmaceutical sector is expressing an increasing interest in modern non-destructive testing techniques. They are using new technologies and materials that require strict quality control. One such method that is quick, safe, and reliable involves using ultrasound transducers to find the speed of sound in a pharmaceutical tablet. The speed of sound can be related to important material properties called elastic constants. Using the relationships that these elastic constants represent, important material properties such as weight, thickness, and hardness can be calculated.
Create an off-the-line pill tester that can test pharmaceutical tablets for weight, thickness, and hardness. Using two sets of ultrasound transducers (one that emits shear wave sound and one that emits longitudinal wave sound), we can get two different elastic modulus. With two different elastic modulus, we can calculate all five of them. From there, the rest should be cake... (assuming an isotropic homogeneous medium bla bla)
Okay, on to the project details. One thing this website does is control an Arduino prototype (pictures and video to come). The Arduino interfaces with a stepper motor, two solenoid, and two pressure sensors. The user downloads and runs the BreakoutJS program and that connects the Arduino to a websocket. The websocket is then controlled through simple jQuery (seen in this project). The data and controls are then presented to the user using Bootstrap, some more jQuery, and Highcharts (a data visualization Javascript library).
The piezoelectric ultrasound transducers are driven using a square wave pulser (possibly tuned to a resonant state by someone before me). The analog signal is then converted into a digital signal by a Tektronix oscilloscope (TDS3000). Using the Tektronix API and networking the computer that is running BreakoutJS (and the web server) into a local private network, data is extracted. The website can interpret both pulses and spectral envelopes. It also includes an algorithm that generates the highest possible resolution signal by zooming in, collecting the data, and then zooming into the next appropriate data collection region.
- Stepper motor uses an acceleration ramping profile to maintain adaquete torque and decrease the time it takes the prototype to successfully maneuver the tablets
- Stepper motor provides high resolution turning accuracy along with high torque using a 200-step 2A/coil step motor that is driven with a Pololu DRV8825 which provides 32 microsteps per step
- The force that the solenoid exerts is controlled by pulse-width modulation (e.g. 50% on, 50% off at a high frequency)
- Force sensors (strain gauges) are connected using integrated circuits that eliminate the need for complex op-amps (TI INA125P)
- Install WAMP
- Download this repo
- Copy/paste all files to the WAMP www directory (C:/wamp/www by default)
- Open the browser and go to http://localhost
- Download and open BreakoutJS for Windows
- Connect your Arduino over USB with the BreakoutJS application
- Set up a local network with the oscilloscope
Debian-based distributions:
- Enter sudo apt-get install -y git apache2 php5 && cd /var/www && git clone THISREPOURL . in the terminal
- Open the browser and go to http://localhost
RHEL based distributions:
- Enter sudo yum install -y apache2 git php5 && cd /var/www && git clone THISREPO . in the terminal
- Open the browser and go to http://localhost
- Connectivity to the oscilloscope is established using AJAX calls in Javascript - older versions of the TDS3000 that do not add "Allow Cross Origin: *" into their HTTP header will not be able to connect to the website unless the web browser is run with security features off
- Tektronix options are not complete (right now it is hard coded to take a 100,000 point spectral envelope)