Hello everyone,
I’m a biologist trying to get my feet wet with electronics, which are seemingly much more complicated than brains. I’m giving a lot of background on the project, so the post is long for those interested in the specifics. Otherwise, the keywords here are: data logging and remote access? I’m interested in getting opinions on the best way to upload a file either to a desktop that I can then access remotely or directly to the internet (google sheets or something?) which I can then access remotely as well.
Here’s the background- I’m a circadian biologist and I’m trying to create an actogram file to look at mouse running wheel behavior patterns. This is literally the most simple file type ever- just a text/csv file with one column for time stamp (down to the minute) and one column for amount of times the running wheel turns in that minute. My study is dealing with jet lag and scheduled exercise. Basically, I only want the mice to run during certain hours of the day, and these hours will shift over the course of several weeks as the mice are simultaneously jet lagged. If I were to do this experiment in a non-automated way, that means I have to also be jet lagged and go into the animal facility in the middle of the night to put the running wheels into the cages and then take them out. I’ve done this before, and it sucked. Hence the automation- I made an Arduino script that reads the time from a DS3231 and moves a servo with a pin attached to it into the wheel to stop it from turning during the hours that the wheel should be locked. A rotary encoder connected to the shaft of the wheel counts rotations/minute. I want to send a log of “time stamp minute, number of wheel turns in that minute” to some sort of remotely accessible file- either a Google sheet or something written to a desktop in the room that I can then screen capture remotely. This way, instead of going into work in the middle of the night to check that the locking mechanism is working, I can just wake up in the middle of the night and check my computer to see if it’s working. Even better would be for the system to just send me a notification if something goes wrong, but beggars can’t be choosers and I know I’m not that advanced.
My ultimate question is- what method of file writing/transfer should I research more to accomplish this? I want the file to be available at the end of the study so that I can turn it into an actogram, so I can’t have the data be overwritten every minute. These files get very long very fast, and since my study should be about 3-4 weeks, I’m estimating my files should be around 35,000 rows long. I don’t know if that complicates things but it wouldn’t surprise me. I’ve read about FTP, but since my institution has a network that requires both a username and password it seemed to get a bit complicated. I read something about using a router to create a new server that feeds into the main university’s network? I also saw some posts about writing a file to google sheets with some JavaScript code. I have ESP8266s as I can’t have all the devices connected directly to the computer (lots of mouse cages, so lots of Arduinos; I’ll probably have 12-16 going at one time so I’ll likely need 12-16 files?), but maybe ESP8266s aren’t the best thing to use in this situation and I’m open to getting something else. If anyone has any suggestions on which method might work best, I’ll feel better committing to one method and putting my efforts into researching one thing. I’m sure there are a ton of ways to do this, so I’m just looking for a middle ground between something decently easy to tackle as a beginner and something that will be reliable enough to let run on its own.
Thank you for reading and for any suggestions you may have! You’re helping put together a cool neuroscience experiment and potentially saving me from weeks of sleep deprivation and I appreciate it!
-Sam