Close
0%
0%

SEELablet : Instrument Cluster For Laboratories

Minimal, yet powerful combination of control and measurement tools integrated with an SBC running Python based UIs for science & Engg. Expts

Public Chat
Similar projects worth following
SEELablet provides an affordable, yet functional alternative for low budget teaching labs that uses code, visuals, and open source software to add depth to conventional experiments

It integrates a Single Board PC with a real time data acquisition and control unit. The measurement capabilities include Scopes, Frequency Counters, Logic Analyzers, and various data buses.
There also configurable outputs such as correlated sine/triangle/square waveform generators, as well as several programmable voltage and current sources.

Add-on boards, both wired as well as wireless [2.4Ghz], enable measurement of physical parameters ranging from acceleration and angular velocity, to luminous intensity ,Passive Infrared, and linear optical spectra.

The Python library and associated experiment specific Apps(PyQt) using a variety of powerful modules facilitate data analysis and visualization.

Here's where I left off last year :
https://hackaday.io/project/6490-a-versatile-labtool

And before that :
https://hackaday.io/project/5971-python-powered-scientific-instrumentation-tool

Objective:

This project aims to equip educators and budding citizen scientists with a flexible range of control and measurement equipment in a compact, standalone form, with minimal BOM.

It also tries to reduce the dependence of the target audience on proprietary software by including various free and open source alternatives in fully configured form , thereby facilitating the transition to a FOSS environment.

A real-time data acquisition unit combined with analog and digital circuitry is paired with a single board computer that runs the analytics and visualization part using mostly Python and its vast array of modules that achieve just about everything. PyQt widgets along with PyQtGraph handle most of the UIs .

Interfacing with the real world is as straightforward as :

from SEEL import interface
I=interface.connect()
I.get_voltage('CH1')

from SEEL.SENSORS import HMC5883L # A 3 axis- magnetometer
M = HMC5883L.connect()
Gx,Gy,Gz = M.getRaw()

Physics Experiments : Example use for commonly available sensors for science labs

Aim : To study the oscillations of a physical pendulum, and observe the relation of its angle to its velocity. Also calculate the value of g, given the length of the pendulum

The picture shows an MPU-6050 (3-Axis accelerometer + 3-Axis Gyroscope ) hooked up to the I2C port via thin guage copper wires designed to cause minimal perturbation to the oscillations of the pendulum.


The IC is positioned at the pivot so that the accelerometer can be used to measure the angle of the pendulum accurately using the vertical compoenent of earth's gravitational pull.The gyroscope's values for the axis parallel to the pendulum's pivot are also recorded.

Resultant data : Note that the velocity is maximum at the mean, and zero at the extremities


Electronics Experiments example: Studying a linear amplitude modulator circuit

Fourier transform of the modulated output shows a single peak for the carrier, and sidebands with frequencies (carrier +/- modulator ) . Changing the modulation amplitude changes the height of the sidebands. In the figure, CH2 is connected to the modulation input.

Help files :

Each Experiment window involves an HTML based help file ( replacing the traditional hard-bound lab manual ) , and is available for educators to edit as they deem fit.

