Author Topic: Signal speed analysis  (Read 2099 times)

0 Members and 1 Guest are viewing this topic.

Offline NickWolfeTopic starter

  • Contributor
  • Posts: 14
Signal speed analysis
« on: April 02, 2019, 01:54:28 pm »
Hi guys!
I'm nearing the end of a prototype but are in need of some speed analysis.
I need to measure the speed from a switch and a digital signal input on a computer.

Having no clue about that area, I'm only thinking, but is it possible to measure the timing via the following
https://www.adafruit.com/product/2312

I'm thinking the digital on the data channel on the usb port and the analog on the switch, then compare the timing in the software?

Thanks in advance!

Sendt fra min SM-G930F med Tapatalk

 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Signal speed analysis
« Reply #1 on: April 02, 2019, 02:10:57 pm »
It all depends the precision you need.  Is it in the order of milliseconds or nanoseconds? The saleae logic analyzer has an internal clock and it will not show the exact timing, sample rate is only 12 MS/s @ 8 Bits digital and 6MS/s on analog.  I think you should get an oscilloscope.  What is tricky is triggering the USB bus right when your timing must start, the old Agilent 54622D has USB triggering and it has 2 analog + 16 digital channels.  The Zeroplus LAP-C can also trigger on USB 2.0 but you have the same limitation, depending on the model it has 100MHz or 200MHz samples per second, that limits the precision to 10ns - 5ns (theoretical).

Please post a diagram of the circuit you need to measure
« Last Edit: April 02, 2019, 02:13:56 pm by TK »
 

Offline NickWolfeTopic starter

  • Contributor
  • Posts: 14
Re: Signal speed analysis
« Reply #2 on: April 02, 2019, 02:14:35 pm »
I would be happy with 1/10 ms precision, but my main problem when thinking about oscilloscopes is that my proto connects via Usb3.
I don't need full data analysis, just the time from analog to usb basically. I'm cringing by the thought of a $50,000 oscilloscope

Sendt fra min SM-G930F med Tapatalk

 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Signal speed analysis
« Reply #3 on: April 02, 2019, 02:38:16 pm »
Does your proto use a microcontroller?  Then you can use one of the GPIO pins to measure the time from the switch to the beginning of the USB3 transmission.  You don't need a $50,000 scope for 1/10ms timing measurement, any entry level scope ($400-$1000) will work (Rigol DS1054Z, Micsig TO1104, Siglent SDS1202X-E, Keysight DSOX1102A, etc).
 

Offline NickWolfeTopic starter

  • Contributor
  • Posts: 14
Re: Signal speed analysis
« Reply #4 on: April 02, 2019, 05:38:35 pm »
It does, currently looking at the rigol you recommended, would I need anything else? Being the first time using an oscilloscope, would it be connecting one probe to the USB end and one probe to the GPIO?
Sorry for the ultra newbie question

Sendt fra min SM-G930F med Tapatalk

 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Signal speed analysis
« Reply #5 on: April 02, 2019, 06:33:52 pm »
Given the latency of USB, does anything else matter?  You can expect an average latency of 1/2 ms or 500 us.  If it matters...
 

Offline NickWolfeTopic starter

  • Contributor
  • Posts: 14
Re: Signal speed analysis
« Reply #6 on: April 02, 2019, 06:41:55 pm »
In all honesty, I can't use calculations to much, I have improved a protocol for the transfer by 7.5x  but I need the actual measurable time from user input to the receiving end [emoji4]

Sendt fra min SM-G930F med Tapatalk

 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Signal speed analysis
« Reply #7 on: April 02, 2019, 07:00:15 pm »
In all honesty, I can't use calculations to much, I have improved a protocol for the transfer by 7.5x  but I need the actual measurable time from user input to the receiving end [emoji4]

Sendt fra min SM-G930F med Tapatalk
Is the receiving end inside the PC or laptop and at the user level (application)?  If this is the case, I don't think an oscilloscope can help.
 

Offline NickWolfeTopic starter

  • Contributor
  • Posts: 14
Re: Signal speed analysis
« Reply #8 on: April 02, 2019, 07:05:27 pm »
In all honesty, I can't use calculations to much, I have improved a protocol for the transfer by 7.5x  but I need the actual measurable time from user input to the receiving end [emoji4]

Sendt fra min SM-G930F med Tapatalk
Is the receiving end inside the PC or laptop and at the user level (application)?  If this is the case, I don't think an oscilloscope can help.
It is, but I just need the time to the interface, more accurately splitting open the usb jack and measuring there, not application level.

Sendt fra min SM-G930F med Tapatalk

 

Offline NickWolfeTopic starter

  • Contributor
  • Posts: 14
Re: Signal speed analysis
« Reply #9 on: April 02, 2019, 07:10:14 pm »
Basically I'm able to circumvent polling, and thus minimize the time between packets by a huge factor. While I'm now testing it by injecting preprogrammed data in from before the buffer, to the microcontroller and then output it through USB, but in order to be absolutely sure of the numbers, I need to know if the buffer and mcu adds how much if any, delay from the input (will reprogram it to test a switch instead of pre programmed data, that was just for benchmarking the throughput)

Sendt fra min SM-G930F med Tapatalk

 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Signal speed analysis
« Reply #10 on: April 02, 2019, 07:10:22 pm »
I think USB is very verbose protocol, I don't think it is going to be quiet until you receive the packet to transmit to the PC.  Discerning the meaningful packet from the rest will be a challenge.  My suggestion is to use a GPIO on the microcontroller to set it HIGH just before sending the packet to the USB port.  Then you can use 2 probes on the scope, one on the switch, another one on the GPIO pin, then trigger on the switch and measure the time from there to the GPIO pin going high.
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Signal speed analysis
« Reply #11 on: April 02, 2019, 07:11:40 pm »
It can be helpful if you post a diagram from the switch to the USB port
 

Offline NickWolfeTopic starter

  • Contributor
  • Posts: 14
Re: Signal speed analysis
« Reply #12 on: April 02, 2019, 07:11:43 pm »
Sounds solid! Thanks [emoji4]

Sendt fra min SM-G930F med Tapatalk

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf