Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Mayfly 1.1 Bootloader Burning?

Home Forums Mayfly Data Logger Mayfly 1.1 Bootloader Burning?

Viewing 5 reply threads
  • Author
    Posts
    • #17430
      Khaase
      Participant

        I haven’t seen a discussion about burning a bootloader to the Mayfly 1v1. I presume the best way to go through J7 with my ISP.

        Is there any special guidance? How is this done during assembly?

        The reason I am messing with the bootloader is that I’m trying to get Mayflys to live off some big batteries for a project in a cold dark place for a long time (over a year). I’m having trouble with the instability of the powersupply with longer battery wires, when the Mayfly turns on the switched power and sensor loads, the 1284p is resetting (with a single adafruit pkcell, as designed, it works flawlessly). I’m wondering if setting the BOD at 1.8V instead of 2.7V will help the 1284p step over the switch point.

      • #17431
        neilh20
        Participant
        • #17433
          Khaase
          Participant

            That is useful, and along the lines of my thinking: moving to LiSOCL2. Though I am having trouble getting supplies to test. The internal impedance of those, especially when low or cold, is a big question to resolve. My system can use all the deep-sleep tricks, but when measuring the load averages ~50 mA with spikes up to ~350 mA for fractions of a second, and I wonder if this will cause a brown-out with the LiSOCL2 cells. Additionally, if I use these cells, we’ll need to use an array of 4, behind protection diodes, which drop the input voltage a bit, but also could provide more current during operation.

            I had not thought to try using a bigger buffer capacitor in front of the Mayfly. I got some more stability with 1000uF with my ammeter in the circuit, but some configurations still got resets: I figured that it was confusing the voltage regulator somehow, as I could not resolve a deep voltage sag on the inputs when measuring. I will look at the datasheet again and meditate.

            But if I could just set the brownout to 1.8V instead of 2.7V that would still be a nice test/check. I tried hooking up through the SD card vertical socket and the DTR pin of the FTDI connector, but wasn’t successful. I am wondering if the pin order in J7 is correct in the schematic, I can’t see the traces under the SD card slot on the PCB, so hoping that I can get clarity here, though I will probably just try to probe out the pins soon.

          • #17434
            neilh20
            Participant

              Hi @khaase I haven’t figured out what the source of the reset is, as the AVR1284 Arduino code discards it – very frustrating.

              I have used low ESR capacitors – something like Digikey 732-9079-1-ND CAP ALUM 680UF 20% 10V THRU HOLE LOW ESR

              Whenever I have longer wires, a power switch, or current measurement, with the LiIon battery, I get some resets. I’ve also standardized on using 4400mAh LiIon battery.

              My EC circuit has low dynamic power demand.  Are you looking to add larger dynamic power demand with radios?  The LiSoCL2  has a relative high impedance,

              Managing power demand is challenging, not taking too much power when its not available. Using Vbat to estimate power is tricky. Vbat measurement is noisy and is referenced to the Vcc, and is only theoretically  accurate when Vcc=3.3V . So the LiSoCl2 3.6V is pretty close to the design limits of the regulators (though far improved than the Mayfly 0.5 regulators)

            • #17447
              Khaase
              Participant

                I probed the traces to the vertical uSD socket and FTDI and determined that with the isolation capacitor and DTR, it’s not possible to update the bootloader from uSD/J7. Of course, Right there on the circuit diagram there is an ICSP port (H4), which is a set of pads for what I believe are 1.94mm pogo pins by the uSD slot. I wonder if there is a part number or diagram for this? It should be easy to design my own, but an engineered part might survive better if I have to reflash many of these.

                Though so far I am finding that the source of power-on resets is simply having the uA meter in the power loop.

                • #17458
                  Shannon Hicks
                  Moderator

                    The Mayfly v1.1RevB board uses a 6-pin Tag-Connect socket for the ICSP header:  https://www.tag-connect.com/product-category/products/cables/6-pin-target

                    Previous versions of the Mayfly boards used standard header pins for the ICSP header, (0.5″ spacing on v1.0 and v1.1RevA, and 0.1″ spacing on v0.5 and older).

                    • #17459
                      Khaase
                      Participant

                        Thank you for the link. I was googling for pogo pin grids, what a nifty widget.

                      • #17464
                        Khaase
                        Participant

                          I ordered the cable. FWIW The folks that run Tag-Connect are very friendly!

                    • #17510
                      Khaase
                      Participant

                        An update: I got the Tag Connect socket and it works fine on my Pololu Atmel ICSP programmer, and using it burning bootloaders and program Mayflys is fast and fun.

                        I am still sorting through my test results and will probably have to do a new battery of tests with an external datalogger because the internal ADC gets confused by low voltages, but regardless of that data, I don’t think that setting the brownout fuse to 1.8V is a solution to many problems one might encounter. In particular to the Mayfly, it does seem not help with the long-wire input capacitance problem that can cause reset loops.

                    Viewing 5 reply threads
                    • You must be logged in to reply to this topic.