1
\$\begingroup\$

I have been working on a miniature temperature sensing module which buzzes once the temperature crosses a threshold using ATtiny85, lm35 and a pico buzzer. When I power the whole circuit using an arduino board and take readings of the temperature sensor, they are consistent. But when I try to take the readings after powering the whole thing using 2xcr2016 3V coin cells, the readings are erratic. How do I solve this issue?

\$\endgroup\$
4
  • \$\begingroup\$ What does your decoupling look like? \$\endgroup\$ Apr 20, 2015 at 18:52
  • \$\begingroup\$ How fast are you clocking the ATtiny85? If you are clocking it faster than is allowed for a 3 volt supply the micro could behave irregularly \$\endgroup\$
    – TylerH
    Apr 20, 2015 at 18:59
  • \$\begingroup\$ Also, why aren't you using the internal temperature sensor? \$\endgroup\$ Apr 20, 2015 at 19:17
  • \$\begingroup\$ Are you connecting the coin cells directly, for 3V or 6V? Do you have anything between the batteries and the uC, like a voltage regulator or decoupling caps? \$\endgroup\$
    – curtis
    Apr 20, 2015 at 20:54

1 Answer 1

2
\$\begingroup\$

Coin cells have ultra high series resistance - any loads greater than 10mA or even less will make them sag significantly. They are intended to power ultra-low power circuits like Real Time Clocks, watchdogs, battery monitoring, and keep volatile memory intact during power failures.

The AT tiny when running at significant clock speeds will be sapping up to or more than 10mA, plus the sensors and other circuitry will be causing havoc to your little coin cells. They will be sagging a lot during sampling periods, and may cause brownouts on your AT Tiny.

Get a better power source, add many more capacitors (low and high values to cover all bases), and use an oscilloscope on the VCC rail to see visibly how it sags, and then you will understand.

If you ran the AT Tiny at 32kHz or a few hundred kHz at most, it may work at a low enough power level to use the coin cells. It will just be slow.

\$\endgroup\$
4
  • \$\begingroup\$ The ADC is inoperable at so low a speed unfortunately. \$\endgroup\$ Apr 20, 2015 at 19:17
  • \$\begingroup\$ @IgnacioVazquez-Abrams perhaps the OP can use an external ultra-low-power accumulation style ADC instead, to interface with his AT Tiny if the onboard ADC is too high-power/clock requirement \$\endgroup\$
    – KyranF
    Apr 20, 2015 at 19:43
  • \$\begingroup\$ Okay so here's what I did. I used 3xcr2016 and regulated the output via a 7805 5v regulator. Works like a charm. And yes I'll not be keeping the circuit on forever. I'm using a watchdog timer to wake every 5 seconds to check the ambient temperature. \$\endgroup\$ Apr 22, 2015 at 3:41
  • \$\begingroup\$ @SiddharthShah interesting - I suggest you try 3 cells in parallel and use a boost regulator -this gives you 3 times less resistance and allows for more current - and the boost regulator should be about 80%+ efficient, meaning you can get better life span than using a 9V -> 5V linear converter circuit. \$\endgroup\$
    – KyranF
    Apr 22, 2015 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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