Viewing DS18B20 temperatures on one Arduino, logging the data with another

In the winter I monitor temperatures in the floor heating system in my home. The floor has four loops of tubing and there is also a supply and return pipe with water from/to the central heating. Thus, there are 10 points where I measure temperature. This is done with Dallas DS18B20 sensors connected to an Arduino Nano while display is on a 3.5 inch TFT display. This works great (see description at http://www.zonnepanelen.wouterlood.com/temperatures-in-floor-heating-loops/

I want to expand this project with sensor data logging. Because nearly all pins on the Nano are used to power the TFT display. I was thinking of splitting the (one) wire from the DS18B20s to distribute signal to the 'display nano' and simultaneously to a logging shield atop af a second Arduino.

Does anyone in this forum has experience with distributing DS18B20 signal over two Arduino's ? Does it make sense? Do the DS18B20 signals perhaps become corrupted or confused? Do I have to synchronize the Arduino's of some sort (nr 1 displays - nr 2 silent versus nr 1 silent versus nr 2 logs)? Is there a way to keep signals clean and strong?

I welcome advice !
Regards to everybody

Hi,
The One Wire Bus responds to signals sent to it. So it would be difficult to have two Arduinos talk to the same sensors. I don't think you can synchronize receiving data by "snooping" on a 1-wire bus...

Why not use one pin with Software Serial to send the data to the logger?? Not much data to move..

Pardon my bombast, but, even in the unlikely event that it might work, your proposal seems to be utterly devoid of logic and definitely not something you would want to brag about. If you are going to get another Arduino, all you need do is get one that is appropriate for the purpose, like the Mega that you should have gotten in the first place. The Mega will be more than capable of doing what you want all by itself, thereby allowing you to sensibly employ the Nano somewhere else, unrelated.

Further, if you start getting serious about data logging and TFT displays, you will start to get serious about using memory, and a Mega then becomes more or less de rigueur.

If you keep your ambitions low, another possibility, which may be cheaper, is to look for for a more sensible display, namely one that uses the SPI bus. This will enable you to retain the Nano, provided that it has sufficient memory, and you will even get to use the onboard SD card, which is rather a good idea if you want to log data.

Thanks Terry and Nick for your helpful comments. I assume from Terry's comments that in a one-wire protocol Arduino #1 sends to a sensor with a specific address a request to conduct a sensing action and report data. I can imagine that Arduino #2 may get confused by some sensor reporting unrequested data (logically because Arduino #2 can/does not know that #1 has issued a request).

So the 'snooping' concept must be discarded as a 'bad' concept. In the mean time I conducted this morning a 'snooping' experiment and indeed data are inconsistent on Arduino #2. even after reducing the lot of wires and connectors to as few as possible, and playing with pull-up resistors.

to Nick: I regard it a personal challenge to try to squeeze as much as possible out of a humble Nano or Uno. Sure a Mega would offer more memory space and a sea of addressable pins. A bigger powerful microcontroller is in my view the easy way out. Via a laptop and through channeling Serial Monitor output to a logging file I can do the job easily with a single Arduino.

It came to my mind that maybe a I-listen-while-you-keep-silent collaboration between Arduino's #1 and #2 might trick them both into robust output (such as two bosses issuing orders one after another instead of shouting simultaneously). Arduino #1 would read the 10 sensors and display the temperatures on the TFT display, and after one cycle sets a pin HIGH and does nothing for some thousnads of millis; Arduino #2 listens via an interrupt pin and comes into swing only when it reads action on the interrupt pin. Unfortunately my TFT display shield uses both interrupt-capable pins on the Arduino (D2, D3), so this strategy would require an asymmetrical approach (keep mouth shut for 5 seconds-then cry!)

Terry already nailed a simple solution for you - softwareSerial. Why mess around with trying to switch the bus between arduinos when the reader can simply tell the logger what it gets?

The software serial is enticing, however I am very clumsy with serial. As far as I understand with serial communbication one has to convert floats into character strings, send these strings via the serial connection to the receiver which then has to convert strings back to floats. Himmel! :astonished:

That's one way to do it. However, you can also just serialize your data by sending it byte by byte into an equivalent data structure on the other arduino thus 'rehydrating' it there.

photoncatcher:
to Nick: I regard it a personal challenge to try to squeeze as much as possible out of a humble Nano or Uno. Sure a Mega would offer more memory space and a sea of addressable pins. A bigger powerful microcontroller is in my view the easy way out. Via a laptop and through channeling Serial Monitor output to a logging file I can do the job easily with a single Arduino.

Good luck with that. As things are, by proposing to use two Nanos, it seems that you have already failed to meet your personal challenge. One datalogging project is much the same as another, and you will eventually learn that, no matter what they actually do, they all have one thing in common, and that is the inclination to grow. Further, the speed at which they grow is directly commensurate with the seriousness of your approach. With datalogging, you are likely to run out of memory more quickly than you will run out of pins and, when you do, no amount of "rising to the challenge" will solve the problem. That is the time when you find out that a Mega is not the easy way out, it is the only way out.

The 10xDS18B20 project is an idea I got after finishing successfully a 'bucket brigade' project in which the pulses generated on a kWh meter are registered and logged. The Arduino with the logging shield sets a pin HIGH for 60 msec every time that a pulse is noticed. This HIGH state of the pin is registered by a second Arduino far away which shows on a 20x4 LCD display the number of pulses counted, the amount of kWh generated (each pulse of the kWh meter represents 0.5 Wh) and the (estimated) power in Watts and based on millis() between two pulses. In turn, the second Arduino can echo to a third Arduino, and so forth as long as there are arduino's are available and required for some job.

The alternative of a 'bucket brigade' is a standalone solution which I also constructed and succesfully tested , but it is a heap of wires and a lot of memory space is devoured by the real time clock, SD control instructions, IRQ, pulse control, etcetera.

Thank for all advice. Bucket brigades work fantastic with simple kWh meter pulse counting. Moving 10 floats from one place to another is the new challenge for me. Investing time and effort to figure out the serial solution ('Himmel!") seems to be the road to go.

(for the bucket brigade solution for pulse counting of kWh meters: see (2) Arduino SD shield: bucket brigade logging-displaying solar PV power production - Zonnestroompanelen in Nederland