Show Posts
Pages: [1] 2 3 ... 59
1  Products / Arduino Due / Re: How fast can "Arduino Due" read the inputs? on: June 26, 2014, 11:26:19 am
ok thanks  smiley
So I guess I will not have any troubles with the input reading speed. But is there an easy way to estimate the number of reading cycles? I am designing this test bench for my bachelor thesis and I need some kind of proof.

I suggest you spend some time with the data sheet for the ARM chip on the Due.  A thesis typically requires a more analytical approach than just "I measured it.".  The data sheet will provide you with the clock cycles required by every operation.  Just determine what operations (assembly not C) your task requires, then do some basic math. 

You can use the Arduino to generate an assembly listing of your C++ code, which is what you would use to provide the list of operations.
2  Using Arduino / Programming Questions / Re: Open Door with GPS / GPRS Data on: June 26, 2014, 11:21:05 am
Two suggestions.

1) I would use a bluetooth connection to perform the function your interested in, and not GPS, which can have a fairly large error in position.  When your server detects the blue tooth connection to the device in the car, it can unlock/open the doors.

2) I would not suggest doing this project at all.  It will make entering your home ridiculously easy for just about anyone who wants to.  Nothing beats a good mechanical dead bolt for security.  YMMV.
3  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 08, 2014, 09:24:37 pm
Can you capture screen images that display the volts per division and time per division like the post a little earlier.  It would be nice to see what kind of output your getting on that approximately 8MHz signal they showed.

I have managed to save the sampled data as a CSV file so I guess I can save an image.

But I haven't figured out how to manage the volts per division and time per division stuff.

Would the CSV file meet your needs?

Also, be aware that I haven't yet attempted to calibrate the probes.

...R

No, I am really just interest in what the waveform looks like on that device.  No rush, but as you become more familiar with it, it would make a nice comparison to the scope output above--for the 7.1MHZ signal.
4  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 08, 2014, 03:51:13 pm
In case anyone read my previous post I thought it would be more sensible to add a new post rather than edit the last one.

I have now run my version of the code on an Uno and the frequency is about 2.67MHz (my DSO differs a little from my equally cheap multimeter). The wave is not as square as I would like but I think that can be solved by calibration, which I haven't tried yet.

I saved a CSV file and looked at it in a spreadsheet. There are 27 samples per cycle which works out nicely at a 72Msps sample rate.

It would be lovely to find a website that listed exactly how to use all the buttons and menu options on the DSO.

I've been browsing to learn about the other firmware but the documentation there seems equally sparse.

...R

Can you capture screen images that display the volts per division and time per division like the post a little earlier.  It would be nice to see what kind of output your getting on that approximately 8MHz signal they showed.
5  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 07, 2014, 04:39:29 pm
I suppose you could confirm 72Msps by capturing at the highest speed, then transfer the file to a computer, and confirm the file size for a given length of sample. Maybe feed it a 4MHz square wave, and while looking at it on the computer, confirm 18 samples from rising edge to rising edge.

Not nescessarily, there were some early digital scopes whose manufacturers would send one sample out twice to give the impression that the scope had twice the sampling speed.  Other factors than two were used as well.  I wouldn't put it past any company that fails to publish a fundamental spec for their tool like bandwidth to play those kinds of games.  Especially if the only change to get the new performance  (twice the sampling rate) included no change to hardware.  I wonder if anyone has done a tear down video of the old and the new?
6  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 07, 2014, 04:35:59 pm
Run this sketch on your Arduino:

Code:
void setup()
{
  cli();
  pinMode(8,OUTPUT);
  while (1) {
    PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;
    PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;  PINB = 1;
  }
}
void loop()
{
}

That will output an 8MHz square wave on pin 8. Can you see it?

If you can then you've got "Arduino" covered. Arduinos can't output a signal faster than that.


Two things.

1) Both the current Due and the upcoming Zero (as well as the Teensy 3.x boards) are capable of output in excess of 8MHz, any of the clones that use a 20MHz Oscillator will output a 10MHz signal with your code.

