Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here


  • Hello everybody,

    I am trying to measure conductivity from liquids water, water with salt, sugar, etc. I am using a conductivity switch sensor SEN0223 from DFROBOT brand. I would like to know first: Is this board suppose to work like an EC sensor? If yes, then I am having this problem:

    I always get the same conductivity readings on all the…[Read more]

  • Alright. I am getting the data right. Thank you for your help.

  • The way a voltage divider works is for you to use 2 resistors in series, and then you measure the junction between the two resistors, and you’ll see a fraction of the overall voltage. The best method for breaking a 5v signal down to something the Mayfly can tolerate would be to use two identical value resistors (like 10k-ohms each), so that way…[Read more]

  • Mark posted an update 4 days, 13 hours ago

    We will be using this temperature sensor

    • If you use a DS18B20 sensors, it requires a pullup resistor on the data line. You can connect the sensor data line to pin D10 and then just close the solder jumper SJ12 on the back of the Mayfly to enable the builti-in pullup resistor for that data pin. This saves you from having to add a separate resistor somewhere on the board to pullup D10.

  • Gera replied to the topic PH Sensor Issue in the forum Environmental Sensors 5 days ago

    Also, with the code you provided, if I do not use the voltage divider I can calibrate it to 2.5V if I remove the *2 from the equation. I am first time coder and also the mayfly is something new for me as well, I am learning little by little how this thing works. So the calibration will be right if I use the code without multiplying the 2?

  • Gera replied to the topic PH Sensor Issue in the forum Environmental Sensors 5 days ago

    Sorry for the late answer I had some stuff to do.
    Okay so, the circuit is connected like this:

    Voltage: V+ which is the 5V DC connected to SW5
    Ground: Ground to Ground
    Analog = PO or PH analog output is connected to the Analog pin A0
    I used three resistors to test which one will be close to the voltage required, I will post a picture of the three…[Read more]

  • Also, you need to use 3.3 volts as the board voltage in your conversion formula and not 5.0 volts. And if you’re measuring a 50/50 voltage divider, you’ll then need to double the measured voltage to get the true sensor voltage. So:

    float voltage = (sensorValue * (3.3 / 1023.0)) * 2.0;

  • You mean the USB5V on the FTDI header? That’s only used if you’re supplying power to the board via an FTDI adapter when programming. You should definitely be using the SW5 pin for powering a sensor and not using the FTDI header.

    What does your resistor divider network look like? What values, and how do you have them connected in relation to…[Read more]

  • The pin is USB5V, I tried using that SW5 as well. I tried using all those slots, all of them gave me the exact same value of 3.73V.

  • What pin is the sensor getting power from? If it’s the Switched 5v pin (labeled SW5), or from one of the grove terminals (assuming you’ve moved the jumper over to the 5v setting), you still need to switch on the 5V boost regulator by putting this line, preferably in your setup routine:

    digitalWrite(22, HIGH);

    The 5v boost regulator (as well as…[Read more]

  • pin A0,

    here is the code:
    void setup() {
    // initialize serial communication at 9600 bits per second:

    // the loop routine runs over and over showing the voltage on A0
    void loop() {
    // read the input on analog pin 0:
    int sensorValue = analogRead(A0);
    // Convert the analog reading (which goes from 0 – 1023) to a voltage…[Read more]

  • Which analog pins of the Mayfly are you attempting to use to measure the voltage? And can you share the code you’re using to read the voltage?

  • Hello everybody, I am currently trying to work with the Mayfly board to find pH. I have the pH Electrode E201 – BNC and the board that comes with it is the DIY PH-4502C. I am having a problem when trying to calibrate this thing with the mayfly board. the 5v voltage pins of this board do not work as the arduino does. When I calibrate it with the…[Read more]

  • Turtle4Life posted an update 1 week ago

    I find your blog interesting and the idea of storm snakes whimsical yet very practical. I am new to the EnviroDIY community and am looking for projects that can stir up the imagination and interest for your Seneca youth. I have recently been awarded a Water Protectors Grant which is geared to bring students outside to investigate the environmental…[Read more]

  • FavyMaks posted an update 1 week ago

    So am new to envoronment monitoring, to start, i was given a 5TM with the decentlab monitoring solution. i am trying to interface the device with my PC to log the data but can’t. is there any software i need to install first to allow for the connection?. please i will appreciate any insight on this

  • Hi Everyone,

    I’m working with @dartmouthwsn, the original poster on this thread, to construct a logger network using Mayflys and 900 Mhz XBee Pros. We had the code successfully working so that the logger Mayflys were able to send data to a centrally located node using the Xbee Pros. The code has been functional for several months and was tested a…[Read more]

  • @dave-eiriksson Those are the same settings I have in my XBee S6B. I attached screen shots below of my settings from XCTU (I deleted my personal network information). I have found by watching the diagnostics in the serial monitor that the S6B doesn’t connect very reliably to wifi to POST after making changes and uploading. Sometimes it requires…[Read more]

  • @srgdamiano – You have done some good work on developing/improving the ModularSensors library. After struggling to get the “logging_to_EnviroDIY” sketch to upload consistently to EnviroDIY portal, I have found the ModularSensors library to run much better with less HTTP POST timeouts. Before I switched I ended up heavily modifying the older exa…[Read more]

  • Those settings should be right for the XBee Wifi. Are you sure the unit is connected properly to your wifi? Can you connect the unit to XCTU and try to send a test json in the console log of XCTU?

    That example sketch should still work, but for anything new I would recommend you switch to using the ModularSensors library to send data to the…[Read more]

  • Thanks for the responses! Unfortunately, I am still having trouble posting data to the web. I had this working before the switch to Limnotech, so I’m wondering if there are some other changes that I’m unaware of that could be causing the problem.

    I’m attempting to post data using the “logging_to_EnviroDIY” sketch on GitHub (after updating the…[Read more]

  • Load More