Jump to content
  • 0

Dual channel event timing problem with Analog Discovery 2


thegecko

Question

I'm trying to analyse ping-response time of US-026 ultrasonic module.

CH1, connected to a pin of the TX transducer, gives the following trace:
1_ping.thumb.jpeg.9ef623b775a0781cb0a0fcf2997c04c1.jpeg(a.c coupled simply because that's the way my AD2 arrived)
This trace exacly matches specification (ping = 8 cycles at 40KHz)

CH2 connected to a pin of the RX transducer, gives the following trace:
2_echo.thumb.jpeg.7f171292dc1575b9806c9fb141b4d54a.jpegThis trace also looks reasonable to me (8 full cycles of echo followed by decaying ringing)
There is some disappointing crosstalk evident with CH1, but this may be down to my wiring.
(CH2 is also a.c coupled according to the board link. Not sure why this trace resembles DC coupling but it's not my primary concern right now)

The US-026 is being operated by arduino in continuous loop, reliably measuring echo time a little over 2000uS - About right, by my calculations, for the 684mm round trip. There is some jitter/noise but otherwise reliable with no timeouts.

However I cannot capture both events using Analog Discovery 2.

I can trigger reliably on CH1 Ping:
3.ping-all_alone.thumb.jpeg.42b50f203a765d1c2f8c3f691a774662.jpeg

I can trigger reliably on CH2 Echo:
4.echo-all_alone.thumb.jpeg.3b5f9d6299ac7528182e887d58dcfeab.jpeg

The only differences between the latter two above are:
    trigger channel
    trigger level
    x-position (adjusted to show +/- 2mS, as appliccable)

But neither screen captures the corresponding echo/ping, which should be at about +/- 2mS.

This remains true seemingly whatever I set the timebase to. I'm fully braced for this being my fault, I just can't see what I'm doing wrong. I'd be grateful if anyone can suggest what's wrong.


P.S.  Two other observations may or may not provide a clue:
1. The echo signal seems somewhat stronger than the ping, counter to my intuition. However I guess it may simply be due to the way the US-026 works?
2. Full disclosure: The probes were set to x10, but the software was set to x1. I presume they should match? However, changing the software to x10 just seems to change trace amplitude which, in my simplistic way, is all I'd expect.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @thegecko

The attenuation setting in the software simply scales the capture based on external attenuation in order to show magnitude at the tip of the probe. It also scales the offset setting and trigger level to proper level.

In order to see the timing between TX RX, try setting higher time base to capture wide time span or perform recording.
You can set the trigger filter to Decimate in order to trigger on pulses shorter than current sampling rate. Otherwise. with the default average sampling method the short pulses may be filtered out, depending on sampling rate. You can also configure the sampling method under the gear menu of each channel.

image.png.51f20840ceafa63e89ae51ebd554e137.png

 

Link to comment
Share on other sites

Thank you Attilla for your reply and confirmation of attenuation setting.
I appreciate your help.

If I understand correctly, you are suggesting that the ping and echo are further apart than I'm expecting.
That's entirely possible, of course, and neither of us should probably rely solely on my calculations.
With that in mind I did try slower time-bases down until the trigger signal has been squashed out of existence. I didn't include those as they didn't add anything.
I will try using your suggestion to measure still-longer intervals but I don't think that's the problem. Either of the latter traces should already be wide enough to capture both ping and echo:

The traces I've shown are from a live system in which an Arduino, monitoring the very same US-026 sensor as the scope, consistently reports the echo at 2000uS after the ping. That 2000uS is exactly where I'd expect it (684mm at the speed of sound (343m/S)), and is comfortably within the display range of both the latter traces.

For some reason, I'm seeing the scope apparently capture only the trigger trace (either CH1 or CH2) with no event captured on the non-tiggered channel. I quite agree that this taken on its own would suggest the time base is too fast but that doesn't seem to fit the other facts.

I will try your suggestions, and in addition will try to push the ping rate up far enough to get two pings on a single trace or recording to see if I get anything in between. I will report back...

 

Link to comment
Share on other sites

Just a quick update:

I rebuilt my breadboard circuit prior to renewed investigations. The scope echo appeared more than 10x what it should be before the receive transducer apparently gave up altogether (nothing registered by either scope or Arduino). I have no readings to post from that one, but nor would I attach so much confidence to the readings I had before.

An alternative US-026, gives rather different waveforms than the first, still apparently differeng from reality.
I'm no closer to solving the problem as posted but may be closer to the problem I was originally investigating: Discrepancy between sensors.

I will post back with explanation if I find one, and possibly more data if I don't, but for now I think the problem is mine...
Thanks again for your response so far, Attila (I haven't yet tried the decimate filter, but thanks for the tip).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...