EmbDev.net

Forum: µC & Digital Electronics Processing data from usb stick / Realtime processing


von Johannes K. (spaceman_spiff)


Rate this post
useful
not useful
Hello,

I want to control a milling machine by computer under Windows XP SP2 in 
real time (For other reasons I cannot use Dos or Unix).
The amount of datapoint can be very large (up to GB).
So my idea was to store the data on a large USB Stick (not in real time) 
and then read and process the data it with a controller in order to 
generate the commands for the stepping motors (in realtime).

Is there any way I can do this? (PIC controllers prefered)

What hardware (Usb Stick + Interface to controller) can I use?

How can I realize a Communtication directly to the Controller via USB? 
What about PC Drivers?

do you have any examples that I can try out myself?


thank you,

Spaceman Spiff

von jrmymllr j. (jrmymllr)


Rate this post
useful
not useful
Many microcontrollers have USB interfaces, so it could easily read data 
off the USB drive.  I haven't used USB yet, but I often use PIC and TI 
ARM Cortex-M3 controllers and they both have it available.

von mizch (Guest)


Rate this post
useful
not useful
Simply having an USB interface is not sufficient.  Most Controllers 
equipped with an USB capability are slaves.  To read from USB mass 
storage, you need host (or OTG) capabilities which require a lot more 
than a simple slave device offers.

von mizch (Guest)


Rate this post
useful
not useful
Depending on your speed requirements, I'd try an SD Card.  SD card 
libraries are available for most µcontrollers and are much simpler to 
interface than an USB thumb drive.

von usb (Guest)


Rate this post
useful
not useful
You should have a look at STI100. Its an USB Interface, which can easily 
be used for reading / writing data on a usb Stick.

von Johannes K. (spaceman_spiff)


Rate this post
useful
not useful
Thank you for your replies!

do you mean this
http://www.elv.de/ELV-STI-100-Interface-fuuml;r-USB-Sticks,-Komplettbausatz/x.aspx/cid_74/detail_10/detail2_20659/flv_/bereich_/marke_

discussed
Beitrag "USB-Stick-Interface STI 100"

?

the sti100 looks very promising but I need some time to try to think 
about it.

I like the SD card Idea as well. Do you have an example?

I do not know if an USB interface to the controller would handle the 
realtime problem. - a mass storage device would be better.

any other ideas, examples schematics, codes?

von Hartmut Semken (Guest)


Rate this post
useful
not useful
Storage is one option.
I think you need to calculate your data rate first: how much data do you 
need to read per second to control the machine?
If we are talking one GB per day its much different from one GB per 
minute, right?

I would probably go for an SD card as well, provided that the interface 
can handle it.
The SD interface comes in two flavors: simple, serial SPI and a much 
faster 4-bit parallel variant. The typical library only implements the 
serial variant.

Your actual problem I would probably address in a different manner:
- use one controller per axis
- use an SPI to feed data to the axis controllers from a machine 
controller
- us a network interface to feed the data from the PC to the machine 
controller.

Depending on speed requirements the controllers could be:

machine controller: pollin AVR net-IO
http://www.pollin.de/shop/dt/NjI5OTgxOTk-/Bausaetze/Diverse/AVR_NET_IO_Fertigmodul.html
or rather the Webmodule by Ulrich Radig
http://www.ulrichradig.de/home/index.php/avr/avr-webmodule

good starting points if speed requirements are not too high.

For higher data rates and larger memory buffers, I would consider a 
"larger" controller like
http://www.embedded-projects.net/index.php?module=artikel&action=artikel&id=54

This can integrate the axis controllers as software (output to port pins 
directly) or use separate controllers to create loop-control and 
maintain precise timing.

The speed that the windows machine can transmit over Ethernet should be 
fast enough on /average/, even though Windows can not provide 
real-time behavior.
The machine controller can implement the buffer required to even-out the 
average speed to a constant speed.

Again: depending on your data rate, a small buffer (such as the Atmega32 
or 644 can provide with its internal RAM) may be sufficient, if a larger 
buffer is required for evening out the Windows processing jitter, the 
ARM controller with megabytes of space will be easier to fulfil the 
requirements.

hope, this helps

hase

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.