2017-08-07 at 10:28 AM #2312plontsteParticipant
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!
2017-08-07 at 10:41 AM #2313Jim MooreParticipant
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!
2017-08-07 at 11:07 AM #2314Shannon HicksKeymaster
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.
2017-08-07 at 1:10 PM #2315plontsteParticipant
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!
2017-08-10 at 9:15 AM #2326Ed VerhammeParticipant
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?
- You must be logged in to reply to this topic.