Adafruit SD CARD shield: problem with OCEANCONTROLS thermocouple shield

Hi all,

I am a Research Associate at Heriot-Watt University in Edinburgh and quite new to Arduino world and to this specific forum so please bear with me if I ask silly questions.

I am developing a remote controller for a solar thermal collector to activate/deactivate the dedicated water pump at different rotational speed (i.e. different water mass flow rates) according to specific step values of temperature difference between collector and water tank.

Up to now, I managed to use the following Arduino shields without trying to write to an SD card:

  1. Arduino UNO (either R3 or previous)
  2. Ocean Controls T-type Thermocouples Shield (Electronics & Automation Engineering T/A Ocean Controls > Arduino Shields > Arduino K, J or T Type Thermocouples Multiplexer Shield) 8-thermocouples
  3. Adafruit Motor Shield v2 (Adafruit Motor/Stepper/Servo Shield for Arduino v2 Kit [v2.3] : ID 1438 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits) where I use only M1 line.
  4. Adafruit SD Card Shield (Using the SD Card | Adafruit Data Logger Shield | Adafruit Learning System)

Without writing to the SD card and using the Adafruit SD-Card Shield only to use its embedded RTC to get time, the code works properly. I can read temperatures (up to 8), control dynamically the pump, get time, even read a voltage signal from a flow meter to get the flow rate, and print all to Serial Monitor.

This code is attached here as temperatures_pump_flowmeter_RTC.ino
Also a snapshot of Serial Monitor looks like this:
...
2021,3,11,18,14,10,23.25,23.25,20.75,25.75,2.50,0.86 L/min
2021,3,11,18,14,11,23.25,23.00,20.75,25.75,2.38,0.90 L/min
2021,3,11,18,14,12,23.25,23.00,20.75,25.75,2.38,0.86 L/min
2021,3,11,18,14,13,23.00,23.00,20.75,25.75,2.25,0.86 L/min
...
########################################

Then I tried the Adafruit SD Card Shield alone with Arduino UNO and had no issues when running the CardInfo or DataLogging standard sketch so the shield works well when alone.

########################################

However, when I try to join the two codes and run the all shields including the writing to SD Card (attached as temperatures_pump_flowmeter_RTC_AdafruitSD.ino), the SD card stop working.

I also noticed that this happens even if I only connect the Thermocouple shield to Arduino UNO + Adafruit SD Card. As soon as I attach the Thermocouple shield the SD card stops working even if the RTC data can be accessed as previously mentioned.

Can anyone help me looking also at my codes and tell me what I am possibly doing wrong?

Regards,

Stefano

temperatures_pump_flowmeter_RTC.ino (8.4 KB)

temperatures_pump_flowmeter_RTC_AdafruitSD.ino (9.63 KB)

I suspect it is not a code problem.

It is probably that the two shields are conflicting because the libraries you are using are conflicting.

.

Hi ieee488,

Can you then suggest me how I may solve this?

I think it is not only an issue of libraries as this happens as well:

if I only connect the Thermocouple shield to Arduino UNO + Adafruit SD Card while running the CardInfo sketch, As soon as I attach the Thermocouple shield the SD card stops working even if the RTC data can be accessed as previously mentioned.

Inadequate power?

Not sure whether that is the problem Nick as just attaching the shield make the SD card function stop. Could it be Pins clash? Power should be stable as I am simply powering from the standard USB cable from laptop

sl2029:
Power should be stable as I am simply powering from the standard USB cable from laptop

And, perhaps, simply not providing enough of it.

Pins clash?

Who would ever know? But the best guess is: unlikely....

Check the readmes at the head of this forum, particularly the one about posting code in the proper manner, using </> code tags. Further, always check that the links you post actually work, and also that those that do actually provide useful information. I can't imagine Ocean Controls staying in business very long.

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