Forum Replies Created
-
AuthorPosts
-
The Mayfly boards are back in stock. The Starter Kit inventory is getting low, but more of those are on the way to Amazon and will be in stock next week.
A large number of boards were purchased earlier today and that depleted the inventory. There are still a few starter kits available. I will be shipping more boards and kits to Amazon later this week, and will post here when they are available for purchase again.
Sure, if the manual says it’s okay to ground the sensor’s negative signal wire, then you can just connect the sensor’s ground and negative signal wires to a “GROUND” pin on the Mayfly, and then connect the sensor’s positive signal wire to one of the Mayfly’s auxiliary analog pins. The easiest way to do this is with one of these Grove-to-screw-terminal boards:
https://www.robotmesh.com/grove-screw-terminal
If you’re using aux analog pin 0, then the following code will work for reading your SP-110 sensor. I put the correct conversion factor in the sketch for your particular sensor. If anyone tries to use this sketch with other sensors with different conversion factors, they will need to change that part of the sketch.
Arduino12345678910111213141516171819#include <Wire.h>#include <Adafruit_ADS1015.h>Adafruit_ADS1115 ads; /* Use this for the Mayfly because of the onboard 16-bit ADS1115 */void setup(void){Serial.begin(9600);ads.begin();}void loop(void){int16_t adc0 = ads.readADC_SingleEnded(0); //reads Mayfly aux analog channel 0 (AA0), returns number of bitsfloat voltage = adc0 * 0.1875; //converts bits to millivolts; default resolution of ADS1115 is 0.1875mv/bitfloat ShortwaveRadiation = voltage * 5.0; //Apogee SP-110 has calibrated output of 5.0 W/m2 per mVSerial.print("Voltage: "); Serial.print(voltage); Serial.print(" mV; ");Serial.print("Shortwave Radiation: "); Serial.print(ShortwaveRadiation); Serial.println(" W/m2");delay(1000);}The Apogee SP-110 will work fine with the Mayfly. Just connect the signal wires to AA0 and AA1 (the aux analog inputs) and do a differential measurement. You’ll need to use the Adafruit_ADS1x15 library and look at the example for differential measurements.
We always use the amplified output versions of Apogee’s solar sensors instead of the self-powered ones because they have much better sensitivity. There’s an order of magnitude improvement in the sensitivity by using the amplified ones, and it results in a much cleaner signal too. The SP-212 is the amplified (2.5v) equivalent of the SP-110, so I would recommend that instead if you haven’t already purchased the sensor.
SJ-12 is for enabling the pullup resistor on D10. SJ-1 is for changing the square wave alarm signal from the RealTimeClock from A7 (default) to D10. As stated on the Jumper Settings page (https://envirodiy.org/mayfly/hardware/jumper-settings/), you should never use SJ-12 if you’ve also changed SJ-1 to D10. The two can’t be used together or it will cause problems.
So remove your solder bridge on SJ-1 and put it back to the default setting by connecting the middle pad to the one labeled “A7”. Then have your sketch look for a LOW pulse on D10 by using this line:
attachInterrupt(2, tip, LOW);
Then anytime you get a tip by the bucket (assuming you connect D10 and GND to the two NormallyOpen poles of you rain gauge switch, the Mayfly will go into the “tip” function. If you still need help, I can post an entire sketch for how to sleep the Mayfly all the time and only wake up briefly whenever there’s a tip, record the tip, then go back to sleep.
We use sensors from a variety of companies, and most times every sensor on our stations will come from a different company. This is because we like to mix and match the sensors for the exact needs of the location and research questions being answered. What parameters are you interested in measuring?
I have used several solar radiation sensors with my Mayfly boards, so it’s possible, however it really depends on what the excitation voltage of the sensor is, and what the analog signal’s output voltage is. Can you tell me the make and model of the sensor, or at least what are the power requirements and output voltage?
The temperature compensation sensor for the Maxbotix sensor doesn’t interact with the Mayfly at all. It’s connected directly to the ultrasonic sensor’s pin #1, so the Mayfly doesn’t need to know anything about it. All the Mayfly does is capture the serial data that comes from the sensor’s data pin.
I’ll be away from my desk most of the day doing remote sensor station installation, but when I get back to my lab I’ll try to take some pictures of the wiring setup for my ultrasonic stations and post those along with a description of how to hook up the cables.
The Mayfly boards and starter kits are fully stocked on Amazon, as well as the protoshield and a new listing for the Grove-to-3.5mmStereo adapter board we use for connecting Decagon Devices sensors to the Mayfly: https://www.amazon.com/dp/B0725Y7B4B
The SIM808 module on the FONA must be powered directly from a 3.7v LiPo battery because it draws around 500mA during data operation, and can have occasional draw of up to 2 amps during a TX burst. The SIM808 module also requires a power source of 4.0v nominal, with a minimum of 3.4v and a max of 4.4v. So powering it directly from a 3.7v Lipo is the only reasonable option.
This is the reason there are two JST “LiPo Batt” jacks on the Mayfly. If you want to use a FONA with a Mayfly, you’ll need to connect a LiPo battery directly to one of the JST jacks labeled “LiPo” on the Mayfy. Then use a JST jumper to connect the JST jack on the FONA’s to the Mayfly’s other “LiPo” jack.
I’ve attached a picture of a JST jumper. We use GPRSbee cellular modules with almost all of our deployments and they come with one of these jumpers. You can make you own jumper by splicing together 2 standard JST pigtail cables.
Be sure to connect the “Vio” pin on the FONA to the 3.3v rail of the Mayfly in order to properly configure the logic level shifting of the FONA’s circuitry.
If you’re looking for the easiest 2G option, I highly recommend the GPRSbee (https://shop.sodaq.com/en/gprsbee.html). It plugs directly into the Bee socket on the Mayfly. Just add the JST power jumper and the u.fl antenna (included) and it’s ready to go. I’ve been using dozens of them for several years now and I really like them.
Attachments:
-
AuthorPosts