A Versatile Labtool User Manual
|
jithinbp.in/vLabtool Videos, sample code ![]() |
![]() |
A cost effective, multi-pronged data acquisition and control instrument to turn your computer into a workbench for science and electronics experiments .
![]() |
![]()
Version 12.04 or Greater
|
|
![]()
Version 2.7 or Greater
|
Calibrated Against Professional equipment for high accuracy
Feature |
Description |
Socket Labels |
Range |
Analog Inputs |
Up to 10 analog inputs with various voltage ranges. Programmable gain and offset control. 12-bit voltage measurement. Up-to 1MSPS sampling. 5ppm , 3.3V Voltage Reference |
CH1, CH2 CH3, CH4 - CH7 SEN I2V |
±16Volts ±3.3Volts 0 − 3.3V 0 − 3.3V ±3.3mA |
Analog Outputs |
Programmable Voltage Sources (12-bit)
Programmable Constant Current Source |
PVS1 PVS2 PVS3 PCS
|
±5V ±3.3V 0 − 3.3V 0 − 3.3mA |
Digital Inputs |
4 × TTL compatible digital Inputs. Logic Analyzer Frequency Counter (0-30MHz), time measurement routines ±2.5ppm, 12M Hz Reference oscillator |
ID1 - ID4 |
0-5 V |
Waveform Generators |
|
Wavegen
SINE
SQ1 - SQ4 |
5Hz - 2MHz 0-4 Volts
14 k Hz ±4Volts 0 − 5Volts 10Hz- 1 6MHz 15nS 15nS |
Wireless Nodes |
Battery Powered add-on units. Power Source Acts as a wireless bridge for various sensors Multiple Nodes can be used together Can also control relays and read voltages |
Cell/Adapter
|
3.7-4.2 V |
Data Buses |
I2C : Master Commonly Used by numerous sensor ICs SPI : Master Chip Select pins UART |
SCL,SDA
SCK,SDI,SDO
CS1 , CS2 |
|
Expansion Slot |
20 - pin Socket designed to accommodate add-on modules. Selection includes SPI,I2C,Analog IO,Digital IO, 16MHz TTL output, and a DC Sine Wave. |
|
|
.
The device has been tested on Debian based distributions: Ubuntu 12.04 and above, and Raspbian Wheezy. Windows support pending.
Processor |
Entry level PCs as well as Netbooks running Intel Atom processors are supported . No special hardware required. Tested with the Raspberry Pi 2.. |
Display |
Graphical Utilities are scalable down to 800x600 without scrollbars entering into the picture. Accelerated Graphics are only required if responsive 3D plots are being used |
Run the following commands on a terminal (CTRL-ALT-T) :
1. sudo apt-get install python-qt4 python-opengl python-qt4-gl python-scipy
python-numpy ipython-qtconsole python-setuptools python-sip
2. sudo easy_install pyqtgraph
3. sudo easy_install vLabtool
The Following is an incomplete list of graphical applications that have been installed along with the Python module, and can be run from a terminal
1. vLabtool-scope , 2-channel Oscilloscope, 4-chan Logic Analyzer, Peripheral control and curve fitting abilities.
2. vLabtool-stream , Designed to continuously plot values from any function from the vLabtool Python module that returns an integer/decimal.
3. vLabtool-sensorDemo , Auto-Detects sensors connected to the I2C expansion slot, and allows plotting their readings in real time., This requires the sensor class to be installed, and several are supported by default.
4. vLabtool-console , Launches an iPython console with the initialization functions already carried out., A plotting window is also incorporated, and can used with a single function call.
5. vLabtool-wirelessDemo , Auto Detects wireless nodes in the vicinity, and lists their addresses and connected sensors, It plots data from multiple sensors in real time.
6. vLabtool-bodePlots , Uses the programmable sine wave generator and analog inputs to obtain the frequency and phase response of filters.
7. vLabtool-diodeIV , Plots the Current-Voltage characteristics of a diode. Also forms a surface plot of multiple curves to study the temperature dependence
Copy the following command and run it on a terminal: vLabtool-scope
The data has also been fitted, and the results displayed in the bottom section.
|
CH1 : Channel 1 of the oscilloscope |
Remappable |
Not restricted to ’CH1’ input socket. This is a very flexible acquisition channel, and can be mapped to any of the analog inputs via a drop down menu located at the top corner, It also Features 12-bit offset control via a slider. |
|
CH2 : Channel 2 of the oscilloscope |
Fixed |
This channel can only record the signals input to the socket labeled CH2. |
|
TRIGGER : Allows selecting the channel to trigger the oscilloscope |
Level |
The rotary dial sets the trigger level, and this is also reflected in a marker located on the plot. |
Channel |
The drop down menu allows selecting the trigger channel , If CH1 is selected, the trigger signal will be obtained from the channel it has been mapped to. |
|
Time Gap : Specify the time scale of the oscilloscope |
Dial |
Set the delay(in µs) between each successive data point. |
|
Sine Fit :Uses Scipy to fit the data against a sine function |
Menu 1 |
Select input data channel for fitting , Uses Scipy.optimize and obtains frequency, amplitude, phase and offset values. |
Menu 2 |
Select a second input data channel for fitting. |
checkbox |
Overlay the fitted results. |
Results |
The fitted values: Amplitude, Freq, Phase, Offset are displayed in the message window at the bottom of the screen. |
|
Lissajous : XY Plots |
Menu 1 |
Select input data channel for X-axis. |
Menu 2 |
Select input data channel for Y-axis. |
show |
Enable/Disable Lissajous overlay. |
Animate |
Pause data acquisition and animate the formation of the X-Y plot. |
PVS1 |
Range : ±5V , Set the output voltage on PVS1 socket., Max Current 5mA. |
PVS2 |
Range : ±3.3V , Set the output voltage on PVS2 socket., Max Current 5mA. |
PVS3 |
Range : 0 − 3V , Set the output voltage on PVS3 socket., Max Current 5mA. |
PCS |
Range : 0 − 3.3mA, Set the output current on PCS socket. Current subject to load resistance, PCS and PVS3 are linked, and only one can be used at a time. |
Wavegen |
Range : 0 − 2M Hz, Set the output frequency of the waveform generator., Max resolution 0.04Hz., Amplitude control(±1mV − ±4V ) via physical knob located on the device. |
|
Phase Correlated Square Waves (SQ1,SQ2,SQ3,SQ4) |
Frequency |
Range : 0 − 8M Hz, Set the output frequency of all four square waves., Resolution:15nS. |
Output |
Select the Output socket to configure. |
Phase Duty |
Set the phase difference (0 − 100%) , between the selected waveform and SQ1. |
Cycle |
Set the Duty Cycle (0 − 100%) , of the selected waveform. |
Active Channels |
Number of inputs to digitize . Single channel and two channel modes can record up to 60 seconds delay between consecutive level changes with a resolution of 15nS. Three and Four channel modes can only record up to 1 ms delay between consecutive level changes. |
Acquisition time |
Time to sample inputs before fetching results . The LA continuously refreshes data at this interval.. |
|
Single Channel Options |
Channel |
The input to record . Select from ID1,ID2,ID3,ID4. |
Edges |
Types of Level changes to record. Select from options such as Falling edges only, rising edges only, all edges. |
|
Trigger |
Channel |
Enable level change trigger on selected channel. |
Edges |
Type of level change to use as the trigger. |
|
3/4 channel modes |
CH1-CH4 |
Set the type of level changes to record for each channel when the logic analyzer is in either the 3 channel, or the 4 channel mode. |
|
Measure Time Intervals > Important! Freeze logic analyzer before using this. |
Edge 1 |
Select input channel and edge type that will start the timer. |
Edge 2 |
Select input channel and edge type that will stop the timer. |
Go |
Run the measurement. |
Results |
Results will be displayed here in seconds units. |
Copy the following command and run it on a terminal: vLabtool-wirelessDemo
1. Plug in a sensor on to a wireless node by matching the pins labeled Vdd, GND, SCL, SDA . These pins appear in the same order on most sensor modules, and no extra wires should be needed.
2. Make sure that the option Register New Nodes on the Application is selected.
3. Plug In the Battery onto the wireless node.
4. Observe that the software has auto detected your wireless node as well as found out the address of the sensor you connected.
5. Unselect Register New Nodes .
If you wish, you may move the cursor over a sensor’s address and the software will guess it’s model number/type.
6. Click on , Refresh Node List , This loads a few controls for each wireless node, and also a drop down selection of the connected sensors.
1. After Following the steps in the previous section, Select the appropriate sensor and click on Go, The software will continuously plot values fetched from the sensor.
1. Open the auto-generated menu at the bottom left corner, and change parameters. A few examples include gain, sampling rates, and data-type selection.
This application plots the return values from any of the functions defined in the Python Module as long as they return integers or decimals.
Copy the following command and run it on a terminal: vLabtool-stream
1. Refer to the programmer’s manual for a list of valid commands , and pick the function you would like to monitor, The manual can be opened from the help menu.
2. Paste the command name with correct arguments into the application . And now click on Monitor. The app includes a few common commands and appropriate arguments packed into a drop down menu linked to the command entry box.
Voltmeter |
Load Widgets that perform a single voltage measurement per click. |
Amplifiers |
Load a widget to set the gain on the voltage input channels. |
Wavegen |
Load a slider that allows setting the frequency of the sine wave output. |
IV sources |
Load widgets that , enable setting programmable voltage and current. |
Timing |
Load time measurement widgets , These include duty cycle and frequency. |
Console |
Insert an iPython Console with init commands preloaded. |
help |
Help menu that allows access to the programmer’s manual as well as experiment specific HTML files. |
CH1 |
Range: ± 16 V , Gain: up to 32×, Separate AC coupled input. |
CH2 |
Range: ± 16 V , Gain: up to 32×, Separate AC coupled input. |
CH3 |
Range: ± 3.3V , Gain: up to 32×, 12-bit Offset control.
*manual gain control by grounding R
g
via resistor R.
|
CH4 |
Range: 0 – 3.3V , Gain: up to 32×, 12-bit Offset control. |
CH5 |
Range: 0 – 3.3V , Gain: up to 32×, 12-bit Offset control. |
CH6 |
Range: 0 – 3.3V , Gain: up to 32×, 12-bit Offset control. |
CH7 |
Range: 0 – 3.3V , Gain: up to 32×, 12-bit Offset control. |
SEN |
Range: 0 – 3.3V , Internally Pulled up to 3.3V via 5.1KOhm resistor. |
AN2 |
Range: 0 – 3.3V , Available on the expansion slot. |
AN3 |
Range: 0 – 3.3V , Available on the expansion slot. |
|
Internally Monitored |
5 V |
The supply voltage , Measures the power supply voltage of the USB port. |
V+ |
Measures the output voltage. Monitor this to verify if external loads are affecting it |
|
Waveform Generators |
WG1 |
0-2MHz Sine/ Triangle Waveform Generator , Range: ±4V. Manual Amplitude Control via dial located on the side. 28- bit (0.04Hz) resolution |
SINE |
Fixed 14KHz Sine Waveform Generator , Range: ±4V. |
|
Programmable Voltage and Current Sources (12-bit) |
PVS1 |
Range : ±5V , Up to 10mA. |
PVS2 |
Range : ±3.3V , Up to 10mA. |
PVS3 |
Range : 0 − 3.3V , Up to 10mA. |
PCS |
Range : 0 − 3.3mA. Subject to Load resistance. Up to 3.3V voltage drop |
|
Logic Analyzer, Frequency Counter, Timing Functions |
ID1 |
Range : 0 − 5V, 0-32MHz. |
ID2 |
Range : 0 − 5V, 0-32MHz. |
ID3 |
Range : 0 − 5V, 0-32MHz. |
ID4 |
Range : 0 − 5V, 0-32MHz. |
|
4 × PWM output with 15nS frequency, phase, and DCycle control |
SQ1 |
Range : 0 − 5V. |
SQ2 |
Range : 0 − 5V. |
SQ3 |
Range : 0 − 5V. |
SQ4 |
Range : 0 − 5V. |
|
I2C (Inter-Integrated Circuit) Master: Up to 4MHz Clock speed |
Application |
Tested With Various sensors , MPU6050, MLX90614, HMC5883L, BMP180, TSL2561, SHT21 etc. These measure angular velocity, acceleration, temperature, humidity, luminosity, pressure, and magnetic fields. |
Vdd |
3.3V Power output. |
GND |
Power return path. |
SCL |
I2C Clock Output. |
SDA |
I2C Data Line. |
|
SPI(Serial-Peripheral Interface) Master: Available on the 20-pin Expansion Slot. Supports all four modes of operation. |
SCK |
SPI Clock Output, Tested Up To 16MHz. |
SDO |
SPI Data Output (MOSI). |
SDI |
SPI Data Input (MISO). |
O1 |
Chip Select 1. |
O2 |
Chip Select 2. |
DDS |
16MHz , 0-3.3V TTL output. This is also the reference clock for the 0-2MHz sine/triangle wave generator, and can be used to create phase correlated wavegen add-ons. |
AN2 |
Analog Input , Range: 0 − 3.3V. |
AN3 |
Analog Input , Range: 0 − 3.3V. |
GND |
Short for GROUND . This is the reference voltage, and is taken as 0 volts. It is also connected to the ground level of the power source (laptop/tablet/RPi etc.) |
V+/V- |
Power Outputs , ±9V . Current limit 20mA per channel. |
Capable of communicating with multiple wireless nodes to control and receive sensor data payloads
I2C |
Data bus for Interfacing with commonly available sensors . Measure physical parameters with minimal mechanical interference. |
SPI |
Another data bus used by some devices. Of interest to the vLabtool are precise waveform generators, and high resolution analog instruments. |
RGBout |
Control WS2812B arrays , Daisy chained RGB LEDs with 16 million shades each. |