Hi everyone, it's been a while since I have posted.
So that you understand the issues, here is some background on this need. I have a need to do long-term (maybe months) unattended triggered data logging, with access to mains power but no Ethernet or WiFi (cellular modem is possible but not so scalable, and LoRa might work for messages but not data transfer). Right away we need to log one location. Ideally we'd like to log six or more, so at that level, cost and scaling become issues. We need to trigger the acquisition, keep at least two or three 60-Hz cycles (16.7 msec period) of pre-trigger data, and log a few more post-trigger 60 Hz cycles, for a total record of up to 10 cycles (170 msec). We'd like to sample at 100 KHz or better. I am looking into how to build an affordable data logger quickly, with no custom hardware. One option is plugging USB DSOs or similar into a PC, I'd prefer a Linux PC in hopes it would be more reliable. I have two Digilent AD2 and plan to deploy them first since it's the best COTS solution I can find right now. The AD2 can do this with its 16384 repeat mode capture at 100 ksps. These inputs will be sampling signals usually in the 12-volt range but will trigger anytime we see something like 20 V or more. The inputs could see 250 V for some tens of msec. We're looking for destructive voltage spikes (not due to lightning). Lightning hits are very brief (under a msec I am told) and the events which are happening destroy the lightning SPDs presumably because the events are so long in duration. We are trying to capture such events and track down the source. It's a thorny problem. The large, destructive events only happen at most a few times a year, on no predictable schedule. We hope to find lower-level, non-destructive events happening much more frequently. So we want to get some logging going ASAP to see if we are even on the right track. It's not a data streaming need, it's capturing 100-200 msec or so of data, at least 16K 16 bit samples per channel, and at least four channels. On the AD2 that's a .csv file of under a MB per event for two channels. So 1 GB of storage can log 500 or more events with 4 channels. Feasible on a $500 notebook PC such as ThinkPad 13.
There are stand-alone loggers for USD$4000 and up but they are usually low bandwidth. And really, the only different between the under $500 USB DAQs and the $$$$ standalone loggers is that they basically mash up a computer board and SD card storage with the $500 analog front end. Plus the surges may wreck whatever we use for logging so we have to consider them sacrificial, and consider the mission a success as long as our data gets collected. So a cheaper front end is better.
Longer term it might be practical to make a logger by adding a USB host device (Raspberry Pi or Teensy) to the affordable analog USB front ends from companies like Dataq. I have tried using the AD2 with a Linux PC and it does not work reliably: USB connections time out. It's a great device on a Windows PC but apparently there is some USB kernel issue with Linux in general, and (other users report) Raspberry Pi in particular. Bitscope Micro works well with the Pi so I have one of those on order too. But the Pi is not a real-time device and brings a lot of complexity to the table along with its many features.
OK so enough background. Since we use Teensy already and like it a lot, I wonder about using Teensy with USB Host hardware as a DAQ logger and manager (it could do some more complex triggering and data analysis). Then we could plug in any of a number of analog front ends from $59 up from places like DataQ or BitScope, anyone who publishes their API and has decent functionality. Does this seem like a reasonable idea for Teensy 3.6?
So I googled and found mention of the USB Host Shield but all the links to purchase hardware are 404s. So my question is, in the other Teensy 3.6 USB Host threads here, exactly what hardware is being used to implement the USB host connection? Is there a way to buy a decent USB host mini shield? I will feel silly if the answer is already there staring me in the face... but happy to have it.
So that you understand the issues, here is some background on this need. I have a need to do long-term (maybe months) unattended triggered data logging, with access to mains power but no Ethernet or WiFi (cellular modem is possible but not so scalable, and LoRa might work for messages but not data transfer). Right away we need to log one location. Ideally we'd like to log six or more, so at that level, cost and scaling become issues. We need to trigger the acquisition, keep at least two or three 60-Hz cycles (16.7 msec period) of pre-trigger data, and log a few more post-trigger 60 Hz cycles, for a total record of up to 10 cycles (170 msec). We'd like to sample at 100 KHz or better. I am looking into how to build an affordable data logger quickly, with no custom hardware. One option is plugging USB DSOs or similar into a PC, I'd prefer a Linux PC in hopes it would be more reliable. I have two Digilent AD2 and plan to deploy them first since it's the best COTS solution I can find right now. The AD2 can do this with its 16384 repeat mode capture at 100 ksps. These inputs will be sampling signals usually in the 12-volt range but will trigger anytime we see something like 20 V or more. The inputs could see 250 V for some tens of msec. We're looking for destructive voltage spikes (not due to lightning). Lightning hits are very brief (under a msec I am told) and the events which are happening destroy the lightning SPDs presumably because the events are so long in duration. We are trying to capture such events and track down the source. It's a thorny problem. The large, destructive events only happen at most a few times a year, on no predictable schedule. We hope to find lower-level, non-destructive events happening much more frequently. So we want to get some logging going ASAP to see if we are even on the right track. It's not a data streaming need, it's capturing 100-200 msec or so of data, at least 16K 16 bit samples per channel, and at least four channels. On the AD2 that's a .csv file of under a MB per event for two channels. So 1 GB of storage can log 500 or more events with 4 channels. Feasible on a $500 notebook PC such as ThinkPad 13.
There are stand-alone loggers for USD$4000 and up but they are usually low bandwidth. And really, the only different between the under $500 USB DAQs and the $$$$ standalone loggers is that they basically mash up a computer board and SD card storage with the $500 analog front end. Plus the surges may wreck whatever we use for logging so we have to consider them sacrificial, and consider the mission a success as long as our data gets collected. So a cheaper front end is better.
Longer term it might be practical to make a logger by adding a USB host device (Raspberry Pi or Teensy) to the affordable analog USB front ends from companies like Dataq. I have tried using the AD2 with a Linux PC and it does not work reliably: USB connections time out. It's a great device on a Windows PC but apparently there is some USB kernel issue with Linux in general, and (other users report) Raspberry Pi in particular. Bitscope Micro works well with the Pi so I have one of those on order too. But the Pi is not a real-time device and brings a lot of complexity to the table along with its many features.
OK so enough background. Since we use Teensy already and like it a lot, I wonder about using Teensy with USB Host hardware as a DAQ logger and manager (it could do some more complex triggering and data analysis). Then we could plug in any of a number of analog front ends from $59 up from places like DataQ or BitScope, anyone who publishes their API and has decent functionality. Does this seem like a reasonable idea for Teensy 3.6?
So I googled and found mention of the USB Host Shield but all the links to purchase hardware are 404s. So my question is, in the other Teensy 3.6 USB Host threads here, exactly what hardware is being used to implement the USB host connection? Is there a way to buy a decent USB host mini shield? I will feel silly if the answer is already there staring me in the face... but happy to have it.