Author Topic: PC based AVR multichannel datalogger  (Read 2742 times)

0 Members and 1 Guest are viewing this topic.

Offline JackPTopic starter

  • Regular Contributor
  • *
  • Posts: 185
  • Country: gb
PC based AVR multichannel datalogger
« on: May 26, 2015, 01:16:08 pm »
 I've been wanting to mess about with some PC based software to create GUIs, and thought of a cool project that seems doable. Before doing any preliminary design work, however, I wanted to verify my premise and check a few things (not easy for me to order parts whenever so I want to make sure I'm doing it right). To clarify, I'm not asking for help on the design as much as if my ideas are correct, and any suggestions are welcome.

First of all, I'll say a bit about what I want to do. I'll have an ADC (more on this later), which is fed from some number of different sensor (as applicable); for example, temperature, light, humidity, voltage, current, resistance, which will be available as standalone modules, separate from the main board (for flexibility). The uC (some AVR variant since that is what I'm comfortable with, but I might try and port it to a STM32 at a later date as a challenge) will then send the data over the serial port (every second?), where it will be read by a Python program, and displayed in a GUI, with selectable devices (so it knows what sensor you are using, and displays the data correctly).

So my main query was about the ADC. I am assuming (since data will only be sent over the serial port every second) that sample rate is not particularly important here. Thus, I can probably get away with a higher resolution ADC. However, is there anything else I've missed in this respect, or could I get away with the internal 10 bit ADC in many AVRs?

Is there anything else I should think about? Is the 1 second data refresh acceptable IYO? Thanks a lot.
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: PC based AVR multichannel datalogger
« Reply #1 on: May 26, 2015, 01:31:12 pm »
for example, temperature, light, humidity, voltage, current, resistance, which will be available as standalone modules, separate from the main board (for flexibility)

That will cost you and make the design quite complicated (multiplexing analog signals and having a backplane for them, also the additional cost of B2B connectors etc.).

It will probably make more sense to use digital sensors for the environmental parameters. E.g. 1-wire sensors.

To measure voltage, current and resistance it might make more sense to integrate an existing DMM (cost, reliability, isolated) into it. Alternatively, if you want/need many channels it might make more sense to only have one converter and multiplex the inputs with relays like it is done in some "traditional" DAQ systems.

So my main query was about the ADC. I am assuming (since data will only be sent over the serial port every second) that sample rate is not particularly important here. Thus, I can probably get away with a higher resolution ADC. However, is there anything else I've missed in this respect, or could I get away with the internal 10 bit ADC in many AVRs?

You'll probably want an external reference for it. Otherwise you shouldn't have a lot of trouble with it, if designed correctly.

Is there anything else I should think about? Is the 1 second data refresh acceptable IYO? Thanks a lot.

One second will be too fast for many applications, especially those involving environmental parameters. So you'll be fine, probably.



Don't make the mistake of underestimating the large effort it will take to create the necessary software to go with the data logger.
,
 

Offline JackPTopic starter

  • Regular Contributor
  • *
  • Posts: 185
  • Country: gb
Re: PC based AVR multichannel datalogger
« Reply #2 on: May 26, 2015, 01:38:11 pm »
Would it not be possible to do without multiplexing - Just use the six ADC channels on the 328 for example?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14195
  • Country: de
Re: PC based AVR multichannel datalogger
« Reply #3 on: May 26, 2015, 02:13:22 pm »
Analog multiplexing is not that difficult. The AVR and essentially all other µCs use an internal multiplexer to connect to one of the analog inputs. There are also higher resolution ADCs with integrated multiplexer to provide more inputs. The more difficult part is protecting the inputs. Whether one uses the µC internal ADC, an external ADC or only digital sensors depends on what is to be measured.

The initial description is more like a DMM with PC interface. Its handy and readily available.

A datalogger usually has the benefit that it can operate independent from a PC at low power, and write the data to some kind of memory  - today this usually is a SD card. The PC is only used to program the logger to set which channels and how fast data are taken and later to look at the data. For some test one might even use the logger directly with the PC connected, but this is more like an exception.
 

Offline JackPTopic starter

  • Regular Contributor
  • *
  • Posts: 185
  • Country: gb
Re: PC based AVR multichannel datalogger
« Reply #4 on: May 26, 2015, 02:22:11 pm »
The point of this project is to learn how to interface my uC projects to the computer. That's why I'm connecting it to the PC; I can learn to make Python GUIs, and have a cool way to monitor environmental factors. Yes, I did say things like voltage and current, but they were just a thing to add, to give it some added functionality specifically for me.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf