Poll

Interested/Instrument/Interface

Yes,3458A,GPIB
17 (23.9%)
Yes,3458A,Prologix
10 (14.1%)
Yes,K2001/K2002,GPIB
11 (15.5%)
Yes, post type of instrument and type of interface (GPIB,Prologix,USB,LAN, RS232)
29 (40.8%)
Not interested, why?
4 (5.6%)

Total Members Voted: 45

Voting closed: December 13, 2016, 10:12:53 pm

Author Topic: Raspberry Pi2/3 logging platform for Voltnuts  (Read 69293 times)

0 Members and 2 Guests are viewing this topic.

Offline Circuitous

  • Supporter
  • ****
  • Posts: 234
  • Country: us
    • Corgi-Tronics
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #25 on: November 17, 2016, 02:24:41 pm »
I'm definitely interested in this project!

I'm interested in LAN support for any of:
34461A - Agilent
34410A - Agilent
DMM7510 - Keithley
2450 SMU - Keithley
DM3068 - Rigol

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1350
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #26 on: November 20, 2016, 05:50:28 am »
Agilent E5810A  - I have one , but not used it yet

Care for a mini teardown? I was thinking about GPIB-LAN bridges recently, because I only have one USB-GPIB adapter (also a 82357B clone) and it's not as convenient as having access to all the instruments from the network. So I've came up with the idea to implement a linux-gpib to VXI bridge to emulate E5810B (could do that with a RPi and this clone USB adapter perhaps), but I need to do more research on that.

While researching this I was looking at existing GPIB-LAN gateways, Keysight, ICS and also I've analyzed E5810B firmware a bit and it seems very clever as it uses TI's AM335X and the PRUSS cores to do the GPIB. I never saw the insides of this gateway so I don't know if PRUSS is bitbanging some GPIB interface chip (NAT9914 and the likes) or probably GPIB transceivers directly, which would be quite cool and fast. The kernel modules, especially the one responsible for talking to the PRUSS and GPIB is tagged with the GPL linker symbol, but I didn't find sources anywhere  :(

I have an E5810A wo. USB , doubt there's a "Beagle" MCU in there.

AFAIK HighVoltage have a B'

/Bingo
 
 
The following users thanked this post: lukier

Offline plesa

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #27 on: November 20, 2016, 07:05:41 am »
Agilent E5810A  - I have one , but not used it yet

Care for a mini teardown? I was thinking about GPIB-LAN bridges recently, because I only have one USB-GPIB adapter (also a 82357B clone) and it's not as convenient as having access to all the instruments from the network. So I've came up with the idea to implement a linux-gpib to VXI bridge to emulate E5810B (could do that with a RPi and this clone USB adapter perhaps), but I need to do more research on that.

While researching this I was looking at existing GPIB-LAN gateways, Keysight, ICS and also I've analyzed E5810B firmware a bit and it seems very clever as it uses TI's AM335X and the PRUSS cores to do the GPIB. I never saw the insides of this gateway so I don't know if PRUSS is bitbanging some GPIB interface chip (NAT9914 and the likes) or probably GPIB transceivers directly, which would be quite cool and fast. The kernel modules, especially the one responsible for talking to the PRUSS and GPIB is tagged with the GPL linker symbol, but I didn't find sources anywhere  :(

I suppose I already posted internal picture of E5810A, but it use the Power PC AMCC PPC405.Firmware seems to be made by ICS Electronic http://www.icselect.com.
And there is also one Xilinx Spartan, 83846 PHY and some Cypress for USB. If you wants picture of A version I can post within 2-3 weeks, when I will be back home:)
The main board looks more like some platform, because on front are 3x 64 pin connectors to connect display and few leds on front panel.

If I remember K2001 and K2002 have 3458A GPIB compatibility mode ... so supporting 3458A means also K2001 and K2002.
Anyone used this compatibility mode up to now on Keithely? How it works?
K2001 do not have compatibility mode. It is only on K2001
I'm interested in LAN support for any of:
34461A - Agilent
34410A - Agilent
DMM7510 - Keithley
2450 SMU - Keithley
DM3068 - Rigol
Both 34461A and 3441xA will be working. For Keithley/Rigol I do not have access to them, but based on how Python scripts are, you can add their support (logging) easily.
Some old meters like 3457A I have in garage, so their support can be added later.

I don't know how D3 works, but I think it will be useful to have a file format that explains how to plot data and few "macro" to add things like stddev, convergence, ppm deviation between two measurements etc. If there is something like this, you can plot chart with one script.
Statistic available in D3 is min,max,mean,median,deviation, ppm is calculated against defined reference value. But If you needs something more complex you can access log by Samba of FTP and work with data in Excel/Libre Office or other statistical program.

In meantime I needs to define data separator ( comma, tab or semicolon) my preference is tab. So log files will be tsv and not csv. Any complains?

Current status:
Image for RPi 2/3 is ready ( ext4 replaced by F2FS)
Support implemented and tested for: LAN instruments ( tested with 34411A), USB ( by USBTMC, tested with 34411A), GPIB (NI USB-GPIB-HS,E5810A)
-big thanks to Alex Forecich ( member here)
http://www.alexforencich.com/wiki/en/python-vxi11/start
http://www.alexforencich.com/wiki/en/python-usbtmc/start
Modified Adafruid library to support two BME280 sensors

Now lets to discuss the D3 and plot part.
A) I propose to have separate graph for Environment data ( both BME280 in one graph) .
B) Measurement data in second graph with environment data from one sensor ( add plot for ppm).

