Connecting a USB Memory Stick to an atmega2560

Is it possible to attach a USB memory stick to an atmega2560?

I have an Ethernet shield that has a micro SD, but we are interested in switching to a memory stick. I've seen a number of posts from years ago saying it is not worth the trouble, but I thought I'd see if there were a more current answer.

Welcome to the forum.

It is indeed not worth the trouble.
Is it to store data ? Can you send the data to a server ? for example a FTP server.

The Arduino Mega 2560 with a Ethernet Shield is a great combination to learn about internet communication, but it uses low level communication. A ESP32 is better.
Maybe a Raspberry Pi is a also good option for your project. That is a complete computer running linux. It helps if you know Python.

I was afraid that was still the answer. We have a stand alone unit with no external connection, so the only way to offload data is through some sort of removable memory. Thanks for the reply.

Incoherent and probably nonsense. A cheap and simple way of doing this is to retrieve the file you already have via Bluetooth. It also seems pretty clear that you simply haven't been looking hard enough. I understand you can use a memory stick for storage but it is a slave device and therefore requires a USB host shield. I haven't used mine but I have had it for at least ten years, so there is nothing new about them. There is nothing you have said that does not suggest that your Mega, along with your programming knowledge, is entirely suitable for your purpose. This includes the Ethernet shield currently installed, which has the SD card facility that nobody ever complains about.

There are USB host shields, but this one is retired: https://docs.arduino.cc/retired/shields/arduino-usb-host-shield

Look for "USB host" shield which supports "mass storage" devices.
Those will work when attached to a Arduino Mega.
The problem is that they use the ICSP header and also the Ethernet Shield uses that. Even if all the ICSP pins are soldered with wires, then the hardware might not work together. Even if that works, then combining the libraries might be a problem.
It is a lot of trouble and it might not work.

When using a (micro)SD card or USB memory card, then a button is needed to close the files, so the media can be removed. But I still got a corrupted file system now and then on my Mega + Ethernet shield in the past.

The Mega 2560 board has three spare Serial ports, they have no conflict with other other libraries. If you can use that for Bluetooth, then it is a reliable way to retrieve the data.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.