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

Mayfly RS232 Compatability (TTL to RS232 adapter?)

Home Forums Mayfly Data Logger Mayfly RS232 Compatability (TTL to RS232 adapter?)

Viewing 4 reply threads
  • Author
    • #2312


        My name is Stephen, and I’m super excited to be joining the Mayfly community! With my first project, I am hoping to interface an eosGP pCO2 sensor with the Mayfly. Eosense has a very thorough guide on how to interface their sensors with Campbell Sci CR1000 data loggers for serial connections, which translates well over to the Mayfly for the most part. Luckily the engineers at Eosense have already been playing around with interfacing their sensors with Arduinos! This is what they told me:

        “The first hurdle you need to cross is that the Arduino’s serial ports are at TTL voltage levels and the eosGP’s serial port is at RS232 voltage levels. I’ve used the BOB-11189 from Sparkfun to do the voltage conversion in my setup. After conversion, you should be able to use the Mayfly’s Serial1 port to read the eosGP (assuming it isn’t being used for the XBEE/Wifi/etc).”

        Before I go out and buy these voltage converters, or find out the hard way that this method wouldn’t work for the Mayfly loggers, I wanted to check with the Mayfly community if this seemed like a reasonable solution? Do the Mayfly loggers already have RS232 capability, and if not, would using these voltage converters be the best method? Thank you for your time and I look forward to replies!


      • #2313
        Jim Moore

          Hi Stephen-

          Generally all you need is a diode (1n914) and clamp resister, 10 K, to the 3.3 Volt bus. This will isolate the higher rs232 voltage from the Mayfly. This is not totally spec (the diode drop gets added to your logic levels) but should work.
          Shannon can probably add to this in case he has tried the cheap and dirty solution and it doesn’t work. If not try it since these parts are less than a dollar or floating around in your electronic scrap box. Or Radio Shack if you can find a store that isn’t selling exclusively cell phones!

        • #2314
          Shannon Hicks

            There are several different ways you can approach this. The easiest option is to use a Max232 chip like the one you mentioned from Sparkfun (https://www.sparkfun.com/products/11189). If your sensor has a DB-9 connector on the end rather than bare wires, you can use one of these:

            There are other ways to do it with discrete components like what Jim mentioned or other more complicated options, but most people will find the the converters listed above will meet their needs. You could use a Grove-to-header cable (http://www.robotshop.com/en/grove-4-pin-female-jumper-wire.html) to connect the Mayfly to the converter.

          • #2315

              Wow! Thank you both for the quick replies and the advice! I think the Max232 chip will end up being our best option. The sensors have DB-9 only on the serial communication portion, but not on the power connection portion (see the CR1000-serial image below). For the CR1000, we have just used a DB-9 adapter to switch the serial connection back to just bare wire (see pictures below).

              Thank you again!

            • #2326
              Ed Verhamme

                According to the photos of your CR1000 you were using COM4. The only true RS232 port on the CR1000 is the DB-9 RS232 port.. all of the C1 to C8 I/O are TTL voltages. So you might not need any voltage converters…. Have you tried it without them?

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