On chart are possible following functions:
Zoom in/Zoom out
Display values on mouse over

Any ideas?

BTW Thanks to VK5RC - He donated one 82357B clone for testing.
Prologix has been ordered.

I can upload current version of image (8GB SD card is minimum) or wait for Prologix. Anyone interested in current version?

« Last Edit: November 20, 2016, 08:09:21 am by plesa »
 
The following users thanked this post: lukier

Offline lukier

  • Supporter
  • ****
  • Posts: 591
  • Country: gb
    • Homepage
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #28 on: November 20, 2016, 07:28:43 am »
I suppose I already posted internal picture of E5810A, but it use the Power PC AMCC PPC405.Firmware seems to be made by ICS Electronic http://www.icselect.com.
And there is also one Xilinx Spartan, 83846 PHY and some Cypress for USB. If you wants picture of A version I can post within 2-3 weeks, when I will be back home:)
The main board looks more like some platform, because on front are 3x 64 pin connectors to connect display and few leds on front panel.

I suspected that Agilent might have rebranded some ICS stuff. Someone here did a teardown of ICS 8065, based on NAT7210 interface chip, driven by LH75411 ARM7TDMI.

Thanks for the description, seems too like departure from NI interface chips (EOL I suppose), so probably the Spartan does the GPIB protocol details and just passes data back and forth with the PowerPC. Still not as clever and simple as driving the GPIB transceivers straight from the PRU cores :)

Anyway, that's just curiosity, I don't want to dive deep into the GPIB details to be able to implement this in PRU. I'm leaning towards just a piece of software to translate VXI11 to linux-gpib calls so anyone with any supported GPIB adapter (NI, Agilent, Beiming, clones etc) and board of choice (RPi, BeagleBone etc) could set up a GPIB to LAN gateway.

TI AM335X GPIB would be useful for those that don't have any GPIB adapters or slow ones (e.g. not NI HS variant), but requires much more and low level work.
 

Offline plesa

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #29 on: November 20, 2016, 08:04:33 am »
I suppose I already posted internal picture of E5810A, but it use the Power PC AMCC PPC405.Firmware seems to be made by ICS Electronic http://www.icselect.com.
And there is also one Xilinx Spartan, 83846 PHY and some Cypress for USB. If you wants picture of A version I can post within 2-3 weeks, when I will be back home:)
The main board looks more like some platform, because on front are 3x 64 pin connectors to connect display and few leds on front panel.

