Close
0%
0%

n-Channel High/Low Speed DAQ

Arbitrary size data acquisition system using BitScopes and RasPi

Similar projects worth following
In order to collect high speed experimental data, multiple BitScopes were controlled by networked Raspberry Pi.

BitScopes with Python/C programming offer versatile analog/digital data collection across many channels with digitally triggered analog collection rates as high as 10MSamples/s for 6k samples. Using timing routines in a driving code, arbitrarily long data collection for thermocouples or pressure transducers at set times for data logging can be accomplished. Similarly, logic conditions measured by the Raspberry Pi or the BitScope can trigger a capture.

Original use for the BitScope DAQ was for high-speed collection of data for strain gauges (differential measurement across a Wheatstone Bridge). To collect this differential data, an instrumentation amplifier to interface the Wheatstone bridge to the BitScope was also constructed. A Wheatsone bridge balance box's construction is also discussed.

This project seeks to provide data capture from 10MS/s for 6k samples (600us) to arbitrarily long capture for many channels. 

Initially this project was intended to capture strain gauge data for ~16 channels at high data rates.  Most DAQs for strain gauges (Omega, Vishay, National Instruments, etc.) max at 250kS/s for strain gauges, so custom capture is required.  Additionally, these systems for balance/amplification modules are in excess of $1,500USD PER CHANNEL!  A cost-effective alternative is needed.

For high speed capture (above 1MS/s) oscilloscopes are probably the best choice.  However "good" oscilloscopes typically are VERY expensive and only have 4 channels.  BitScopes (bitscope.com) offer modest-cost 2-channel analog/digital oscilloscopes that can be run by simple computers over USB.  Their website shows BitScopes connected to networked Raspberry Pis.

Using this network principle, the data collection opportunity is limited only by the number of BitScopes and RasPis you connect to a network.  Each BitScope can be controlled using programming libraries (provided by the manufacturer) so their collection is flexible and user-programmable.

  • 8 × BitScope BS10
  • 3 × Raspberry Pi 1 Master & 2 Slave computers
  • 1 × Network Switch
  • 1 × Monitor/keyboard/mouse Your choice, or replace MASTER with existing computer
  • 16 × TI128P Instrumentation Amplifier For differential signal amplifier

View all 9 components

  • 1
    Prepare RasPi

    **These instructions parallel those found on http://www.bitscope.com/blog/DI/?p=DI29A**

    Install Raspian on RasPis.

    Download software from BitScope (http://www.bitscope.com/software/)and install at least DSO, Logic, Chart and Meter on MASTER RasPi.

    Download and install at least "BitScope Server" on SLAVE0 and SLAVE1.

    Connect MASTER to monitor/mouse/keyboard and to the network.

    Connect SLAVE0 and SLAVE1 to network and note IP addresses. (The easy way is to connect each to the monitor and type at the command prompt.) 

    $ ifconfig

    On a terminal window on MASTER, attempt connecting via SSH to each of the SLAVE computers (insert appropriate IP address):

    $ ssh pi@192.168.XXX.XXX

     Ensure that the BitScope server program is working.  Type (while you are connected to SLAVE0:

    $ bitscope-server -v

    which starts BitScope server on the SLAVE computer (in verbose mode), which waits for network connections and allows access to the BitScopes connected to SLAVEN over the network.  To exit BitScope Server, hit <ENTER> then 'y.'

    Navigate to "/etc/bitscope/bitserve.prb" and modify it, if necessary, to read:

    USB:/dev/ttyUSB0
    USB:/dev/ttyUSB1
    USB:/dev/ttyUSB2
    USB:/dev/ttyUSB3

     This code tells the BitScope software to connect to the BitScopes in this order.

    On MASTER, modify "/home/pi/.config/bitscope/bitscope.prb" to read:

    UDP:192.168.1.129
    UDP:192.168.1.130

    (replace these IP with your correct SLAVE IP addresses) which tells the MASTER BitScope programs to look for BitScopes on SLAVE0 first then on SLAVE1.

    If all this is successful, the RasPis are ready.  Advanced users can share RSA keys between the RasPis to prevent having to type in "raspberry" all the time, or include interesting shortcuts for SSH to SLAVEN by using an alias in MASTER's ".bashrc" file.  I did something like:

    alias sshslave0="ssh pi@192.168.1.129"
    alias sshslave1="ssh pi@192.168.1.130"

    this prevents having to type in the IP address all the time.  Also, the program 'tmux' can be very useful, since you can start a session on a remote computer (SLAVE0), begin a program running (bitscope-server) and then detach the session to go back to MASTER.  tmux keeps the session running on SLAVE0, even though you aren't specifically logged in.  (Learn more about tmux: https://leanpub.com/the-tao-of-tmux/read.)

    Also, you will likely want to change the hostname for each of the RasPis so the command prompt will tell you where you are rather than "pi@raspberrypi."

  • 2
    Connect BitScopes

    Connect the BitScopes to the SLAVE computers.  Note the USB connection numbers.  In this image, USB0 is the upper left, USB1 is below it, USB2 is upper right.

  • 3
    Test Connection to BitScope from MASTER

    On MASTER, SSH to SLAVE0, and start bitscope-server.

    pi@bitscopeSLAVE0 ~ $ bitscope-server -v 

    Start BitScopeDSO on MASTER, click "SETUP" in the DSO window.  Ensure that the IP addresses you typed in "/home/pi/.config/bitscope.prb."  If not, then choose "ETHERNET" in the drop-down and type the IP address of SLAVE0 into the box next to it.

    Click "POWER" to turn on the scope.  If a connection is successful over the network, the command line (that you left open from above) will show a connection from the MASTER's IP, and you'll see a yellow 'trace' from CHA on one of the BitScopes attached to SLAVE0, and the LEDs on the front of one of the BitScopes (hopefully the one plugged into USB0) will be blinking.

View all 3 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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