The feature list for the acquisition and control portion:

  • Several 12-bit Analog inputs with programmable gains, and maximum ranges varying from +/-16V to +/-5mV.
  • Frequency counter tested up to 16 MHz.
  • 4MHz, 4-channel Logic analyzer with 15nS resolution. Independent function calls are available to measure time differences between specified level changes on different digital inputs ( These come in handy for projectile velocity measurement , and a few odd sensors like the DSM01 dust sensor ).
  • 4-channel oscilloscope capable of monitoring the above mentioned analog inputs at maximum of 2 million samples per second. Includes the usual controls such as triggerring, and gain selection. Also leverages Python-Scipy for curve fitting.
  • W1 : 5Hz - 5KHz arbitrary waveform generator. Manual amplitude control up to +/-3Volts
  • W2 : 5Hz - 5KHz arbitrary waveform generator. Amplitude of +/-3Volts. Attenuable via software
  • up to four phase correlated PWM outputs with maximum frequency 32MHz, 15nano second duty cycle, and phase difference control.
  • 12-bit Constant Current source. Maximum current 3.3mA [subject to load resistance]. voltage monitoring must be carried out externally to check for saturation.
  • SPI,I2C,UART outputs that can be configured and controlled entirely through Python functions.
  • Onboard 2.4GHz transceiver for wireless data acquisition. [ The wireless nodes are a drop in replacement for wires connecting I2C/SPI sensors, and also have a 0-3.3V , 10-bit ADC (not calibrated against professional equipment )
  • 5V,3.3V power supply outputs. +/-8V outputs .
  • Graphical Interfaces for Oscilloscope, Logic Analyzer, streaming data, wireless acquisition, and several experiments developed that use a common framework which drastically reduces code required to incorporate control and plotting widgets.
  • In case the user does not wish to use the integrated SBC, a Standalone Mode that uses a 128x64 OLED to display a few basic measurements is also available. It also has space for an ESP-12 module for WiFi access with access point / station mode (Running the JEELabs transparent UART firmware) .


Logs :

Applicable licences:

Communication Library : GPL V3
Graphical Applications : GPL V3

Dependencies :
Python : GNU GPL compatible
Python - Scipy : BSD Licensed
iPython, iPython-qtconsole : MIT License
PyQt4 : GPL
PyQtGraph : MIT licence

Third Party APIs (Optional):
PubNub : remote access without a static IP requisite.
Twitter : Auto-responder for twitter based queries

Hardware Schematics : GPL-v3

Enclosure designs : GPL-V3


While the library is open source, and most users will eventually spin their own code to develop innovative experiments, numerous graphical interfaces targeting 101 experiments have been built keeping in mind that the majority might not be from a CS background, and may not know how to code.


Example: RC phase shift experiment

Aim: To observe the phase shift produced by a simple RC network and the corresponding Lissajous figure on an oscilloscope. CH1 monitors the input waveform, and CH2 monitors the output of the RC network.









Figure : Schematic. The connections are made according to the schematic.


Resulting Data: The resulting Lissajous figure is a tilted ellipse.

Read more »

scope_pic.png

Screenshot of the oscilloscope

Portable Network Graphics (PNG) - 24.25 kB - 09/14/2016 at 16:29

Preview

oscilloscope.sozi.html

A slideshow of the scope

HyperText Markup Language (HTML) - 701.23 kB - 09/14/2016 at 16:23

Download

oscilloscope.sozi.json

JavaScript Object Notation (JSON) - 44.55 kB - 09/14/2016 at 16:23

Download

i2c_sensors_paths.sozi.html

Some supported I2C sensors

HyperText Markup Language (HTML) - 2.95 MB - 09/13/2016 at 18:06

Download

i2c_sensors_paths.sozi.json

application/json - 21.82 kB - 09/13/2016 at 19:33

Download

View all 10 files

  • Electronics 101 : screenshots

    Jithin10/02/2016 at 07:53 0 comments

    Scope

    Ac/DC

    Amplitude modulation

    Astable Multivibrator circuit

    Bode plots

    Capacitance measurement

    Capacitor Discharge

    Experiment Designer

    Diode Clamping

    Diode Clipping

    combination clipping

    series clipping

    Diode IV characteristics

    simple diode study

    Sound FFT

    Piezo buzzer response

    Fullwave rectifier

    Distance Measurement

    Inverting Op-Amp

    LDR speed

    Monostable multivibrator

    Multiple Feedback filter

    NJFET characteristics

    Summing Junction

  • Wireless Nodes : Battery powered intelligent subunits

    Jithin09/05/2016 at 12:38 0 comments

    Wireless subunits use a PIC16F18345 along with an NRF24L01P transceiver, a rechargeable Li-ion coin cell, charging circuitry, and a neopixel.

    Its features include:

    - Unique 3-byte address

    - 10 bit ADC. Capture mode

    - Battery Level monitoring

    - Automatic detection

    - 2Hz to 8MHz frequency counter. 1% accuracy

    - I2C bus . Integrated with sensor communication classes

    - SPI bus

    - 5-bit DAC

    - Up to 10 WS2812B RGB LEDs in daisy chained form

    - Broadcast mode to simultaneously address multiple nodes

    Prototype #1

    Prototype #2

  • Really tiny stepper motors

    Jithin07/18/2016 at 10:59 2 comments

    Micro stepper motors over at aliexpress are super cheap ( 50 for a few dollars! ) . Plenty of shops sell these, but there's hardly any mention of what they're used for. Maybe to adjust lenses inside digital cameras?
    Here's what one looks like :


    They're 4-wire, 2-phase steppers, and can be driven in half/full step modes using 4 push-pull digital I/O. From a science perspective, I need to figure out where these might come in handy. Maybe this biologist can use it to manipulate his subjects into selective interaction.



  • Using phototransistors for pulse sensing

    Jithin07/18/2016 at 08:10 0 comments

    How to make a pulse sensor with a phototransistor, and a bright LED.

    The SEN input of the SEELablet is connected to a 12-bit voltmeter, and is also connected internally to 3.3V via a 5.1Kohm resistor. A photo-transistor connected between SEN and GND can be used to measure the amount of incident light.

    In order to measure and visualize heartbeats, place a finger placed between a bright light source and the phototransistor, such that the light has to pass through the finger to get to the phototransistor. The body's pulse causes the opacity of the finger to change momentarily, and this is reflected in the amount of light received by the sensor.

    In order to record these fluctuations , open the data streaming utility , and set the command to 'get_resistance()' . This will start plotting the resistance of the phototransistor as a function of time

    The phototransistor was connected to the SEN input, and its resistance was plotted against time. To do this with a regular voltmeter, simply pull-up the phototransistor's collector to the supply voltage via an appropriate resistor (5K1), and monitor the collector voltage.

    A bright light source was aimed at it with a finger placed between the two, such that the light has to pass through the finger to get to the phototransistor. The body's pulse causes the opacity of the finger to change, and this is reflected in the amount of light received by the sensor.

  • Testing and Software Updates

    Jithin07/17/2016 at 13:54 0 comments

    Users should be able to fetch the latest set of experiments with minimal technical know-how and effort.

    Debian packaging is standard, and will make it to the next release (stretch) .

    However, in the short term, I have a bunch of fully assembled units that need to be installed with the latest deb files

    A short script that fetches them from a computer running apache on the local network

    sudo apt-get remove -y libseelablet
    URL='http://192.168.1.2/public_html/'
    LIBNAME='libseelablet-1.0.0.deb'
    APPNAME='seelablet-1.0.0.deb'
    wget $URL$LIBNAME -q --show-progress -O lib.deb 
    wget $URL$APPNAME -q --show-progress -O apps.deb 
    
    sudo gdebi --n lib.deb
    rm lib.deb
    
    sudo gdebi --n apps.deb
    rm apps.deb

    The version numbers are hardcoded in the filename because I haven't figured out how to use regex with wget. (target systems don't have Curl installed )



    With slight modification,

    URL='http://seelablet.csparkresearch.in/debs/'
    this script can be used to fetch the deb files from the company website.




    In order to test the individual units , some interconnects between outputs and inputs of the device must be made, and a python script handles the rest. Screenshot of the GUI:

  • Quick Reference / Layout & specs

    Jithin07/14/2016 at 10:16 0 comments

    A small brochure that goes into the shipment box.
    Edits:

    Frequency Counter : 10Hz to 16MHz . Amplitude minimum +/-50mV
    Digital Inputs : 5V tolerant . Do not exceed

    CH3 : +/-3.3 Volts . 1MOhm input impedance. It passes through a non inverting, unity buffer, and its gain can be controlled by connecting Rg to GND via a resistor.

    MIC : +/-15mV signal. 200x gain stage inside.

  • Remote access / publishing : ThingSpeak & PubNub

    Jithin07/12/2016 at 10:12 0 comments

    being able to remotely access the instrument and connected sensors opens up several new possibilities such as weather monitoring systems.
    From an implementation point of view, I tried out two platforms.

    A ) Thingspeak.com : This allows uploading sensor data to your channel, and their website auto-generates nice plots that you may embed on websites. You can also retrieve the data, all through http requests. There's a restriction of 15 seconds between successive uploads of datapoints, so you're limited to monitoring slow parameters.

    In the above example, I created a channel called HMC5883L , and uploaded a few datapoints to it. The plot is available here .

    result = I.get_voltage('CH1')  # upload a voltage reading
    params = urllib.urlencode(
    {'field1': float(result),
    'key':<your key here>})
    headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
    conn = httplib.HTTPConnection("api.thingspeak.com:80")
    conn.request("POST", "/update", params, headers)
    response = conn.getresponse()
    print response.read()
    

    B) PubNub :

    With PubNub, one can send and receive data on predefined channels. Simply bind a callback function to a channel(string) , and the PubNub thread will automatically invoke it whenever a message is received over a subscribed channel. The free accounts are limited to 1 million messages.

    Figure : Utility to access devices remotely

    pubnub = Pubnub(publish_key = <your key>,subscribe_key = <your key>)   #  Create a pubnub communication thread
    def callback(msg,channel):
        print msg,channel
    pubnub.subscribe('C1',callback = callback) #subscribe to a channel called C1, and specify the callback function
    
    pubnub.publish(channel = 'C1',message = 'hello') #send a message over C1 . Anyone listening over C1 will be able to read it.
    

    Figure : Thingspeak publishing.


    get_voltage('CH1') is executed every 15 seconds, and the data is pushed to the cloud.

  • Response time of an LDR

    Jithin07/12/2016 at 08:42 1 comment

    Light dependent resistors are known to be slow to respond. We'll find out just how slow they are by using an LED connected to a square wave, and measuring the resistance of the LDR using the scope.

    Response to an LED driven by a 47Hz square wave. The resistance is measured by connecting the LDR, and a 5K1 resistor in series between 3.3V and Ground. By monitoring the midpoint of the two, and using the known values of either ends(3.3 , 0 ) as well as 1 resistor(5K1), one can calculate the resistance of the LDR.

  • Laser grid for projectile detection

    Jithin07/12/2016 at 08:34 0 comments

    Objective : Calculate the value of acceleration due to gravity by measuring the time between succesive bounces of a ball.

    This can be done in a couple of different ways:

    1) make a plastic ball bounce on a hard surface, and use a microphone with high gain so that the sound of the bounce clips. Connect it to the digital input, and measure time between rising edges.
    2) make a laser beam bounce back and forth between two mirrors, and finally stop at a light sensor(photo transistor : G2 )

    We're trying to make the second one : The design file for laser cutting is here

    The mirror remains to be cut and assembled for the laser grid. However, the simple photogate featured in the center, works well enough for measuring RPMs of small fans, and time periods of pendulums.

  • Electronics 101 experiments :Diodes, BJTs , Op-Amps, FETs...

    Jithin07/11/2016 at 16:34 0 comments

    Armed with a few odd basic instruments such as power supplies, voltmeters, and maybe a scope , there's quite a bit of electronic behaviour one can study.

    Some simple schematics


    Slightly more advanced topics


    Sample Code for measuring a transistor's common emitter output characteristics

    from SEEL import interface
    I=interface.connect()
    
    #PVx are power supplies with various output ranges.
    #set_pvx sets a voltage, and returns the actual set voltage ( corrected for least count )
    
    pv2 = I.set_pv2( 1.0)   #  Bias the base via a 200K resistor.
    base_voltage = I.get_voltage('CH3')
    base_current = (pv2-base_voltage)/200e3 # Use Ohm's law to determine current
    CollectorCurrent = []
    CollectorVoltage = []
    for a in np.linspace(0,5,100):
      pv1 = I.set_pv1(a)
      CollectorCurrent .append( (pv1 - I.get_voltage('CH1') )/1e3 )
      CollectorVoltage.append(pv1)
    
    from pylab import *
    plot(CollectorVoltage,CollectorCurrent ) #Plot and try a different base current
    show()

    Halfwave rectification using an LED.
    The high forward threshold voltage of the LED causes the output voltage to be very low for an input waveform of 3.3V






    Example results :

View all 18 project logs

Enjoy this project?

Share

Discussions

clae wrote 12/18/2019 at 19:58 point

Are you planning to move this into production?  What sort of price point would you be looking at?

  Are you sure? yes | no

RandyKC wrote 04/17/2018 at 17:25 point

I love the concept and the breadth of this project. 

I was reviewing the available open source files and can only find schematics for the junior not the 17. And the only firmware seems to be for the 17, not the junior. I know you’re doing a lot of other projects, but would you confirm which version of the hardware/firmware/software is open source?

  Are you sure? yes | no

Jithin wrote 07/06/2019 at 10:31 point

Thanks for reviewing.

GUI : https://github.com/expeyes/expeyes-programs/tree/master/eyes17

Firmware, Layout and Schematics : https://github.com/expeyes/expeyes-programs/tree/master/ExpEYES17

https://csparkresearch.in/expeyes17/

http://expeyes.in

The SBC integrated version didn't take off as well as I had hoped, but ExpEYES17 is doing well enough

You Might also like KuttyPy : https://csparkresearch.in/kuttypy . Costs 15$, but it's pretty powerful coz of the real-time Python Link.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates