Author Topic: Moteino will not run until reset has been jumped with ground  (Read 6153 times)

TomWS

  • Hero Member
  • *****
  • Posts: 1877
Re: Moteino will not run until reset has been jumped with ground
« Reply #30 on: February 10, 2017, 07:57:57 AM »
10K from SCK to VCC (3.3V).
Try MISO too, this might actually be the culprit.  Do the two tests independently.


TomWS

  • Hero Member
  • *****
  • Posts: 1877
Re: Moteino will not run until reset has been jumped with ground
« Reply #31 on: February 10, 2017, 08:00:27 AM »
...Would pay off quickly too considering all the tpl5010 Tom wouldn't need going forward ...  ;)
What?  And have my power consumption JUMP from 34nA to hundreds of nA?  NEVER!   ;)

OSBSS

  • Newbie
  • *
  • Posts: 29
  • Country: us
    • OSBSS - Open Source Building Science Sensors
Re: Moteino will not run until reset has been jumped with ground
« Reply #32 on: February 15, 2017, 12:57:24 AM »
I've noticed this issue several times in the past as well. I forgot what I did, but I don't have this issue anymore. I've tried almost all IDEs after 1.0.5, all Moteinos work fine.

I believe this is happening when using the Moteino alongside other SPI devices? I was trying to use a DS3234 RTC without a pullup on the SS pin. Internal pullup barely helped. Adding a dedicated external pullup to each SS pin and decoupling cap to all SPI devices should make the setup more robust.

odiephd

  • Newbie
  • *
  • Posts: 36
  • Country: us
Re: Moteino will not run until reset has been jumped with ground
« Reply #33 on: February 27, 2017, 09:00:32 PM »
Ok, I assembled two more motes, loaded the sample node testing program.  Both work with flawlessly with powering them up with a battery.  I will integrate my sensors and test each step along the way to make sure it works as expected.

For the other two motes, I tried the 10K resistor between 3v3 and SCK, and 3v3 and MISO in two separate tests.  Both cases did not work.  My other two motes will not power up with battery.  However, if I power them through FTDI/USB, then connect the battery, they will continue to run.

What do I try now?

ieris

  • Newbie
  • *
  • Posts: 38
  • Country: lv
Re: Moteino will not run until reset has been jumped with ground
« Reply #34 on: April 21, 2017, 03:20:27 PM »
Hi,
 I'm(was) in your club.
Till now I hadn't such problems. I have several battery operated Motes and never had such problem. As well I have 3 Motes which operates on 5V over 10m+ power cables, and powered motes from phone chargers.
Yesterday I have received my new PCB (garageMote+Hi-Link PSU), soldered it and have noticed that Mote is not powering up, spend a lot of hours tracing and diagnosing.
Just now I read 2-3 topic on this forum regarding this problem, and before adding cap or drt-gnd, I have updated my Arduino IDE from 1.6.2 -> 1.8.2.
And can you guess? The problem is gone...

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5844
  • Country: us
    • LowPowerLab
Re: Moteino will not run until reset has been jumped with ground
« Reply #35 on: April 21, 2017, 04:02:20 PM »
Not really clear, but simply updating the IDE (no hardware changes) solved your problem?

ieris

  • Newbie
  • *
  • Posts: 38
  • Country: lv
Re: Moteino will not run until reset has been jumped with ground
« Reply #36 on: April 22, 2017, 03:49:31 AM »
Not really clear, but simply updating the IDE (no hardware changes) solved your problem?

I just want to say that I have got the same problem what was mentioned in this topic that Moteino is not booting on external power.
And yes, I haven't done any changes to hardware, just simply updated the IDE.
But this morning I noticed that situation is not fully fixed. After short power off (less that 10sec) Moteino starting up without problems, but longer shutdowns (more that 15sec) not always start it up. This seems logical because of caps in PSU.
But before IDE upgrade the situation was worse, unfortunately I have deleted 1.6.2 IDE and can't verify it again.

EDIT: Just added the 0.1 uf cap across RST to GND. Currently seems that the problem is gone.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5844
  • Country: us
    • LowPowerLab
Re: Moteino will not run until reset has been jumped with ground
« Reply #37 on: April 25, 2017, 04:10:50 PM »
I've spent some time to debug this issue. I've been able to replicate it on a 8mHz Moteino (removed LDO) where the sketch immediately goes to sleep.
The solution which seems to fix this is a change in the schematic.
Could you also try this?
You can solder a 1uF cap in parallel with the existing 0.1uF between DTR and RST. Then add a 0.1uF between RST and GND (already seems you have this). Let me know if anything changes in behavior from your current "working" hack.
I am considering to implement this in the next Moteino revision.

perky

  • Hero Member
  • *****
  • Posts: 871
  • Country: gb
Re: Moteino will not run until reset has been jumped with ground
« Reply #38 on: April 28, 2017, 03:51:07 PM »
So, a bigger cap, that's interesting. What's the failure mechanism?

Mark.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5844
  • Country: us
    • LowPowerLab
Re: Moteino will not run until reset has been jumped with ground
« Reply #39 on: April 28, 2017, 05:32:12 PM »
Mark,
I think it has to to with the behavior of the atmega328 when the residual charge in the 10uF cap onboard the Moteino starts to drain.
One important thing to note is it keeps running while VCC is above 1.8v. In very low power modes that can last a "long" time. All is fine in this state, where if you reapply power, the 10uF cap will simply recharge and atmega328 will keep running. If it's sleeping in this mode, it will appear as if its unresponsive. But this is OK, the atmega simply does what it was told - to sleep. I think some folks put the chip in sleep, then remove GND-VIN power, then re-apply VIN power and expect the their sketch to restart (usually a blink or whatever behavior they know will happen at startup) - but it doesn't because of the residual charge in the cap which I explained above - which is totally expected.

