Giter VIP home page Giter VIP logo

xtb's Introduction

Xlab Tester Board - 2.1 (XTB-20)

Open-source in-situ device driver & data acquisition board for use in Stanford's eXtreme Environment Microsystems Laboratory xlab.stanford.edu

Datalogging with the XTB

Operating, measuring, and saving data with the XTB boards is handled by a microcontroller. Nearly any microcontroller will work, and the code is written in Arduino to aid in use. The example below uses an Adafruit Feather M0 with microSD card for easy datalogging capability.

Configuration and Operation

As long as you're using one of the XLab Adafruit Feathers floating around, there is no additional software needed to configure and run tests using the XTB. This is accomplished by editing the "config.txt" text file stored on the microSD card.

How it works:

  1. Every time the XLab Adafruit Feather board is powered on, it looks for the "config.txt" file.
  • If the SD card isn't installed, the config.txt file isn't present, or the Feather isn't able to write to the SD card, the red LED will illuminate. No actions are taking place while the red LED is on. It will stay on until the power source is removed from the Feather board.
  1. Once the Feather finds "config.txt" it will read each line in the text file and execute specific commands that it finds.
  • The "config.txt" commands are very specific and listed below (don't include the brackets). Only one command per line, each command must finish with a comma, commands are case-sensitive, there is a space between arguments, and the last line of the file must be blank.
    • start, tells the ADC to start take measurements and take it out of 'standby' mode
    • stop, tells the ADC to stop take measurements and puts it in 'standby' mode
    • reset, resets the ADC to a preconfigured state
    • delay [wait time], tells the Feather to wait for specific amount of time
    • temp [save data?], tells the ADC to make a temperature measurement and (depending on the argument), whether or not to save the data to the SD card
    • read [+ pin to read] [- pin to read] [IDAC pin] [VBias Pin] [save data?] [wait time] [# of measurements to save] [IDAC mag] [data label text], tells the ADC to configure itself according to the arguments and then instructs the ADC to make a series of voltage measurements using the new configuration
    • batt, measures the battery voltage of the Feather board and saves it to the SD card
    • readout, tells the ADC to print the state of all of its registers over the serial port - see TI spreadsheet to decode register values
    • calibrate, tells the ADC to perform a self calibration and adjust the offset registers accordingly - usually followed by a readout command
    • gpio [GPIO pins] [GPIO state], tells the ADC to configure the gpio registers accordingly

config.txt command reference

Reference Description Valid Inputs
[+ pin to read] Positive terminal of voltage measurement 0
1
2
3
4
5
6
7
8
9
10
11
12 (12 is GND)
[- pin to read] Negative terminal of voltage measurement 0
1
2
3
4
5
6
7
8
9
10
11
12 (12 is GND)
[IDAC pin] sets the current-source pin 0
1
2
3
4
5
6
7
8
9
10
11
15 (off)
[VBias Pin] applies 0.275V to specified pin 0 (off)
1 (AIN0)
2 (AIN1)
3 (AIN0 and AIN1)
4 (AIN2)
(AIN0 and AIN2)
6 (AIN1 and AIN2)
8 (AIN3)
[save data] choose whether or not to record data to SD card t (save data = true)
f (save data = false)
[wait time ] amount of time to delay in ms 1 - 500
[# of measurements to save] 2X the number of measurements to
perform for the given parameters
0 - 200
[IDAC mag] sets the current-source level
CORRESPONDING IDAC PIN
MUST HAVE PATH TO GROUND
0 (off)
1 10 uA
2 50 uA
3 100 uA
4 250 uA
5 500 uA
6 750 uA
7 1000 uA
8 1500 uA
9 2000 uA
[data label text] identifying string appended to each
line of the data file for
data analysis correlation
String 4 characters or less
[GPIO pins] decimal input for the 0x10 register (GPIODAT) 0 (all GPIO pins disabled)
1 (GPIO0 enabled)
2 (GPIO1 enabled)
3 (GPIO0 and GPIO1 enabled)
4 (GPIO2 enabled)
5 (GPIO0 and GPIO2 enabled)
6 (GPIO1 and GPIO2 enabled)
7 (GPIO0, GPIO1, and GPIO2 enabled)
8 (GPIO3 enabled)
15 (all GPIO pins enabled)
[GPIO state] decimal input for the 0x11 register (GPIOCON) 0 (all GPIO set to HIGH)
1 (GPIO0 = HIGH)
2 (GPIO1 = HIGH)
3 (GPIO0 and GPIO1 enabled)
4 (GPIO2 = HIGH)
5 (GPIO0 and GPIO2 = HIGH)
6 (GPIO1 and GPIO2 = HIGH)
7 (GPIO0, GPIO1, and GPIO2 = HIGH)
8 (GPIO3 = HIGH)
15 (all GPIO pins = LOW)


Simple config.txt example file that starts the XTB, makes a temperature measurement (saves it to the SD card), delays for 100ms, and then repeats.




More complex config.txt example file that performs measurements on multiple devices and saves to the SD card.

xtb's People

Contributors

maholli avatar captainspacecat avatar

Stargazers

 avatar Bleys Goodson avatar Fernando Saldivar Ceron avatar

Watchers

James Cloos avatar Thomas Kircher avatar Fernando Saldivar Ceron avatar

Forkers

koson

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.