Interpret analog signal as digital

Hi, I am trying to analyze CANbus with Logic 8 analyzer, and it turns out it’s impossible, because it requires the swing of at least 0.6 - 1.2 V, while my CANbus low has swing of 1.3 - 2.4 V, so the logic input stays high all the time, while I can see the signal on the analog input. The CAN protocol analyzer allows only a digital channel to be selected as source, but I have an idea:
Why not allow to manually select a threshold on the analog channel, and make a digital signal from it? The interpretation would be done in the software, so it would be slower, but it’s okay, as I would be able to at least analyze something :slight_smile:

Or perhaps there is already such feature in version 2, but I couldn’t find it?

2 Likes

That’s an interesting idea. I don’t believe it is possible currently. You could add it as a feature request.

But, I wonder if the idea itself could be expanded. For instance, I deal with IsoSPI as well. This is essentially an analog bi-polar version of SPI that runs through transformers and thus gets the Iso prefix because it is completely isolated between nodes. The thing is, it is just SPI but with a different physical layer. The end result is still SPI. So, I wonder if it’d be possible to make an interface where analog signals could be processed and turned into a digital output that then is fed back to any other digital plug in for processing. In my example the IsoSPI could be turned into SPI which then gets processed as normal by the digital SPI functionality. That SPI output could then be fed to an HLA for even more processing. This idea could really potentially even make sense for digital to digital signals, though I can’t think of any good example for that.

But, your example and mine might make a good case for an analog to digital functionality. If you or I added this to the feature list I wonder what they’d say?

2 Likes

I added the feature request:

https://ideas.saleae.com/b/feature-requests/process-analog-channels-to-digital

This has been an idea we’ve kicked around for a while, for exactly the same reason. We’re actually in a good place with the new data processing system to add features like this, where a new processing step could be added to create a digital stream of data from an analog one.
However, I don’t want to add this now, because it’s quite complex to handle on the session management level. It represents a lot of complexity that will affect quite a few other parts of the application, since channel data feeds into so many other components.

What I think might be the best plan is to come up with a single solution that allows taking digital, analog, and/or analyzer data, run some code with it, and produce digital, analog, and/or protocol data. Basically an extension that users could write that builds on what we can do now with protocol analyzers, which are essentially digital data to protocol data converters. This would just expand the input formats to support analog or other protocol analyzer outputs, and expand the output to support digital and analog data. The new python high-level analyzers and measurements are a step in this direction.

I have no timeline on this, all I can say now is that user extensibility is a big focus for Logic 2. I wish we could start working on it sooner.

In the meantime, would something like this help work around the problem?
https://www.amazon.com/SN65HVD230-Transceiver-Communication-Module-Arduino/dp/B01L47TLVQ

1 Like

Thanks Collin.

Thanks markgarrison. I already figured out that the board I’m working on already has a CAN tranceiver, and I could simply probe the other side of it :slight_smile:. But I have left the post, because I think it would be a cool feature to have.

Oh I am in need of a similar solution!

Let me expand my problem a little more:
I don’t own a Saleae analyzer yet, but I have a quite capable oscilloscope, which I never used before.
Instead, I used Sigrok with some basic devices while in college. Nothing special, basic microcontroller circuit and max. 5V. But for my thesis I was made aware of the logic analyzers of Saleae, so I remembered them in this situation.

Now, I had an emergency where I needed to check a RS422 connection between two devices.
The said oscilloscope was able to export the waveform data and even had a protocol decoder, but I was planning to analyze the data later and not on site.
Since the system I manage is built-in a big project, I can’t guarantee a stable and proper RS422 connection. If there is a failure, it could even be an overvoltage on the line.
The failure also only occurs occasionally. One more reason I wanted to log the data for a longer period of time.
Checking the oscilloscope, the signal itself looked okay. Even the protocol decoder showed what I expected. So I created a few long time logs and exported the data…
No, I am not able to import it again and attach the decoder to the exported data.
Alone in this case, I know Sigrok was easier to control.
But having no compatible device, I checked the Saleae devices after returning to office.
So I checked the latest demo device in Logic2 and saw everything I need but the Analog → Digital converter.

I still hope to find out how to use the oscilloscope properly. But in case the Saleae devices would support this out of the box, I would directly order one.
The specs are looking great: 25V input protection (for analog too?), 10V signal level for analog. And the fact it features analog inputs really made me hope it would be able to convert the analog to digital.

So yeah … There is another person who could need such a converter. And even more, if I would be able to parameterize the settings for the decoder in its strictness.

@rng Thanks for writing in, and I’m glad to hear you remembered us from your thesis!

First, I wanted to answer your question below:

25V input protection (for analog too?)

Yes, for our current products (Logic 8, Logic Pro 8, and Logic Pro 16), all input channels are protected up to +/- 25V whether they are configured as analog, digital, or both. You can refer to our datasheet below as well if needed:

Our logic analyzers are not able to decode differential signals natively, however, for RS-422, you should be able to record either the “+” side or the “-” side of the signal depending on which of those can effectively cross the digital voltage threshold of our Logic analyzer during data transitions. We discuss this in more detail below.

By the way, what kind of voltage swings are you working with? I’m also curious to know why you need the ability to convert analog recordings into digital. Hope you can clarify that for me!

This is how I have done it. Checking both polarities the same time only to see if there is any critical fluctuation on any of them.

Voltage swing was not critical according to the data I received. Sure, a few peaks on the flanks and a foreign signal in the 10-100mV region. Nothing RS422 shouldn’t be able to handle. Failure injected voltages can be more, especially on ground.

Now, the idea was to check if there is any failure in the data itself, while checking back to the waveform if it is signal related.
Since debugging the target machine is not possible right now, we are limited to check the data received, we are now working on a tool to check the data with the transmitted checksum.
Also, both, target and source, were used many times before without problems and even a source-simulator (a tool on PC using a RS422 dongle) is working without problems.

@rng Thanks for the added information! I think I may have lost sight of your original question/request. Were you mainly trying to understand if our Logic products would be able to decode your RS-422 data? I wasn’t quite sure where your request to interpret analog signals as digital comes from, but hopefully you can help me understand!

Based on your recent reply, it looks like you have an RS-422 signal, and you’d like to decode the data in the digital domain, while also being able to look at the analog representation to check for any fluctuations or noise issues.

If so, our Logic products would be useful for this! The reason I asked about what voltages your RS-422 + and - signals swing between (when referenced to ground) was to see if either the + or - signal would be able to cleanly cross the voltage threshold of our devices to ensure the transitions between HIGH and LOW states would be recorded properly.

Our devices’ voltage thresholds are described below. The Pro models have the ability to configure between 3 voltage threshold options, and Logic 8 has 1 fixed voltage threshold value.

@timreyes originally I just wanted to hint interest in analog → digital decoding because I wanted to see the waveform while being able to read the data.
Now I see it is already possible. I am not limited to only use the analog OR the digital input. It shouldn’t matter just to connect both inputs to the same line.

The voltage shouldn’t be the problem. The strictness I mentioned was about overshoots, noise. I measured a few cases where it looked like we had another signal on the line, shifting the offset of one signal line. But I think that was most likely a measurement error on layer 8.

I will check if we have some budget left and if I can convince my manager to get another “oscilloscope with logic analyzer”…

1 Like

You don’t even have to connect two inputs. Logic analyzers can record both digital and analog signal at the same time from a single input.

1 Like

Nice, this wasn’t visible from the demo device. I just wasn’t able to connect die AI to the decoder. That’s why I am here. But checking the datasheet … Yeah, I missed the part with multipurpose input. Thanks again!