Forum Replies Created
-
AuthorPosts
-
We haven’t shared the board layout yet, but all of the necessary information is in the schematic. The aux ADC on the Mayfly is the ADS1115. Its Vcc is tied to the 3.3v supply of the board, so it’s not possible for it to sample anything greater than that. You can use the jumpers near the Grove connectors on the board to provide a 5v excitation for external sensors, but the sensor must not return a signal greater than 3.3v. For all of our deployments, we use sensors that have 5v excitation but provide a 0-2.5v return. If your sensor returns 5v, you can simply use a resistor divider to change the voltage to something within the safe range of the ADS1115.
Unfortunately we currently don’t have an option for purchasing the Mayfly outside of the US.
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:
https://www.amazon.com/Ultra-Compact-RS232-Converter-Male/dp/B00OPU2QJ4
https://www.amazon.com/Ultra-Compact-RS232-Converter-Female/dp/B00OPTOKI0There 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.
You haven’t mentioned what battery you are using. But the problem with using a solar panel on the USB port is that the voltage supplied by the panel in direct sunlight will cause a transistor switch on the Mayfly to essentially “disconnect” the battery from the processor power supply and use the voltage from the panel to supply power to the entire board. But since the solar panel can’t supply an adequate current, then the board will be unstable. That’s why there’s a separate “SOLAR” input on the Mayfly. When you use it as intended, the board is powered by the battery at all times, and the charge regulator on the Mayfly will charge the battery whenever there’s sufficient sunlight. It also works best with a 6v solar panel, so unless you have lots of direct sun, your panel will likely be supplying around 4v, which isn’t going to do much, especially if you’ve got it connected to the USB jack instead.
So I would highly recommend you use a 6v solar panel, and one that is completely waterproof and rugged if you’re using it outdoors. We use panels made by Voltaic Systems (https://www.voltaicsystems.com/2-watt-panel), and you can get a handy bracket for them (https://www.voltaicsystems.com/small-bracket) and an extension cable (https://www.voltaicsystems.com/extension-with-exposed-leads). Just solder a JST connector onto the extension cable, and you’ve got a rugged and weatherproof way to charge the Mayfly. For batteries, a 2200mAh Lipo is usually sufficient and can be charged in less than an hour of sunlight if your Mayfly sleeps or doesn’t have much current draw.
You say you use these solar panels to power other microcontrollers. Is this a bare solar panel that outputs 6v in full sunlight and 0v in the dark, or is it one of those solarpanel/battery combo things that has a built-in battery so it always outputs a constant even in the dark?
The solar panel shouldn’t be connected to the USB port. Solar panels should only be connected to the JST jack labeled “SOLAR”. The LiPo charger circuitry on the Mayfly will use the solar panel voltage to charge the battery.
If you connect a USB cable to the USB jack, then the charging circuitry will use that voltage, and yes, the battery will be protected from overcharging either way.
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.
-
AuthorPosts