Agilent might have rebranded some ICS stuff. Someone here did a teardown of ICS 8065, based on NAT7210 interface chip, driven by LH75411 ARM7TDMI.

Thanks for the description, seems too like departure from NI interface chips (EOL I suppose), so probably the Spartan does the GPIB protocol details and just passes data back and forth with the PowerPC. Still not as clever and simple as driving the GPIB transceivers straight from the PRU cores :)

Anyway, that's just curiosity, I don't want to dive deep into the GPIB details to be able to implement this in PRU. I'm leaning towards just a piece of software to translate VXI11 to linux-gpib calls so anyone with any supported GPIB adapter (NI, Agilent, Beiming, clones etc) and board of choice (RPi, BeagleBone etc) could set up a GPIB to LAN gateway.

TI AM335X GPIB would be useful for those that don't have any GPIB adapters or slow ones (e.g. not NI HS variant), but requires much more and low level work.

I also suppose that it is re-brand or some of their OEM product.
NI seems to have also obsolescence problems and that why they made NI GPIB-USB-HS+, it can be interesting what is inside.
It can be useful, but the amount of work seems to be big, maybe for someone like NighPanda who made Beiming adapter:)

BTW I'm surprised how many people are using one adapter per instrument, after that is GPIB quite "expensive" interface.And GPIB cables are so cheap on eBay:)


« Last Edit: November 20, 2016, 08:10:06 am by plesa »
 

Offline lukier

  • Supporter
  • ****
  • Posts: 591
  • Country: gb
    • Homepage
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #30 on: November 20, 2016, 08:29:08 am »
BTW I'm surprised how many people are using one adapter per instrument, after that is GPIB quite "expensive" interface.And GPIB cables are so cheap on eBay:)

Seriously? Bus is in the name :) I wouldn't call GPIB cables cheap (especially when compared to mass produced computer cables), but still much cheaper than even Agilent clones or Beiming.

BTW For those looking for GPIB cables I can recommend this seller:

http://www.ebay.co.uk/itm/400964594669

Bought from them 4 last year and 4 pcs recently and these cables are of very good quality, solid metal connector. Much better than some GPIB cables I found in the dumpster once (insulation coming out of the connector, plastic connector shells etc).
 

Offline Nuno_pt

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: pt
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #31 on: November 21, 2016, 09:19:40 am »
I've bought 10x 50cm HP GPIB cables for $30 to connect everything toghether.
I already have the 53181 conhecer to the 3457, and the 3457 conhecer to the K2000.
Next will be the K2000 conhecer to the 3456, then the 3456 conhecer to the PC with GPIB to USB HP clone.
Nuno
CT2IRY
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 3865
  • Country: tw
  • xDevs.com/live - 24/7 lab feed
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #32 on: November 21, 2016, 03:09:25 pm »
plesa
Quote
I can upload current version of image (8GB SD card is minimum) or wait for Prologix. Anyone interested in current version?

My SD card in one of Pi1's died recently, so I'm surely can try new image now  ;D.

One more suggestion - to have main linux partition located in the end of the image. So it could be easily expanded to larger SD cards. It's PITA to do so if there is other smaller partition in the end or swap in 8GB image, and you use it on 32GB card for example  :-\ Yea, my linux-magic not that great.
YouTube | Chat room | Live-cam | Have documentation to share? Upload here! No size limit, firmware dumps, photos.
 
The following users thanked this post: plesa

Offline plesa

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #33 on: November 22, 2016, 09:05:46 am »
plesa
Quote
I can upload current version of image (8GB SD card is minimum) or wait for Prologix. Anyone interested in current version?

My SD card in one of Pi1's died recently, so I'm surely can try new image now  ;D.

One more suggestion - to have main linux partition located in the end of the image. So it could be easily expanded to larger SD cards. It's PITA to do so if there is other smaller partition in the end or swap in 8GB image, and you use it on 32GB card for example  :-\ Yea, my linux-magic not that great.

