Serial Binary Counter and Shift Registers

Started by David Sousa Mendes April 25, 2005
Hello
I'm working with an anemometer which sends pulses every time it makes a complete tour.
I was thinkin about using the CountTransitions function... The thing is I will have to count transistions during 5 seconds or so and meanwhile, my program would be stopped as well as the RTC
As a solution, I'm trying to bring back some of the digital lectures I had during University ir order to use, flip-flop binary counter and parallel to serial procedures ir order to receive the number of transistions without having to halt my program...
Did somone implementt such a circuitry? Any schematics availlable?
Cheers
David

----- Original Message -----
From: Mike Perks
To: basicx@basi...
Sent: Sunday, April 24, 2005 4:12 PM
Subject: Re: [BasicX] Re: Announcing "BasicX Internals - Part 6" Article w7mjr wrote:

>
> --- In basicx@basi..., Mike Perks <basicx@a...> wrote:
> > Also its not clear to me the benefit of aligning with a .NET
> > embedded framework.
> >
>
> Oh, I was thinking about potential benefits of reusability,
> portability, and familiarity.

Good benefits but I think most of these embedded Operating Systems (name
your flavor) are too big for the smaller AVRs that are being used for
BasicX. Even if a RAMTastic chip comes out based on a ATMega32 that is
still probably too small as these OS need gobs of RAM. On the other hand
I haven't researched this much so I may be wrong.

>
> > In terms of minimal changes, more memory is good and also
> > fixing some of the glaring defects we found during our
> investigations
> > would help.
>
> Are these defects summarized in your documentation or treated case-by-
> case as they arise?

They are not summarized in one place. I am thinking of putting them
together in one place and sending them to NetMedia. I also would like to
see fixed some of the performance improvements that are documented in
part 4.

Mike
http://home.austin.rr.com/perks/basicx/Articles/ ------
Yahoo! Groups Links

a.. To




--- In basicx@basi..., "David Sousa Mendes"
<davidsousamendes@h...> wrote:
> Hello
> I'm working with an anemometer which sends pulses every time it
makes a complete tour.
> I was thinkin about using the CountTransitions function... The thing
is I will have to count transistions during 5 seconds or so and
meanwhile, my program would be stopped as well as the RTC
> As a solution, I'm trying to bring back some of the digital lectures
I had during University ir order to use, flip-flop binary counter and
parallel to serial procedures ir order to receive the number of
transistions without having to halt my program...
> Did somone implementt such a circuitry? Any schematics availlable?
> Cheers
> David

You might consider a outboard PICAXE-08M or PICAXE-18X.

The BX24 can initiate a measurment to the PICAXE, the PICAXE counts
over a period of time. BX24 later commands the PICAXE to send the
result. The PICAXE to BX24 might be serial or perhaps easier as
higher speed pulses.

See http://www.phanderson.com/picaxe/picaxe.html

There is also a discussion of a counting type RH measurement at;

http://www.phanderson.com/picaxe/rh_count.html

PHA



I built a weather station a couple of years ago using the fascinating
electronics anenometer. I used a single BX-24 to read the weather
sensors, including the annenometer, respond to panel inputs,
drive a serial LCD, and respond to commands on the serial port.
The annenometer presented the biggest challenge to the response time
of the remaining functions. I addressed the problem by employing two
methods of determining wind speed. The first was to read an
off-board
counter periodically to compute a weighted moving average speed. For
this method I connected the output of the pulse debounce logic to a
74HC590 (8-bit binary counter) which was connected to a 74HC165
(8-bit
parallel in serial out shift register). The BX-24 periodically reads
the counter and updates a software counter. An 8-bit counter is big
enough so that even reading the count every second supports wind
speeds
in excess of 100mph. The second method uses the RCTIME function to
time the interval between pulses. Because the BX-24 is heads down
durning RCTIME, I didn't want to use this method unless the interval
was short enough. So the software only uses the RCTIME techique when
the average speed exceeds some threshold.



cfrancois, I designed a weather station based on an older PIC 40-pin
processor around 12 years ago. I was using recycled Heathkit wind
sensors. I checked calibration data with the anemometer mounted on my
truck. It was a simple matter of getting an interrupt every second
and doing the math. For temperature, I used six LM34s mounted around
my house that provided temperature zones in case of a fire, HVAC
control, and outdoor readings. For Humidity and Dewpoint, I used a
couple of Honeywell HyCal sensors for indoor and outdoor. I used an
external 8-channel 12-Bit A/D (MAX186) with an SPI Bus. For rain, I
used a Davis Instruments Tipping Bucket gauge.

There are published weather sensor standards and update periods. In
my case, I updated the wind sensors every second. Other sensors were
updated every minute.

I think you should be able to easily do that with a BX-24. Warning,
I'm thinking off the 'top of my hat' ;-)... I would read the
anemometer every second as a separate task and do the calibration
math. I'm not sure what you use for wind direction, but that should
be easy. Other sensors only needed to up updated once a minute or an
hour.

The hardest thing about this is designing the wind sensors with the
rain gauge being a little easier. You mentioned Facinatiing
Electronics. Other sources, if you can convince them to sell you the
sensors, are Davis Instruments and Oregon Scientific. I wish Dallis
Semi still had their kit with sensors for sale...

- Tom

--- In basicx@basi..., "cfrancois_55116" <cfrancois@f...>
wrote:
> I built a weather station a couple of years ago using the
fascinating
> electronics anenometer. I used a single BX-24 to read the weather
> sensors, including the annenometer, respond to panel inputs,
> drive a serial LCD, and respond to commands on the serial port.
> The annenometer presented the biggest challenge to the response time
> of the remaining functions. I addressed the problem by employing
two
> methods of determining wind speed. The first was to read an
> off-board
> counter periodically to compute a weighted moving average speed.
For
> this method I connected the output of the pulse debounce logic to a
> 74HC590 (8-bit binary counter) which was connected to a 74HC165
> (8-bit
> parallel in serial out shift register). The BX-24 periodically
reads
> the counter and updates a software counter. An 8-bit counter is big
> enough so that even reading the count every second supports wind
> speeds
> in excess of 100mph. The second method uses the RCTIME function to
> time the interval between pulses. Because the BX-24 is heads down
> durning RCTIME, I didn't want to use this method unless the
interval
> was short enough. So the software only uses the RCTIME techique
when
> the average speed exceeds some threshold.



> ... I wish Dallis Semi still had their kit with sensors for sale...

http://www.maxim-ic.com/products/ibutton/weather/ Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


Tom thanks. It was my understanding that they no longer sell the kit.
They just post the reference design.

- Tom --- In basicx@basi..., "Tom Becker" <gtbecker@r...> wrote:
> > ... I wish Dallis Semi still had their kit with sensors for
sale...
>
> http://www.maxim-ic.com/products/ibutton/weather/ > Tom >
> Tom Becker
> --... ...--
> GTBecker@R... www.RighTime.com
> The RighTime Clock Company, Inc., Cape Coral, Florida USA
> +1239 540 5700