I can't say for sure but there seems to be a meta stable region below the 1.8 or even lower where the chip will simply not start (maybe the RST pullup has something to do with this?) or so it seems. I could only replicate this with very low power sleep modes, where i apply power to VIN and nothing else.

If I change the DTR-RST cap to 1uF and add a 0.1uF to RST-GND then the chip will be forced to restart every time regardless - as long as the 10uF cap is discharged and doesnt keep the atmega going.

Thoughts?
This change is planned for the next R6 and another change also: changing the big from 10uF to 22uF. Anyone see a problem with this?
« Last Edit: April 28, 2017, 05:33:53 PM by Felix »

Rawze

  • Newbie
  • *
  • Posts: 7
  • Country: us
Re: Moteino will not run until reset has been jumped with ground
« Reply #40 on: May 28, 2017, 07:41:18 AM »
Found a possible solution to this. It is mentioned here...
https://lowpowerlab.com/forum/index.php?topic=1655.msg19923#msg19923

I am all for solving it with a hardware/capacitor solution to lessen the learning curve here but personally, I don't think the large capacitors on the reset line is the best solution. Forcing a known SPI buss state during startup seemed to be a better one for at least me any ways. Resistors on all pins solved it only partially. I tried them both pull-up and pull-down and it will still get hung on rare occasion on several of the devices I have here. I have had zero issues when I resorted to forcing a logic low on all SPI pins together for the 10ms startup period of the RFM. Logic high works too but the RFM fails the buss state more reliably and does not hang while all pins are forced low at boot. At least this is what I observed over here while testing it. I have 2 different types of RFM69HW modules here. Some of these problems may possibly be board revision specific. Hsackaday's website even has some fixes for some with capacitors soldered incorrectly on some of the boards.

I can only take a guess and say that with the buss driven/forced low, it perhaps sees all pins low, fails the condition quickly, and continues to boot normally. After the initial 10ms wait, it is simply a matter of initializing it and every one I have here runs flawlessly after booting them that way. Others may have a different experience, and that is the nice thing about forums. I am sure that others will try this solution and give some feedback of their own on it.

I do however think that if flash is installed, a pullup should come installed with it, or at least a solder-bridge location to enable a pre-installed 10k resistor. -- Just an idea.

I think before anyone jumps to too many conclusions, like Felix was saying, before any hardware change is made, it should be tested through various sleep states and other wacky things at startup that a users might put one through. Personally, I don't use any kind of power savings, disable all over-current protection, and drive the PA to max snot on some of them with external antennas high in the air at the end of long coax cables. Haven't burned one up yet.

perky

  • Hero Member
  • *****
  • Posts: 871
  • Country: gb
Re: Moteino will not run until reset has been jumped with ground
« Reply #41 on: May 28, 2017, 10:48:56 AM »
I tend to agree with the large capacitor fix, it doesn't seem quite right but that's really a gut feeling.

I've speculated before about the posibility of the MCU accidentally going into programming mode. That's initiated by a rising edge on SCK when RST# is low, so a pull-up on SCK might have an effect. I note you tried this with partial success though, but unsure what value of resistor used or whether a low value, like 1k, would work better than a high value (of course this then has power implications).

Mark.
« Last Edit: May 28, 2017, 10:56:48 AM by perky »

svorres

  • Newbie
  • *
  • Posts: 3
Re: Moteino will not run until reset has been jumped with ground
« Reply #42 on: June 01, 2017, 04:47:33 PM »
I'm having a large number > 20  of locked up Moteino RFM95 in the field,  it seems when the battery gets lower, i.e  2.9V  the  Moteino goes to sleep and  never wakes up.  When I replace the batteries the Moteino still won't wake up.

If I want to retrofit my R4 boards,  should I add a  0.1uf   1206  surface mount Capacitor  between pins RST and GND,  and also  piggyback a 10uf  804 SMT capacitor on top of the  DTR to RST cap ?

Has anyone had any good experiences with such a retrofit ?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5844
  • Country: us
    • LowPowerLab
Re: Moteino will not run until reset has been jumped with ground
« Reply #43 on: June 02, 2017, 09:03:49 AM »
I'm having a large number > 20  of locked up Moteino RFM95 in the field,  it seems when the battery gets lower, i.e  2.9V  the  Moteino goes to sleep and  never wakes up.  When I replace the batteries the Moteino still won't wake up.

If I want to retrofit my R4 boards,  should I add a  0.1uf   1206  surface mount Capacitor  between pins RST and GND,  and also  piggyback a 10uf  804 SMT capacitor on top of the  DTR to RST cap ?

Has anyone had any good experiences with such a retrofit ?

Steve,

Are your motes programmed in a deep sleep state?
One possibility is that when you replace the battery they are still running on the onboard cap charge and appear to not wake. But then you're saying they are "locked" which (while they appear to not do anything) is hard to pinpoint what it really means.
I would suggest piggyback a 1uF on the DTR-RST cap and add a .1uf from RST to GND, see if that makes a difference.

Please note that this will not help with lockups that originate from code (ie infinite loops etc) - I say this because I have lots of moteinos (older revisions) that have been running for years without being touched and with no lockups/brownouts/glitches, some in locations that have extreme temperature drifts every day.
« Last Edit: June 02, 2017, 09:22:04 AM by Felix »