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

sharkhat

  • Newbie
  • *
  • Posts: 10
  • Country: us
Moteino will not run until reset has been jumped with ground
« on: February 01, 2017, 12:35:38 PM »
I purchased 5 moteinos last week with the RFM95 transceiver. Prototyping was going great while plugged into my computer through the FTDI cable.  When I moved to batteries, it would not run.  My pro-minis (3.3v) and micros(5v), work on this 3 AA battery pack.  I have tried my benchtop powersupply as well.  The moteino code does not run until I short rst and ground from the ftdi connector.  All 3 of my moteinos that I have tested have this issue.  Anyway around it?  Is it a manufacturing defect?  Is this the intended functionality?

Thanks

WhiteHare

  • Hero Member
  • *****
  • Posts: 1298
  • Country: us
Re: Moteino will not run until reset has been jumped with ground
« Reply #1 on: February 01, 2017, 01:02:13 PM »
You're not alone.  A number of people, including me, have reported it.  The last I heard, though, Felix has not been able to reproduce it.  Connecting DTR to ground, though, does seem to be a viable workaround.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5958
  • Country: us
    • LowPowerLab
Re: Moteino will not run until reset has been jumped with ground
« Reply #2 on: February 01, 2017, 02:13:07 PM »
From what you describe it sounds like this happens on all your nodes.
Things have not changed on my end. I think most people don't have a problem and I don't know how to replicate this. The boards have been manufactured and tested the same way for the past few years, I recall a few instances where this was reported and Tom and WhiteHare and others have suggested their fix which should take care of this if it keeps happening.

sharkhat

  • Newbie
  • *
  • Posts: 10
  • Country: us
Re: Moteino will not run until reset has been jumped with ground
« Reply #3 on: February 01, 2017, 03:13:55 PM »
Would you like me to send one back to you for testing?  Is there anything I can do to help troubleshoot?  I would love to use this platform, as it is one of the only premade RFM95 arduino compatibles out there.  It is very simple to reproduce.  Just power it from the FTDI connector's Ground and PWR pins on any supply between 3.5-6 volts (the volt ranges I tested)  Whether is was battery powered or powersupply; the results are the same.


Thanks again
« Last Edit: February 01, 2017, 03:33:03 PM by sharkhat »

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: Moteino will not run until reset has been jumped with ground
« Reply #4 on: February 01, 2017, 03:37:45 PM »
You're not alone.  A number of people, including me, have reported it.  The last I heard, though, Felix has not been able to reproduce it.  Connecting DTR to ground, though, does seem to be a viable workaround.
That essentially puts a 100nF to ground on RST slowing it down. My own personal theory is that due to the low bulk capacitance on board the Moteino, when the battery is connected Vcc rises faster than SRon specification (power-on Slope Rate, table 32-7) which is 10V/ms, and without the capacitor on RST this rises at that fast rate too and is not adequate to reset the device properly. The rise time might be dependent on the internal resistance of the battery. Extending the reset allows it to cope with the fast rise time of Vcc. I know people have put in software delays in the power-up code to simulate a longer reset but this has apparently had no effect, the only thing left in my mind is some kind of rise-time related reset issue.

Mark.

Edit: You might be able to test this theory Felix, use a 470uF cap on the battery and put a switch between that and the Moteino. That should give the maximum rise time (although it is going through the regulator, that would appear to limit the rise time to 1ms so maybe this isn't it).
« Last Edit: February 01, 2017, 03:53:11 PM by perky »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5958
  • Country: us
    • LowPowerLab
Re: Moteino will not run until reset has been jumped with ground
« Reply #5 on: February 01, 2017, 03:53:03 PM »
Would you like me to send one back to you for testing?  Is there anything I can do to help troubleshoot?  I would love to use this platform, as it is one of the only premade RFM95 arduino compatibles out there.  It is very simple to reproduce.  Just power it from the FTDI connector's Ground and PWR pins on any supply between 3.5-6 volts (the volt ranges I tested)  Whether is was battery powered or powersupply; the results are the same.

No need to, I can test on another Moteino here, do you have the FLASH MEM on?
Any special sketch are you using? I assume power from a LiPo (~4v) with a simple blink program should be evident (no running the sketch, ie no blinking).

sharkhat

  • Newbie
  • *
  • Posts: 10
  • Country: us
Re: Moteino will not run until reset has been jumped with ground
« Reply #6 on: February 01, 2017, 04:11:46 PM »
Hi Felix,

Moteino, with FTDI connectors, and all headers soldered on, no peripherals attached.  Running the moteino 'blink' program, powered by 3 AA batteries, or a benchtop powersupply running 3.5-6 v.

Thanks again, took me all morning to figure out the 'rst' pin in the ftdi cable is the key.


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5958
  • Country: us
    • LowPowerLab
Re: Moteino will not run until reset has been jumped with ground
« Reply #7 on: February 01, 2017, 04:47:04 PM »
I tested a Moteino + LoRa, no FLASH, FTDI headers , programmed with the sketch below (on older Arduino IDE 1.0.6).
Powered via GND and VIN (2 wires only) from:

- 5V (FTDI)
- 3.7 LiPo
- 3xAAA pack

It always blinks no matter how many times i disconnect/reconnect.
You are welcome to send a suspect unit + your batt pack or setup or whatever else would help identify the problem and I will try to help in whatever way.

Code: [Select]
 
//#define SERIAL_ENABLE

#ifdef __AVR_ATmega1284P__
  #define LED           15 // Moteino MEGAs have LEDs on D15
#else
  #define LED           9 // Moteinos have LEDs on D9
#endif


// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(LED, OUTPUT);     
#ifdef SERIAL_ENABLE
  Serial.begin(115200);
#endif
}

