Using Timer instead of RTC chip

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello friends,
I have started work on pulse detector. The idea is very simple.

I need to detect pulse (whenever it occurs) from hall effect sensor and count it.
Then transmit the pulse count along with time(hr:min:sec) & date(mm:dd:yy) information. This data transmission will happen once in a month.

I would like to operate this system on battery (3.6v).
I have to use spi protocol for wireless module interface & may be TWI for RTC interfacing.

The battery should last at least for 5 years.

my doubts are:
1) Will Pico Power Avr serve my purpose ? Which one I should use out of the available list?

3)Should I use external crystal or Internal Rc Osc?
4)Which sleep mode will suit my application?
5) Any other suggestions to make system low power & more reliable.

Thanks in advance !!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am a bit confused what you are asking.

Based on the topic, you ask if it is possible to use timer instead of RTC chip for timekeeping. Yes, it is possible, but you need a crystal because RC oscillators are way too inaccurate.

But if you use a separate RTC chip which itself requires a 32768Hz watch crystal, then you can use the AVR with an internal RC oscillator if you don't do anything that requires precise clock. A rule of thumb is that RC oscillators are 5-10% accurate only.

You can use what ever sleep mode you wish, the external RTC could wake the AVR every now and then with some alarm interrupt. If the pulses don't happen very often, the hall sensor can wake the AVR with external interrupt. If they happen often, then you might have to use less deep sleep modes or count the pulses with timer module or something.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

vijay.naikwade wrote:

I would like to operate this system on battery (3.6v).
I have to use spi protocol for wireless module interface & may be TWI for RTC interfacing.

The battery should last at least for 5 years.

Then at first get the battery capacity, divide it by 5 years and you have the maximum average current, which you can consume.

Before this, all guessing was futile.

Only after it you can decide, which solution may work for you.

Peter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I need to detect pulse (whenever it occurs) from hall effect sensor and count it.

Aaah, there is the first situation. In our production absolute encoders we do indeed use Hall effect for the pulses--but only when not on battery power. The continuous current of a Hall device, even though in the uA, is too high for a small battery and long life. When on battery, we use reed relays instead. Now, if you can put a large battery... But the first step is still to calculate your average current draw budget.

Quote:

I have to use spi protocol for wireless module interface & may be TWI for RTC interfacing.


Now, THAT is strange--why do you "have" to use SPI for the wireless? Have you already picked the module? (Most that I am familiar with use a UART interface.) You could still use an SPI RTC.

If you are going to be battery-powered anyway, you >>could<< do the RTC in the AVR.

Using the internal oscillator is probably better for this app, as a crystal will take a long time (several milliseconds) to wake from deep sleep mode. That would still be OK if the pulses are spaced widely--more than a few milliseconds apart.

I would start with the Mega48 family--P chip, hardware SPI and TWI and USART, lots of power saving features, inexpensive, several "big brothers" in the family.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could pick an AVR which has RTC crystal pins for timekeeping and still use the internal RC oscillator instead of a crystal for the core operation.

This would save you the RTC maybe.

- Jani