1

i am building an outdoor sensor with a combination of a custom Arduino board and a battery (+solar charging). I experience strange behavior when the temperature falls below a certain value (i can reproduce it by putting it in the freezer), regardless which type of battery i am using. The custom Arduino runs without power-regulation, straight from the 3.7volts the battery can provide. How can i prevent this to happen? I guess a little heating would be not really a solution as i am trying to consume as less energy as possible. Would a (step up) regulator possibly help? Any other ideas?

---Update--- Thanks to your comments here i figured out, that the AVR 328p should not be operated below a voltage of 3.7v if run at 16Mhz. As i am running with a 3.7v LiPo Battery that could easily explain my problem i guess. My first try to decrease the processor speed to 8Mhz with a Prescaler worked, but the GSM Fona does not seem to like it. So i would like to try something in between like 10Mhz or 12Mhz. As the prescaler does not support this, my question is: can i just use another crystal or would i have to modify something in the code/bootloader as well?

  • 2
    Lithium chemistries may not like cold, so consider something else. Also make sure you clock is in spec for the voltage and that your brown out fuses aren't set high. – Chris Stratton Jan 24 '15 at 2:02
  • AFAIK all battery chemistries have problems with cold: Capacity drops, current delivery drops, and internal resistance increases, so the voltage over your device drops. Not sure if a step up regulator would help, since the battery may still be too current limited in the cold. Perhaps an EE question? Not an expert, but I imagine a combination of more batteries and a regulator would help. – j-g-faustus Jan 24 '15 at 3:02
  • As others have mentioned, most batteries have problems at low temperatures. In very cold conditions I used to keep batteries next to the body. You could test this by running in the freezer with the battery outside. – Milliways Jan 24 '15 at 4:35
  • In theory you could need to adjust the capacitors on the crystal, in practice it is likely to just work, especially if you can find the specs of the original and order something similar. But figure out how low the voltage is really dropping if loaded when cold - and consider if rising impedance may be a better model than dropping nominal voltage. – Chris Stratton Jan 25 '15 at 12:28
  • see instructions for 12Mhz bootloader here: ceptimus.co.uk/?p=102 – Omer Jan 25 '15 at 12:56
3

To answer your modified question:

Running the ATmega328p at 16Mhz with 3.7v is out of spec - see this EESE answer for reference or the ATmega datasheet - so the obvious solution would be to lower its speed to 8Mhz.

But since you also mentioned that there is an additional GSM breakout board involved (Adafruit Fona), which expects UART (in auto-baud mode) Rx/Tx connection, it might not be that trivial. Further exploration of the Fona library's source code reveals that it has several hard-coded delays (see Adafruit_FONA.cpp::begin, for example), but its core seems to be implemented inside the Adafruit_FONA::readline method, which uses an underlying Stream, which in turns comes from a Software/Hardware serial object, as shown in the FONAtest.ino example that comes with the library.

From my experience, Software/Hardware serial should work fine on 8Mhz, except maybe when using high baud rates, which is solvable. The hard-coded delays doesn't look like they should cause actual damage except for delay, but you could cut them in half just to see if you can make the library work.

Additional aspect that you should consider is the comment from Adafruit's Fona product page, regarding pin Vio:

This is the pin that you MUST drive with an external voltage from 3V-5V to set the logic level converter

So, despite that from the datasheet, the Fona seems to have a voltage regulator, you might still want to consider adding a decoupling capacitor between Vcc and Gnd of your battery, to mitigate transient current draws from any component in your circuit.

  • 1
    Actual GSM (even in comparison to its more modern replacements) involves quite high current, I could easily see the first transmit attempt triggering a brown out when the battery is cold. – Chris Stratton Jan 25 '15 at 16:57
  • @Chris that's a very good point – Omer Jan 25 '15 at 23:06
  • 2
    Excellent hint Omer - i also had checked the library for delays etc. and cut them in half - but i didn't have the baud-rate in mind. Instead of 4800 i am now initializing Fona with 9600baud and everything seems to work fine so far, it is running since hours now. – Stephan Noller Jan 26 '15 at 14:10
-1

It's most likely that the cold weather is messing with your batteries. I don't know what battery types you've tried, but this site says that Lithium batteries (Not Li Ion, but standard single use, expensive, lithiums) hold up well in very cold and very hot environments. For rechargeable batteries the site recommends NiMH batteries. Of course, we all know that lead acid batteries hold up well in cold (Or else our cars wouldn't start!), so those are also a viable option. Lead acids can be purchased in somewhat small forms, but they may still be too big for your purposes.

For the other part of your question, yes a regulator will help. It's rarely acceptable to run directly off a battery without a regulator. Since your application is low power you'll want to use an efficient switching regulator (Search for modules, not individual chips). Remember that a battery's output changes based on its charge level, temperature, current draw, and other things I'm likely forgetting. Using a regulator mitigates these effects as regulators are less affected by temperature and current draw than the battery that supplies it (Hopefully).

So to summarize: Use Lithium batteries, or NiMH if you need to recharge, or Lead Acid if you need a ton of capacity and size isn't a limit. Then get a switching regulator module. Best of luck with your project!

  • No, it is quite normal to run processors such as the ATmega off unregulated batteries whose useful curves fall within their input range. Please review the specs before making recommendations. – Chris Stratton Jan 24 '15 at 14:28
-1

When using battery, always use a step-up converter, something like LTC3525 or NCP1402. A direct connection of unregulated battery voltage to an analog input can give you a good information on the remaining capacity while the step-up converter still provides stable 3.3V for operation.

  • No. This is throwing expense and inefficiency in a direction far removed from the problem, which is simply that the chosen cell won't deliver useful energy. – Chris Stratton Jan 24 '15 at 14:26
  • I beg to differ. A step-up converter assures the microcontroller to work until the very end of battery capacity and enables reporting low-battery status. Assuming the battery is providing accurate voltage is energy efficient (about 15% more efficient) but far from reliable. – Robert Špendl Jan 24 '15 at 18:03
  • A converter can't obtain energy which isn't there. Additionally, over discharging rechargeable lithium cells prevents their reliable recharging. – Chris Stratton Jan 24 '15 at 18:35
  • True, but the microcontroller is rather sensitive to low voltage when running on higher frequencies and that seems to be the problem with Stephan's outdoor sensor in cold environment. That's why I think the converter might be useful. As you have already pointed out in your comment, reducing the frequency actually enables the chip to run on much lower voltage so this could be an alternative way to go. Though you can not rely on reference voltage any more if it is not regulated, but this is another story. – Robert Špendl Jan 24 '15 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.