Andras

Members
  • Content Count

    20
  • Joined

  • Last visited

About Andras

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Szia @attila, You never fail to amaze me what WaveForms and Analog Discovery can do! Thank you again!
  2. Hi, I'm trying to implement a custom protocol for NeoPixel LED arrays using a script. I need to represent the 0 and 1 data bits as signals of 0.4us high + 0.85us low and 0.8us high + 0.45us low respectively. I implemented the custom protocol with a script already, the data pulse widths look alright and I thought I could use UART and its Protocol.UART.Send(uartMessage,true) method, but I had to realize that I can't disable UART's Start bit so the receiver will misunderstand my data. Is there a way to disable the Start bit in the Digital Protocol? Also, when I was investigating the bus, I used the Logic Analyzer and I found something interesting: when I tried to set the rate to 3.2 MHz it always jumped back to 3.125 MHz. Is this normal? Thanks, Andras
  3. Szia @attila, Thank you for the tips, I finally could find the problem. It's very likely that Adafruit's ADS1115 is faulty and messes up the I2C line. I could use the Logic Analyzer's Record function to make some tests, and here you can see the difference between the two cases when the ADS1115 is first not connected: The correct sequence of events coming from the Pi: START + h48 WR + NAK + STOP. After connecting the ADS1115 there are spikes on both the data and the clock lines. You can see the spike on the data line here: And because of this, the sequence ends prematurely. Sometimes it's still ok, but sometimes it results an error. The ADC still works, but it clutters the bus so much that theoretical 100'000 baudrate is impossible to reach, I could get it to around 45'000. Thanks again, Andras
  4. Szia @attila, This Protocol Spy looks like a lot of fun Still I got errors and lost samples even at higher capture sample rates. Some packets are recognized properly though. Should the sampling frequency be exactly 4 times the baud rate? What does the "error" exactly mean in this context? Do you have a guess what can I do wrong?
  5. Hi @attila, I started to play around with the logic analyzer and I got a few questions. I'm working with a Raspberry Pi 3 B and my goal is to communicate with multiple ADS1115 ADCs on the I2C bus. I have a Python script that demonstrates reading the ADC values and I would like to write a .NET Core 3.0 C# application running on the Pi to do the same. Something isn't right just yet and I used WaveForms v3.11.5's Logic Analyzer with AD2 to see what's going on. I connected the SCL and SDA to the digital inputs #0 and #1. The Raspberry Pi's I2C bus runs at 100 kHz as far as I know, so I had the following settings: I selected to have a I2C protocol and I wanted to catch a few Start - Stop packets: The address of the ADS1115 is 0x48, but it's not that relevant here. Even if neither the script nor the app are running, when I click on the "Single" button in WaveForms the capture session it runs and stops immediately. When I examine the 10 buffers they all show only unrecognized "ERROR" chunks, none of them has I2C "START" events that could have triggered the capture. Is this the expected behavior? If yes, can I set the trigger somehow to capture only the valid packets between START - STOP events (and ignore ERRORs)? The "Address & Data" trigger works fine, it stays in "Armed" state until I send a packet with the predefined address. In this case my experience was that even if I set the buffer value to #1 it records the packet into the buffer #2. It's not a big deal, I'm just curios if that's intentional. The scroll bar above the signals also acts a little strange: if I scroll either way I don't see any new data, just blank spaces left or right of the captured signals. Also, if I see "ERROR" could you tell a little more about the nature of that error? I get that a lot, and I'm not sure if my SCL, SDA line are too noisy or the clock isn't stable enough or I set the rate wrong or I send an invalid packet? Thanks, Andras
  6. Szia @attila, Would you consider adding support for raw PCM or RIFF WAVE as export file formats? Both supports 32-bit floating point datapoints too if you preferred them.
  7. Oh, I see, thank you @attila for the explanation! I learned something new again!
  8. Hi, I use the Spectrum Analyzer's FFT for a variety of tasks and I really like the high resolution capabilities of Analog Discovery 2. If I set the BINs of the FFT something big like 4.097k or 8.193k the problem is that I can't set my display to have as many columns on the chart to show them all. If I understand it correctly the FFT with the setting of 8193 BINs will divide the range (from Start to Stop) into 8193 small segments and the FFT will generate 8193 datapoints. These datapoints will be displayed on the chart. If you have a monitor resolution like me, you have 1920 pixels horizontally from which approximately 1700 will be used as the active region of the chart. This means that we got (8193/1700=)4.8 datapoints for every column on the chart. I suppose WaveForms displays the average of those datapoints, but that means that we are unable to see any extremely high or low values because they got averaged out. My request would be to have an improved display of those datapoints on the chart. Design-wise it could be done in different ways, for example Grafana has a chart where you can see min, max and mean values instantly by using a solid line for mean and semi-transparent filling for min and max values: Would you consider improving the chart this way? Regards, Andras
  9. Ah, never mind, I have just realized that the dB average counter on the bottom of the chart shows that is get reset. In this case it's more like a feature request: could you keep the average function's buffer if the user changes a non-critical parameter of the measurement like the vertical scale? Do I understand it correctly that changing the top and bottom settings of the spectrum analyzer doesn't change the measurement parameters if the range remains the same?
  10. Hi, I'm using WaveForms 3.8.22's Spectrum Analyzer with Analog Discovery 2. When I run the analyzer I use FFT with 129 BINs in the 1 Hz to 100 Hz range on both channels. The magnitude settings of the Spectrum Analyzer are the follows: Vrms, top: 10 mV, bottom: 0 V, reference: 1V, range: 5V. I selected the exponential dB Average on both channels. If I run the spectrum analyzer and while it's running I change the top value from 10 mV to let's say 20 mV it instantly changes the chart correctly, but after a new measurement completes the chart changes drastically which is not the expected behavior, I think. Here is a screenshot of my workspace (just before the change): And another one just after the change from 10 mV to 20 mV: As you can see the chart changes significantly while the source signal remained somewhat the same. Interestingly when I tried to reproduce the problem by connecting the signal generator with the scope while generating a steady sine signal, the problem didn't show. It did show though when I set the signal generator to sweep mode. It also work fine if I change the type of the trace from the exponential dB average to sample. Is there a reason why this could happen? Does the averaging algorithm's buffer get reset when we change any of the parameters of the spectrum analyzer? Thank you, Andras
  11. Szia @attila, Thanks again for the excellent script, it works nearly perfectly. I noticed that when I run the script you recommended for the exponential average of difference and I keep the source Trace1 and Trace2 visible the Spectrum Analyzer, they both are shown as if they had a "Sample" type, and it make no difference if I choose any other type for them. Is this the intended behavior?
  12. Hi @attila I'm playing around with the new Spectrum1.Trace3.setMagnitude(d); command and I'd need some help. I used your script and made some changes to it to generate the 3rd trace signal in the Spectrum Analyzer: plot1.X.Units.text = "Hz" plot1.X.data = Spectrum1.Trace1.frequency plot1.Y1.Units.text = "dB" plot1.Y1.AutoScale.checked = false; plot1.Y1.Range.value = 40; plot1.Y1.Offset.value = 100; //while (true) { var t1 = Spectrum1.Trace1.magnitude var t2 = Spectrum1.Trace2.magnitude var c = t1.length var d = [] for(var i = 0; i < c; i++){ d.push(t1[i]-t2[i]-100) } plot1.Y1.data = d Spectrum1.Trace3.setMagnitude(d); // Spectrum1.wait(); } I have 3 traces in the Spectrum Analyzer: Trace1 (C1, Exponential dB Average, 10) Trace2 (C2, Exponential dB Average, 100) Trace3 (Hold, Sample) The first strange thing is that when I run the Spectrum Analyzer and then I click on the Play sign next the the "Script" label at the tab's top, the script runs, but both averaging functions reset for Trace1 and Trace2. Is that the intended behavior? Also, I would like to make the script above a continuously running one (that's why I used the "do (while)" and ".wait()" methods), but I wasn't successful. Could you help me out with this? The third thing I wonder: will it be possible to run an averaging function on Trace3 (like the Exponential dB Average) if it's values are set by the Spectrum1.Trace3.setMagnitude() method? Thanks!
  13. @attila, that's fantastic, thank you, I really appreciate your quick work!
  14. Szia @attila! I'm using WaveForms 3.8.18 on Windows 10. I would like to chart the difference between the currently measured AC RMS compared to the average of the past x values. Is it possible to do with a script? Theoretically, if I could access the past values of the C1ACRMS from script it would be possible to calculate the average and the difference from that average. Or as another approach, can I access the current value of the "Average" column in the script? Let's say I name this script-based signal C1ACRMSDelta. I created another one for C2, and name it C2ACRMSDelta. Will I be able to create a third one using C1ACRMSDelta, C2ACRMSDelta are they accessible from script somehow? The other thing is that the "Maximum" column displays the minimum value, not the maximum. I think that's a small bug