Pro mini locking up / freezing - not responding to reset

This is my second pro mini for my weather station and all I have connected to the pro mini is a SHT21 through I2C and a NRF24 radio. The pro mini has worked flawlessly for weeks but it ends up completely freezing and not even responding to a physical reset.

To note, I hacked both pro-minis and removed the voltage regulator to save more power. And in freeze situations, I have confirmed it is not a voltage issue as well. I have a solid 4v available from my ni-cad batteries. My original pro-mini was 3v this one is a 5v and same thing.

The only way to restore operations is to disconnect power and restart. I originally blamed the pro mini but this is the second one that has the same symptoms. On my previous build without the SHT21 I did not see these issues. I have watchdog code everywhere to prevent software lockups but I sortof suspect this is not software. Any suggestions?

If I had to guess I would think ESD or some other electrical spike. Do you have 0.1µF bypass caps on the NRF24, SHT21 and Pro Mini?

Regarding the WDT. I have some older Pro Mini and to use the WDT I had to change the boot loader to an optiboot bootloader. I don't recall exactly but I think the issue was the WDT would trigger before the bootloader passed execution to the program. You might want to test your WDT by putting a very short time out and a delay to force the WDT to reboot.

You really should consider a precise DC source... were I doing this, I would select a DC-DC converter that was at least 2x the power rating that I needed; that is, if you need 500 mA then you should look for a DC-DC converter that can continueously handle 1A. Depending on temperature rise from the DC-DC, you may need to mount it separately in a ventilated enclosure to avoid heating the Arduino and sensors.

So, while 3.3V Arduinos "can" be powered from 5V, the system should really be powered from 3.3 to get accurate A/D on internal. The 5V Arduino should be powered by 5V. Removing the regulators is fine as long as you are cautious with not overheating the uC or damaging the circuit board.

I would think for a battery device you would not want to add the parasitic load of a DC-DC. The Pro Mini should work down to 1.8V however at that frequency the processor clock max is 4 Mhz.
I suspect the 328P will be a little better than that but you will be on the edge.

Note the voltage range of the ATmega328P is 1.8V to 5.5V. Above 5.5 volts you start to get into a gray area where it will probably work but you risk damage if you go much above 5.5V

If you ad the above mentioned 0.1µF capacitor at the input of each board and a 100µF cap to service all three boards you should be OK. You might want to look further into the NRF24 to see if they suggest any thing in addition to the above caps.

Is your wiring such that they make good antennas for pickup? Another place to check.

Actually I don't - would you have any schematics to set these up? And this explanation makes sense... I have a solar panel wired to the batteries (with a regulator) so this is totally possible.

I have no hopes for the WDT because when these boards freeze even a physical reset button doesn't do anything so I don't think the software has any way to reset the boards. And they run fine for weeks.

A schematic would probably not help. However:

  1. Long wires are not your friend.
  2. Twisted wires are better than not twisted.
  3. The 0.1 µF capacitors (ceramic type) should go right where the power enters the board. You should do this for each board.

You have a solar cell connected to the NiCads. Then the NiCads connect to the Arduino, the SHT21 and the radio.

After your update you will have a 0.1µF at the input of each board AT the board pins of each board.

You NiCads should connect to the 100µF (could be higher maybe 220µF) then from the leads of the 100 µF run both + and - to each board. Do not run the power for the sensor and radio through the Arduino.

I understand your statement about the WDT. Personally I would add the WDT for no other reason than its good design.

Could the lockup be the radio and not the Arduino? You might try using an unused input as a test initiator. If the input is low (normal) no change but if you pull that input high the LED will blink at some rate that makes sense for your code.

You should also look into the brown out detector to see if it could be of help.

That sounds like a good idea. So I don't have any 0.1µF on hand but I have a 1µF (electrolytic).
So should I use a 1µF and a 100µF from the NiCads to the arduino? And I assume I would connect the + of the capacitor to the + of the NiCad /- of the capacitor to the - of the NiCad?

And thanks for mentioning the BOD - I was not aware of that feature at all. I will try to configure that one as well.

Hi,

A schematic would help, so we know what you are talking about.
Particularly when it comes to bypassing components.
Please include component names, pin labels and power supplies.

Some images of your project would also help.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Unfortunately the 1µF electrolytic will not do the job. Capacitors have frequency limitations that are not mentioned on the on the first sheet of any specification.

Electrolytic capacitors start to look like inductors at some high frequency. In general the larger the capacitor the lower this "crossover" frequency is. And electrolytic are even lower than ceramics. You should be using a ceramic capacitor. The capacitor should have a characteristic "X7R" for stability over temperature. And you likely don't care if they cost you a penny or two more than the cheaper Z5U characteristic.

I would recommend you purchase something like these.
or these if you prefer axial.

  • Both are from a premium mfg
  • reasonable shipping time
  • You will likely never have to purchase more again. (f you by the 91 pc lot
  • the capacitance is reasonably stable over temperature.
  • They have full length leads (some are cut short an put in tape for easy machine insertion.

So I finally figured out this one. The lockup was caused by the I2C sensors which were powered through the digital pins. This seems to wear out the pins and any random power issue with the I2C sensors does easily lock the whole atmega. I was able to reproduce this with a nano board. I've rewired my system to power the sensors directly from the batteries and this has been working flawlessly.

Hi,
This is where a schematic would have shown your problem.
See post #8, 2 months ago.
Why did you use the I/O pins for power, they are not designed for a load greater than 40mA and even then, their output is not exactly 5v regulated.

Glad to see you have found the error of your ways.

Tom.... :smiley: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.