I want to save files to USB via teensy3.6 board.

I want to save files to USB via teensy board.

I want a simple example source code and circuit diagram.
Please help me.

Hello. I would like to collect data every minute and store the numerical values on USB.
It will be saved in .csv file format, and it will be large because it needs to collect data for up to 2 years.


Is there any workaround?
Also, is there anything provided by teensy3.6?

Please provide example source code.
 
I'm not sure what you mean by
I want to save files to USB via teensy board.

The other end of the USB connection on the Teensy can be connected to any USB host. It would then be the responsibility of that host to save the data in a file.

Perhaps you really mean to save the data on the Teensy 3.6 SD card. If that is the case, you could easily save that data on an 8GB card. For an 80-byte line each minute for two years you would need
80 x 60 x 24 x 365 x 2 bytes, or about 85 megaBytes.
That's not really a large amount of data for a two year logging session. The more important questions that prevent a complete answer to your query are:
What sensors are you going to use to collect the data?
How do the sensors connect to the Teensy (Analog, SPI, or I2C)?
Does the system run off batteries, making power efficiency important?
What kind of packaging and connectors do you need?
 
Dear mborgerson, @mborgerson

Thanks for the quick answer.

I know how to store data via SD card. But I don't know how to save it to USB.
(Attach pictures)

By the way, what I want to do is to save the data to USB.
In other words, the user wants to extract data by plugging in the USB.
Users can receive the data stored for 2 years through USB.
* -Battery is no problem.
* -There is no problem in communication between sensors.
* -Only, I want to save it to USB.


USB.jpg
 
AHA! In US English, what you show is generally referred to as a "thumb drive" or "USB drive". USB alone generally refers to the serial bus itself.

Now that I know what you want, I'm afraid that there is not a simple answer. To save data to a thumb drive requires a lot of parts that are not readily available on the T3.6. First, you need a hardware connection between the host port pins on the T3.6 and a USB Type A socket. Then you need a driver for the Teensy that knows how to write to the file system on the thumb drive. You could probably hand-wire a connector to the T3.6, but i'm not sure that there is a software driver available to write to the file system on the thumb drive. The latest version of the USB Host library on GITHub doesn't support mass storage drivers, but only HID devices like mice, keyboards, MIDI devices, and USB Serial devices.

Is there some reason you cannot write to the onboard micro-SD card, then unplug it and read it on a PC? If you have to connect to a USB Type-A socket, there are adapters with a Type A USB plug into which you insert your micro-SD card.
 
Dear mborgerson
Dear defragster

Something similar to what I want to implement
link: https://arduinobasics.blogspot.com/2015/05/ch376s-usb-readwrite-module.html

The problem with the 'CH376S' above
1. When there is a lot of data, a problem occurs.
2. You cannot enter the date of the file.

So I am looking for a new way. I would like to know if it is possible with 'teensy'.
Please refer to the attached file for what I want to implement.

Please advise and consult me.

t1.jpg
 
See links in post #5.

Teensy 3.6 has onboard host connector - see second link for connection and cable - first link is a thread using USBHost code with added river to utilizr high speed USB at some 5 to 10+ MByte per second write speed.

It seems that p#6 indicated device is some odd way to connect USB that the T_3.6 has native and faster hardware for.
 
Back
Top