P2 Fun during Oz Lockdown

Here’s some photos of various P2-based instrumentation projects I’ve been working on in the past couple of months during Melbourne’s COVID-19 lockdown.

Currently I’m building up a P2 weather station, that will incorporate ultrasonic anemometry, a tipping bucket rain gauge, plus temperature, pressure, humidity and UV measurement. Eventually this will also build in the ESP32 for field deployment/internet access.

For the anemometry part of this project the analog capability and smart pins of the P2 really shine. A couple of pics show my test setup and draft control screen where the transducer Rx envelopes and zero crossings are reported. Hope to post more about this project as it progresses.

Comments

  • roglohrogloh Posts: 2,777
    edited 2020-10-09 - 22:05:36
    Wow, you've been busy. Good to see that lockdown hasn't slowed you down. :smile:
  • WoW! Great project.

    You have kept it under wraps all this time?

    If you want to share some files, Gerbers, BOM, SPIN files, I could move this to Customer Projects forum.
  • Super amazing work Richard. You've done a great job with photos (depth of field etc) too

    We need to make a rotary jig here for testing some sensors (ToF, IR arrays, Laserping etc). Could that be of benefit to you for testing wind direction too? Thinking a platform with slip ring in the middle and small stepper motor driving the outside
  • Hi Lachlan

    yes indeed - that would be extremely useful. The arrangement with sticky tape and glasses (!!) has been sufficient for my initial testing but I need something much better for a finished application. Re wind direction I can calculate that from a vector addition from the N/S and E/W readings - but a decent mount for the transducers will be essential. There's potential issues with turbulence to think about too.

    Re TOF measurements I've got some great results with a VL53L0X module BTW.

    I'm really keen to get over and catch up with you, OzPropDev and Rogloh again as its been a long time. It's fantastic to see your new P2 DIL boards coming to fruition - and Roger's work on the HyperRAM/Flash driver is super amazing too - I'll certainly want to be using that for a number of things I have in mind down the track.

    Just need to hope those infection numbers keep coming down before I can visit - but I'm afraid I'm not optimistic we'll hit Dan's target by Oct 19th.... But looking at things elsewhere in the world now it seems here are on the right track.
  • Very nice work Richard.
    Looking forward to catching up again for sure.
  • Excellent labviewing too
  • Pretty neat, RJSM!

    Are you using the Goertzel to measure phase shift?
  • I'm using SINC2 analog to capture 4 x 10240 point transducer waveforms into HUB. There's currently some external circuitry; a comparator generates zero crossings and a smart pin detects edges, with cycle counts stored into LUT for each direction -N,S,E and W. The key is then to find the peak of the received envelope and hence the TOF. I'm exploring various ways to do this, including convolution using a matched filter and several others. For this the ADC waveforms are scanned after accumulation to compute local maxima and minima.

    I hadn't thought about Goertzel - sounds interesting. Its great to see how much load the P2 can take on to remove external components. I'm still far from an expert at programming the P2 with its generous instruction set but its been a joy to work with so far.
  • RJSM wrote: »
    I'm using SINC2 analog to capture 4 x 10240 point transducer waveforms into HUB. There's currently some external circuitry; a comparator generates zero crossings and a smart pin detects edges, with cycle counts stored into LUT for each direction -N,S,E and W. The key is then to find the peak of the received envelope and hence the TOF. I'm exploring various ways to do this, including convolution using a matched filter and several others. For this the ADC waveforms are scanned after accumulation to compute local maxima and minima.

    I hadn't thought about Goertzel - sounds interesting. Its great to see how much load the P2 can take on to remove external components. I'm still far from an expert at programming the P2 with its generous instruction set but its been a joy to work with so far.

    The Goertzel would listen to the ADC bitstream for some time and return to you a sine and cosine accumulation referenced to its own sine output. You would play a sine wave at 39KHz (?) out of one transducer and listen to the other. At the end of each measurement period, you would convert the relative sine and cosine accumulations to phase and power using the QVECTOR instruction. Better yet, maybe you could just flip phase on the output transducer every time you sensed an abrupt phase change on the input. The flipping period would become the time between output and input transducers. You should be able to resolve wind speeds in millimeters per second.
Sign In or Register to comment.