5 Replies Latest reply on May 29, 2019 3:16 AM by michaelkellett

    Design advice for micro data logger

    yoctoctet

      Hello everybody, I'm new to this community.

      I'm trying to design a flight computer for a small model rocket. It will be more of a logger, saving altimeter and accelerometer data to a small memory.

      I'm trying to choose the microcontroller for that task. I won't be dealing with a lot of data, probably 1 MB max.

      The thing that I'm mostly concerned about is how to transfer back data from the logger to my PC easely.

      I was thinking about the possibility of using a microcontroller with USB mass storage capabilities to make data transfers easy.

      Has anyone worked with that kind of stuff in the past ? How hard is it ? Should I prefer doing it through a basic serial transfer and to create some custom software to recieve the file ?

      I want to make it open hardware in the end.

      Thank you everybody for helping me,

      Raleigh.

        • Re: Design advice for micro data logger
          shabaz

          Hi Raleigh,

           

          I've thought about it lots in the past, and didn't reach a conclusion at the time. Nowadays, maybe a solution could be Bluetooth LE (BLE), because it saves needing the weight of connectors, and eliminates the need to easily access it (apart from the battery). However the small BLE microcontrollers are not easy to solder, although it can be done, this project I worked on last year shows one way to attempt soldering it (a couple of videos are there): Smart Doorbell System - Extra Information / Appendix

          Otherwise, as you say, USB could be a good option too, since that is a standard connector on most PCs too, so better than old RS232 serial. If you're making the USB connect to UART on a microcontroller via a USB-UART chip, then as an option you may need custom software at the PC end, or alternatively you could use a terminal program and copy-paste from there, or make it look like a USB keyboard and let it type the results into a notepad application. Lots of examples of this are here: https://www.obdev.at/products/vusb/prjdata.html however this is only good for a few kbytes of data, it would take ages with 1Mbyte. Incidentally if you've got that much data, then you may be storing it on a microSD card perhaps? In which case the card could be removed and read on a PC. But perhaps there could be reliability issues with microSD on even a model rocket, I've no idea : (

          Another idea is to make the USB device could look like mass storage, allowing you to just retrieve a file (e.g. in CSV Excel format), however it needs a more powerful microcontroller, whereas the examples above with notepad etc are easier.

          3 of 3 people found this helpful
            • Re: Design advice for micro data logger
              yoctoctet

              Thank you a lot for your anwser.

              I believe I'm going to use a micro sd card. It will do the job without any problem.

              I just have to be careful not to put it in the same direction as acceleration to avoid disconnection of the sd card.

                • Re: Design advice for micro data logger
                  michaelkellett

                  You have to mind several other things as well.

                   

                  Micro SD cards have a lot of built in control electronics and software.

                  They draw large currents during erase cycles.

                  They can spend 10s or even hundreds of ms doing internal stuff and refusing to accept data.

                  The connectors are not robust.

                  If you will only record a Mbyte or so of data then consider a serial (SPI)  flash chip.

                  It will write fast and although it may take a few seconds for a full chip erase you don't need ever to do this in flight.

                  Use a small micro (ARM M0 based parts will do) and a logic level serial interface.

                  Connect to a PC using an FTDI smart USB/serial lead.

                  This way your logger is two chips. If you want to go off piste a bit you could use a single micro with a big flash memory and get down to one chip but using main flash memory for data is a pain on most micros.

                  (MAX32660 might do - chip is  a few mm square, 1Mbyte flash - there is a physically tiny dev board and a helpful road test (Jan Cumps)

                  What is the data rate of you application ?

                   

                  MK

                  3 of 3 people found this helpful
              • Re: Design advice for micro data logger
                beacon_dave

                Perhaps take a look at the Adafruit Feather M0 Adalogger, as it has a built-in microSD card slot:

                https://learn.adafruit.com/adafruit-feather-m0-adalogger/overview

                3 of 3 people found this helpful
                • Re: Design advice for micro data logger
                  dougw

                  Some good advice above. I believe arduino MKR Zeroarduino MKR Zero also has a uSD card slot. It might also work.

                  3 of 3 people found this helpful