// the loop routine runs over and over again forever:
void loop() {
#ifdef SERIAL_ENABLE
  Serial.println(var++);
#endif
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
}

sharkhat

  • Newbie
  • *
  • Posts: 10
  • Country: us
Re: Moteino will not run until reset has been jumped with ground
« Reply #8 on: February 01, 2017, 05:15:48 PM »
This is so strange.  The ONLY difference I can see, is that I am using a 3v3 FTDI (at least I am pretty sure it is 3.3v)  and I program with this.  Is there anyway that this difference has an effect?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5958
  • Country: us
    • LowPowerLab
Re: Moteino will not run until reset has been jumped with ground
« Reply #9 on: February 01, 2017, 07:54:18 PM »
It should not make a difference. I know it works with the FTDI I offer which is 5v supply and 3.3v serial signals (defaults). Many other 3rd party FTDI adapters work also.
I just tried the same setup with 2xAAs (3.2v) and nothing changes, blinks away as expected.

TomWS

  • Hero Member
  • *****
  • Posts: 1892
Re: Moteino will not run until reset has been jumped with ground
« Reply #10 on: February 01, 2017, 08:52:27 PM »
It is my technical opinion that if you live within 41 to 47.5 degrees latitude, 82 to 87 degrees longitude this phenomenon never occurs.  Everywhere else it does, but only under certain random, unidentifiable conditions.

I've never lived within that geographic window so I ALWAYS short DTR to GROUND on a Moteino when not using FTDI cable and have been happy ever since  ::)

Tom

WhiteHare

  • Hero Member
  • *****
  • Posts: 1298
  • Country: us
Re: Moteino will not run until reset has been jumped with ground
« Reply #11 on: February 01, 2017, 10:59:54 PM »
I'd wager the reason isn't latitude and longitude, but rather that Felix compiles with Arduino IDE 1.0.6 and the OP probably uses a more recent IDE:  https://lowpowerlab.com/forum/general-topics/how-to-get-spiflash-library-to-work-on-a-clone-(answered)/msg12473/#msg12473

@sharkhat: Try compiling and uploading your sketch using Arduino IDE 1.0.6 and let us know if that solves your problem.

« Last Edit: February 01, 2017, 11:04:29 PM by WhiteHare »

joelucid

  • Hero Member
  • *****
  • Posts: 869
Re: Moteino will not run until reset has been jumped with ground
« Reply #12 on: February 02, 2017, 03:08:24 AM »
There's an app note (http://www.atmel.com/Images/Atmel-2521-AVR-Hardware-Design-Considerations_ApplicationNote_AVR042.pdf) which suggests that a 0.1uF cap from reset to ground isn't necessary because the 328p does internal low pass filtering of rst. But they do say it can be done as "additional protection" to prevent resets in very noisy environments.

Following that theory the Moteino might be constantly resetting in a super noisy environment. I've never seen this. In fact for the th motes I don't even put a pull-up in. You could test whether that's the issue by detaching your dtr/Gnd short after startup to see if the Moteino then hangs.


TomWS

  • Hero Member
  • *****
  • Posts: 1892
Re: Moteino will not run until reset has been jumped with ground
« Reply #13 on: February 02, 2017, 07:35:41 AM »
There's an app note (http://www.atmel.com/Images/Atmel-2521-AVR-Hardware-Design-Considerations_ApplicationNote_AVR042.pdf) which suggests that a 0.1uF cap from reset to ground isn't necessary because the 328p does internal low pass filtering of rst. But they do say it can be done as "additional protection" to prevent resets in very noisy environments.

Following that theory the Moteino might be constantly resetting in a super noisy environment. I've never seen this. In fact for the th motes I don't even put a pull-up in. You could test whether that's the issue by detaching your dtr/Gnd short after startup to see if the Moteino then hangs.
Joe, that's not the behavior I'm seeing.  In several instances, and it's on particular motes, these are battery operated, field deployed motes, when I install the battery the 'boot' LED never flashes until I temporarily ground DTR pin.  So, as a rule, I just install a jumper across pins 1 &  6 of the header and the mote always starts when power is applied.   On the other hand, line powered Motes may or may not exhibit that behavior and, given the spotty power outages we have here in the woods, I have had instances where a mote just disappears until I reset it - hence my religious use of TPL5010s...

To WhiteHare's point, I've never used an IDE older than 1.5x.

Tom

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: Moteino will not run until reset has been jumped with ground
« Reply #14 on: February 02, 2017, 07:36:58 AM »
There is another possibility. The SPI of the 328P is used for programming as well as a master SPI when programmed. There is no pull-up on SCK, and could be sampled low when power is applied. That might put it into programming mode. However there's a pull-up on RST and both have to be sampled low so it might not be an issue. Trying a pull-up on SCK might yield something though.
Mark.