An Arduino UNO based Datalogger for the Classroom

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I realize this logger is probably below the bar set in a technical forum like AVR freaks, but if you know any teachers looking for a starting point, pass this link along to them. I cobbled together an Uno based data logger for some teacher friends of mine that can be quickly jumpered together with an UNO, a breadboard, and a couple of $1 parts from eBay.
 

 

An Arduino Uno based Datalogger for the Classroom

 

This uses DS3231 RTC alarms & sleeping so that the students can graduate to stand alone builds based on smaller 3.3v boards later. We used this logger in my wife's instrumentation course to introduce all the basic programming concepts with tethered operation before we started the soldered build with them, and I am happy to report that they were all able to build functioning instruments by the end of the course.

 

I have tried to put in as many education related links in that post as I could find to help instructors, but I would be happy to add others to list if anyone here has suggestions.

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

Last Edited: Wed. Jan 13, 2016 - 06:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to AVRFreaks Ed.

 

What took you so long? cheeky

 

I like your work.

 

Cheers,

 

Ross

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To be honest, I was intimidated by the level of some of the discussions I was coming across in this forum. Many of the contributors here really seem to know what they are doing. Me? I just noodle around until something starts working...more or less...

 

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey don't be put off by some of the "smartie pants"... they are all nice folks who had to start noodling themselves at some time in the dim dark past... laugh

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Impressive project!  Well explained.

 

Many of the contributors here really seem to know what they are doing.

Yup, experts at Google and Wikipedia....devilwinkcheeky

 

 

Welcome to AVRfreaks.

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

  Congrats on becoming an Arduino teacher!  Making a clock with a blinking/winking LED and an SD-card temperature storage is a large project.  It is one of those projects that can take an hour or two to get working in the classroom/lab if everything goes well and there is an experienced person/teacher available to answer of the questions that inevitably arise.   This same project can take months to complete if you are doing all the research and debugging alone with just a Google interface and have serious Murphy's Law issues.

 

 

For future directions, let me suggest interfacing a TFT display screen.  The example below is a typical eBay listing of these devices:

 

www.ebay.com/itm/2-4-inch-TFT-LC...

 

These devices establish a new low-cost level of sophistication in Arduino design.  They solve the two biggest headaches of 8-bit microcontrollers:

how to quickly get the data from detailed user selections into the AVR,  and how to display large amounts of data back to the user from the AVR.

There is an SD card holder for storing large amounts of data.  [The SD.h library that is shipped with Arduino appears to max out with a 16Gigabyte SD card.  I could not get my 32 Gigabyte SD cards working. ]

 

You can easily get 20-30 unique finger-tip touchpoints on a screen, and you can re-write the screen with new finger touch-points as fast as normal touchscreen usage permits (about 2-3 touch selections per second, which is average iPhone interactive speed).   Small dial displays can be updated with sensor data in real-time (about 20 sensor reads/display dial updates per second).  In other words, these little touch-screen TFT displays are highly interactive.  They are making all the 20th century Input/Output devices like push switches, potentiometers, encoders, keypads,  LEDs, 7-segment LEDs, LiquidCrystal 16 char X 2 rows, etc... obsolete.   TFT stands for Thin-Film Transistor technically, but can mean Tiny Flat Television as well.

 

They have several disadvantages that will (hopefully) pass in the coming years.  The biggest one is that no one who sells these devices on eBay seems to know what TFT controller is used in the actual unit that they are shipping to you.  There are about six commonly-used controller types and each one requires its own unique Arduino library.  There is NO way to determine what the internal controller type is by looking at the writing and labels written on the device: they all look the same.  And there is no way to open the TFT module device to see the controller chip.  Opening the module destroys it. 

 

You have to use software to determine the controller.   Long-time AVRfreaks poster david.prentice has made available this excellent library:

https://forum.arduino.cc/index.p...

 

The other main disadvantage is that this module uses up nearly all of the pins available on a UNO.  It even steals the I2C/TWI SDA pin: A4.  To use I2C devices, you need to clip this pin off the shield and reset the TFT by physically pressing the reset button.  But having done that, you can use I2C expander chips to create any new input/output pins that you may need.

 

 

As for other topics,  I don't recommend that anyone use an Arduino Pro-Mini that has no USB interface IC on it.  Use instead an inexpensive Arduino Nano clone with a new CH340G USB-serial IC on-board.  Same price as the Pro-Mini with far less hassle.

 

Small amounts of data (less than 4096 bytes) can be stored on the serial EEPROM that is found on every DS3231 RTC module board.  This 4K serial EEPROM (a 24LC32 or Atmel clone) can also be replaced by a 64K byte serial EEPROM (24LC512) for about a dollar.  It's a not-too-difficult way to learn precision soldering techniques.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have not tried putting screens on the loggers yet, but I will probably be using an I2C screen, simply because I am already using so many other pins on the loggers: A0 for main battery tracking, A1 to track the rTC coin cell voltage, A4&5 for I2C, D2& 3 for interrupts, D4-6 for LEDs, D7 for one wire....and I have not even really started with analog yet.  From the looks of things, you can't really read thermistors accurately unless you put resistor dividers on a couple of other pins to track your ADC offset and drift over time.  So tempting as that input screen may be, it sounds like it just uses too many system resources for general purpose data logger unless you were working with a 1284 based board.

 

