Please suggest a suitable Raspberry Pi for data logging - Page 1
Forum section: electronics / general

author: Jester
author_rank: Frequent Contributor
timestamp: January 15, 2022, 12:48:11 pm
content: I want to put together a multichannel (6 channels max) data logger that will run for extended periods a month at a time collecting data from both GPIB and a couple of serial ports.I have never used a Raspberry Pi. Assume my Raspberry knowledge == 0.What minimum flavour of Pi would you recommend that will get the job done?Thanks J

author: rstofer
author_rank: Super Contributor
timestamp: February 05, 2022, 12:46:35 am
content: You might consider the Pi 4 Compute Module, it would be easy to integrate onto another PCB. Otherwise a 4B will work just as well and I would buy the 8 GB version, not that it will be necessary.The really nice way to do everything that needs doing is to use a Pi 400. Add a monitor and mouse and you're ready to go. I really like this platform. Everything to do with a project is running on the project machine itself.I assume you will be recording to a file on the microSD card and some other process is going to read the file and present the output. You can add a printer to Ubuntu and print the data formatted by the program you write. Or, you can send the stuff over a network connection to a NAS or whatever.Ubuntu gives you a lot of power.There is a problem, however. There is only one accessible serial port. There are devices that connect over USB to provide a serial port. I used to use cable type converters. There are also some more expensive hubs but I don't know if either of these work on Ubuntu. You'll have to do some homework. Take a Pi USB port, run it into a USB hub and use USB<->Serial cables to the devices.https://www.amazon.com/s?k=usb+serial+cableIf everything else fails, use a compute module at every external device and network the whole project to the host Pi. Berkeley Sockets is easy to use on Ubuntu. Use the compute module to provide a single serial port and grab the data for transmission over TCP/IP. I would probably start with this approach because it leads toward future proofing. Only the host code needs to change if I need to add 1 or 100 additional devices. Distance doesn't matter, I can record data from anywhere with an internet connection.

author: mawyatt
author_rank: Super Contributor
timestamp: February 05, 2022, 02:05:33 am
content: We've been using RPi for some time now as the main computer platform in various systems, ranging from single axis custom focus stacking optical system, to 4 axis stack & stitch focus stacking systems, and lately to a complex controller that is sort of a 15 bit 180VPP capable 128 independent channel AWG with Bi-Phase and Offset modulation capability. Even use the RPi as the overall system clock generator.These RPi ranged from 3, 4, 400 and even Zero, although the Zero is somewhat slow. Agree having everything to do with the project running on the project machine itself, so everything is self contained is a really good approach and why we selected this method. With the built in Wireless, you can use VNC and operate from anywhere if desired.Here's a couple images of the 64 channel system under test with RPi 400 and Zero.Best,

author: mawyatt
author_rank: Super Contributor
timestamp: February 05, 2022, 02:42:05 am
content: Here's some links to systems built around the RPi, these are for optical focus stacking, but may be of interest.https://www.photomacrography.net/forum/viewtopic.php?f=25&t=39756&hilit=Quad+Axis+Controllerhttps://www.photomacrography.net/forum/viewtopic.php?f=25&t=42140&hilit=Stack+Stitchhttps://www.photomacrography.net/forum/viewtopic.php?f=25&t=38512&hilit=Focus+Stacking+Raspberry+PiBest,

author: Lindley
author_rank: Regular Contributor
timestamp: February 05, 2022, 11:06:45 am
content: Does it have to be a Rasp Pi ?Depending on you needs you might find the humble Arduino or ESP32 module with an SD card are well able to do that data collection and in some ways easier to get going, eg No LinuxHeres just one of many such examples on the web, some even giving details of how to transfer to data to Excel etc.https://maker.pro/arduino/tutorial/how-to-make-an-arduino-sd-card-data-logger-for-temperature-sensor-data

author: rstofer
author_rank: Super Contributor
timestamp: February 05, 2022, 05:48:28 pm
content: There's far too little information to make any real recommendation other than in response to 'which Pi?'. Even there, it depends...How far apart are the sources from each other and the host?Is the code in the remote units changeable? Could we scrap the serial port and substitute SPI? I2C? Gain control of the serial port so RS485 becomes practical?How often are the remote units polled? Milliseconds or hours?What happens to the data when the host receives it? Is it placed in a file on a USB Thumb Drive? You certainly can't plan to interchange the microSD card although the host can provide access to the file. Or is the data forwarded for storage elsewhere? Perhaps it is massaged with LibreOffice and presented as a spreadsheet and graphs. Is this done on the host (certainly possible given Linux) or on some other machine? How does the data get there? Any opportunity to just stuff the data into a SQL Server somewhere? Where? On the local host? Then the database could be queried from anywhere on the network for custom data analysis.Grabbing data is the least part of the job. Data without analysis is pretty much useless.So many questions... One thing Linux buys is future proofing. Given a full OS with a complete network stack, anything is possible. A small micro would have to shove all the work uphill to another host.I have a couple of PI 400s and they're pretty slick. I also have a large assortment of the other PIs but if I had to create a host for this project, I think I would go with the 400.BTW, I could create an isolated network with DHCP and DNS running on the host. It would be easy to use Ethernet for the remote sensors (hard wired) and WiFi to provide a link to some uphill network thus keeping the data network isolated.The possibilities with PI/Linux are endless, the Arduino, less so. It could still be workable, depending...

author: rstofer
author_rank: Super Contributor
timestamp: February 05, 2022, 06:34:27 pm
content: That GPIB device is going to be a hassle. There is a workable Arduino project. The video is just a small portion of the project and really deals with Brown Out Detection for the converter.There are many other Arduino GPIB projects. Like:https://duino4projects.com/open-source-hardware-gpib-usb-adapter/This project winds up as a virtual serial port under Linux so at this location, make sure the PI has USB host capability. Again, the PI is just a network interface sending data to the upstream host. Depending on location, it could also plug into the main host.Remember that Linux is not exactly a real-time OS so sampling/scheduling is a more difficult problem. Maybe the ESP devices are better for the remotes.https://courses.engr.illinois.edu/cs423/fa2012/05-sched.pdfThis would take some experimenting.

author: eugene
author_rank: Frequent Contributor
timestamp: February 16, 2022, 06:50:48 pm
content: The right Raspberry Pi would be whatever one you can acquire, which is none of them at the moment.TheTeensy 4.1has a micro SD card slot to store data and might be either easier or harder to code than a RPI, depending on exactly what you need your code to do. You can add a small touch screen if needed and use the libraries from Adafruit, or just power down the Teensy, pop out the SD card, and read the data on your laptop computer.

author: ledtester
author_rank: Super Contributor
timestamp: February 16, 2022, 07:29:16 pm
content: What kind of data logging do you want to do? Digital? Analog? How many samples per second do you need to log? How many inputs do you need to monitor?Note that the Rpi doesn't have any ADC units so if you want analog you'll have to get an external ADC module. If 10-bit resolution is adequate then a simple Arduino Uni/Nano might work for you. For higher resolution you can get modules like the ADS1115 which give you 16-bits.

author: Jester
author_rank: Frequent Contributor
timestamp: February 18, 2022, 05:18:12 pm
content: I picked up a used pi4 model B on Kijiji for cheap.I want to use it to capture voltage measurements from 3x 34401As via GPIB perhaps every 10s as well as temperature.