2) What is equally important is what does that 8MHz 5V SQUARE wave look like on the scope.  I suspect that on the DSO Quad it will look more like a 3V sine wave.  And it will not look like much of a sine wave either if the sampling is only 36Msps (the older devices).
7  Using Arduino / General Electronics / Re: Problem reading random noise generator on: June 07, 2014, 02:36:54 pm
Glad to here you got the code working.  I am still climbing the 3D printing learning curve!
8  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 07, 2014, 01:22:01 pm
That is nearly exactly correct, except that my understanding (from the earlier link) is that the new devices have an individual channel sampling rate of 72Msps (combined 144) compared to the older one with 36Msps on a single channel (combined 72).

Perhaps I am wrong, but I think you are misreading the specs.  The way I interpreted them was that if you were only using a single channel you could use both sampling hardware on that single channel to provide roughly twice the sample frequency.  I only glanced at it when we were first discussing this, but that is the way I interpreted it, and that was a common approach in the old days when digital sampling scope technology was new.

I can't understand, from your suggestion of (say) looking at signals from the Arduino 16MHz clock, how I can confirm which device I have.

If you examine a 16MHz, signal at 36Msps, you will only average a little more than two points per crest/trough.  That isn't enough to render an accurate depiction of the wave form.  So as long as the scope isn't asking you to tell it what kind of wave form it is, it will have no way of providing an accurate shape for a signal that fast.  If you do see a solid displayed symbol, then you most likely are sampling at 72Msps since that will provide 4.5 samples per second, which isn't quite enough, but should be close enough.

A small DDS board if you can get it locally (its $5 here) would be even better since you can precisely control the frequency generated and its range is high enough to pass the Nyquist limit for either sampling rate.


I'm just enquiring about this out of idle curiosity. It doesn't matter which device I have. I would just like to know.

Perhaps there is a simple test that just couldn't work on the slower device?

...R

Yep, I understand.  With any tools, knowing their limitations is very important to make sure you don't make mistakes when trusting what they tell you.
9  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 07, 2014, 11:52:45 am
By hooking up a signal? Not really possible.
But how could it not be that?

Sorry, @fungus, I don't understand.


How can the sampling rate be wrong?

The bandwidth can be all sorts of wrong, but not the sampling rate.



I believe what he is asking is how to check if the sampling rate on the device is what they are advertising.  In other words does he have the new device with the 72Msps on both channels at the same time or does he have the older device which only allows 36Msps when using BOTH channels.
10  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 07, 2014, 11:50:57 am
From looking at the SeedStudio Wiki it seems that my device should be capable of 72Msps per channel.

With a function generator it is fairly easy, you send a signal at increasing frequency, and you should see the waveform become less clear as to 'shape' as frequency increases.  

How does that tell you the sampling rate?

And here from your comments to others you were an expert on the subject.... smiley-roll

The method I outlined doesn't provide a precise estimate of sampling rate, but does give a ballpark figure.   And after all you are the champion of 'good enough'...

In an oscilliscope whose badwidth is well below the sample rate, say you can still see the signal at least as a sine wave well above the bandwidth of the scope, the amplitude is just shown as much less than actual.  So if you can achieve a frequency of say 1/5 of the sample rate on the sine wave and still see a sine wave on the scope, then your sample rate is at least 5 times the frequency of your sine wave.   The point at which the wave starts to loose shape on screen is where you are no longer sampling enough points to estimate the wave form.

All of the above is for a scope whose sampling rate is about 5-10 times of the bandwidth of the analog section of the scope.  In a decent design the analog should be designed this way, but there is a strong possibility that the bandwidth of the Quad is well below what you would expect for the sample rate they use (7.2Mhz - 14.4Mhz).

So if you feed a 5V p-p sine wave into the scope, the point at which the peak-to-peak amplitude is about 3.5V is roughly the bandwidth frequency for the scope.  If you can still see a sine wave at this frequency, then the scope has a sampling rate that is good enough.
11  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 07, 2014, 08:27:19 am
My DS203 has now arrived and so far so good. It showed a nice picture of the waveform changing as the Arduino faded an LED on and off.  And that's probably typical of the level of sophistication I will be using.

The device I have says it is Hardware  2.72, Sys 1.6 and App 1.10

From looking at the SeedStudio Wiki it seems that my device should be capable of 72Msps per channel.

Just out of curiosity, does anyone know how I can verify that?

...R

