Home › Forums › Mayfly Data Logger › Mayfly 1.1 Bootloader Burning?
- This topic has 8 replies, 3 voices, and was last updated 2022-12-29 at 9:00 AM by Khaase.
2022-11-06 at 1:14 PM #17430
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.
2022-11-06 at 10:01 PM #17431neilh20Participant
Maybe of interest https://www.envirodiy.org/topic/primary-powering-in-cold-settings/
2022-11-07 at 9:05 AM #17433
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.
2022-11-07 at 1:03 PM #17434neilh20Participant
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)
2022-11-15 at 8:48 AM #17447
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.
2022-11-18 at 12:27 PM #17458Shannon HicksModerator
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).
2022-12-29 at 9:00 AM #17510
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.
- You must be logged in to reply to this topic.