arduino uno datalogger for complete beginners (ie_ no soldering) _ arduino based underwater sensors

Upload: apofview

Post on 07-Aug-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    1/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 1/12

    SPI micro SD card adapters like this can be had for less

    than $1 on eBay, and these can be connected directly

    to the Arduino Uno pins. (note: the SPI pin labels are

    on the back).

    Arduino UNO Datalogger for Complete Beginners (ie: no soldering)Posted on December 22, 2015

    Since posting the step-by-step guide in November, I’ve had enquiries from people saying that the equipment &

    time required for that build still presented a significant barrier in the classroom. A few asked if I could come up

     with a plan based on the Uno/Breadboard combination that has become a standard starting point for many 

    people. So here is a simplified data logger f or those high-school teachers who want to add environmental

    monitoring projects to the curriculum: (& reference links at the bottom of the post)

     An Uno -based basic data l ogger, w ith no solderi ng re quired. As the i nstructor, you can asse mble this lo gger 

    very quickly with pre-made jumpers but we found the connections were too easily knocked loose by clumsy

    students, so it’s worth taking the time with them to put stiff solid core wires in place. Note: I used an older UNO

    R1 I had lying around for the photos on this page, and the current R3 has a few more risers above AREF, so

    follow the pin labels rather than the physical positions to accommodate different board pinouts.

    There is nothing on this page that can’t be found in many other placeson the web (including pre-built logger combinations), but I thought I

     would add it to my other DIY logger tutorials for those who Googled to

    this site, but need something for people tackling their very first Arduino

    project. If you went with no-name clones, this approach might also

    qualify as the cheapest possible option (…if you are funding the

    everything out of your own pocket like some science teachers I know…).

    The key difference between using an (unmodified) UNO, and the smaller

    pro-mini style loggers described in my earlier tutorials, is that Uno’s

    operate at 5v, while smaller form factor boards are generally regulated to3.3v. This limits the sensors you can connect directly to those capable of 

    operating with 5v logic levels, but most importantly it affects the SD

    cards, as they can only handle 3.3v. So you would need to use a raw 

    adapter board with a level shifter to accommodate the different voltages.

    Arduino based underwater sensors

    https://edwardmallon.files.wordpress.com/2015/12/levelshiftedsdcard.jpghttp://www.instructables.com/howto/datalogger+uno/https://www.youtube.com/watch?v=XAxv0fr26_8http://www.numbatconspiracy.com/moodle/course/view.php?id=54https://edwardmallon.files.wordpress.com/2015/12/levelshiftedsdcard.jpghttps://edwardmallon.files.wordpress.com/2015/12/unobreadboard_600pix.jpghttps://edwardmallon.files.wordpress.com/2015/12/unobreadboard_600pix.jpghttps://edwardmallon.files.wordpress.com/2015/12/unobreadboard_600pix.jpghttps://edwardmallon.wordpress.com/https://learn.sparkfun.com/tutorials/microsd-shield-and-sd-breakout-hookup-guidehttps://learn.adafruit.com/arduino-tips-tricks-and-techniques/3-3v-conversionhttps://www.tindie.com/products/Dead_Bug_Prototypes/extreme-low-power-data-logging-shield-for-arduino/http://www.instructables.com/id/Logger-Shield-Datalogging-for-Arduino/https://learn.adafruit.com/adafruit-data-logger-shieldhttp://www.numbatconspiracy.com/moodle/course/view.php?id=54https://www.youtube.com/watch?v=XAxv0fr26_8http://www.instructables.com/howto/datalogger+uno/https://www.adafruit.com/products/50http://www.electrodragon.com/product/jumper-wire-60-70-pcs/https://edwardmallon.files.wordpress.com/2015/12/unobreadboard_600pix.jpghttps://edwardmallon.wordpress.com/2015/12/22/arduino-uno-based-data-logger-with-no-soldering/https://edwardmallon.wordpress.com/2015/12/22/arduino-uno-based-data-logger-with-no-soldering/http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2054436.m570.l1313.TR0.TRC0.H0.XMicro+SD+Storage+Board+TF+Card+Memory+Shield+Module+SPI+For+Arduino.TRS0&_nkw=Micro+SD+Storage+Board+TF+Card+Memory+Shield+Module+SPI+For+Arduino&_sacat=0https://edwardmallon.files.wordpress.com/2015/12/levelshiftedsdcard.jpg

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    2/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 2/12

    Fortunately, SD modules that already have the regulator & level shifter on the breakout board are very 

    inexpensive, so this issue does not add complexity to the basic connection plan. Of course these cheap

    regulators are notorious power wasters, but most people operate Uno based projects on a USB tether for live serial

    output, or via a wall wart adapter.

    Parts you will need:

     Arduino Uno ($24.95)

    (A few students used less expensive clones for their personal projects (~$4.00) and they worked OK, though the

    soldering looked a bit dodgy, and a couple of the eBay ones used non standard UART chips so we had to go

    hunting for drivers. I often use the cheap stuff when I am noodling around on the workbench trying to get 

    something working, and then deploy more expensive hardware in the field) 

    DS3231 & AT24C32 RTC module ($1.00)

    Mini 400 Contact Solderless Breadboard ($1.50)

    CR2032 coin cell battery  for the RTC ($0.50)

    SanDisk microSD card: 256MB to 1GB ($2.00-4.00)

    (Stick with cards smaller than 2Gb and format them with SDformater utility (not windows!) to fat16 and test 

    with H2testw. I generally buy 1Gb MUVE music cards from eBay because they are usually genuine; drawing

    lower sleep currents. WRT Filenames: use 8.3 format and don’t use spaces or special characters.) 

    SPI microSD breakout ($1.00)

    Common Cathode RGB LED 5mm (

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    3/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 3/12

    Removing the resistor highlighted in red di sables the

    battery charging circuit. There is also a power wasting

    LED on the RTC board that you can remove as well,

    but that’s only worth doing if you want to run the logger 

    on batteries. For more details about these DS3231

    breakout boards, you can dig into this RTC Post.

     b) An I2C bus scanning utility

    http://playground.arduino.cc/Main/I2cScanner

    (to make sure your I2C devices are connected & working)

    c) A library that puts the Arduino processor to sleep:

    https://github.com/rocketscream/Low-Power 

    (you can’t put the UART to sleep on an UNO, but every little bit still helps save power)

    Putting it together:

    1) Prepare the RTC board

    I have been using these cheap DS3231 RTC boards for a while now. They 

    have proven to be very robust, although they have one element that is

    slightly annoying: they come with a charging circuit that assumes you

    have a rechargeable LIR2032 backup coin cell installed. Since you are

    not allowed to ship these lithium batteries in the post, you almost alwaysreceive these RTC boards with no battery, and so you end up using a

    local supplier for non-rechargeable CR2032 coin cells. 2032’s works ok 

    as a backup power source for the clock provided you disable the

    charging circuit that comes on the breakout board by removing a simple

    resistor. You can cut that resistor off with a knife, but I find it easier to

    flick it off the board with a hot iron ( I know I promised that this was a

    solder-less build… but I didn’t say anything about de-soldering

    ) Then insert a fresh CR2032 coin cell into the backup battery holder on the other side. If you forget to put in the

     battery the logger will still run, but the RTC will forget the date/time every time you shut your logger down, so the

    time stamps will not be correct unless you reset them every time you start the logger.

    2) Power the breadboard rails

    Bring the ground and 5v lines over to the power rails on the breadboard

     with some solid core 22 gauge wire. I usually do this at the end of the

     board that is farthest from the rest of the wires I am patching over. Its

     worth tucking them in as neatly as possible so that they don’t get

     bumped around later. Make sure you have stripped enough insulation

    from then ends that the bare wire penetrates into the riser holes enough

    for a good connection.

    3) Jumper the RTC module

    https://edwardmallon.files.wordpress.com/2015/12/1_pwrjumper.jpghttp://www.ebay.com/sch/i.html?_from=R40&_trksid=p2057872.m570.l1313.TR12.TRC2.A0.H0.XCR2032.TRS0&_nkw=CR2032&_sacat=0http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2047675.m570.l1311.R4.TR9.TRC2.A0.H0.XDS3231.TRS0&_nkw=ds3231+at24c32&_sacat=0https://github.com/rocketscream/Low-Powerhttp://playground.arduino.cc/Main/I2cScannerhttps://edwardmallon.wordpress.com/2014/05/21/using-a-cheap-3-ds3231-rtc-at24c32-eeprom-from-ebay/https://edwardmallon.files.wordpress.com/2015/12/resistor-to-remove-from-rtc.jpg

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    4/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 4/12

    Connecting the DS3231 RTC to an Uno:  This is possible because the DS3231 has a wide voltage range from

    3.3v to 5v. Many other I2C devices would require a 3.3-5v level shifter  before they could be connected to the

    5v UNO pins. Note: The long red & black wires at the bottom are simply patching power over to the rails on the

    other side of the mini breadboard.

    The RTC board has clearly written silk screened labels for each pin:

    Connect VCC & Ground to the appropriate rails on your breadboard.

    Since the RTC is an I2C device, it uses the  A4 pin on the Arduino as the SDA  data line (white) and the A5 pin as

    the SCL clock signal line (yellow). There are many easy to use I2C sensors (that have pre-written libraries) that

     you may use with your logger, and they will be connected to these lines in parallel with the RTC. ( …if those

    sensors can tolerate 5v logic levels like this RTC )  To enable I2C communications, this RTC breakout board

    already has 4.7K pullup resistors installed on those two lines, so any other sensors you wish to connect to the SDA 

    and SCL communication lines will probably not need pullup resistors to function. Many sensor breakout boards

    also have pullups on them, which you can usually leave in place, provided that the combined resistance of your

    parallel pullup resistors does not fall below 2.2k ohms.

    Jumper the SQW line (blue) from the RTC board to Arduino pin D2. This wire will carry the “wakup alarm”

    signal from the RTC to the INT0 line. (note: the angle on the diagram above makes it look like the wire is in D3,

     but it is D2)

    4) Set the time on the RTC module

    Before connecting any other components to the Arduino you should make sure you have the RTC working.

    Download the library ZIP file, extract the package, and move the library into your Arduino Libraries folder. The

    moved folder must be re-named ‘RTClib’ for the compiler to find the library and sometimes un-zipping adds

    extra folder layers that you have to remove to get to the library you want.

    This library includes two useful utilities called setTime & getTime that can be found via the IDE pulldown menus

    after the library is installed  at:

    File / Examples / RTClib / settime &  File / Examples / RTClib / gettime

    Open the settime sketch, verify it, and then upload it to your Arduino via a USB cable connection. This takes the

    time signature from the compiled code itself and sets the RTC clock with that time.  Do not open the serial window

    while settime is running or the program restarts – setting the time again incorrectly.  Immediately after the

    settime has been run, LOAD the gettime sketch in the IDE and upload it to the Uno. Now open the serial widow,

    set the IDE serial window speed to match the script, and you should see the date & time being read from the RTC:

    Technically speaking, if your RTC is showing the correct date and time in the serial window, you can move on to

    the next assembly stage. However, I usually run other programs to make sure that both the RTC and the AT25C32

    Follow

    Follow “Arduino

    based underwater

    sensors”

    Get every new post delivered to

    your Inbox.

    Join 37 other followers

    Enter your email address

    Sign me up

    Build a website with WordPress.com

    https://github.com/MrAlvin/RTClibhttps://wordpress.com/?ref=lofhttp://void%280%29/http://www.atmel.com/images/doc0336.pdfhttps://github.com/MrAlvin/RTClibhttps://www.adafruit.com/products/757?gclid=CMG83MLX8MkCFdgLgQod9pYGOwhttps://edwardmallon.files.wordpress.com/2015/12/rtc-connections.jpg

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    5/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 5/12

    Note: I set my loggers to UTC to avoid problems with

    local daylight savings time variations. To do this simply

    change the time zone on your computer before

    uploading the settime sketch.

    I find that its easier to keep the wires tidy by connecting

    one end of the wire to the Arduino, and then bend / fold

    it into place before trimming the other end.

    eeprom on the breakout board are working properly. Rob Tillaart wrote

    a bus scanning utility which is quite useful for this:

    http://playground.arduino.cc/Main/I2cScanner.

    If you run this utility you will usually find that the RTC is on the bus at

    address 0x68 and the 4K chip is on the bus at address: 0x57 – although

    the eeprom can move around from one board to the next. In fact the

    memory address can be changed to avoid conflicts with other devices by 

    connecting the solder pads provided on the breakout board.

    On that arduino.cc page you will also find a  link to a “Multispeed I2C 

     Scanner” which I like because it scans the I2C bus with different speeds.

    This is useful as it identifies when your wires have become so long that 

    capacitance is starting to interfere with the serial communication

    signals and cause the devices to act flaky and/or “drop off the bus”, but 

    the basic scanner works just fine for most cases, especially when you

    are adding new sensors to your logger and you don’t know their bus address.

    Note: If you see junk characters scrolling across the screen when you run any of these little utility programs, you

    probably need to check that your serial window is set to the same speed specified in the serial.begin

    command inside the program:

    * I have also found that with some of the cheap UART boards that are needed for Pro-mini style Arduinos, I end

    up having to set the serial window to 1/2 the speed listed in the arduino code to make them work. But this should

    not affect the Uno based builds.

    5) Connect the indicator LED

    Connect a three color common cathode LED to Red=D4, Grn=D5,

    Blue=D6. A KEYES KY-009 SMD 5050 breakout board is pictured

    here, but any common cathode LED would work fine. Use at least  a 1 kΩ

    resistor to connect the common ground line to the ground rail on your

     breadboard, to limit the current flowing through your LED. As the limit

    resistor gets bigger the LED will become dimmer, but most are still

     visible with limit resistors up in the 20-30 kΩ range so the value is not

    critical. You do not need a three color indicator LED, but I find it helpful

    to put different color led flashes in the code so that I can keep track of 

     what the Arduino is doing when I don’t have it connected to the serial

    http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2050601.m570.l1313.TR1.TRC0.A0.H0.Xcommon+cathode+rGB.TRS0&_nkw=common+cathode+rGB&_sacat=0http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2047675.m570.l1313.TR0.TRC0.H0.XKEYES+KY-009+RGB+3+Color+Full+Color+LED+SMD+Module.TRS5&_nkw=KEYES+KY-009+RGB+3+Color+Full+Color+LED+SMD+Module&_sacat=0http://www.electrodragon.com/product/cp2102-usb-ttl-uart-module-v2/https://edwardmallon.files.wordpress.com/2015/12/usbspeed.jpghttps://github.com/RobTillaart/Arduino/tree/master/sketches/MultiSpeedI2CScannerhttp://playground.arduino.cc/Main/I2cScannerhttps://edwardmallon.files.wordpress.com/2015/12/trimming.jpghttps://edwardmallon.files.wordpress.com/2015/12/gettime.jpg

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    6/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 6/12

     window. So I turn on red for SD writing, blue for eeprom buffering,

    green for sensor reading, etc.

    Two extra I2C jumpers (white and yellow) shown here simply patch those lines to the other side of the

    breadboard. These are not necessary, but they make it easier to add sensors to your logger later without

    disturbing your RTC connections. The 220 Ω limit resistor pictured here should be bumped up to at least 1KΩ.

    6) Connect the SD card Adapter

    Place the SD card holder on the breadboard and jumper the following SPI lines from the adapter board ( check 

    and match the labels printed on your particular SD board):

    D12=MISO, D11=MOSI, D13=SCK, D10=CS 

    Then patch the Ground and VCC lines to the rails on your breadboard.

    Before connecting your Arduino to test these connections, you need to

    insert a micro SD card in the adapter. Check a new card on your computer

    first, and delete any files that already exist on the card, then save a new 

     blank text format file named “datalog.txt” onto the card (note: name in

    lowercase letters). Eject the sd card with the blank text file on it from your

    computer, and insert it into the SDcard adapter on your breadboard. It

    should slide into the socket. It should register with a nice click when it is in

    place. I often buy used MUVE music 1-3 GB micro sd cards because they are

    genuine Sandisk cards so they sleep at low current, and they are cheap

     because of the DRM on them that only lets you see 1gb of space – which is

    far more than you need for most data logger applications. ( A typical loggerrecording Date/time and a few sensor readings every 15 minutes might generate about 5mb of text data after

    running for a year)

    7) TEST the SD card with CardInfo

    http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2047675.m570.l1313.TR0.TRC0.H0.X1GB+%2F+3GB+Muve+Music+MicroSD+Memory+Card.TRS5&_nkw=1GB+%2F+3GB+Muve+Music+MicroSD+Memory+Card&_sacat=0https://edwardmallon.files.wordpress.com/2015/12/led.jpg

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    7/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 7/12

    This handy utility can be downloaded at: https://www.arduino.cc/en/Tutorial/CardInfo

    From there COPY & PASTE the Cardinfo code into a new window in the IDE and make the following

    changes to the default CARDinfo script:

    (a) CHANGE  the chipselect from pin 4, to pin 10 with: const int chipSelect = 10; at the beginning of the

    script. We have already used pin 4 to drive our indicator LED’s red channel.

    (b) ADD  #include to the beginning of the script if it is not there already.

     VERIFY & SAVE this file on your computer with the name CardInfo. (you will end up using this utility many 

    times again in the future!) Then plug in your Arduino and upload the code, and open a serial window. You should

    see something like the following:

    If you do not see a message like this one, it is possible that  -> The SPI line jumper wires are not in the correct place or you have a loose wire somewhere. There is some

     variation in the different board pin locations so review these on your board first to make sure you have everything

    connected properly. Note that your particular SD card adapter board pin-outs may not match my diagrams here,

    so you will have to adjust for that. 

    -> Your SD card is not formated as fat16 or the card is not inserted properly. I usually use smaller 1-2gb cards, as

    some of the new larger HDSC cards don’t format as fat16.

    -> You have a bad sd card adapter board. I have had plenty of crummy sd card adapters with bad spring contacts,

    so try to have 2-3 of these on hand in case you get a bad one too.

     At this point your jumpered connections should look something like this:

    https://edwardmallon.files.wordpress.com/2015/12/card-found-ok.jpghttps://www.arduino.cc/en/Tutorial/CardInfo

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    8/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 8/12

    and your pretty much ready to start using your data logger.

    8) Upload a basic data logger script

    The code for your logger can now be downloaded from github via this LINK 

    Starting with Tom Igoe’s excellent example at Arduino.cc, (which would also work fine with this build if you make

    sure to change CS to pin 10, but that code would not make use of the RTC, etc)  I added some

    functionality to create a time stamp and read the temperature register from the DS3231, and then write that

    information to a file on the SD card. Here is graph of typical temperature output from that RTC: (@ 15 min

    interval)

    The RTC record only resolves 0.25°C, but I have found these chips to be far more accurate than the ±3C listed in

    the data sheet – often less than half a degree away from sensors like the MCP9808

    The code also puts the UNO’s cpu to sleep between readings, and it wakes up again to take a sensor reading when

    the RTC alarm goes off. The serial  print output is all optional, so you can comment out those statements when the

    logger is running in stand alone mode. When you start making changes to the code, commenting out the lines you

    don’t need is generally much safer than deleting them.

    This script is only meant to provide you with a basic starting point, and it should be easy to add other I2C sensors,

    or simple analog sensor readings following the example from Arduino.cc . Before you add some new sensor to

     your logger, spend time searching through the forum at Arduino.cc, as someone has probably already answered

    https://forum.arduino.cc/index.php?board=10.0https://vimeo.com/111239036https://vimeo.com/111224388https://edwardmallon.files.wordpress.com/2014/05/correctedds3231.jpghttps://www.maximintegrated.com/en/products/digital/real-time-clocks/DS3231.htmlhttps://edwardmallon.files.wordpress.com/2015/12/typical-rtc-temp-output.jpghttps://www.arduino.cc/en/Tutorial/Dataloggerhttps://github.com/EKMallon/UNO-Breadboard-Datalogger/blob/master/_20160110_UnoBasedDataLogger_v1/_20160110_UnoBasedDataLogger_v1.inohttps://edwardmallon.files.wordpress.com/2015/12/theconnections.jpg

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    9/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 9/12

    Six in series AA battery packs like this are fairly

    common, and should power this basic Uno logger for a

    few days of stand alone operation – especially if you

    use Lithium AA’s which have a flat discharge curve..

    8xAA packs are available, but you have to be careful

    that over-voltage on new batteries does not push the

    total output above the UNO’s 12v maximum. The

    optimal solution might be to use 7 batteries in a n 8-

    series battery pack, with a simple wire soldered across

    the last holder. 18650’s in series would be another 

    option. If you need something that runs longer, rare

    earth magnets (soldered to the ends of jumper wires)

    make it easy to connect a number of C or D cell

    batteries into a custom power supply held together with

    painters tape. I would not try to power this logger from a

    9V battery, as I don’t think it can deliver enough current

    for safe SD card writing. Rechargeable LiPo shields

    are also available if your pockets are deep enough.

    any question you might have about getting it to work. When you are just starting out, choose sensors that already 

    have good libraries written for them.

    It’s worth noting here that this code would also run fine on my pro-mini based logger builds. All you would have to

    add is a few lines to read analog A0 to tracks the main battery voltage via that resistor divider which is not 

    included  in this UNO build. The main Arduino page has a lot of free books and resources as well as explanations

    for all of the built in code examples. There are also plenty of good Arduino programming references out there if 

     you google around, which should help you customize the script.

    Running the logger:

     Always do USB tethered test runs with the sensor output echoed to the

    serial port to make sure you code is doing what you want it to do before

     you try to run the logger in stand alone mode. In fact I assume that is

    the way people would always use this logger in the classroom, but it’s

    still a good idea to make sure data is being saved to the SD cards

    anyway. This makes it easy to graph the data later if the students havetrouble cutting and pasting from the serial window, or if they 

    accidentally shut the serial window down by pressing the wrong

     button. (NOTE: to copy data from the serial window and paste it right

    into excel you need commas printed between your numbers, and

    cartridge returns at the end of each line from println) One of the weird

     behaviors to know about with Arduinos is that every time you open the

    serial window from the IDE, the program that is running on the

     Arduino will restart , so if you are writing header data to the datalog.txt

    in the setup section, you will see a new copy of that header in the fileeach time the serial window is opened.

    Once you are comfortable with the IDE and programming the Arduino,

     you can look into graphing the data in real time with the new Serial

    Plotter tool in IDE 1.66, or by using another program called Processing.

    But be sure you test everything before your classes, as I’ve had some

    challenges getting processing to work on different windows

    systems (with the data on the SD card saving the day once

    again…) There is also an Excel macro called PLX-DAQ that can be used

    to monitor any serial port and display the data sent through it. Like

    Processing, this requires a few specific lines of code to be embedded in the Arduino sketch to direct the data to

    specific cells. Plot.ly might also be worth looking into as a way to share sensor data online in a way that looks very 

    professional. And if you are really get the bug, you could take it all the way to the ‘Internet of Things‘ level if you

    add a shield or two.

    Note:

     With the always on UART, it’s hard to get an UNO to run for long on batteries, but you should still be able to get

    few good days out of a set of AA’s with this plan. If you want a smaller footprint, you could bend the pins 90°

    and connect the RTC & SD boards with a lower profile to one of the many ‘stack on top’ proto shields available.

    Probably the best of the lot is the Dead Bug Prototype shield for an Arduino UNO (~$24.00), as this shield also

    lets you run an UNO for a very long time  on batteries, though you would have to wrangle with his code a bit to

    make things work. That shield has the RTC, & SD carrier already built in, so my advice is build a jumpered UNO

    https://www.tindie.com/products/Dead_Bug_Prototypes/extreme-low-power-data-logging-shield-for-arduino/http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2047675.m570.l1313.TR0.TRC0.H0.X1PCS+UNO+R3+Prototype+Shield+ProtoShield+Mini+Breadboard+Arduino.TRS5&_nkw=1PCS+UNO+R3+Prototype+Shield+ProtoShield+Mini+Breadboard+Arduino&_sacat=0http://randomnerdtutorials.com/25-arduino-shields/https://www.initialstate.com/learnhttp://hackaday.com/2016/01/08/internet-of-things-in-five-minutes/https://learn.sparkfun.com/tutorials/internet-datalogging-with-arduino-and-xbee-wifihttps://www.mysensors.org/http://www.instructables.com/id/Plotly-Arduino-Data-Visualization/?ALLSTEPShttps://plot.ly/products/industries/research-and-development/http://robottini.altervista.org/arduino-and-real-time-charts-in-excelhttps://www.parallax.com/downloads/plx-daqhttps://www.youtube.com/watch?v=g0pSfyXOXj8http://arduining.com/2013/08/05/arduino-and-processing-graph-example/http://randomnerdtutorials.com/arduino-serial-plotter-new-tool/https://www.arduino.cc/en/Tutorial/Graphhttp://web.stanford.edu/class/me20n/week3/Arduino%20Programming%20Language.pdfhttp://math.hws.edu/vaughn/cpsc/226/docs/askmanual.pdfhttp://it-ebooks.info/search/?q=arduinohttps://programmingelectronics.com/http://www.instesre.org/papers/ProgrammingGuide.pdfhttps://www.youtube.com/playlist?list=PLA567CE235D39FA84https://www.arduino.cc/en/Tutorial/HomePagehttp://playground.arduino.cc/Main/ManualsAndCurriculumhttp://www.ns-electric.com/https://edwardmallon.files.wordpress.com/2015/06/removeovervoltagewithzenner.jpghttp://www.ebay.com/sch/i.html?_odkw=Mini+400+Contacts+Tie+Points+Solderless+Bread+Board+Breadboard&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR12.TRC2.A0.H0.Xrare+earth+magnets.TRS0&_nkw=rare+earth+magnets&_sacat=0http://www.ebay.com/sch/i.html?_odkw=8xAA+Battery+Case+Box+Holder+Pack+with+Wire+12V&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.X8xAA+Battery+Holder+Pack+12V.TRS0&_nkw=8xAA+Battery+Holder+Pack+12V&_sacat=0https://edwardmallon.files.wordpress.com/2015/12/arduino-battery-holder-300x300.jpg

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    10/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 10/12

     After UNO base d la bs, the stud ents moved on to pro-mini

    based builds  with many different sensor combinations.

    logger as per this tutorial, then when you get all your code & sensors working properly in tethered mode,

    transpose what you have learned  to create a stand alone unit using the Dead Bug shield. Moving on from there

    another option that really helped me at the beginning of this project (when I was still learning to solder) is the

    compact TinyDuino platform, which is code compatible with all of the larger Arduino boards so you can usually 

    transpose your existing work directly.

     With your ‘deployment’ build ready, you can go hunting for a waterproof enclosure for you combination, or you

    could try building something more creative with pvc plumbing. Lego blocks are not waterproof, but they are madefrom standard ABS, so a little dab of solvent around the edges lets you quickly build very robust internal scaffolds

    for your prototypes.

    Project ideas:

    If you are looking for project ideas, it would not hurt to browse through a few commercial data logger websites

    sites to see how people use them, then search through the Arduino sensors forum and see if someone have already 

    posted helpful information about the application you find interesting. Although the Cave Pearl Project is

    focused on environmental monitoring, don’t overlook all the other cool things that people do with Arduinos forinfo on how to integrate new sensors. A number of artists create interactive pieces by adding motion, sensing,

    leds & sound. Others create simple robots with their Arduino. There are lots of great maker resources to search

    through if can appreciate their sense of humor (though you might want to avoid clock projects …)  Really, the sky is

    the limit…

     Addendum 2016-01-05:

    It’s also worth noting that this UNO logger was ‘field tested’

    during Trish’s Instrumentation course. I am happy to report

    that with the Arduino & breadboard attached to cut sheets

    of polystyrene, and the solid core wires firmly in place, the

    students were able to reassemble the loggers quickly at the

     beginning of each class by simply popping the RTC, LED &

    SD adapter back into place. This saved a great deal of time,

    and the students used the UNO’s as a code development

    platform while they built “stand alone” loggers for their final

    projects.

    However there were a few bumps along the way that

    I would like to share with other instructors:

    1) No matter how many times you tell your students to unplug the Arduino from the computer before changing

     wires around on the breadboard, they will forget , and start changing wires around while the whole system

    is live. (…making plenty of mistakes in the process) While our Arduinos survived, the ports they were connected to

    sometimes did not. I would strongly recommend that you use a (sacrificial) powered usb hub between the

    computer and the Uno to protect the computer usb ports from this abuse.

    2) The single most common mistake that the students made was forgetting to put the limit resistor on the LED,and a few digital ports were lost from resulting high currents if student failed to notice the the led was

    unusually bright. (Again, I am amazed the mcu’s survived these events without needing surgery)  I suggest that

     you pre-solder a 10k limit resistor directly to the common ground line of the LED’s before you hand out the parts

    http://makezine.com/projects/replace-and-re-flash-a-blown-arduino/http://www.ebay.com/sch/sis.html?_nkw=NEW+Plastruct+White+Sheet+Styrene+.060++%283%29+91105+NIB&_id=291082661102&&_trksid=p2057872.m2749.l2658http://www.amazon.com/Scotch-Permanent-Outdoor-Mounting-4011-LONG/dp/B000BL5INMhttps://www.ardusat.com/http://www.wired.com/2015/09/heres-bomb-clock-got-ahmed-mohamed-arrested/https://www.youtube.com/watch?v=_8ICqCQoZHYhttp://hackaday.com/2011/02/16/arduino-fart-o-meter/http://diyhacking.com/diy-projects/arduino-projects/http://www.electroschematics.com/arduino/http://lifehacker.com/tag/arduinohttp://www.teachmetomake.com/http://www.intorobotics.com/best-ideas-for-cheap-arduino-uno-projects/http://makezine.com/projects/building-a-simple-arduino-robot/http://blog.atmel.com/2014/12/15/metaphase-sound-machine-is-a-kinetic-audio-installation/http://blog.atmel.com/2015/03/11/this-drone-attachment-can-save-your-life/http://blog.atmel.com/2014/12/01/13-year-old-maker-creates-his-own-google-glass/http://ocw.mit.edu/resources/res-2-005-girls-who-build-make-your-own-wearables-workshop-spring-2015/http://makezine.com/2015/11/20/build-your-own-arduino-weather-station/http://www.environmentalbiophysics.org/soil-moisture-sensors-trees/http://forum.arduino.cc/?board=10.0http://www.environmentalbiophysics.org/environmental-biophysics-lectures/http://www.onsetcomp.com/products#dataloggershttps://sites.google.com/a/divinechildhighschool.org/electronics/Home/final-projects-fall-2008http://www.electronicshub.org/arduino-project-ideas/http://www.electroschematics.com/arduino/https://edwardmallon.files.wordpress.com/2014/02/3accross-2.jpg?w=930&h=278http://www.oatey.com/brands/oatey/products/plastic-pipe-cements-and-primers/oatey-abs-cements/abs-special-milky-clear-cementhttp://www.instructables.com/id/Arduino-Uno-Lego-Case/?ALLSTEPShttps://edwardmallon.wordpress.com/2014/02/05/a-simpler-design-emerges/https://edwardmallon.wordpress.com/2015/10/24/diy-arduino-logger-build-instructions-part-3/http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2047675.m570.l1313.TR4.TRC2.A0.H0.Xwaterproof+box+plastic&_nkw=waterproof+box+plastic&_sacat=0https://www.tiny-circuits.com/products/tiny-duino.htmlhttps://edwardmallon.wordpress.com/2014/02/05/a-note-on-using-the-tinyduino-platform/https://edwardmallon.wordpress.com/2014/02/05/switching-to-a-low-power-platform/https://edwardmallon.wordpress.com/2015/10/24/diy-arduino-logger-build-instructions-part-1/https://edwardmallon.files.wordpress.com/2015/12/earthsciencestudentsbuildingloggers.jpg

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    11/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    https://edwardmal lon.wordpress.com/2015/12/22/ardui no-uno-based-data-logger-with-no-sol dering/ 11/12

    so that there is no way for younger students to make this mistake. They will still hook the thing up wrong, and

    three color led’s will light up with unusual color combinations if you ground any of the 4 lines, but I don’t think 

     we lost any digital lines that way.

     Addendum: More Arduino Resources for Teachers:

    (I will add more useful links here as I find them…)

     Arduino in a Nutshell is a free e-book resource worth looking into.

    The udemy blog’s free Learn the Basics Arduino Tutorial is a good place to start, and there are many “Getting

    started” videos available if that is your preferred format. Be sure to check out Jeremy Blum’s Arduino

    Tutorials which are essentially a complete course on the Arduino.

    Sparkfun is also a great place to look for teacher resources.

    It’s allot to wade through, but the Adafruit tutorials are also one of the best resources out there for educators.

    Tronixstuff has a large number of specific hardware tutorials when you are ready to go further with your Arduino

    projects, and there are a host of cool Arduino projects to dig through at instructables site. I really believe that you

    can improve engagement and understanding by providing hands-on experience with real data, but there are

    plenty of other practical things you can do with the same basic setup.

    Creative Technologies in the Classroom (CTC) is a collaborative learning curriculum designed for schools that

     wish to incorporate emerging technologies into their existing technology classes.

    If you want to abstract away the entire IDE interface for younger students, there are a few visual programming

    tools out there for the Arduino like Visuino, or MIT’s Scratch.

    Share this:

    Tw itte r Fa ce bo ok   2   Google

    This entry was posted in A DIY Arduino data logger. Bookmark the permalink.

    2 Responses to Arduino UNO Datalogger for Complete Beginners (ie: no soldering)

     Like

    Be the first to like this.

    Related

     A DIY Arduino data logger for $ 10 fr om 3

    components

     A DIY Arduino data logger: Build

    Instructions - Part 1 (Component

    Preparation)

    The original float/pendulum idea

    Ben says:

    January 12, 2016 at 7:52 am

    Hi Edward,

    First of all I’d like to say how much I have enjoyed your projects over the past few months. As an oceanographer with

    https://edwardmallon.wordpress.com/2014/02/03/the-original-floatpendulum-idea/https://edwardmallon.wordpress.com/2015/10/24/diy-arduino-logger-build-instructions-part-1/https://edwardmallon.wordpress.com/2014/07/01/a-10-diy-data-logger-is-born/https://edwardmallon.wordpress.com/2015/12/22/arduino-uno-based-data-logger-with-no-soldering/https://edwardmallon.wordpress.com/category/a-diy-arduino-data-logger/https://edwardmallon.wordpress.com/2015/12/22/arduino-uno-based-data-logger-with-no-soldering/?share=google-plus-1&nb=1https://edwardmallon.wordpress.com/2015/12/22/arduino-uno-based-data-logger-with-no-soldering/?share=facebook&nb=1https://edwardmallon.wordpress.com/2015/12/22/arduino-uno-based-data-logger-with-no-soldering/?share=twitter&nb=1http://playground.arduino.cc/Interfacing/Scratchhttps://www.visuino.com/http://madrid.verkstad.cc/question/http://www.instructables.com/id/Basement-Flood-Alarm-Arduino/?ALLSTEPShttp://www.instructables.com/howto/Automatic+Weather+Station/http://www.instructables.com/howto/datalogger+uno/http://tronixstuff.com/tutorials/https://learn.adafruit.com/https://learn.adafruit.com/series/learn-arduinohttps://learn.sparkfun.com/blog/1377https://learn.sparkfun.com/tutorials/sik-experiment-guide-for-arduino---v32/introduction-sik-arduino-unohttps://www.youtube.com/playlist?list=PLA567CE235D39FA84http://www.danielandrade.net/2015/05/16/arduino-crash-course-get-up-and-running-in-1-hour/https://blog.udemy.com/arduino-tutorial-learn-the-basics/http://hci.rwth-aachen.de/arduino

  • 8/20/2019 Arduino UNO Datalogger for Complete Beginners (Ie_ No Soldering) _ Arduino Based Underwater Sensors

    12/12

    29.2.2016. Arduino UNO Datalogger for Complete Beginners (ie: no soldering) | Arduino based underwater sensors

    Arduino based underwater sensors

    minimal knowledge in electronics, your clear tutorials have inspired me to embark on my own data logger project. Thank 

     you.

     Would it be possible to upload the correctly formatted version of the example code onto Git? I am having trouble getting the

    code to verify and I’m sure its just down to formatting issues.

    Keep up the good work,

    Regards,

    Ben

    Reply

    edmallon says:

    January 12, 2016 at 9:48 am

    Hi Ben.

    Here is a link to the code on Github.

    I tried re-copying the code back out of wordpress myself and it was horrible; even the quotes were changed tosomething non-functional. Please accept my apologies to you, and anyone else I subjected to that.

    Reply

    The Twenty Ten Theme.  Blog at WordPress.com.

    https://wordpress.com/?ref=footer_bloghttps://wordpress.com/themes/twentyten/https://edwardmallon.wordpress.com/2015/12/22/arduino-uno-based-data-logger-with-no-soldering/?replytocom=932#respondhttps://github.com/EKMallon/UNO-Breadboard-Datalogger/blob/master/_20160110_UnoBasedDataLogger_v1/_20160110_UnoBasedDataLogger_v1.inohttps://edwardmallon.wordpress.com/https://edwardmallon.wordpress.com/2015/12/22/arduino-uno-based-data-logger-with-no-soldering/?replytocom=931#respondhttps://edwardmallon.wordpress.com/