And I have not yet found out if the Nano can be put into low current sleep modes that are comparable with the other mini form factor boards, like the moteino, or the Rocket Ultra. What is their lowest sleep current?

 

I've been using the 32K eeproms from electrodragon: http://www.electrodragon.com/pro...

 

and even there I am seeing diminishing returns when I buffer more than 5-6 days of data to the eeproms.  Eventually all that eeprom writing uses as much power as the saved SD card writes, when you take the mcu up time into account.

 

 

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ed,

 

Have you considered the FRAM alternative?

 

https://learn.adafruit.com/adafr...

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Already have them sitting in the parts bin. Just have not had a chance to play with them yet as I would have to use it in SPI mode for any benefit.  The $1 I2C eeprom I linked works fine at 400 kbit/s and I have not pushed the bus any faster for fear of loosing my coms to the DS3231 RTC.  Actually I'm not sure you can go faster on an 8mhz system? Can you?

 

[note: went digging re the I2C speed...and found this: http://www.avrfreaks.net/forum/c... ]

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

Last Edited: Fri. Jan 15, 2016 - 06:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The nice bit about FRAM is they hold data even if you completely disconnect them from power, ie no standby power usage.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The eeproms already have good standby at 2-3 µA, and I am not quite at that level of power optimization yet on the project. Also there is the cost factor. Most of the people who really need data loggers are not in the rich countries. So adding a $10 part to a logger that can currently be built for less than $15, has to deliver a heck of allot of performance improvement.

 

Current best builds (using 3.3v pro-mini style boards rather than UNOs) sleep around 0.11 mA: the elephant in the room is the sleeping SD card, as it is overwhelmingly the largest power user on the loggers. But I have not managed to get around the fact that the arduino SD libraries don't like multiple starts, as I am not enough of a programmer yet to deal with that on my own. If I simply de-power the entire logger,  the sensors,etc also have to be re-initialized, and some of them take a while before they provide stable readings after a start. I also have other 'only on startup' events that that would make that strategy challenging. 

 

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

Last Edited: Thu. Jan 14, 2016 - 11:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The nice bit about FRAM

Badum-bum.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Believe it or not, that UNO datalogger tutorial has risen to the top of the traffic stats on the blog, and has generated more than a few requests for a complete parts list, which I finally got around to posting: 

 

https://edwardmallon.wordpress.c...

 

I'm sure there is nothing there that AVRfreaks members don't already know, but feel free to pass that link on to any teacher friends  who want to introduce Arduinos to their STEM curriculum, but are working within a very limited budget.

 

Cheers.

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is that picture the output from processing nowaday's? :)

 

Some time ago I was plesantly surprized about the 3d view capabilities of KiCAD.

a few days ago I heard some rumours  that ng spice is integrated / compatible with KiCAD but when I tried to look into that I became distracted by export functionality to FreeCAD...

How's that for feature creep?

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I figure that most of the people building those UNO based loggers will probably use them as a DAQ, rather than as a stand alone logger.  So I put together a short example of using one to view brief low current events with the Serial Plotter Tool built into the IDE:

 

https://edwardmallon.wordpress.c...

 

I admit it's a bit crude, but it mirrors a task that one would normally do with an oscilloscope, perhaps even serving as a segway lesson to exactly that...?

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is a really nice wiring job. Perhaps the best I have ever seen. Congrats!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are referring to the UNO/Breadboard combination shown on the DAQ page (click the image to enlarge), then I am really flattered - because I did not do it.  It was a leftover from the last run of the Arduino course, and so was one that a student put together. I just grabbed it off the shelf for the little adc experiment.  It makes me happy that people with no previous experience can make one that looks reasonably good too.

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've been working on an overhaul of the code base for our data loggers and in the process I standardized some of that spagetti code into a simple set of functions to access memory registers on I2C sensors. So posted those to the project blog to help others trying to figure out how to add a sensors to the basic UNO datalogger:

https://edwardmallon.wordpress.com/2017/11/03/configuring-i2c-sensors-with-arduino/

- The Cave Pearl Project: Developing Arduino based underwater data loggers and sensors -

Last Edited: Sat. Nov 4, 2017 - 07:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Someguy22 wrote:

That is a really nice wiring job. Perhaps the best I have ever seen. Congrats!

I agree they are extremely neat, but weren't you active here when we saw user "gwens" solder-less breadboards? Those where insanely tidy. (We invented the term "gwenboard" for them..)

 

 

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]