Pages: [1]   Go Down
Author Topic: Seperate IC to Count Pulse Input?  (Read 3222 times)
0 Members and 1 Guest are viewing this topic.
São Paulo/SP/Brazil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 305
Brazilian Arduino Team
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Original post:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230550957

Quote
Hi,

Is anyone aware of any IC's that can be used to count the pulse from a hall effect sensor and whose count can be read via serial/i2c?  I have found some IC's that provide a 4 bit digital output to represent its count, but i'm worried about losing input pins on the Arduino.

If you've used any in the past, it'd be great to hear of anything!

Cheers,
Scott.

I'm using a rain gauge and an anemometer(in two interrupts with a counter++ function). I want to count the pulses and I'll put my arduino to sleep. It'll wake up each three minutes to transfer the information using Ethernet.

The ethernet uses 150mA and is too much to be enabled 24x7. I have some solar panels and a 7500mAh battery and my station is using too much power. I want to save power and get some batteries and solar cells back.
Logged

0
Online Online
Shannon Member
****
Karma: 162
Posts: 10517
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't find such a chip when I last looked, so I've used a counter chip with parallel output and a shift-register to read its output...  Is there a reason you can't just use pin2 or pin3 with an interrupt routine?
Logged

[ I won't respond to messages, use the forum please ]

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8458
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is anyone aware of any IC's that can be used to count the pulse from a hall effect sensor and whose count can be read via serial/i2c?
Yep, an ATtiny85/84.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a good chip for this sort of thing in the 1-Wire range... well... there WAS one in the range. You can still buy modules from HobbyBoards.com, search for "counter", even though Dallas isn't making any more of the chips.

1-Wire to Arduino: Uses just one digital I/O line.
Logged

São Paulo/SP/Brazil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 305
Brazilian Arduino Team
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't find such a chip when I last looked, so I've used a counter chip with parallel output and a shift-register to read its output...  Is there a reason you can't just use pin2 or pin3 with an interrupt routine?

actually I'm doing this, the problem is to maintain my arduino on and it stays drawing power(the ethernet is consuming >200mA).

I made a research yesterday and comes to this solution you are saying:
1 x 74HC4020 (14-bit counter)
2 x 74HC165N (shift register)

I bought the ICs and are waiting for the tests. I'll put my arduino to sleep, it'll wake-up from a 555 monostable and then I'll have to get the counter, reset it, send using ethernet and sleeping again. My main concern is to get the counter and reset. Do you have any code getting to get the counter?
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote from: Graynomad
Yep, an ATtiny85/84.
They will use more power than a counter chip, but this idea is good for a lot of "is there a chip than co do ..." cases where as a hobbyist you may have a go at creating it yourself.

No one mentioned the more obvious solution however, that all of the three AtMega timers can be configured to work as pulse counters.
Logged

São Paulo/SP/Brazil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 305
Brazilian Arduino Team
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No one mentioned the more obvious solution however, that all of the three AtMega timers can be configured to work as pulse counters.

I know, but I can't maintain my arduino on. So I need a "offline" solution to count for me. Even if I put an attiny85 to do this and transfer using some USART or I2C between arduino/chip.

The DS2423 is a good way to go. But the chip is SMD I'll need a breakout board to it because $25.00 for the complete board on hobbyboards is VERY expensive.
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know, but I can't maintain my arduino on. So I need a "offline" solution to count for me.
When using sleep mode idle, counters will still operate and you can disable unused peripherals for further power reduction. Wakeup source could include timer overflow (from the timer that counts external pulses). When using an external counter IC, you will probably need to wake up more frequently (worst case wind condition) in order not to overflow the external counter. Using the internal counter (8-bit for timer2 or 16-bit for timer1) you would only wake up if and when needed. Power usage in sleep mode idle is about 2.5mA so this would be the target to beat when considering external counters (you could probably avoid the 555 timer as well using sleep mode idle).

Timer2 can be configured for asynchronous operation and this would allow operation during additional sleep modes, but unfortunately is not compatible with the Arduino design (AtMega must run on internal oscillator in this mode) with the asynchronous clock connected to PB6 (Atmega328 pin 9).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Might try a 74590 with a PCF8574. Count on the 74590 and read I2C from the PCF8574 chip. Thinking of doing this myself as I want all my weather sensors to be I2C. smiley
Logged

Pages: [1]   Go Up
Jump to: