Controlling an awning, wind sensor problems
Archiver
Posts: 46,084
Thanks, Dave.
I also think it's interesting, but I have not had much response until now.
For reading the wind sensor I will try "pulsin", measuring the lenght of
the time the sensor is closed (180 degrees of each turn).
But the calibration problem with this type of sensor is hard. I am
considering driving a car at a known speed, with the sensor out of the
window and measuring the pulse at different speeds. Rather complicated and
a 2 men job at least!. I shouls also have to write Ad hoc code just to
measure the pulse values and use a laptop or something to store them. Quite
a mess!
Any ideas on how to relate the turns per minute (or pulse lenght) to actual
wind speed? Or a more friendly sensor?
"Pulsin" has an interesting feature: it will return a zero value for any
infinite lenght of pulse, which is good as the sensor can stop at any place
when there is no wind (closed or open).
But I still do not see how to put it in a loop to count for 10 minutes
while the BS still scans the other variables, such as "sun is on or off",
and the manual switches. I cannot use "wait" for this reason. I will have
to go back to my forgotten basic if I do not get some help from more
experienced users.
Any ideas?
Regards,
Jose Luis
At 15:03 01/10/2001 +0000, you wrote:
>Hi Jose,
>
>thanks for letting me know what 'store' meant.
>
>Your project sounds interesting and it seems like
>you have a good direction.
>
>I trust there are some people on here who can offer the
>best way to take a pulse input from your wind speed
>sensor and turn it into a numerical value based on time.
>
>I was thinking of just polling the port and seeing if
>it had not been hi for 10 minutes, or if it has been
>only high for 1 minute.
>
>On suggestion I do have for your relays is to use
>a DPDT and put the 'up' on the NC of one and the NO
>of the other, and putting the 'down' on the NO of
>the first and the NC of the second. That way, if
>one is powered, it will break the circuit to the other
>thus preventing power to both sides simultaneously.
>
>Dave
>
>
>--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...> wrote:
> > Hi Dave:
> >
> > "Store" is just my bad english. It refers (using the wrong word
>from
> > French) to an awning. Sorry about that
> >
> > My awning is slow and heavy to move and I should avoid having it
>going up
> > and down too often as it would strain the motor.
> >
> > However, if the wind is blowing too hard for a shoort period (say 1
>minute)
> > and the awning is "down", it should react "quickly" (after a
>minute) and go
> > up to protect itself.
> >
> > Once it has gone up because of strong wind, the system should check
>the
> > wind speed for a much longer period (say 10 minutes).
> >
> > Only if the wind has been remained continuously under the speed
>limit
> > during the 10 minutes period, it should go "down" again. (and this
> > provided the sun is still shinning).
> >
> > As for the wind sensor, I already have a rotary type (kind of
>simple
> > anemometer) that turns with a speed proportional to the wind's
>speed. In
> > each turn, it opens and closes once an interla contact. I could
>use this
> > sensor, although it doesn't seem easy to interface with te stamp (I
>could
> > use the "pulse" command and compute the time the contact is closed
>in
> > milliseconds). I would still have a calibration problem. I will
>chech Tracy
> > Allen's reference you have given.
> >
> > The Light dependent resistor is an extremely cheap device I know
>well; it
> > could be used easily in this project as it requires no additional
>circuitry
> > (just the "pot" command to measure the resistance ---> light level
>(sun or
> > no sun).
> >
> > The application with 2 LEDS you mention is a very smart and
>inexpensive
> > solution to have this solar panel "follow" the sun, therefore
>increasing
> > the number of insolation hours. But I need something simpler, just
>to tell
> > the BS whether the sun is shinning or not (i.e it is night or the
>sky is
> > cloudy)
> >
> > The awning has a single motor that is powered by 300 V DC!!!.
>According to
> > the polarity applied, it turns in one direction or the other. This
>is an
> > old design, more recent motors use AC, though still at 230V level.
>The
> > problem is that it is no longer possible to obtain commercial
>systems to
> > automatically control an awmning with this old DC motor.
> >
> > Replacing the motor would be a solution but it is very is very
>complicated
> > and expensive.
> >
> > I can manage to invert the polarity of a DC 300V voltage and have 3
>states:
> > (+300V; -300V an 0V), using 2 electromechanical relays 1PDT. Full
> > electronic solutions, such as a MOSFET H bridge could also work,
>but
> > probably at a higher cost and complication. In any case, ideas and
> > experiences are warmly welcome.
> >
> > Now, that's why I have decided to build my own controller using a
>BS1.
> >
> > But I have never programmed a BS (or any other Microcontroller, by
>the
> > way). It doesn't seem too difficult, as I can read/write Basic and
>Pbasic
> > iseems to be mainly a subset.
> >
> > However I still cannot figure for example, how have the BS check
>for wind
> > speed to be low for 10 minutes, without using "wait" or "sleep", as
>it must
> > continue checking the wind speed during that long period.
> >
> > I am also discouraged by the limitation of the EEPROM capacity to
>store so
> > few lines of code.
> >
> > If any of you that have read this mail has the experience on how to
>deal
> > with this kind of control aand could help with ideas or examles (or
> > references) of code, please let me know.
> >
> > Regards,
> >
> > Jose Luis
> >
> > At 03:10 29/09/2001 +0000, you wrote:
> > >Hi Jose,
> > >
> > >I have a few questions. First, does 'store' have a speical
>meaning?
> > >(showing my ignorance and/or confusion)
> > >
> > >you mentioned the shade going up 'rather quickly' but your control
> > >is only one rely for up and another for down. This would indicate
> > >one speed for up and another (or the same) for down.
> > >
> > >if you wanted 2 (or more speeds) in either direction, you may
> > >need additional contacts. I would not recomend electro-mechanical
>relays
> > >for any pulse operation.
> > >
> > >As far as a wind speed sensor, check Tracy Allen's site for an
> > >anemometer. He has a good description and workable design.
> > >
> > >I'm not sure the best light detector or what levels of light you
>want
> > >to sense, but I ran across a solar collector that uses a simple LED
> > >to detect light. it was basically a pair of LEDs that ran into a
> > >comparator, which ever had a higher output, the comparator switched
> > >the motor to swing the collector so the outputs matched, thus the
> > >direction pointed to the sun. This may not the the most applicable
> > >circuit, but I was intrigued with the idea.
> > >
> > >Dave
> > >
> > >
> > >
> > >
> > >--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...>
>wrote:
> > > > Hi!
> > > >
> > > > Has anybody ever tried controlling automatically a store (or
>sun shade)
> > > > using a BS1?
> > > >
> > > > I am considering having 6 inputs:
> > > >
> > > > - sun is on or off (thru a Light dependent resistor)
> > > > - an adjustable reference resistor for the LDR
> > > > - Wind speed is under or over a limit (typically using rotary
>wind sensor
> > > > that open/closes a contact on each sensor turn) or any other
>wind sensor
> > > > you may know of. If over, the stor should go "up" rather
>quickly....
> > > > - an adjustable resistor to set the maximum wind speed
> > > > - Manual up
> > > > - Manual down
> > > >
> > > > The stor motors usually require 2 different relay contacts to
>close:
> > > > - Motor up
> > > > - Motor down
> > > > - No movement (both relays open)
> > > >
> > > >
> > > > Could anybody provide some help on the code or the logic flow
>diagram?
> > > >
> > > > Thanks in advance,
> > >
> > >
> > >
> > >To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@y...
> > >from the same email address that you subscribed. Text in the
>Subject and
> > >Body of the message will be ignored.
> > >
> > >
> > >Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
[noparse][[/noparse]Non-text portions of this message have been removed]
I also think it's interesting, but I have not had much response until now.
For reading the wind sensor I will try "pulsin", measuring the lenght of
the time the sensor is closed (180 degrees of each turn).
But the calibration problem with this type of sensor is hard. I am
considering driving a car at a known speed, with the sensor out of the
window and measuring the pulse at different speeds. Rather complicated and
a 2 men job at least!. I shouls also have to write Ad hoc code just to
measure the pulse values and use a laptop or something to store them. Quite
a mess!
Any ideas on how to relate the turns per minute (or pulse lenght) to actual
wind speed? Or a more friendly sensor?
"Pulsin" has an interesting feature: it will return a zero value for any
infinite lenght of pulse, which is good as the sensor can stop at any place
when there is no wind (closed or open).
But I still do not see how to put it in a loop to count for 10 minutes
while the BS still scans the other variables, such as "sun is on or off",
and the manual switches. I cannot use "wait" for this reason. I will have
to go back to my forgotten basic if I do not get some help from more
experienced users.
Any ideas?
Regards,
Jose Luis
At 15:03 01/10/2001 +0000, you wrote:
>Hi Jose,
>
>thanks for letting me know what 'store' meant.
>
>Your project sounds interesting and it seems like
>you have a good direction.
>
>I trust there are some people on here who can offer the
>best way to take a pulse input from your wind speed
>sensor and turn it into a numerical value based on time.
>
>I was thinking of just polling the port and seeing if
>it had not been hi for 10 minutes, or if it has been
>only high for 1 minute.
>
>On suggestion I do have for your relays is to use
>a DPDT and put the 'up' on the NC of one and the NO
>of the other, and putting the 'down' on the NO of
>the first and the NC of the second. That way, if
>one is powered, it will break the circuit to the other
>thus preventing power to both sides simultaneously.
>
>Dave
>
>
>--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...> wrote:
> > Hi Dave:
> >
> > "Store" is just my bad english. It refers (using the wrong word
>from
> > French) to an awning. Sorry about that
> >
> > My awning is slow and heavy to move and I should avoid having it
>going up
> > and down too often as it would strain the motor.
> >
> > However, if the wind is blowing too hard for a shoort period (say 1
>minute)
> > and the awning is "down", it should react "quickly" (after a
>minute) and go
> > up to protect itself.
> >
> > Once it has gone up because of strong wind, the system should check
>the
> > wind speed for a much longer period (say 10 minutes).
> >
> > Only if the wind has been remained continuously under the speed
>limit
> > during the 10 minutes period, it should go "down" again. (and this
> > provided the sun is still shinning).
> >
> > As for the wind sensor, I already have a rotary type (kind of
>simple
> > anemometer) that turns with a speed proportional to the wind's
>speed. In
> > each turn, it opens and closes once an interla contact. I could
>use this
> > sensor, although it doesn't seem easy to interface with te stamp (I
>could
> > use the "pulse" command and compute the time the contact is closed
>in
> > milliseconds). I would still have a calibration problem. I will
>chech Tracy
> > Allen's reference you have given.
> >
> > The Light dependent resistor is an extremely cheap device I know
>well; it
> > could be used easily in this project as it requires no additional
>circuitry
> > (just the "pot" command to measure the resistance ---> light level
>(sun or
> > no sun).
> >
> > The application with 2 LEDS you mention is a very smart and
>inexpensive
> > solution to have this solar panel "follow" the sun, therefore
>increasing
> > the number of insolation hours. But I need something simpler, just
>to tell
> > the BS whether the sun is shinning or not (i.e it is night or the
>sky is
> > cloudy)
> >
> > The awning has a single motor that is powered by 300 V DC!!!.
>According to
> > the polarity applied, it turns in one direction or the other. This
>is an
> > old design, more recent motors use AC, though still at 230V level.
>The
> > problem is that it is no longer possible to obtain commercial
>systems to
> > automatically control an awmning with this old DC motor.
> >
> > Replacing the motor would be a solution but it is very is very
>complicated
> > and expensive.
> >
> > I can manage to invert the polarity of a DC 300V voltage and have 3
>states:
> > (+300V; -300V an 0V), using 2 electromechanical relays 1PDT. Full
> > electronic solutions, such as a MOSFET H bridge could also work,
>but
> > probably at a higher cost and complication. In any case, ideas and
> > experiences are warmly welcome.
> >
> > Now, that's why I have decided to build my own controller using a
>BS1.
> >
> > But I have never programmed a BS (or any other Microcontroller, by
>the
> > way). It doesn't seem too difficult, as I can read/write Basic and
>Pbasic
> > iseems to be mainly a subset.
> >
> > However I still cannot figure for example, how have the BS check
>for wind
> > speed to be low for 10 minutes, without using "wait" or "sleep", as
>it must
> > continue checking the wind speed during that long period.
> >
> > I am also discouraged by the limitation of the EEPROM capacity to
>store so
> > few lines of code.
> >
> > If any of you that have read this mail has the experience on how to
>deal
> > with this kind of control aand could help with ideas or examles (or
> > references) of code, please let me know.
> >
> > Regards,
> >
> > Jose Luis
> >
> > At 03:10 29/09/2001 +0000, you wrote:
> > >Hi Jose,
> > >
> > >I have a few questions. First, does 'store' have a speical
>meaning?
> > >(showing my ignorance and/or confusion)
> > >
> > >you mentioned the shade going up 'rather quickly' but your control
> > >is only one rely for up and another for down. This would indicate
> > >one speed for up and another (or the same) for down.
> > >
> > >if you wanted 2 (or more speeds) in either direction, you may
> > >need additional contacts. I would not recomend electro-mechanical
>relays
> > >for any pulse operation.
> > >
> > >As far as a wind speed sensor, check Tracy Allen's site for an
> > >anemometer. He has a good description and workable design.
> > >
> > >I'm not sure the best light detector or what levels of light you
>want
> > >to sense, but I ran across a solar collector that uses a simple LED
> > >to detect light. it was basically a pair of LEDs that ran into a
> > >comparator, which ever had a higher output, the comparator switched
> > >the motor to swing the collector so the outputs matched, thus the
> > >direction pointed to the sun. This may not the the most applicable
> > >circuit, but I was intrigued with the idea.
> > >
> > >Dave
> > >
> > >
> > >
> > >
> > >--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...>
>wrote:
> > > > Hi!
> > > >
> > > > Has anybody ever tried controlling automatically a store (or
>sun shade)
> > > > using a BS1?
> > > >
> > > > I am considering having 6 inputs:
> > > >
> > > > - sun is on or off (thru a Light dependent resistor)
> > > > - an adjustable reference resistor for the LDR
> > > > - Wind speed is under or over a limit (typically using rotary
>wind sensor
> > > > that open/closes a contact on each sensor turn) or any other
>wind sensor
> > > > you may know of. If over, the stor should go "up" rather
>quickly....
> > > > - an adjustable resistor to set the maximum wind speed
> > > > - Manual up
> > > > - Manual down
> > > >
> > > > The stor motors usually require 2 different relay contacts to
>close:
> > > > - Motor up
> > > > - Motor down
> > > > - No movement (both relays open)
> > > >
> > > >
> > > > Could anybody provide some help on the code or the logic flow
>diagram?
> > > >
> > > > Thanks in advance,
> > >
> > >
> > >
> > >To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@y...
> > >from the same email address that you subscribed. Text in the
>Subject and
> > >Body of the message will be ignored.
> > >
> > >
> > >Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
I think you can get at least some results in two ways.
First, if you put up your sensor and just let it run, you can
then just watch for the gusts you feel are too strong and record the
time. Maybe if you sat on your proch with a nice drink and a bag of
chips, you can tell people you ar hard at work calibrating you unit.
as far as timing is concerned, you can run a few loops. one to count
to 100 (or whatever you count per minute) and another that will total
the number of times the speed was over your trip point. another
would watch the second and count it ten time for your ten minute
timer.
a = a + 1
if a > 100 then a=0
this will allow you count to 100 and then reset
the second would be to count times speed is over your trip point.
if your pulse is high (indicating your speed it over trip point)
then (b=b+1)
if b > 10 then roll up awning.
if a > 100 then b=0 to reset every minute.
if a = 99 then c=c+1
if c>10 then c=0
this will offer you a 10 minute timer.
if a=99 then d=b
this will keep a running total in d of the number of times b is over
your trip level.
e=d/c to average d by the number of times a has passed 99
Jose, this is not at all elegant and will only count to one
minute then reset and count to 10 minutes and reset, so it will
only work every minute. since you didn't care how often the shade
was put down, at least you did not think it was as critical as
going up fast, the 10 minute timer could take 19 minutes
to let the awning go down.
You could do a running average (see Tracey's math page) to keep
the level of the average wind speed. This would allow you to have a
pre-set level runnning all the time.
Since this was just a quick response, the programming is not
in pbasic, but you should be able to figure out what it is trying to
do.
And as Rodent most eloquently stated, there will probably one of the
list wizzards to point out where I made my mistake(s) and put you on
a simpler path.
Dave
--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...> wrote:
> Thanks, Dave.
>
> I also think it's interesting, but I have not had much response
until now.
>
> For reading the wind sensor I will try "pulsin", measuring the
lenght of
> the time the sensor is closed (180 degrees of each turn).
>
> But the calibration problem with this type of sensor is hard. I am
> considering driving a car at a known speed, with the sensor out of
the
> window and measuring the pulse at different speeds. Rather
complicated and
> a 2 men job at least!. I shouls also have to write Ad hoc code just
to
> measure the pulse values and use a laptop or something to store
them. Quite
> a mess!
>
> Any ideas on how to relate the turns per minute (or pulse lenght)
to actual
> wind speed? Or a more friendly sensor?
>
> "Pulsin" has an interesting feature: it will return a zero value
for any
> infinite lenght of pulse, which is good as the sensor can stop at
any place
> when there is no wind (closed or open).
>
> But I still do not see how to put it in a loop to count for 10
minutes
> while the BS still scans the other variables, such as "sun is on
or off",
> and the manual switches. I cannot use "wait" for this reason. I
will have
> to go back to my forgotten basic if I do not get some help from
more
> experienced users.
>
> Any ideas?
>
> Regards,
>
> Jose Luis
>
> At 15:03 01/10/2001 +0000, you wrote:
> >Hi Jose,
> >
> >thanks for letting me know what 'store' meant.
> >
> >Your project sounds interesting and it seems like
> >you have a good direction.
> >
> >I trust there are some people on here who can offer the
> >best way to take a pulse input from your wind speed
> >sensor and turn it into a numerical value based on time.
> >
> >I was thinking of just polling the port and seeing if
> >it had not been hi for 10 minutes, or if it has been
> >only high for 1 minute.
> >
> >On suggestion I do have for your relays is to use
> >a DPDT and put the 'up' on the NC of one and the NO
> >of the other, and putting the 'down' on the NO of
> >the first and the NC of the second. That way, if
> >one is powered, it will break the circuit to the other
> >thus preventing power to both sides simultaneously.
> >
> >Dave
> >
> >
> >--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...>
wrote:
> > > Hi Dave:
> > >
> > > "Store" is just my bad english. It refers (using the wrong word
> >from
> > > French) to an awning. Sorry about that
> > >
> > > My awning is slow and heavy to move and I should avoid having it
> >going up
> > > and down too often as it would strain the motor.
> > >
> > > However, if the wind is blowing too hard for a shoort period
(say 1
> >minute)
> > > and the awning is "down", it should react "quickly" (after a
> >minute) and go
> > > up to protect itself.
> > >
> > > Once it has gone up because of strong wind, the system should
check
> >the
> > > wind speed for a much longer period (say 10 minutes).
> > >
> > > Only if the wind has been remained continuously under the speed
> >limit
> > > during the 10 minutes period, it should go "down" again. (and
this
> > > provided the sun is still shinning).
> > >
> > > As for the wind sensor, I already have a rotary type (kind of
> >simple
> > > anemometer) that turns with a speed proportional to the wind's
> >speed. In
> > > each turn, it opens and closes once an interla contact. I could
> >use this
> > > sensor, although it doesn't seem easy to interface with te
stamp (I
> >could
> > > use the "pulse" command and compute the time the contact is
closed
> >in
> > > milliseconds). I would still have a calibration problem. I will
> >chech Tracy
> > > Allen's reference you have given.
> > >
> > > The Light dependent resistor is an extremely cheap device I know
> >well; it
> > > could be used easily in this project as it requires no
additional
> >circuitry
> > > (just the "pot" command to measure the resistance ---> light
level
> >(sun or
> > > no sun).
> > >
> > > The application with 2 LEDS you mention is a very smart and
> >inexpensive
> > > solution to have this solar panel "follow" the sun, therefore
> >increasing
> > > the number of insolation hours. But I need something simpler,
just
> >to tell
> > > the BS whether the sun is shinning or not (i.e it is night or
the
> >sky is
> > > cloudy)
> > >
> > > The awning has a single motor that is powered by 300 V DC!!!.
> >According to
> > > the polarity applied, it turns in one direction or the other.
This
> >is an
> > > old design, more recent motors use AC, though still at 230V
level.
> >The
> > > problem is that it is no longer possible to obtain commercial
> >systems to
> > > automatically control an awmning with this old DC motor.
> > >
> > > Replacing the motor would be a solution but it is very is very
> >complicated
> > > and expensive.
> > >
> > > I can manage to invert the polarity of a DC 300V voltage and
have 3
> >states:
> > > (+300V; -300V an 0V), using 2 electromechanical relays 1PDT.
Full
> > > electronic solutions, such as a MOSFET H bridge could also work,
> >but
> > > probably at a higher cost and complication. In any case, ideas
and
> > > experiences are warmly welcome.
> > >
> > > Now, that's why I have decided to build my own controller using
a
> >BS1.
> > >
> > > But I have never programmed a BS (or any other Microcontroller,
by
> >the
> > > way). It doesn't seem too difficult, as I can read/write Basic
and
> >Pbasic
> > > iseems to be mainly a subset.
> > >
> > > However I still cannot figure for example, how have the BS check
> >for wind
> > > speed to be low for 10 minutes, without using "wait"
or "sleep", as
> >it must
> > > continue checking the wind speed during that long period.
> > >
> > > I am also discouraged by the limitation of the EEPROM capacity
to
> >store so
> > > few lines of code.
> > >
> > > If any of you that have read this mail has the experience on
how to
> >deal
> > > with this kind of control aand could help with ideas or examles
(or
> > > references) of code, please let me know.
> > >
> > > Regards,
> > >
> > > Jose Luis
> > >
> > > At 03:10 29/09/2001 +0000, you wrote:
> > > >Hi Jose,
> > > >
> > > >I have a few questions. First, does 'store' have a speical
> >meaning?
> > > >(showing my ignorance and/or confusion)
> > > >
> > > >you mentioned the shade going up 'rather quickly' but your
control
> > > >is only one rely for up and another for down. This would
indicate
> > > >one speed for up and another (or the same) for down.
> > > >
> > > >if you wanted 2 (or more speeds) in either direction, you may
> > > >need additional contacts. I would not recomend electro-
mechanical
> >relays
> > > >for any pulse operation.
> > > >
> > > >As far as a wind speed sensor, check Tracy Allen's site for an
> > > >anemometer. He has a good description and workable design.
> > > >
> > > >I'm not sure the best light detector or what levels of light
you
> >want
> > > >to sense, but I ran across a solar collector that uses a
simple LED
> > > >to detect light. it was basically a pair of LEDs that ran
into a
> > > >comparator, which ever had a higher output, the comparator
switched
> > > >the motor to swing the collector so the outputs matched, thus
the
> > > >direction pointed to the sun. This may not the the most
applicable
> > > >circuit, but I was intrigued with the idea.
> > > >
> > > >Dave
> > > >
> > > >
> > > >
> > > >
> > > >--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...>
> >wrote:
> > > > > Hi!
> > > > >
> > > > > Has anybody ever tried controlling automatically a store (or
> >sun shade)
> > > > > using a BS1?
> > > > >
> > > > > I am considering having 6 inputs:
> > > > >
> > > > > - sun is on or off (thru a Light dependent resistor)
> > > > > - an adjustable reference resistor for the LDR
> > > > > - Wind speed is under or over a limit (typically using
rotary
> >wind sensor
> > > > > that open/closes a contact on each sensor turn) or any other
> >wind sensor
> > > > > you may know of. If over, the stor should go "up" rather
> >quickly....
> > > > > - an adjustable resistor to set the maximum wind speed
> > > > > - Manual up
> > > > > - Manual down
> > > > >
> > > > > The stor motors usually require 2 different relay contacts
to
> >close:
> > > > > - Motor up
> > > > > - Motor down
> > > > > - No movement (both relays open)
> > > > >
> > > > >
> > > > > Could anybody provide some help on the code or the logic
flow
> >diagram?
> > > > >
> > > > > Thanks in advance,
> > > >
> > > >
> > > >
> > > >To UNSUBSCRIBE, just send mail to:
> > > > basicstamps-unsubscribe@y...
> > > >from the same email address that you subscribed. Text in the
> >Subject and
> > > >Body of the message will be ignored.
> > > >
> > > >
> > > >Your use of Yahoo! Groups is subject to
> >http://docs.yahoo.com/info/terms/
> >
> >
> >To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@y...
> >from the same email address that you subscribed. Text in the
Subject and
> >Body of the message will be ignored.
> >
> >
> >Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
a spring-loaded flap that would move if the wind gusts got too strong. Use a
switch to tell when the flap moved. You could also mount some sort of strain
gauge to the awning itself and retract it when the force became too great.
One other idea is to use a motor instead of a switch and magnet to measure
speed -- just measure the output voltage of the motor and do whatever when
the voltage went too high.
Original Message
>
> I think you can get at least some results in two ways.
>
> First, if you put up your sensor and just let it run, you can
> then just watch for the gusts you feel are too strong and record the
> time. Maybe if you sat on your proch with a nice drink and a bag of
> chips, you can tell people you ar hard at work calibrating you unit.
>
> as far as timing is concerned, you can run a few loops. one to count
> to 100 (or whatever you count per minute) and another that will total
> the number of times the speed was over your trip point. another
> would watch the second and count it ten time for your ten minute
> timer.
> You could do a running average (see Tracey's math page) to keep
> the level of the average wind speed. This would allow you to have a
> pre-set level runnning all the time.
> > I also think it's interesting, but I have not had much response
> until now.
> >
> > For reading the wind sensor I will try "pulsin", measuring the
> lenght of
> > the time the sensor is closed (180 degrees of each turn).
> >
> > But the calibration problem with this type of sensor is hard. I am
> > considering driving a car at a known speed, with the sensor out of
> the
> > window and measuring the pulse at different speeds. Rather
> complicated and
> > a 2 men job at least!. I shouls also have to write Ad hoc code just
> to
> > measure the pulse values and use a laptop or something to store
> them. Quite
> > a mess!
> >
> > Any ideas on how to relate the turns per minute (or pulse lenght)
> to actual
> > wind speed? Or a more friendly sensor?
> >
> > "Pulsin" has an interesting feature: it will return a zero value
> for any
> > infinite lenght of pulse, which is good as the sensor can stop at
> any place
> > when there is no wind (closed or open).
> >
> > But I still do not see how to put it in a loop to count for 10
> minutes
> > while the BS still scans the other variables, such as "sun is on
> or off",
> > and the manual switches. I cannot use "wait" for this reason. I
> will have
> > to go back to my forgotten basic if I do not get some help from
> more
> > experienced users.
I think I will now sit and sip my drink first, so I can digest all this
loops stuff. Programming is not much self explaining, is it?
I also like the idea of a simple spring loaded flap, although the position
should be chosen carefully to "face the wind" as often as possible.
However I wander why commercial manufacturers bother with rotary sensors,
but it is probably because this type of sensor react to any horizontal
component of the wind, no matter the direction.
regards,
JL
At 18:05 01/10/2001 +0000, you wrote:
>HI Jose,
>
>I think you can get at least some results in two ways.
>
>First, if you put up your sensor and just let it run, you can
>then just watch for the gusts you feel are too strong and record the
>time. Maybe if you sat on your proch with a nice drink and a bag of
>chips, you can tell people you ar hard at work calibrating you unit.
>
>as far as timing is concerned, you can run a few loops. one to count
>to 100 (or whatever you count per minute) and another that will total
>the number of times the speed was over your trip point. another
>would watch the second and count it ten time for your ten minute
>timer.
>
>a = a + 1
>if a > 100 then a=0
>this will allow you count to 100 and then reset
>
>the second would be to count times speed is over your trip point.
>if your pulse is high (indicating your speed it over trip point)
>then (b=b+1)
>
>if b > 10 then roll up awning.
>if a > 100 then b=0 to reset every minute.
>
>if a = 99 then c=c+1
>if c>10 then c=0
>this will offer you a 10 minute timer.
>if a=99 then d=b
>this will keep a running total in d of the number of times b is over
>your trip level.
>e=d/c to average d by the number of times a has passed 99
>
>Jose, this is not at all elegant and will only count to one
>minute then reset and count to 10 minutes and reset, so it will
>only work every minute. since you didn't care how often the shade
>was put down, at least you did not think it was as critical as
>going up fast, the 10 minute timer could take 19 minutes
>to let the awning go down.
>
>You could do a running average (see Tracey's math page) to keep
>the level of the average wind speed. This would allow you to have a
>pre-set level runnning all the time.
>
>Since this was just a quick response, the programming is not
>in pbasic, but you should be able to figure out what it is trying to
>do.
>
>And as Rodent most eloquently stated, there will probably one of the
>list wizzards to point out where I made my mistake(s) and put you on
>a simpler path.
>
>Dave
>
>
>--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...> wrote:
> > Thanks, Dave.
> >
> > I also think it's interesting, but I have not had much response
>until now.
> >
> > For reading the wind sensor I will try "pulsin", measuring the
>lenght of
> > the time the sensor is closed (180 degrees of each turn).
> >
> > But the calibration problem with this type of sensor is hard. I am
> > considering driving a car at a known speed, with the sensor out of
>the
> > window and measuring the pulse at different speeds. Rather
>complicated and
> > a 2 men job at least!. I shouls also have to write Ad hoc code just
>to
> > measure the pulse values and use a laptop or something to store
>them. Quite
> > a mess!
> >
> > Any ideas on how to relate the turns per minute (or pulse lenght)
>to actual
> > wind speed? Or a more friendly sensor?
> >
> > "Pulsin" has an interesting feature: it will return a zero value
>for any
> > infinite lenght of pulse, which is good as the sensor can stop at
>any place
> > when there is no wind (closed or open).
> >
> > But I still do not see how to put it in a loop to count for 10
>minutes
> > while the BS still scans the other variables, such as "sun is on
>or off",
> > and the manual switches. I cannot use "wait" for this reason. I
>will have
> > to go back to my forgotten basic if I do not get some help from
>more
> > experienced users.
> >
> > Any ideas?
> >
> > Regards,
> >
> > Jose Luis
> >
> > At 15:03 01/10/2001 +0000, you wrote:
> > >Hi Jose,
> > >
> > >thanks for letting me know what 'store' meant.
> > >
> > >Your project sounds interesting and it seems like
> > >you have a good direction.
> > >
> > >I trust there are some people on here who can offer the
> > >best way to take a pulse input from your wind speed
> > >sensor and turn it into a numerical value based on time.
> > >
> > >I was thinking of just polling the port and seeing if
> > >it had not been hi for 10 minutes, or if it has been
> > >only high for 1 minute.
> > >
> > >On suggestion I do have for your relays is to use
> > >a DPDT and put the 'up' on the NC of one and the NO
> > >of the other, and putting the 'down' on the NO of
> > >the first and the NC of the second. That way, if
> > >one is powered, it will break the circuit to the other
> > >thus preventing power to both sides simultaneously.
> > >
> > >Dave
> > >
> > >
> > >--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...>
>wrote:
> > > > Hi Dave:
> > > >
> > > > "Store" is just my bad english. It refers (using the wrong word
> > >from
> > > > French) to an awning. Sorry about that
> > > >
> > > > My awning is slow and heavy to move and I should avoid having it
> > >going up
> > > > and down too often as it would strain the motor.
> > > >
> > > > However, if the wind is blowing too hard for a shoort period
>(say 1
> > >minute)
> > > > and the awning is "down", it should react "quickly" (after a
> > >minute) and go
> > > > up to protect itself.
> > > >
> > > > Once it has gone up because of strong wind, the system should
>check
> > >the
> > > > wind speed for a much longer period (say 10 minutes).
> > > >
> > > > Only if the wind has been remained continuously under the speed
> > >limit
> > > > during the 10 minutes period, it should go "down" again. (and
>this
> > > > provided the sun is still shinning).
> > > >
> > > > As for the wind sensor, I already have a rotary type (kind of
> > >simple
> > > > anemometer) that turns with a speed proportional to the wind's
> > >speed. In
> > > > each turn, it opens and closes once an interla contact. I could
> > >use this
> > > > sensor, although it doesn't seem easy to interface with te
>stamp (I
> > >could
> > > > use the "pulse" command and compute the time the contact is
>closed
> > >in
> > > > milliseconds). I would still have a calibration problem. I will
> > >chech Tracy
> > > > Allen's reference you have given.
> > > >
> > > > The Light dependent resistor is an extremely cheap device I know
> > >well; it
> > > > could be used easily in this project as it requires no
>additional
> > >circuitry
> > > > (just the "pot" command to measure the resistance ---> light
>level
> > >(sun or
> > > > no sun).
> > > >
> > > > The application with 2 LEDS you mention is a very smart and
> > >inexpensive
> > > > solution to have this solar panel "follow" the sun, therefore
> > >increasing
> > > > the number of insolation hours. But I need something simpler,
>just
> > >to tell
> > > > the BS whether the sun is shinning or not (i.e it is night or
>the
> > >sky is
> > > > cloudy)
> > > >
> > > > The awning has a single motor that is powered by 300 V DC!!!.
> > >According to
> > > > the polarity applied, it turns in one direction or the other.
>This
> > >is an
> > > > old design, more recent motors use AC, though still at 230V
>level.
> > >The
> > > > problem is that it is no longer possible to obtain commercial
> > >systems to
> > > > automatically control an awmning with this old DC motor.
> > > >
> > > > Replacing the motor would be a solution but it is very is very
> > >complicated
> > > > and expensive.
> > > >
> > > > I can manage to invert the polarity of a DC 300V voltage and
>have 3
> > >states:
> > > > (+300V; -300V an 0V), using 2 electromechanical relays 1PDT.
>Full
> > > > electronic solutions, such as a MOSFET H bridge could also work,
> > >but
> > > > probably at a higher cost and complication. In any case, ideas
>and
> > > > experiences are warmly welcome.
> > > >
> > > > Now, that's why I have decided to build my own controller using
>a
> > >BS1.
> > > >
> > > > But I have never programmed a BS (or any other Microcontroller,
>by
> > >the
> > > > way). It doesn't seem too difficult, as I can read/write Basic
>and
> > >Pbasic
> > > > iseems to be mainly a subset.
> > > >
> > > > However I still cannot figure for example, how have the BS check
> > >for wind
> > > > speed to be low for 10 minutes, without using "wait"
>or "sleep", as
> > >it must
> > > > continue checking the wind speed during that long period.
> > > >
> > > > I am also discouraged by the limitation of the EEPROM capacity
>to
> > >store so
> > > > few lines of code.
> > > >
> > > > If any of you that have read this mail has the experience on
>how to
> > >deal
> > > > with this kind of control aand could help with ideas or examles
>(or
> > > > references) of code, please let me know.
> > > >
> > > > Regards,
> > > >
> > > > Jose Luis
> > > >
> > > > At 03:10 29/09/2001 +0000, you wrote:
> > > > >Hi Jose,
> > > > >
> > > > >I have a few questions. First, does 'store' have a speical
> > >meaning?
> > > > >(showing my ignorance and/or confusion)
> > > > >
> > > > >you mentioned the shade going up 'rather quickly' but your
>control
> > > > >is only one rely for up and another for down. This would
>indicate
> > > > >one speed for up and another (or the same) for down.
> > > > >
> > > > >if you wanted 2 (or more speeds) in either direction, you may
> > > > >need additional contacts. I would not recomend electro-
>mechanical
> > >relays
> > > > >for any pulse operation.
> > > > >
> > > > >As far as a wind speed sensor, check Tracy Allen's site for an
> > > > >anemometer. He has a good description and workable design.
> > > > >
> > > > >I'm not sure the best light detector or what levels of light
>you
> > >want
> > > > >to sense, but I ran across a solar collector that uses a
>simple LED
> > > > >to detect light. it was basically a pair of LEDs that ran
>into a
> > > > >comparator, which ever had a higher output, the comparator
>switched
> > > > >the motor to swing the collector so the outputs matched, thus
>the
> > > > >direction pointed to the sun. This may not the the most
>applicable
> > > > >circuit, but I was intrigued with the idea.
> > > > >
> > > > >Dave
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >--- In basicstamps@y..., Jose Luis Juarez <jl.ingenieria@i...>
> > >wrote:
> > > > > > Hi!
> > > > > >
> > > > > > Has anybody ever tried controlling automatically a store (or
> > >sun shade)
> > > > > > using a BS1?
> > > > > >
> > > > > > I am considering having 6 inputs:
> > > > > >
> > > > > > - sun is on or off (thru a Light dependent resistor)
> > > > > > - an adjustable reference resistor for the LDR
> > > > > > - Wind speed is under or over a limit (typically using
>rotary
> > >wind sensor
> > > > > > that open/closes a contact on each sensor turn) or any other
> > >wind sensor
> > > > > > you may know of. If over, the stor should go "up" rather
> > >quickly....
> > > > > > - an adjustable resistor to set the maximum wind speed
> > > > > > - Manual up
> > > > > > - Manual down
> > > > > >
> > > > > > The stor motors usually require 2 different relay contacts
>to
> > >close:
> > > > > > - Motor up
> > > > > > - Motor down
> > > > > > - No movement (both relays open)
> > > > > >
> > > > > >
> > > > > > Could anybody provide some help on the code or the logic
>flow
> > >diagram?
> > > > > >
> > > > > > Thanks in advance,
> > > > >
> > > > >
> > > > >
> > > > >To UNSUBSCRIBE, just send mail to:
> > > > > basicstamps-unsubscribe@y...
> > > > >from the same email address that you subscribed. Text in the
> > >Subject and
> > > > >Body of the message will be ignored.
> > > > >
> > > > >
> > > > >Your use of Yahoo! Groups is subject to
> > >http://docs.yahoo.com/info/terms/
> > >
> > >
> > >To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@y...
> > >from the same email address that you subscribed. Text in the
>Subject and
> > >Body of the message will be ignored.
> > >
> > >
> > >Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
> >
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
[noparse][[/noparse]Non-text portions of this message have been removed]
a kit. The one I built uses a spinning magnet and a reed switch -- two
pulses per rotation of the cups. Not sure what is in the other one, but it
does not "click" like the one I built, so I assume it uses a motor.
As far as wind direction, the one I built has 4 reed switches and a magnet.
It gives you 8 points of direction -- not very accurate, but it works.
You are correct about the rotary sensor -- it does not care which way the
wind blows.
As far as the flap, you could also use a vertical rod that would lean / bend
when the wind blew hard. The movement of the rod could trigger a switch.
This would react much faster than spinning cups. You could also use an LED
and photocell with a mirror -- when the wind blows the mirror aim is
altered, and triggers your circuit.
Original Message
> I think I will now sit and sip my drink first, so I can digest all this
> loops stuff. Programming is not much self explaining, is it?
>
> I also like the idea of a simple spring loaded flap, although the position
> should be chosen carefully to "face the wind" as often as possible.
>
> However I wander why commercial manufacturers bother with rotary sensors,
> but it is probably because this type of sensor react to any horizontal
> component of the wind, no matter the direction.