Image is being uploaded to xDevs FTP :) File is called RPi_LogNut.7z
I tried to minimize the image size, but there seems to be problem with F2FS ( but I have much better experience with F2FS than with Ext4 FS).
Current image size after compression is 2.2GB. For image creation was used Win32DiskImager.
On image is enabled Samba, so you can access/map  /pub directory on your main computer.
Following has been tested:
   Connection to LAN instrument ( example /pub/python/Test_LAN.py)
   Connection to USB  instrument ( example /pub/python/Test_USB.py)
   Connection to GPIB instrument over NI adapter ( example /pub/python/Test_GPIB.py)
   Samba /pub ( read/write)
  BME280 logging (   /pub/python/BME280/BME_Logging_tsv.py)

Following needs to be set:
  webserver
  D3 scripts for logging (I would like to make it universal - description of plot loaded from log file header)
  Test support for 82357B clone adapter
  Test Prologix GPIB-USB Controller 6.0


Here are notes if someone want to update you own image:
1. Download Raspbian image  (RASPBIAN JESSIE WITH PIXEL)  it will take a while 1.4GB
https://www.raspberrypi.org/downloads/raspbian/

2. For image installation follow
https://www.raspberrypi.org/documentation/installation/installing-images/README.md

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install screen mc f2fs-tools i2c-tools samba samba-common-bin bc python-dev rpi-update tk-dev build-essential texinfo texi2html libcwidget-dev libncurses5-dev libx11-dev binutils-dev bison flex libusb-1.0-0 libusb-dev libmpfr-dev libexpat1-dev tofrodos subversion autoconf automake libtool

sudo rpi-update
sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-update
sudo rpi-source
sudo reboot

cd /opt
sudo svn checkout http://svn.code.sf.net/p/linux-gpib/code/trunk/linux-gpib/ linux-gpib
cd linux-gpib
sudo ./bootstrap
sudo ./configure
sudo make
sudo make install

sudo svn checkout https://github.com/python-ivi/python-vxi11/trunk python-vxi11
cd python-vxi11
sudo python setup.py install

sudo svn checkout https://github.com/python-ivi/python-usbtmc/trunk python-usbtmc
cd python-usbtmc   
sudo python setup.py install
sudo pip install pyusb

# Following part is test USB connection
import usbtmc
instr =  usbtmc.Instrument("USB::0x0957::0x0a07::INSTR")
print(instr.ask("*IDN?"))
# Agilent Technologies,34411A,MY480060XX,2.41-2.40-0.09-46-09
Vice info https://github.com/python-ivi/python-usbtmc


# I2C
enable i2C in raspi-config
sudo raspi-config
-7 Advanced Options - A7 I2C Enable/Disable automatic loading of I2C kernel module - YES
reboot
# Now detect the BME280 by
sudo i2cdetect -y 1
pi@raspberrypi:~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 77

# Address 77 and 76 - BME280

Install adafruit library
cd opt   
sudo git clone https://github.com/adafruit/Adafruit_Python_GPIO.git
cd Adafruit_Python_GPIO
sudo python setup.py install

Modication second module ( I2C address to 76 instead 77 )
https://cdn.sparkfun.com/datasheets/Sensors/Weather/SparkFun_BME280_Breakout_v10.pdf

# Samba configuration
sudo smbpasswd -a pi
enter Samba password (raspberry)

create /pub directory
mkdir pub
chown -R  pi /pub
sudo nano /etc/samba/smb.conf

# add following to smb.conf
[pub]
   comment= RPi pub
   path=/pub
   browseable=Yes
   writeable=Yes
   only guest=no
   create mask=0777
   directory mask=0777
   public=no

 
The following users thanked this post: Assafl

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1350
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #34 on: November 23, 2016, 06:00:54 am »
@Plesa

Any hints/picts for mounting the BME280's ?
Do you have them on "cables" or what ?

