Hi! Am Freitag, 31. August 2018 17:44:22 UTC+2 schrieb [email protected]: > > Hello, > I am interested in using the BBB to monitor a sensor (geophone) at about > 200-400sps. I am currently using the Adafruit_BBIO.ADC library to do this > in Python. Ultimately, there are two goals for this project, and I would > love some input on how to approach this. > > 1) Time stamp when the input voltage reaches 0.5v - The geohone is > generating a sine wave, the stronger the vibration/movement of the > geophone, the higher the amplitude/voltage of the signal is produced. I > would hope to accurately place a timestamp at the exact moment the voltage > crossed that threshold. As far as timing goes, I am using onboard GPS with > 1 PPS output and Chrony for sync. >
libpruio <http://github.com/dtjf/libpruio> is designed for such tasks. Use it in MM mode (MeasureMent mode). Up to four triggers can be set to specify the sampling start. Even pre-triggers are possible. See http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/_cha_features.html#SubSecTriggers for details. When measurement starts, the value of AdcUdt::DRam[1] drops down to 0 (zero). So by monitoring that value you can generate a timestamp with Python accuracy. If this isn't accurate enough, you could use the other PRU just for the timestamp. Next version 0.6 will ship with Python bindings and example sources. > 2) I also have a contact closure that I would like to monitor. Right > now, I am pushing 1v through the closure, and monitoring the ADC for a > voltage change from 0v to 1v, then applying a timestamp. Any thoughts here? > Since version 0.4 libpruio can handle GPIO input in MM mode. Ie configure a pulled-up GPIO-input and groud the pin by your closure. (You can also continue with ADC input, but in MM mode the data evaluation has to be done after the measurement.) Regards > I have read about the PRU on the BBB and am wondering if that is what I > need to be using to obtain sub millisecond accuracy on my timestamp. Any > thoughts here? > > Thanks! > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/35940ab2-f5b5-4ea6-a204-7a9e93d0dd7c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
