Lucky Resistor
Menu
  • Home
  • Learn
    • Learn C++
    • Product Photography for Electronics
      • Required Equipment and Software
    • Soldering for Show
  • Projects
  • Libraries
  • Applications
  • Shop
  • About
    • About Me
    • Contact
    • Stay Informed
  •  
Menu

Long-Term Test Finished

Posted on 2015-08-272015-08-27 by Lucky Resistor

I finished my long-term test of the minimal version of the data logger project after a few days. To simulate the situation for the actual usage, I setup the data logger to record data in 1 hour intervals.

The test answered these questions:

  • Does the data logger function properly over several days?
  • How much battery does the data logger use?

I could not answer the first question until I stopped the data logger and read all values over the TTL cable. I found this is a little bit tricky, because the microcontroller did reset as soon I attached the TTL cable. This automatically restarted the logging and logged some additional value, visible in the chart.

The battery life is hard to measure. I used a multimeter and measured the voltage on the battery. At the end, the voltage was still over 4.0V, which means the battery pack is almost full charged.

I would need to connect the battery to an analog input of the microcontroller, using a MOSFET as a switch. So I could measure the battery voltage over time.

Importing the Data

Working on Mac OS X, I am using the screen command as serial console. If you add the parameter -L to the command, the whole output is automatically logged in a file.

LR: ~lr$ screen -L /dev/cu.usbserial-FTHXXXXX 57600

I opened the file using BBEdit and removed any lines before and after the actual data. After the edit I saved this edited file as “data.csv”.

Temperature Humidity ChartTo get a little bit more options for the diagram, I used Microsoft Excel. After the import of the data, I formatted the columns, added a title and created a X/Y chart from it. After fine tuning all the titles, formats and lines I created a nice chart and could export it as PNG file.

You can see the chart as feature image of this article, or click on the thumbnail on the right side to see the full resolution version.

Conclusions

If you look at the chart you can clearly see the problem of the minimal version. It logs just integer values without fractions which is clearly not enough for the temperature. The sensor is capable of a higher precision, but not accuracy. But the higher precision will make trends better visible in the data.

What is Coming Next?

Next I will implement the simple version of the data logger. This will add additional 32KB of storage to the device, using the Non-Volatile FRAM Breakout from Adafruit. With this “vast” amount of storage, I can use a 14 bytes record which stores the date and time as unix time-stamp, using a float for humidity and temperature and a real CRC-16.

Date/Time    4b
Humidity     4b
Temperature  4b
crc          2b
---------------
total       14b

This will allow 2340 records in the FRAM, which sums up to 97 days recording time at one hour intervals.

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay Updated

Join me on Mastodon!

Top Posts & Pages

  • How and Why to use Namespaces
  • Storage Boxes System for 3D Print
  • Use Enum with More Class!
  • Circle Pattern Generator
  • Real Time Counter and Integer Overflow
  • Circle Pattern Generator
  • Logic Gates Puzzles
  • C++ Templates for Embedded Code
  • C++ Templates for Embedded Code (Part 2)
  • Logic Gates Puzzle 101

Latest Posts

  • The Importance of Wall Profiles in 3D Printing2023-02-12
  • The Hinges and its Secrets for Perfect PETG Print2023-02-07
  • Better Bridging with Slicer Guides2023-02-04
  • Stronger 3D Printed Parts with Vertical Perimeter Linking2023-02-02
  • Logic Gates Puzzle 1012023-02-02
  • Candlelight Emulation – Complexity with Layering2023-02-01
  • Three Ways to Integrate LED Light Into the Modular Lantern2023-01-29
  • The 3D Printed Modular Lantern2023-01-17

Categories

  • 3D Printing
  • Build
  • Common
  • Fail
  • Fun
  • Learn
  • Projects
  • Puzzle
  • Recommendations
  • Request for Comments
  • Review
  • Software
Copyright (c)2022 by Lucky Resistor. All rights reserved.
 

Loading Comments...