Is the image for a Raspi3 , or can it run on a Raspi1 (old 512MB)  too ?

Edit: Thanx for doing this Plesa  :-+

Ohh suggestion . NFS Client , to be able to log data to a remote NFS disk , will also reduce the wear on the SD card.

/Bingo
« Last Edit: November 23, 2016, 06:15:10 am by bingo600 »
 

Offline ManateeMafia

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: us
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #35 on: November 23, 2016, 09:21:27 am »
@bingo600

I have the Adafruit version of the BME280 breakout and I plan on putting mine inside of a Hammond 1551MFLBK enclosure. One of the holes of the pcb will be used to secure it to one of the internal standoffs.

The enclosure is much larger but I like the fact I can use a zip tie to temporarily mount it where it is needed. I will have to drill some small holes near the sensor.

I have found the board to be highly sensitive to air drafts and have been keeping mine wrapped in anti-static foam for a while now.
 

Offline plesa

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #36 on: November 23, 2016, 10:49:29 am »
2x BME are hooked on I2C cable. One is packed with LTZ board inside polystyrene box.It is not secure by any screw.Nothing fancy I was in hurry to hook it up before leaving.

Image should be transferable to RPi2 ( tested ) for RPi I propose to run sudo apt-get update && sudo apt-get upgrade && rpi-update && reboot.
And after that I will be probably required to reinstall Linux-gpib according to notes above.

The NFS client, is good idea. The main aim of making this image is to help to people with 3458A and other instrument to setup powerful logging tool.
Currently we needs to more focus on interpreting the data (website for piloting basic scripts) rather than fine tunning image I think.
Wear level of SD card is not big deal, the majority of failures I have in past was related to corrupted FS. That's why I changed default Ext4 to F2FS.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1350
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #37 on: November 24, 2016, 01:54:09 am »
@ManateeMafia & Plesa
Thanx for the info.

I'll see if i can get a Raspi 1 or 3 going this weekend , while waiting for the BME's from China

/Bingo
 

