Coder Social home page Coder Social logo

daqari's Introduction

DAQari DAQari

A simple browser-based DAQ software using WebSerial & FileSystem Access API's

DAQari was born from my need for a simple data acquisition software that could read 16 Analog signals at ~0.2Hz (or every 5 seconds) passed through an ADC Arduino shield. It is not as sophisticated as products from LabChart, LabView, or MATlab. However, if all you need is analog (or digital) inputs that can be ingested by an Arduino board and at low frequency (eg < 200 Hz), this is more than sufficient. Considering that commercial options cost many $1000's, a simple DAQ unit can be built for < $30 with 8 10-bit analog inputs. Moreover, you can have multiple instances of DAQari running at the same time on different Arduinos by simply opening new tabs/windows.

This must be ran through the Chrome Browser by visiting here.

Demo gif:

alt text

Features:

  • Real-time data recording to local file (up to 1000 Hz)*
  • Transform serial inputs (2-point linear calibration)
  • Integrate serial inputs to create custom channels
  • Auto-detect number of channels from incoming serial data
  • Manipulate chart layout
  • Save configurations and share with others
  • Basic chart configuration settings

*Note: Current implementation of recording at high sample rate (1000 Hz) will interpolate missing values. That is, missing data will be replaced with the closest known value. There is a risk of missing data at this speed.

Here is an example Arduino sketch you can upload to get running (it can also be found in the Arduino/example folder). You will need the Arduino_JSON Library. If all your use-case requires is 8 channels at 10-bit accuracy, this is an extremely low-cost option for a DAQ:

#include "Arduino_JSON.h"
JSONVar channels;
#define PRINT_SPEED 20 // increase value if you are having issues
static unsigned long lastPrint = 0; // Keep track of print time

int analogPins[] = {A0,A1,A2,A3,A4,A5,A6,A7};

void setup() {
  Serial.begin(115200);
}


void loop() {
if ((lastPrint + PRINT_SPEED) < millis()) // Establish a basic "x times per second" routine.
  {
    //read all analogPins and store in array
    for( int i = 0; i<8; i++){
      channels[i] = analogRead(analogPins[i]);
    }

    // Send the event with JSON variable as parameter to DAQari - DO NOT REMOVE "data". DAQari is listening for that string to be sent, this triggers new data
    JSONVar event;
    event[0] = "data"; //DO NOT CHANGE THIS
    event[1] = channels;

    Serial.println(JSON.stringify(event));

    Serial.flush(); // clear Serial after writing

    lastPrint = millis(); // Update lastPrint time
  }
}

Thank you to the following libraries and frameworks that are incorporated into DAQari:

Change log:

August 31, 2021

  • Able to record to data file at up to 1000 Hz (or every millisecond)

August 23, 2021

  • Upload configurations
  • Download configurations
  • Delete locally stored configurations
  • Record to local file, currently restricted to 1Hz as fastest write speed
  • Basic channel setting options

August 10, 2021

  • Save configurations and load them
  • Added Baud rate selection
  • Delete configuration ( not fully implemented )

July 27, 2021

  • Able to add custom channels integrating values from other predefined channels
  • Change line color for each graph
  • Clear past config (destroys localdb and refreshes page) -- depreciated

July 23, 2021

  • Store channel order in localdb
  • Incorporated jQuery UI Sortable for handling channel order

July 22, 2021

  • Uploaded to Github
  • Draggable channel order
  • Store channel settings in browser Localdb
  • Transform inputs (linear regression)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.