Arduino Zero <or Similar> Native USB

Thread Starter

gulagman145

Joined Jan 5, 2016
6
Hello!

Quick question-
I intend to use python software (or something) to drive a microcontroller as a DAQ. I'm considering the zero for this purpose.

I understand that the native USB port is detected as a USB device by the computer. Is the data transfer rate still limited in the same way as the serial communication on the Uno?

I'm looking for data transfer rates on the order of 120Mbit/s or 15MB/s which is not possible with the Uno. The documentation for the zero states a direct USB connection to the new chip which is encouraging, and I am hoping to find that I can utilize the full typical USB speed (within reason) with the proper setup. I searched on the forums here and did not find anything related to this... hope someone knows something!

Thanks!!!
 

sailorjoe

Joined Jun 4, 2013
364
How the heck do I code to communicate with the chip?
If you buy an Arduino Zero, it's all set up to communicate with your laptop or computer, either Windows, Mac, or Linux. You connect the Zero to your laptop with a USB cable. You need to download the Arduino IDE (Integrated Devopment Environment) to your laptop, and for Windows, you may need an additional USB port driver. You program an application on your laptop in the IDE, then download it to the Zero, where it runs and does whatever you programmed it to do.
Are these things you already understand?
 

Thread Starter

gulagman145

Joined Jan 5, 2016
6
If you buy an Arduino Zero, it's all set up to communicate with your laptop or computer, either Windows, Mac, or Linux. You connect the Zero to your laptop with a USB cable. You need to download the Arduino IDE (Integrated Devopment Environment) to your laptop, and for Windows, you may need an additional USB port driver. You program an application on your laptop in the IDE, then download it to the Zero, where it runs and does whatever you programmed it to do.
Are these things you already understand?
Hey!
I've used the IDE for creating code on my uno, so I am familiar with the methodology. My current need is for a similar setup which has the capability of higher data rates, hence looking into the zero for its USB 2.0 port. I'm looking to use (whatever microcontroller I end up with) as a DAQ for high speed sampling of an external ADC. The PC software will establish the data acquisition parameters and read in data from the microcontroller acquired from the ADC.
 

sailorjoe

Joined Jun 4, 2013
364
Ok, good that you understand how this all works. Let's talk data rates. How many bits coming in from the ADC? How many samples per second? Is the connection serial or parallel? Does the ADC have a part number? Is the data stream continuous, or does it start and stop. Can the Zero buffer the data, or does it need to send it to the PC in real time?
 

Thread Starter

gulagman145

Joined Jan 5, 2016
6
Ok, good that you understand how this all works. Let's talk data rates. How many bits coming in from the ADC? How many samples per second? Is the connection serial or parallel? Does the ADC have a part number? Is the data stream continuous, or does it start and stop. Can the Zero buffer the data, or does it need to send it to the PC in real time?
Thanks for the feedback, and I apologize for the delay!

I'm planning on an 8 bit ADC. The sampling rate has yet to be determined, but I suspect it will be limited by the microcontroller's ability to read in and transmit the data rather than the ADC itself. (To this end I have been looking more closely at raspberry pi and found the clock rates to be far more favorable than the zero).

Samples per second could be as high as 100M or as low as ~10M depending on cost and some other factors. Parallel connection.

Looking for a continuous data stream with many periods of 'low' voltage values from the ADC and very few, short 'not-low' periods. I have not yet selected an ADC but am looking at something along these lines: http://www.ti.com/lit/ds/symlink/adc08100.pdf/

A buffer can exist as long as it does not create a lag of greater than ~100ms.

I appreciate your feedback! I am not a hardware specialist if you can't tell... :)
 

sailorjoe

Joined Jun 4, 2013
364
OK, so even though the input signal may not have anything on it, you still want to sample it constantly, right? Or do you really expect to have your DAQ sort of sitting idle until, for some reason, the PC says it's time to start sampling? I just want to be clear.

As stated in post #4, a board with ethernet can do 100Mb/s, which is only 12.5 MBytes/second, not counting communications overhead. So how expensive do you want to go? For less than $100 you can get 10 M samples/second, but costs go up drastically to get 100 M samples/second into the PC.

Are you familiar with the Nyquist Sampling Rate? I ask because I want to ensure you aren't trying to sample far more than needed.

Have you ever programmed a Direct Memory Access (DMA) interface?

Can you share the nature of the signal you're sampling?

The 100 msec delay will likely not be a problem in this case, although we'll need to keep it in mind.
 

Thread Starter

gulagman145

Joined Jan 5, 2016
6
Hi!
I'm reading acoustic echoes and looking for amplitude per echo along with a time stamp (hence lots of almost zero amplitude until an echo is received). I understand I need greater than 2x the signal frequency to avoid too few samples, hence shooting for a large number.

Either case is acceptable for sampling, but I would prefer some kind of user input for when to start sampling, but it would then run continuously until user input says otherwise.

I've not used a DMA interface.

I'm considering using the raspberry pi because I can possibly do the signal processing and GUI all onboard and not have to worry about transmitting to a PC... what do you think of that Idea?
 
Top