TJF,
This is absolutely AWESOME!  What a great library!  I am just now reading 
through the documentation and reviewing your recommendations but have a 
question..  I plan on utilizing a GPIO pin and setting up MM mode and 
monitoring AdcUdt::DRam[1].  How do you recommend I monitor 
AdcUdt::DRam[1]?  Just setup a loop in python or do you recommend another 
method?  Basically I need to put a timestamp at the leading edge of the 
input.  

Thanks!


On Saturday, September 1, 2018 at 12:00:35 PM UTC-5, TJF wrote:
>
> 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/632dd074-1e98-4ca1-836c-3eaa9dc1c5b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to