Forum Replies Created
-
AuthorPosts
-
What version of the Mayfly board do you have? The newer boards have a different regulator than earlier versions, so make sure you’re looking at the right datasheet and resistors.
If you’re comfortable removing and reinstalling SMT resistors, then it is possible to remove that resistor and replace it with another one to achieve different output voltages. But you have to be careful with supplying 12v to external devices so that you don’t exceed the maximum safe current and that the return data is at a safe voltage, otherwise you’ll damage the Mayfly. It’s likely you might need some external level shifters on the return data lines, which is why I didn’t include 9v and 12v excitation options on the Mayfly to begin with. Things can quickly go bad if users aren’t careful about voltage levels, so I decided to keep higher voltage stuff off the Mayfly. You can add an external boost regulator for just a few dollars each (5, 9 or 12v) from here: https://www.pololu.com/product/2117
Then you can put that boost regulator on a Grove protoshield (https://www.robotmesh.com/grove-protoshield) along with a level-shift breakout and then a header or screw terminal, and then you’ll have everything you need for safely powering an external device with a different voltage.
ChanCafun is right, you definitely don’t want to connect any panel to the Mayfly’s SOLAR jack that has a voltage higher than 6 volts. I wrote a post about solar panel options earlier this year: https://envirodiy.org/topic/dying-batteries-in-winter/#post-2051
Since that post, we’ve released the Mayfly v0.5 that has the option for directly connecting up to 16v on the External Power input pins. But unless you’re leaving the logger on continuously and powering some current-hungry sensors, you should be fine with a 3.7v Lipo paired with a 3.5W, 6W, or 9W panel, keeping in mind that anything over 3W is unnecessary if you’re in direct sunlight (see my explanation in the post above).
The code I posted above is for when you use a ADS1115 16-bit ADC. If you’re using a standard Uno or Mega board, you’ll have to use the regular 10-bit ADC, unless you’re planning to use a separate ADS1115 breakout. But assuming you’re okay with the lower resolution of the 10-bit ADC, just use the standard analogRead command and then convert the result to voltage. And because the output of the SP-212 is 1mv = 1 PAR, the measured voltage (in millivolts) is the PAR. The 10-bit resolution of the ADC means you’ll get steps of around 5 PAR (4.89 actually).
Arduino1234567891011121314void setup(void){Serial.begin(9600);}void loop(void){int sensorValue = analogRead(A0); //change this to the correct analog pin you're usingfloat voltage = sensorValue * (5.0 / 1023.0); //converts bits to voltsfloat PAR = voltage * 1000.0; //converts volts to PAR (for SP-212, 1 mV = 1 PAR)Serial.print("Bits: "); Serial.print(sensorValue);Serial.print(" PAR: "); Serial.println(PAR);delay(1000);}We designed the Mayfly logger system to be very easy to build and deploy. In fact, we’ve been teaching workshops to school groups and citizen scientist programs for the past year and I was actually in Grand Forks, ND earlier this summer where we gave a 2-day workshop at UM-Crookston. With most of our school workshops, we taught middle-school and high-school students some basics of electronics and coding/programming, and then we gave them kits and let them build a logger, assemble everything in the waterproof enclosure, and then show them the tips and techniques needed to successfully deploy the station in a stream. We also talk about maintenance and troubleshooting and how to QA/QC the collected data, and and some general scientific background to help them understand why we’re collecting the data and what the different parameters (turbidity, conductivity, pH) mean in the big picture. This was all part of a pilot program from the EPA to develop workshop materials and teaching curriculum based on the Mayfly board and various sensors. If you’d like, we could send you some of the information when it’s published.
And as for the circuit boards themselves, they are very simple to use. We can supply the code you need to program the board for most logging deployments (most of it is already available on our Github page), and almost all sensors simply connect to the board with simple jacks or screw terminals, so there’s no soldering or electrical engineering background needed. It gets powered by a small LiPo battery with a small solar panel to keep it continuously charged. The hardest part is making sure the enclosure you mount the sensors in is waterproof, and that you install the sensors in the water in a way that gives reliable data and can withstand floods/ice/mud etc. We use a variety of sensors from low-cost short-term deployable sensors to rugged research-grade sensors that require much less maintenance but cost several times more. So choosing the sensors really depends on your budget, how often you want to maintain them, and the quality of data you want to record. Using the Mayfly is not much harder than any other modular logger/sensor station you could build from other, more expensive commercial hardware options. In the end, you’ve still got to protect a logging device from the weather by putting it in some sort of enclosure along with a source of power, then mount your sensors and hope they can survive whatever flood events will eventually happen. The Mayfly significantly lowers the entry cost for building a station, plus you can use just about any sensor you want from any manufacturer without worrying that it isn’t compatible with a different brand. Plus you can use the Mayfly for any other regular Arduino-type microcontroller project, so it is a very versatile little circuit board.
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.
-
AuthorPosts