Author Topic: Trigger the oscilloscope with digital signals - SHT15 serial data and Arduino  (Read 861 times)

0 Members and 1 Guest are viewing this topic.

Offline MattiaMTopic starter

  • Newbie
  • Posts: 2
  • Country: gb
I am a complete newbie with digital electronics, and I decided it was time to learn something new.

I got an Arduino with a temperature and humidity sensor (SHT15, datasheet  here).

I thought that figuring how the sensor communicates with the microcontroller could be a good learning opportunity, so I took my scope and tried to see if I could identify the various communication steps described in the datasheet. And here is the problem: I think I am not triggering the oscilloscope correctly, and I have not been able to figure out how to show the signal properly.

With a pulse width trigger set to 10us over a time span of one second, I get three pulses (in yellow the serial clock, in blue the data, first image attached) which look nothing like in the datasheet, although I figured the first one is to retrieve the temperature data, the second to retrieve humidity, and the third one again temperture (the third one is called from the humidity function in the library for the SHT15, because humidity values need to be adjusted taking into account temperature). I also figured that, with the 1s span, the sampling per second is not large enough to show any waveforms at the frequencies of the clock/data.

With the same pulse width trigger set to 10us, over a time span of 1us I get something that seems the same as the first line in Fig. 17 in the datasheet: I can see the transmission start command, the '000' address, and the '00011' sequence indicating that the temperature measurement and, I believe, the ACK.
However, I am not able to visualize the entirety of the trasmission: I can't visualize the data actually transmitted, the CRC-8 Checksum and all the other parts shown in Fig. 17. I am also not able to trigger on the humidity transmission either nor on the second call for temperature data transmission. What I see is just nothing. (2nd and 3rd images attached).

What am I doing wrong? How can I visualize the entire span of bits?  :-//

Thank you!
Mattia
« Last Edit: December 01, 2018, 04:14:15 pm by MattiaM »
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
A cheap USB logic analyser + sigrok PulseView is going to more useful to see what is going on here. You can capture the entire communication and scroll through it at your leisure. PulseView won't know how to decode the data since the SHT15 uses its own protocol but you'll still be able to see it on screen. If it was a I2C sensor like a SHT31 then you'd see the decoded data as well.
« Last Edit: December 01, 2018, 04:27:39 pm by tsman »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
The protocol looks a lot like I2C but I only just glanced at the datasheet.

I sometimes use a digital pin that I can set just ahead of a transfer as a way to trigger the scope.  True, these are usually for higher speed devices like FPGAs but the idea is the same.  I can move the trigger point way over to the left if there is a lot of time lag between setting the output pin and the beginning of the transfer.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf