0

Adafruit Data Logger Shield
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Data Logger Shield

by JettJohn on Thu Apr 20, 2017 9:26 pm

Hi,

I'm trying to make an Arduino temperature and light sensor data logger to log sensor data in my new aquaponics garden design.
I bought three Adafruit Waterproof DS18B20 Digital temperature sensors and two Adafruit TSL2561 Digital Luminosity/Lux/Light Sensor Breakouts and I was wondering if there is any possibility of connecting these sensors to the Adafruit Data Logger Shield instead of the TMP36 and the CdS Photocell?
These sensors work a lot better for my situation than the existing sensors because I need to be able to measure water and soil temperature far away from the actual Adafruit Data Logger Shield.
If there is any possibility of rewiring the circuits when building the Adafruit Data Logger Shield (https://learn.adafruit.com/adafruit-data-logger-shield/light-and-temperature-logger-use-it) to make this a possibility that would be awesome!
Any help would be greatly appreciated!

JettJohn
 
Posts: 2
Joined: Thu Apr 20, 2017 9:02 pm

Re: Adafruit Data Logger Shield

by adafruit_support_bill on Fri Apr 21, 2017 6:19 am

Yes, it would be possible to do that. You will need to lay out the circuit differently and alter the code to match the sensors you are using. You might want to test out your circuit using a small breadboard first before transferring the components to the prototyping grid on the shield. https://www.adafruit.com/product/65

adafruit_support_bill
 
Posts: 74643
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Data Logger Shield

by JettJohn on Fri Apr 21, 2017 6:38 pm

Okay cool!
Thanks for the help!

JettJohn
 
Posts: 2
Joined: Thu Apr 20, 2017 9:02 pm

Re: Adafruit Data Logger Shield

by jess_gail on Mon Apr 01, 2019 4:26 pm

IMG_5296_b.jpg
IMG_5296_b.jpg (451.61 KiB) Viewed 319 times
I have a follow-up question to this. I successfully wired my DS18B20 on the breadboard (connected to the Arduino Uno only) and got the code to run and give me accurate temperature readings in real time. I am now trying to solder the sensor onto my Adafruit Datalogger Shield (SD card) but I'm getting error readings (-127). I know this is due to poor wiring from when I was prototyping on the bread board. My problem is I'm not sure what the problem is because I believe all the connections are in the right place. I think it might have to do with my resistor connections; I've placed the resistor in the prototyping area on the board and used jumper wires to connect it to the output wire (in digital pin 6) and the VCC wire (5v). I did this by doubling up in the holes : i.e. resistor leg + jumper wire in one hole, jumper wire + sensor VCC wire together in 5V hole, etc. Is this an acceptable way to make connections? Or do I need to follow the strategy in the tutorial (https://learn.adafruit.com/adafruit-dat ... ure-logger) of bending over wires and soldering bridges between holes that have individual wires?

The DS18B20 sensor is the one with the black shrink wrap; the gray wire is a soil moisture sensor that is giving me good readings.

Thank you in advance for your help!

jess_gail
 
Posts: 11
Joined: Mon Apr 01, 2019 4:14 pm

Re: Adafruit Data Logger Shield

by adafruit_support_bill on Mon Apr 01, 2019 4:56 pm

There should be no problem doubling up the wires if you have enough room in the holes. The important part is that you get good electrical conductivity. If you can post a photo showing the back-side of the board, we'll check out the soldering there.

adafruit_support_bill
 
Posts: 74643
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Data Logger Shield

by jess_gail on Mon Apr 01, 2019 5:08 pm

Hi there,

Thank you for your quick reply! I have attached a photo of the underside. The board is a bit of a disaster...I'll admit this is my first attempt at all of this so I had a few mistakes. I edited the photo to point out the connections relevant to this wire. Other soldered spots either pertain to the soil moisture sensor or are screw-ups that I attempted to de-solder.

If the set-up is correct I can go ahead and try and do a better job soldering on a fresh logger shield. Is it better to solder the two wires together before putting them through the holes?

Thanks again for your help.

IMG_5298 2.jpg
IMG_5298 2.jpg (644.51 KiB) Viewed 314 times

jess_gail
 
Posts: 11
Joined: Mon Apr 01, 2019 4:14 pm

Re: Adafruit Data Logger Shield

by adafruit_support_bill on Mon Apr 01, 2019 5:33 pm

That solder looks fine. The important thing is that the solder flows well onto both the wires and the solder pads to make a good electrical connection. I don't see any signs of a cold joint or other common problems: https://learn.adafruit.com/adafruit-gui ... n-problems

Are you testing with the DS18B20 example code?

adafruit_support_bill
 
Posts: 74643
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Data Logger Shield

by jess_gail on Wed May 01, 2019 4:37 pm

Thank you for your help! I realized I made the silly mistake of not changing the pin assignment in the code. Thanks for your help!

jess_gail
 
Posts: 11
Joined: Mon Apr 01, 2019 4:14 pm

Re: Adafruit Data Logger Shield

by adafruit_support_bill on Wed May 01, 2019 4:44 pm

Good to hear you solved it. Thanks for the follow-up.

adafruit_support_bill
 
Posts: 74643
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Data Logger Shield

by jess_gail on Wed May 01, 2019 4:46 pm

I have another question about using the Logger Shield with the UNO, for a different project I am working on. I am connecting an LCD, two buttons (one momentary and one regular), and a CO2 sensor. I soldered up the LCD and started playing with the code to get the SD card to talk to the LCD (e.g. lcd.print("Initializing SD card")). In this process, I discovered that apparently there are a handful of pins on the logger shield that I cannot use because they are used for the SD card to talk to the rest of the board. I guess I need to re-solder some connections.

I am not entirely clear on what these are, given the description of the old vs. new shield with different boards (https://learn.adafruit.com/adafruit-dat ... and-config).

I have the Rev B shield with the R3 UNO and on one hand, it sounds like the 2x3 SPI header spot frees up the digital pins 11-13, but below that description is then says that on the UNO, "Digital #13 is the same as ICSP SCK, #12 is ICSP MISO, #11 is ICSP MOSI, SDA is tied to A4 and SCL is A5".

This has me confused and my ultimate question is: Where CAN I connect the LCD's 6 data pins and where CAN I connect my CO2 sensor (SCD30, 12C compatible, says to connect to SDA and SCL) without messing up the SD card system?

Thank you for your help!

jess_gail
 
Posts: 11
Joined: Mon Apr 01, 2019 4:14 pm

Re: Adafruit Data Logger Shield

by adafruit_support_bill on Wed May 01, 2019 5:03 pm

I have the Rev B shield with the R3 UNO and on one hand, it sounds like the 2x3 SPI header spot frees up the digital pins 11-13, but below that description is then says that on the UNO, "Digital #13 is the same as ICSP SCK, #12 is ICSP MISO, #11 is ICSP MOSI, SDA is tied to A4 and SCL is A5".


The original Arduino was based on an Atmega168. This was later upgraded to an Atmega328 which uses the same pinout. The UNO still has an Atmega328 processor. So it follows the original Arduino pinout with the SPI bus on pins 11-13 and the i2c bus on pin A4 & A5.

When newer Arduinos started appearing with different processors such as the Atmega2560, the 32U4 and various ARM processors, the i2c and SPI buses appeared on different pins - causing all sorts of compatibility issues for shields. So starting with the R3 UNO, now all Arduinos have 2 extra pins in the header which are mapped to i2c. And the ICSP location is standardized and mapped to the SPI bus. So shields designed for the R3 standard can get those signals from a common location - regardless of the processor type.

However - those signals still exist on their original pins. So pins 11-13 on the UNO are still the SPI bus and are off-limits if you are using the SPI devices such as the SD card. Likewise, pins A4 and A5 on an UNO are still the i2c bus and are off-limits if you are using i2c devices like the RealTime Clock on the logger shield.

adafruit_support_bill
 
Posts: 74643
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Data Logger Shield

by jess_gail on Wed May 01, 2019 5:12 pm

Ok I see. So pins 11-13 (plus pin 10 from what I can see) are off limits, and so are A4 and A5 because those are SDA/SCL pins. So that means digital pins 3-9 are available for connected the LCD digital pins (I was going to connect one of the buttons to digital pin 2, because I understand that can be used for an interrupt so the button can be used to pull the arduino in and out of sleep??).

What about the other SDA/SCL pins on the digital side of the board? Can I connect my SCD30 CO2 sensor to those? If not, what are my options for connecting that sensor? I've attached a photo from the example pinout from http://fablab.ruc.dk/co2/.

Thanks!
Attachments
SCD30 pinout.png
SCD30 pinout.png (564.47 KiB) Viewed 271 times

jess_gail
 
Posts: 11
Joined: Mon Apr 01, 2019 4:14 pm

Re: Adafruit Data Logger Shield

by adafruit_support_bill on Wed May 01, 2019 5:24 pm

So pins 11-13 (plus pin 10 from what I can see) are off limits, and so are A4 and A5 because those are SDA/SCL pins.

It is possible to re-assign CS to a different pin. Pin 10 is the default. The others mentioned are all fixed.
Note that both SPI and i2c are bus architectures. So it is possible to share the SPI bus with other SPI devices. And it is possible to share the i2c bus with other i2c devices.

What about the other SDA/SCL pins on the digital side of the board? Can I connect my SCD30 CO2 sensor to those?

If your SCD30 sensor is an i2c sensor and if it has an i2c address that does not conflict with the RTC on the shield, you can use either set of i2c pins. They are all connected to the same pins on the processor chip. https://learn.adafruit.com/i2c-addresses/the-list

adafruit_support_bill
 
Posts: 74643
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Data Logger Shield

by jess_gail on Wed May 01, 2019 5:36 pm

Awesome, thanks! So I looked it up and the SCD30 address is 0x61. The RTC on the logger shield is 0x68. For them not to interfere, do they just need to be different? In which case, I'm fine?

jess_gail
 
Posts: 11
Joined: Mon Apr 01, 2019 4:14 pm

Re: Adafruit Data Logger Shield

by adafruit_support_bill on Wed May 01, 2019 5:41 pm

Yes. As long as the i2c addresses are different, you are fine.

adafruit_support_bill
 
Posts: 74643
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.