Home › Forums › Miscellaneous › Atlas Scientific EZO sensors
- This topic has 8 replies, 3 voices, and was last updated 2016-07-15 at 5:17 PM by hank.
2016-06-12 at 9:52 PM #1559
I am trying to interface the subject conductivity sensor to the Mayfly. For starters I can’t find any info on switching the power to the grove connectors. The EZO sensors have a serial output that I want to use to log data to a file.
Any code examples for powering the grove connectors and a serial interface would be helpful.
2016-06-13 at 10:05 AM #1562Shannon HicksModerator
Try this DHT sensor example. It shows you how to power the switchable Grove connectors, and you can just replace the DHT stuff with some SoftwareSerial code to use either the D6-7 or D10-11 pins for the serial comms.
Or you could use the D4-5 connector, the default jumper sets it to 3.3v constant. The D6-7 and D10-11 sockets are always switchable, either 3.3v or 5. Only experienced users should use the 5v option, since they will need to insure that the sensor or other peripheral device is either one-way or has level converters so that the higher voltage required by the remote device won’t get fed back to one of the Mayfly digital pins.
2016-06-16 at 10:55 PM #1567
That works but I noticed the 5V pins were at 3.27 Volts and the 3.3V pins were at 3.32 Volts. Is there another pin to turn on the 5V boost ckt?
2016-06-21 at 6:02 PM #1578
2016-06-22 at 3:21 PM #1581Shannon HicksModerator
The Atlas Scientific sensors work fine with 3.3v VCC, so just connect the 3.3v pin on the Mayfly header (either the D22 switched or the constant 3.3v VCC pin) to the Atlas board along with a ground line. Then choose 2 free digital pins for the comms, like 6 & 7 or 10 & 11, and edit the first few lines of the sample code to change from the pins 2 & 3 that’s shown in the demo.
2016-07-11 at 11:01 PM #1640
I want to time stamp data to a log file from the Atlas sensors. I can’t seem to find any sample code for the Mayfly board’s RTC. I could also use some help on the battery and solar cell connections.
2016-07-13 at 7:05 PM #1641hankParticipant
Somewhere on the site, it recommended a Sodaq DS3231 library, which is similar to the Mayfly. Make sure the coin battery is in.
I used the example to set the clock (took me ~10 sec to upload): https://github.com/SodaqMoja/Sodaq_DS3231/blob/master/examples/adjust/adjust.pde
Then before powering down, I upload the code for data-logging. If you power down and then re-power without uploading new code, it will reset the time for what you had adjusted from the above example.
Attached is my data-logging/xbee transparent (AT) communication code. It writes a csv string with time stamps then sensor data- weather station in my case via composite SDI-12 command. The FormatTS function just adds leading zeroes when needed. Sorry it’s in text format, the forum didn’t let me attach a .ino file.
There might be other RTC libraries, but i went with the safe route. -h
2016-07-13 at 10:19 PM #1643
Your code looks close to what I am trying to do with the Atlas sensors. However, it wouldn’t compile due to missing SDI12.h library. Is this just for the SDI-12 protocol which I am not using for the Atlas senors?
2016-07-15 at 5:17 PM #1645hankParticipant
yeah, the library is for sdi12 sensors.
- You must be logged in to reply to this topic.