Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Arduino datalogger

Home Forums Other Data Loggers Arduino datalogger

Viewing 32 reply threads
  • Author
    Posts
    • #1819
      lilcano
      Participant
        i am new to arduino, i am working on a project to use arduino to collect data from several SDI 12 sensors, for now i am trying to figure out how to view the results from the sensors on on my PC. tried
      • #1820
        Shannon Hicks
        Moderator
          Different types of SDI12 sensors have different commands for taking measurements and retrieving data from the sensor, so the Arduino code has to be modified for whatever specific sensor you’re u
        • #1821
          lilcano
          Participant

            Hello Hicks thanks for the quick reply, I am using hydra probes and 5TM soil sensors. Please can you refer me to the sample code. Thanks

          • #1825
            Shannon Hicks
            Moderator
              Did you use the “Address Change” example included with the SDI12 library to give each sensor a unique address? Decagon 5TM sensors are always set to default address “0” when y
            • #1829
              lilcano
              Participant
                I will try running the address change example, as for now i am trying to use a simple arduino board (arduino duemilanove). the main idea of my project is to use an arduino board to collect the data fr
              • #1830
                Shannon Hicks
                Moderator
                  I’ve connected 15 of the Decagon 5TM sensors to one Mayfly board before, so it’s no problem to connect 6 to a Duemilanove. You’ll need to figure out how to get them all wired to the
                • #1831
                  lilcano
                  Participant

                    Their endings are bare wires, please can you give me pointers on how to get this sensors working with the arduino, that is what sections of the code do i have to edit?

                    Thanks

                  • #1832
                    Shannon Hicks
                    Moderator
                      You’re going to need to connect the sensors one at a time to the Arduino board in order to program the address. Then you’ll need to hook them all together to the same bus. For example, a
                    • #1833
                      lilcano
                      Participant
                        Hello Hicks,
                        Thanks for the quick reply, for now i will use a wire nut to join the sensor wires, and i will want to get the samples every 10 minutes. Right now if i can get the results on the serial
                      • #1834
                        Shannon Hicks
                        Moderator
                          Here’s some sample code for running 6 Decagon 5TM probes with a standard Uno board. It could be modified by changing the pin number for the LED, in the example below I used the default pin 13 f
                        • #1839
                          lilcano
                          Participant
                            Thanks for the reply. I tried following the steps as you suggested above, i noticed when i uploaded the address change example onto the arduino board and connected the sensors it ask for new address i
                          • #1852
                            Shannon Hicks
                            Moderator
                              The sample code above will not work properly until you’ve correctly changed the channel number for each of the 6 sensors. Also, once you do that and you have a different number of sensors other
                            • #1939
                              lilcano
                              Participant
                                Hello Hicks, tried the code you provided for 2 sensors, and followed the steps but still cant get results on the serial monitor, can you please check the code to see if you can get the results.

                                Tha

                                Attachments:
                              • #1941
                                Shannon Hicks
                                Moderator
                                  The code I posted above has been running for years on several different loggers, so it is correct. Have you verified that you correctly wired the signal, power, and ground lines of the sensors to you
                                  • #1946
                                    lilcano
                                    Participant
                                      Tried the code again and followed the steps as mentioned above, but can’t still get data from the sensor on the Arduino serial monitor. attached is the section of the code I edited to work just
                                  • #1949
                                    Shannon Hicks
                                    Moderator
                                      I don’t know what the white box is in the top right of that one photo, but I’m assuming it’s an external power supply. I’m not sure why you are using that; the sensor definite
                                    • #1950
                                      lilcano
                                      Participant
                                        Thanks for the reply, the reason I used an external power supply is because when I connected the sensor wires to the Arduino board, and ran the address change example the sensor couldn’t be foun
                                      • #1951
                                        Shannon Hicks
                                        Moderator
                                          What voltage were you putting on that white wire with the external supply?

                                          If you use the “address_change” example, the sensor red wire needs to go on D9 if you want to run the code as-is

                                          • #1952
                                            lilcano
                                            Participant
                                              Thanks, I followed all the steps above and connected the sensor to the Arduino and all works great. I can get data from the sensor now. Just a quick question if I want to connect several sensors to th
                                          • #1953
                                            Shannon Hicks
                                            Moderator
                                              No, you’ll never need an external supply even if you’re using dozens of 5TM soil moisture sensors. The reason is that the code I posted above will only power one sensor at a time. All of
                                              • #1954
                                                lilcano
                                                Participant
                                                  I plan on making this project interesting that way I get a better understand on how to work with the Arduino and the SDI12 sensors. I am thinking of wireless transfer of the data using ZigBee, then ad
                                                  • #1955
                                                    Shannon Hicks
                                                    Moderator
                                                      If you’re trying to use a Zigbee module and a microSD card with an Arduino board, you could buy a bee adapter shield and a memory card shield and stack them all together. If you’re loggin
                                                    • #1958
                                                      lilcano
                                                      Participant
                                                        I tried placing an order for the mayfly board on amazone but it looks like they are not available and it says they don’t know when next the board will be available for ordering. Do you have any
                                                      • #1966
                                                        Heather Brooks
                                                        Keymaster

                                                          Hi @lilcano. You’ll find your answer here.

                                                        • #1968
                                                          lilcano
                                                          Participant
                                                            Hello Shannon,

                                                            I implemented the wireless communications using Xbee S2, I do get the data from the sensors using your code but the serial mornitor gives some extra junk data as shown in the attached

                                                            Attachments:
                                                      • #1975
                                                        Shannon Hicks
                                                        Moderator
                                                          Do you only get that “extra junk” (as you described it) on the serial monitor when the Xbee is attached? It looks to me like you’ve got the Xbee radio on the same serial port as the
                                                        • #1976
                                                          lilcano
                                                          Participant
                                                            I am using the Arduino Fio, because it has Xbee slots already available on the board. As of the board rate when programming the Xbee I set them to 57600. So I think that’s not the problem. I am
                                                          • #1977
                                                            Shannon Hicks
                                                            Moderator
                                                              If you’re using the Fio board, then your Xbee is forced to use the only hardware serial port on the board (pins 0 and 1). So if you really want to print out data to the serial port at the same
                                                            • #1979
                                                              lilcano
                                                              Participant
                                                                I am transmitting the data to another xbee connected to my computer with the help of the xbee explorer and its setup as coordinator. I tried using the softwareSerial library and connecting the Tx and
                                                              • #1980
                                                                Shannon Hicks
                                                                Moderator
                                                                  Past your code into this thread and I’ll take a look at it. Also, did you change the baud rate of the Xbee modules using X-CTU, or are they still set to the default?

                                                                  Also, if you’re ever

                                                                • #1993
                                                                  lilcano
                                                                  Participant
                                                                    Bellow is a sample sketch I am trying to run to make sure I get the software serial going but still it doesn’t work.

                                                                    #include <SoftwareSerial.h>

                                                                    SoftwareSerial mySerial(10, 11); // RX, T

                                                                  • #1995
                                                                    Shannon Hicks
                                                                    Moderator
                                                                      I’m going to need more information if you want me to diagnose your problem. When you say “it doesn’t work”, do you mean that it doesn’t compile, or there’s no outp
                                                                    • #2001
                                                                      lilcano
                                                                      Participant
                                                                        What I mean by “its not working” is, I still have some extra characters on the Arduino serial monitor when the message “goodnight moon” is printed.
                                                                        I am using an FTDI cable 5V
                                                                      • #2002
                                                                        Shannon Hicks
                                                                        Moderator
                                                                          Try this: use X-CTU to reprogram both of the Xbee modules to 9600 baud and then change the baud rate in your Fio sketch to 9600 for the serial port and also 9600 for the software serial port (it̵
                                                                        • #2012
                                                                          lilcano
                                                                          Participant
                                                                            i tied changing the baud rate as you suggested, but unfortunately i see the characters when i print use the arduino software serial monitor. when i use the X-ctu console i don’t have the charact
                                                                          • #2081
                                                                            lilcano
                                                                            Participant
                                                                              So i have decided to improve my project by adding a data logger shield from adafruit. can seam to get the data from the attached decagon 5TM sensors. Please can any one help with what i am doing wrong
                                                                            • #12817
                                                                              BrianM
                                                                              Participant

                                                                                This is great thank you!

                                                                              • #13818
                                                                                agro0305
                                                                                Participant

                                                                                  Can You send code for conecting multiple sensors on same bus, eg pin.

                                                                                  • #13819
                                                                                    Shannon Hicks
                                                                                    Moderator
                                                                                      The code and wiring depends on what kind of sensors you’re talking about connecting to the same pin.  Are you using sensors with SDI-12 or modbus communication?  Are these sensors already incl
                                                                                  • #13820
                                                                                    agro0305
                                                                                    Participant
                                                                                      We are trying to connect SDI-12 sensors., not modbus. Sensors which we try to connect are EnviroPro EP100G. They are measuring Temperature, soil moisture and Ec. They are 40 cm long and on each 10 cm
                                                                                      Attachments:
                                                                                    • #13822
                                                                                      agro0305
                                                                                      Participant

                                                                                        Enviro PRO SDI-12 command, as promies in previous repply.

                                                                                    Viewing 32 reply threads
                                                                                    • You must be logged in to reply to this topic.