Storing Volumetric Flow Data as .txt

I am creating a simple program to monitor and save data into a spreadsheet. This is very much like the Temperature Log Example — XOD
But I would prefer to use the SD card as a back up, and primarily just take the data straight into to my laptop via the USB port.
Is there a guide for this?
I have the sd-log example running already, seems to be working fine, so I assume modifying the program to go straight into the laptop via USB would not be difficult.

IFM SA6010
Adafruit Data Logging Shield

1 Like

In addition to sending your data to sd-log, you should additionally send them to uart/print, e.g.:

You can then run a tool such as putty on your laptop to receive and log the serial data.

Here’s a guide lo logging serial data using putty:

1 Like

Alternatively, you could use console-log and run your patch in the debugger, e.g.

1 Like

I will begin learning about this now.

Hello and good day to all,
I’m afraid this project has not gotten off the ground very well.
To start things off simply, I began with a only an ASAIR AM2302 Hygrometer. This sensor is already soldered to a small board with a resistor and a capacitor.
I connected it to the 5v pin, Gnd, and D3. I used a multimeter to confirm the voltage is present at the sensor connections.
In the XOD IDE; I used the dht2x-hygrometer node and 2 watch nodes. Right from the start, I got the common error, “node evaluation stopped…”, just like others have gotten, so I added a clock node and set the time interval to 5 seconds. This resulted in the same error, only with a pause at first. I am guessing this pause to be about 5 seconds.
I read a post where the person said their sensor was faulty, so I have now tried a second one, but still I have the same result.
Before I find a new vendor and order a third sensor, I thought I should upload these pictures and get some ideas from the forum.
AM2302 hygrometer Node XOD Forum

  1. Try using a different pin, like D8
  2. Try to get this working in the Arduino IDE. Here’s the Adafruit tutorial on this device
    Overview | DHT11, DHT22 and AM2302 Sensors | Adafruit Learning System
  3. Trace the board to make sure they board was made right. Based on the spec sheet, the pins could be mislabeled. So, assume it’s labeled wrong, and wire it based on the data sheet. If you break it, then you said you have a spare, anyway.

Spec Sheet:

The order of the pins in the datasheet look different than order of the pins on the board. So, you gotta follow the traces. Is the alone pin by NC to be GND or is it Sig as on the board label? You could go right to the sensor pins, bypass the board, and wire your own pull-up… However, the Arduino can Pull-Up by itself, so I’m surprised we need a pull-up resistor, if we do it Ardunio, instead.

here’s some links to troubleshooting forums for this device

  1. If none of those work, then consider looking into changing the timing in the C++ code of the node…

  2. If you can’t get it working in XOD, but it works in Arduino, then scrutinize which library the Arduino code is using. The Arduino IDE examples all use the DHT.h library… which has been updated, apparently. However, the XOD/xod-dev/dht nodes don’t call an Arduinio Library, but instead has hardcoded the digital timing functionality into itself, doing all the low level stuff to talk to the board. So, again, it would point to a timing issue… Then, you’re back to changing the timing in the XOD node to better manage the DHT you have, OR, go ahead an make your own DHT library in XOD that accesses the DHT.h library from github.

Hopefully, option 1 works… which is just changing the Digital pin. One of the forums mentioned using a pin that is pulled high on bootup, which, when used throws the DHT into error.

Let us know how it goes!


1 Like

Also, deeper in the node there’s a word-to-number that appears to be deprecated. I’m not sure what effect that would have on the system.

When you run the program… double click inside the node, and see which node there is giving the error. That will help isolate the issue, also.

I will begin working through these ideas today and report back with my findings.

Attached are some pics.
I tried using Pin 8,

no love.
I tried using the Arduino IDE,

no love there either.
I traced the board and it all seems to be good, even has the capacitor included.

In XOD, I clicked on the node during the error, but I didn’t see any information there.
dht2x-hygrometer (1)

dht2x-hygrometer read

I guess I will just grab a different sensor as the main point here was to be able to accomplish some data logging, the final project will be using an IFM SA6010 flow meter, I just wanted to use the hygrometer as a “stand-in” variable input signal.
I will look through my bag of stuff here and find a different temporary analog sensor.

I will have to come back to the hygrometer at some point, right now I
feel defeated by it so another round is definitely in the future.

If it’s not working with the Arduino Sketch, then it’s a problem with the DHT. To me, the power wiring that is soldered looks suspect. Also, the board itself has some suspect soldering. I would test the connections with a multimeter to see if they make sense, or are shorted, for example. You could check the resistors, too, to see if they are burned out… Something is making that DHT not work. The logic of the traces look OK…
Now, I would want to verify the Red and Black Wires are going to where they should be. You said earlier that all the voltages you measured were correct…
Finally, the Arduino code you have doesn’t look like the Arduino code in the Tutorial. You may want to follow the Adafruit tutorial exactly to test your board in Arduino IDE… It’s not clear where your Arduino Code came from. Question: Which pin is your code using for data?

Also, are each of those solder spots on the red dev board independent? I would assume they are… but if they are actually connected across the bottom, then the way the board is mounted may short the pins on the underside.

I would check all those board connections and power. Then, follow a tutorial exactly. But, the device could just be broken. I have a DHT11, I’ll try to get it going soon, and wrap one of the github libraries, if I can.

The sensor has to be broken. I used the xod-dev/dht library, 10kohm resistor between 5V and Signal on Pin 3 and got values… Though, they do look pretty noisy and it looks like only 1 degree resolution, but something was able to be printed to the watch nodes.


I assume the sensors were broken. I never got either of them to work.

I also believe that I have chosen poorly for my data logger, as it uses the PCF8523. This does not seem to be currently supported with XOD.

I have gotten the data logger to work in the Arduino IDE using the examples, and I have used XOD to read a DS18b20 sensor and display it on an i2c LCD. But I have not yet been able to do all three of these things at the same time.

I would much rather use only XOD. so for right now I am stuck. I think I should buy a different data logger because this might be quicker than learning how to put a node together for using the adafruit data logger with PCF8523.

I will have the next two days off work to read, learn, and decide a course of action.

Thanks to all,

PCF8523 appears to be I2C, LCD is I2C, DS18b20 is digital, and the SD-Card is SPI… So, if it’s not all working together, then it is likely you’ve got to time the two I2C devices so they are NOT “running into each other”… I put up an example of how to get multiple I2C working altogether… I hope this helps!

I feel like I had a better example posted, but here’s what I found.

I’ve got a big project I’m working on with about 5x I2C on the same wires… I put them in a loop with each “Done” pulse wired into the “Send” pulse of the next device… Works well… But, the above it’s a simpler method for fewer devices.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.