2019-08-14 at 8:29 AM #13069
I am attempting to change the address for the Hydros 21 CTD sensor (On Mayfly Board v 0.5b) and running into an error uploading the SDI-12 Change Address sketch:
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x88
I have previously set the RTC and uploaded the DRWI_NoCellular sketch for the CTD Sensor – these seemed to upload just fine.
The address change instructions specify to change the following lines in the sketch to match hardware setup:
#define DATA_PIN 7 // The pin of the SDI-12 data bus
#define POWER_PIN 22 // The sensor power pin (or -1 if not switching power)
The CTD sensor is plugged into D6-7 on the Mayfly… I tried using the DATA_PIN assignment 6 and 7 with same failure. I did not change the power pin assignment. I am a novice with this type of hardware, so perhaps someone could point me to a diagram or resource which explains where to find the pin numbers on the Mayfly board. Or maybe there is another issue that I am overlooking. Any tips would be appreciated.
2019-08-14 at 9:46 AM #13070
After some searching on other forums it seems the sketch upload error is just a communications error. Is there any reason why I have previously been able to upload sketches to my board and send output to the serial monitor, but now I cannot? Could it be a driver issue?
I did not install the FTDI virtual COM port (VCP) driver because when I first connected the Mayfly to my PC it was recognized… my IT dept said that I already had the necessary driver installed. Perhaps this is not the case?
2019-08-14 at 10:27 AM #13071
It sounds like your PC is just not seeing the Mayfly. You should make sure the Mayfly is turned on at the main power switch, and that the small power-select slide switch is set to the USB/Lipo setting (not Ext). Sometimes the switches can be a little glitchy, so you can try sliding them back and forth to make sure they’re getting good contact. And also ensure that you’re using a proper microUSB cable, like the one that came with the starter kit, if you bought one. Some users have reported issues with cheaper cables due to bad connections, broken wires, or bent pins on the cable. And verify that you’ve chosen the proper COM port in the Arduino IDE settings. Sometimes your computer will assign a new COM port to the Mayfly, but the IDE doesn’t always update the COM setting to the newest port, so it’s looking for the Mayfly on the wrong port.
2019-08-14 at 11:53 AM #13072
I was able to fix the issue, though I’m not sure at all why it worked. When I have a microSD card in extra slot for datalogging the Mayfly board will not even power up. As soon as I pull the microSD card out the LED lights blink, the red one stays on and all is well. This seems to be a rather serious issue since the entire purpose of the mayfly is to log data. I can now communicate with the device/upload sketches. However, it seems my solution now leaves me with another problem…
2019-08-14 at 4:25 PM #13073
What you’re describing with the microSD card is definitely not normal. I’ve encountered it only a few other times in over 1000 boards, and it’s usually caused by a bent pin inside the microSD socket that causes a short circuit when a card is inserted. Is this a brand new board? And are you seeing this behavior with the microSD socket that’s built into the Mayfly, or with the supplemental vertical microSD card adapter board (that comes with the starter kit) that plugs into the 8-pin SPI header between the power switch and the D21 pushbutton? And do you see this same behavior with various microSD cards, or just one? Sometimes a malfunctioning microSD card will cause the problem instead of the socket itself.
2019-08-15 at 8:02 AM #13079
Yes, this is a brand new board.
The microSD card is not the issue – I have switched cards and get the same result. Both cards work fine if used alone.
I believe the problem lies in the circuitry between the two SD card slots… When only 1 card is inserted (either slot) the board powers on. If both slots have microSD cards inserted simultaneously – no power.
As an extra test, and to isolate the problem, I unplugged everything else from the board except the usb cable to the computer – I get the exact same behavior.
2019-08-15 at 7:31 PM #13109
The Mayfly is not designed to have 2 microSD cards inserted at the same time. No one should ever insert two cards. The reason for the second vertical socket is for people who have the logger mounted inside an enclosure that makes it difficult to remove the card in the regular horizontal socket. Various electrical irregularities will occur if you use two cards at the same time, and the processor will only write to one card anyway, so there’s no benefit to having two cards in together.
So are you saying that the board performs properly as long as you’re using only one card? Because I have seen a few of the optional vertical memory card adapter boards have the bent pin that results in the short circuit when a single card is inserted. The issue is fixed by simply replacing the vertical memory card board. I’ve never seen a Mayfly have the issue with the onboard horizontal memory card socket because that’s one of the things I test for before shipping each Mayfly.
2019-08-16 at 8:01 AM #13110
Yes, the board seems to perform just fine while only 1 card is inserted. There are most definitely electrical irregularities when 2 cards are in at the same time! I had erroneously assumed that the horizontal card was for uploading sketches and that data would be logged to the second (vertical) microSD card, which could be extracted easily to download data. There were no details in the Mayfly Manual explaining this aspect of the board. From now on I will just use 1 card on the vertical port. Thank you for helping me troubleshoot.
As for my original question about the SDI-12 address change for the Hydros 21 – is the data pin #7 and power pin #22 on the Mayfly? I could not find any details on this either. I am assuming it is, since it was in the EnviroDIY sample sketch, but I figured it would be wise to verify.
2019-08-16 at 9:30 AM #13111
The Mayfly logger processor is just like any other Arduino board, and loading sketches onto it is just like any other Arduino board. The uploaded sketch is “burned” into the microprocessor chip in the center of the board. The microSD card slot is just an optional device to allow users to store recorded variables or other data during the subsequent operation of the logger. The Mayfly is not like a Raspberry Pi that has an actual operating system and executable files on the memory card.
Regarding SDI-12 addressing, you can connect a Hydros 21 sensor to any pins you want, you just need one data line, one power excitation line, and one ground line. Are you using a sensor with bare wires or did you purchase one with the 3-pin stereo plug (3.5mm)? If you’re using the stereoplug-to-grove adapter board that we sell, then just use a grove cable to connect the adapter board to the Mayfly’s D6-D7 grove jack, and then you would use data pin 7 in the sketch. If you’re using a bare wire sensor, then you’re free to connect them to any free digital pin, but for simplicity you should use D7 when starting out so you don’t have to change the sketch. The reason for the power excitation pin D22 in the sketch is that the onboard switchable voltage regulator is controlled by turning on pin D22. But you need to hook any external sensors you want to operate to the “Switched 3v” line because that’s where the actual switched power comes from, and not D22. Again, this is taken care of if you’re using the grove jack stereo plug adapter board, but you have to hook it up right if you’re using a bare wire sensor. Whenever D22 is on, there’s a red LED in the bottom corner of the Mayfly that comes on to indicate that the sensor (and anything else on the switched 3v or switched 5v line) is being powered.
You must be logged in to reply to this topic.