Offline guenthert

  • Regular Contributor
  • *
  • Posts: 233
  • Country: us
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #38 on: November 24, 2016, 03:02:21 pm »
Wear level of SD card is not big deal, the majority of failures I have in past was related to corrupted FS. That's why I changed default Ext4 to F2FS.
Er, Ext4 FS is pretty stable these days.  What makes you think that the fs didn't fail because some blocks couldn't be written (or rather the controller *on the SD card* didn't write those blocks to the non-volatile storage medium, presumable because either power was cut or no free, still good block could be identified)?

Stories aplenty of corrupted file systems among RPi users.  Didn't happen to me yet and I have a few, one or two for a few years now, but i) I'm not in the habit of cutting power to them (you wouldn't do that to a Unix box, would you?) some are actually mostly on (uptime on my Internet radio is now 283 days) and ii) on most of them I'm using the Debian package 'flashhybrid', bypassing the flash-wear and sudden power loss issues.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1350
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #39 on: November 26, 2016, 07:15:04 am »
I'm actually using ext4 too , and have no problems on my RasPi's.
I even have one with Kodi , that gets it's power cut when we leave the summerhouse.
That one have been working for 1.5 years wo. probs

/Bingo
 

Offline guenthert

  • Regular Contributor
  • *
  • Posts: 233
  • Country: us
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #40 on: November 27, 2016, 11:37:43 am »
Stories aplenty of corrupted file systems among RPi users.  Didn't happen to me yet and I have a few, one or two for a few years now, but i) I'm not in the habit of cutting power to them (you wouldn't do that to a Unix box, would you?) some are actually mostly on (uptime on my Internet radio is now 283 days) and ii) on most of them I'm using the Debian package 'flashhybrid', bypassing the flash-wear and sudden power loss issues.
I jinxed it, it seems.  I have now in my hands my first broken micro SD card.  It happened while tinkering with one of my RPis -- I managed to misplace the 40pin header of a 'hat' by one pin.   :palm:  The RPi seems to have survived, but can't boot anymore.  On a 2nd system, I can mount and read the fs, but there are block level errors when the host attempts to write (including writing the dirty bit of the fs).  Update: some blocks, including some which shouldn't have been modified in months, can't even be read.

Ext4 is a traditional Unix file system, designed for rotating storage media, with little provisions protecting from hardware (block level) failures (the boot block is copied a few times, but that's about it).  Hardware failures are assumed to be handled on the block layer (RAID or similar).

A fs designed with the specific properties of the medium might be of advantage.  Not sure, how F2FS suggested above would fare in the event of a SD controller failure.

I think running an OS of an SD card is a rather questionable proposition.  I'd be more at ease, having the host boot from such a card, populating a RAM disk with the OS and then running from there (like many embedded systems operate).  Debian/Raspbian might be too fat to fit into the RAM of a RPi.  I meant for a while already to have a look how well OpenWRT runs on a RPi ... 
« Last Edit: November 28, 2016, 04:40:57 am by guenthert »
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1350
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #41 on: November 27, 2016, 06:23:16 pm »
Addon to the Vnut Platform

Here's Mark Simms annotated HP3458A calram readout , built on a RasPiv3 with a "fresh Jessie" , and linux-gpib 4.03
Rename the file extension to tar.gz , wasn't allowed as an upload extension

I haven't tested this one on my 58' yet , but it's build as the one i uploaded previously , that was used by TiN

/Bingo
« Last Edit: November 27, 2016, 06:25:51 pm by bingo600 »
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 3865
  • Country: tw
  • xDevs.com/live - 24/7 lab feed
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #42 on: November 27, 2016, 08:51:45 pm »
I'd expect this ready to go image concept presented in thread to be more targeted for beginners and non-software folks who just want plug it in, write image and run the "log the data, now" app.

Btw, one problem I have with RPi and NI USB-GPIB-HS is random crashed when running long time (hours). I used wheezy and jessie images from raspi site, different kernels, latest and one before that linux-gpib, RPI 1 and RPI 3 boards and various SanDisk SD cards. After crash gpib_config can't talk to dongle anymore, even thou it shows ok in lsusb. Reboot doesn't help , only dongle powercycle does.

Same NI dongle however works happily logging simultaneous data from 3x2001, 2x2002, 3458 over more than 70 hours now, running same python snake app on DE1SoC board with Trusty LTS 14.04 linux.
YouTube | Chat room | Live-cam | Have documentation to share? Upload here! No size limit, firmware dumps, photos.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1350
  • Country: dk
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #43 on: November 28, 2016, 04:12:32 am »
I'd expect this ready to go image concept presented in thread to be more targeted for beginners and non-software folks who just want plug it in, write image and run the "log the data, now" app.

I don't agree 100%
A common platform would be nice for ie. your DMM noiselogger measurements.


Btw, one problem I have with RPi and NI USB-GPIB-HS is random crashed when running long time (hours). I used wheezy and jessie images from raspi site, different kernels, latest and one before that linux-gpib, RPI 1 and RPI 3 boards and various SanDisk SD cards. After crash gpib_config can't talk to dongle anymore, even thou it shows ok in lsusb. Reboot doesn't help , only dongle powercycle does.
Have you tried with a powered USB hub ?
I think it could be power related.

Same NI dongle however works happily logging simultaneous data from 3x2001, 2x2002, 3458 over more than 70 hours now, running same python snake app on DE1SoC board with Trusty LTS 14.04 linux.
Does that one deliver more/better power ?

/Bingo
 

Offline plesa

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #44 on: November 28, 2016, 10:07:01 am »
Image v2 is ready. Just needs to solve issue with ftp upload.
Image is runnning on RPi2/RPi3.´, based on Raspbian Jessie image with latest kernel 4.4.37.
Extra Kudos for TiN for space on  xDev storage https://xdevs.com/doc/_Images_RPI-DL/
And also lot of inspiration in his Python scripts and idea with D3js.

On image is running samba where you can find all python scripts, log files and website sources.
Just to map network drive with RPi address.
Scripts can be executes over ssh ( user pi, password raspberry) same for samba.
On website you can find few basic pages with D3 plots.

Tested is USB,LAN, USB-RS232, GPIB (NI-GPIB-HS).
Soon will be added support for Agilent 82357B adapter/clone - thanks to VK5RC for donating clone.
Also Prologix is on it way. Support will be added in next release, probably will be used wrapper
https://github.com/hgrecco/pyvisa/issues/112

Some interfaces like USB requires root privileges, so use sudo.
Script for logging mainly set intruments for logging on 10V or 20V range - for LTZ boards logging.
BME280 sensors has it own page for log data.
Script for logging with 3458A also run ACAL every 1°C or 24h and log the DCV gain data.


Here are examples
#   Keyspan USA-19hs serial adapter
pi@raspberrypi:/pub/python $ python Test_RS232_USB.py
KEITHLEY INSTRUMENTS INC.,MODEL 6517B,1234567,A13/700x

pi@raspberrypi:/pub/python $ python Test_LAN.py
Agilent Technologies,34411A,MY12345678,2.41-2.40-0.09-46-09

pi@raspberrypi:/pub/python $ sudo python Test_USB.py
Agilent Technologies,34411A,MY12345678,2.41-2.40-0.09-46-09

pi@raspberrypi:/pub/python $ sudo python Test_GPIB.py
KEITHLEY INSTRUMENTS INC.,MODEL 2001M,1234567,B17  /A02

pi@raspberrypi:/pub/python $ sudo python 3458A_Log.py
Temperature or time difference since last ACAL is higher than set treshold 1.0 C / 86400 s
Since start ACAL performed 0 times
Performing ACAL DCV, it will takes 3 minutes
10V Gain DCV = 0.993364009
Internal Temperature = 32.5
27/11/2016      18:15:07        1 x ACAL        7.16507735      -1.258 ppm      32.5 C
27/11/2016      18:15:15        1 x ACAL        7.16507738      -1.254 ppm      32.5 C
27/11/2016      18:15:23        1 x ACAL        7.16507724      -1.272 ppm      32.5 C
27/11/2016      18:15:31        1 x ACAL        7.16507726      -1.270 ppm      32.5 C
27/11/2016      18:15:39        1 x ACAL        7.16507726      -1.270 ppm      32.5 C

pi@raspberrypi:/pub/python $ python BME_Log.py
27/11/2016      16:47:35        Temperature: 20.90 C 17.23 C    Pressure:  98680 Pa  98875 Pa   Relative Humidity: 49.7 61.6
27/11/2016      16:47:45        Temperature: 20.90 C 17.23 C    Pressure:  98680 Pa  98875 Pa   Relative Humidity: 49.7 61.6
27/11/2016      16:47:55        Temperature: 20.90 C 17.23 C    Pressure:  98680 Pa  98875 Pa   Relative Humidity: 49.7 61.6


pi@raspberrypi:/pub/python $ sudo python 34410A_Log.py
Agilent Technologies,34410A,MY12345678,2.41-2.40-0.09-46-09
27/11/2016      17:06:55        7.16734802      0.6 ppm
27/11/2016      17:06:57        7.16734637      0.4 ppm
27/11/2016      17:06:59        7.16734833      0.7 ppm
27/11/2016      17:07:01        7.16734792      0.6 ppm
27/11/2016      17:07:03        7.16734937      0.8 ppm
27/11/2016      17:07:05        7.16734989      0.9 ppm
27/11/2016      17:07:07        7.16734974      0.9 ppm
27/11/2016      17:07:09        7.16734902      0.8 ppm
27/11/2016      17:07:11        7.16734973      0.9 ppm


pi@raspberrypi:/pub/python $ sudo python K2001_Log.py
KEITHLEY INSTRUMENTS INC.,MODEL 2001M,1234567,B17  /A02

27/11/2016      19:26:08        -0.79064850     -1110349.2 ppm
27/11/2016      19:26:09        -0.79909820     -1111528.5 ppm
27/11/2016      19:26:09        -0.80731830     -1112675.7 ppm
27/11/2016      19:26:10        -0.81536700     -1113799.1 ppm
« Last Edit: November 28, 2016, 10:10:41 am by plesa »
 
The following users thanked this post: TiN, mimmus78, dr.diesel, Nuno_pt

Offline TiN

  • Super Contributor
  • ***
  • Posts: 3865
  • Country: tw
  • xDevs.com/live - 24/7 lab feed
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #45 on: November 28, 2016, 12:48:44 pm »
Quote
I don't agree 100%
A common platform would be nice for ie. your DMM noiselogger measurements.
More meant - can do both, DIY stuff for advanceds, but also have easy functions for beginner work :)
E.g. when linux-gpib was a new thing few years ago - fiddling with dozen of packages, kernel headers, firmware uploads enough to scare even brave *nix beginner  :)

Quote
Have you tried with a powered USB hub ?
I think it could be power related.
...
Does that one deliver more/better power ?

Yes, even tried powering +5V to dongle directly to pod from 3A PSU, same thing.
RPI board just forwards same +5V from input. Dongle takes ~400mA peak.

This issue is bit offtopic here, but I brought it up so we make sure images are ok for long term runs.
YouTube | Chat room | Live-cam | Have documentation to share? Upload here! No size limit, firmware dumps, photos.
 

Offline plesa

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #46 on: November 28, 2016, 01:06:40 pm »
I hope this image will help beginners to start with python and also with D3js for plotting. Histogram for noise measurement is also easy in D3. We just needs time to make scripts from scratch or convert EZGPIB ones.
TiN do you have all GPIB cables connected to instruments?

Image is here https://xdevs.com/doc/_Images_RPI-DL/RPi_LogNut_v2.zip

 
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 3865
  • Country: tw
  • xDevs.com/live - 24/7 lab feed
    • xDevs.com
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #47 on: November 28, 2016, 05:17:22 pm »
Maybe worth to make two level app? First level for function logic, etc datalogger or noise tester or custom modes such as delta measurement using current source and voltmeter for resistance measurement, similar to Kei 6220+2182.

Second layer would be for hardware support, eg SCPI commands to talk actual instruments.

It will take a bit more work, but will be easier to add support for specific instruments later.

I always have 3458, 2002s connected on GPIB, and add other instruments as needed.
YouTube | Chat room | Live-cam | Have documentation to share? Upload here! No size limit, firmware dumps, photos.
 

Offline HighVoltage

  • Super Contributor
  • ***
  • Posts: 4112
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #48 on: November 28, 2016, 09:02:54 pm »
What a great thread.

OK, I am ready to get my first Raspberry Pi.
But which one should I get to get best results ?
Thanks.
There are 3 kinds of people in this world, those who can count and those who can not.
 

Offline plesa

  • Frequent Contributor
  • **
  • Posts: 965
  • Country: se
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #49 on: November 29, 2016, 04:46:01 am »
What a great thread.

OK, I am ready to get my first Raspberry Pi.
But which one should I get to get best results ?
Thanks.

RPi2 or RPi3. RPi3 is faster and has integrated WiFI/BT. Price is almost the same. Image is working on both, we are not using x64 mode available on RPi3.
Do not forget to buy also enclosure. As SD card is 8GB minimum, I'm using several Samsung SD ( Pro/EVO+)  cards without problems.
RPi official power adapter is OK, but during logging I used output of E3631A PSU ( 5V for RPi, and 15V for LTZ).

I do not have Prologix yet, so it is not working, but will be added soon. Currently is working on NI USB-HS and E5810 GPIB interface.
82357B will be added soon as well.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf