Processing data from usb stick / Realtime processing

OP #1845190
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
#1849974
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.
Guest #1850004
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.
Guest #1850016
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.
Guest #1850023
You should have a look at STI100. Its an USB Interface, which can easily 
be used for reading / writing data on a usb Stick.
OP #1850542
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?
Guest #1901529
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

Reply

A question of your own? This thread is over 16 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.