With a function generator it is fairly easy, you send a signal at increasing frequency, and you should see the waveform become less clear as to 'shape' as frequency increases.  Without a generator (or one of those nice cheap DDS breakout boards like this (https://www.sparkfun.com/products/9116) you can also use a square wave signal gened by your Arduino, and if you can't get that high enough look at the clock signals from the resonator to the AVR on the board.  

If you look at a square wave (that you are sure is a square wave), you will notice that it starts to look more and more like a sine wave as the frequency increases and the bandwidth limitation of the scope come into play.  You can also see another effect of the bandwidth limitation earlier in the process by examining the  amplitude of the square wave.  If you feed a 5V signal into the scope at the same frequency as its bandwidth, the signal will only measure about 3.1V

Even without formal test gear, your Arduino's can fill many of the same functions.  Such as generating signals at different frequencies.  If you have one of the ARM based boards such as the Teensy 3.x or the Due you can easily generate signals that should demonstrate the limitations of your scope and give you a feel for what they are so that you can account for that in any measurements you do.
12  Using Arduino / General Electronics / Re: Problem reading random noise generator on: June 04, 2014, 05:25:55 pm
Ok, I have collected about 75,000 numbers from 0-19, using my original library code.  Looks like the algorithm itself is working (chi sq of 29.9283, p-value of 0.05272, so when I get finished playing with my new 3D printer that just arrived I will look at seeing what is wrong with your code in a day or two!

Code:
> library(foreign)
> tmp <- read.csv("log20.txt")
> tmp <- tmp$X3
> cb <- table(tmp)
> pb <- rep(1/20,20)
> cb <- as.integer(cb)
> chisq.test(cb, p = pb)

Chi-squared test for given probabilities

data:  cb
X-squared = 29.9283, df = 19, p-value = 0.05272

> length(tmp)
[1] 73958
> sum(cb)
[1] 73958
>
13  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 04, 2014, 02:57:28 pm
Robin, I hope it works for you!

Best wishes!
14  Using Arduino / General Electronics / Re: Problem reading random noise generator on: June 04, 2014, 02:40:22 pm
I am very fond of the debugging approach of throwing away the parts of code that aren't working for me, and either recoding from scratch or even better trying a different approach/algorithm.

As long as your generator is producing uniform numbers, it shouldn't matter whether you use it to generate 2,3,4,8,32, or n -bit integers.  Just make sure it is producing uniform numbers, my cursory look at you sketch indicated you were only using Von Neumann whitening.  Which can work find when the circuit is first wired up and calibrated; however the components WILL drift and the balance will alter quite considerably over time.  While the median approach that Seward developed, helps that problem a lot, it only goes so far.  In my opinion RNG circuits can never use too much whitening, which is why I layer multiple techniques.  My experience indicates that 4-8 bits in for every bit output is about good for safety.


On a related note, I have an Arduino using my original mapping code to produce numbers from 0-19.  I will take a look at the distribution, and get back to you.  If the problem is my algorithm (god I hope not), I will know tomorrow, since I KNOW that that library/software has been well tested to produce uniform 32-bit random number distributions by a number of people on a number of chips.  If my sample distribution is good, then the problem is something obscure in your implementation.  If not, I will need to produce another release of my library after I figure out the cause...  (Did I say, that I hope the problem is somewhere in your implementation?)
15  Using Arduino / General Electronics / Re: Which Handheld Oscilloscope? on: June 04, 2014, 02:23:25 pm
They have made a significant upgrade to their hardware, though it isn't advertised well.  That is why there was such a price difference between the E200 model, I quoted and the E115 one you quoted.

I have looked back over your posts but I don't think you posted a link to the model you referred to - I would appreciate it if you would.

And I wonder are mixing up US$ and UKĀ£

...R

My original price for the quad was what I found (in dollars) on the seed studio site.  The specific message of mine you are quoting was using the prices I found on Amazon UK for both the Rgol I recommend (if you simply must have a new scope as opposed to used) versus the price they listed for the latest version of the DSO Quad, http://www.amazon.co.uk/DSO-Quad-Pocket-Sized-Digital-Oscilloscope/dp/B005C5HTV6/ref=sr_1_4?ie=UTF8&qid=1401808225&sr=8-4&keywords=DSO+Quad  Now Amazon UK did have cheaper Quads for sale, but I made the assumption that those were the earlier models with specs of about half what the current mode has. http://www.seeedstudio.com/wiki/index.php?title=DSO_Quad
Pages: [1] 2 3 ... 59