Pages: [1]   Go Down
Author Topic: 1-Wire remote counters  (Read 1276 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm looking for a 1-wire counter but all I could find is info on the DS2423 which is now discontinued.

Is there any suitable replacement?  If not is it possible with a 12bit ripple counter like the 4040 then some sort of 1-wire parallel input sensor?

Tom
Logged

0
Offline Offline
Shannon Member
****
Karma: 199
Posts: 11649
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've used a SN74LV8154 plus a 74HC299 shift register.  You need several other signals to clock the counter and the shift register though, but the counter is really 2 16-bit counters that can be daisy-chained to make one 32 bit counter if you want.  Rather complex compared to a one chip one wire solution!
Logged

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

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

Thanks for the reply.

8 bit would be fine as I would be reading the value a few times a second.

Could I use the CD4021B as documented in:
http://www.arduino.cc/en/Tutorial/ShiftIn
Simply daisy-chaining them together and setting on the master Arduino how many 'nodes' it expects to read?

If this is possible, whats the realistic length of the chain?  I would expect about 12 'nodes' along a cable around 10 metres probably using cat5 cable.

Tom
Logged

0
Offline Offline
Shannon Member
****
Karma: 199
Posts: 11649
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you afford to miss a count? - the SN74LV8154 has special logic to avoid missing counts - while you read the outputs they hold a snapshot of the true counter which continues to run in the background.  For multiple channels each SN74LV8154 can be 2 separate 16 bit counters, you could parallel up all of them and use the shift register chain to read all the bytes in 4 stages (it has 4 output selects).

Read the datasheet about that protocol.

What you don't do is reset the counters - that will lose counts, you take successive readings from each counter and subtract the previous reading to get the new count.
Logged

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

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

Missing a count wouldn't be too bad.  This is to attach to fluid flow meters.  The meters output approximately 1000 pulses per litre and the flow rate would be anticipated at no more than about 200ml per second.

I was hoping to keep it simple and bare minimum.  I currently have a prototype where by each flow meter is attached to the digital pins of an arduino however this is restricted to 8 as thats the only spare pins I have.  My thought was for a bus style array of sensors which are daisy chained and can be expanded.

I have attached a rough schematic of what I thought would be suitable from reading the datasheets.  I'm still concerned on the length of cable between these?

Tom


* Node - 1-0_schem.jpg (775.18 KB, 4185x2547 - viewed 105 times.)
Logged

Pages: [1]   Go Up
Jump to: