My query is on control. KISS is the order of the day here. I plan on two
thermostats - Hi and Lo. Also two limit switches - full open and full
closed. The control is simple - if you make Hi; roll up for a few seconds
and go to delay timer. If you make Lo unroll a few seconds and go to delay
timer. Stop on limit switches. Repeat 24X7.
I'm thinking this is PLC territory. I know nothing about them. Is there an
inexpensive simple to program unit that runs on 12 volt DC? Alternatively, I
can see a way to do it with a timer that continuously does a few seconds on
then several minutes off continuously.
Karl
>
> I'm thinking this is PLC territory. I know nothing about them. Is
> there an inexpensive simple to program unit that runs on 12 volt DC?
> Alternatively, I can see a way to do it with a timer that continuously
> does a few seconds on then several minutes off continuously.
>
I think you'll find you don't need any electronics, at all. Most wenches
can think (albeit, just a little) on their own. And all have the
requisite strength to open and close a roll-up blind.
If the wench can't do the job, fire her and get another. If you're still
not pleased, there are all sorts of tiny PLCs out there with most of the
requirements a wench could satisfy.
LLoyd
http://www.softwarecorp.com/FX2N14.htm
http://www.ab.com/programmablecontrol/plc/pico/controller.html
The Automation Direct PLC looks like it would take programming software and
cable.
You can get a couple of 12VDC relays to control your gear motor.
RogerN
I like the price of this one best, its the cheapest. And, Automation Direct
has always been good to me. I see the software is free for 100 words max. I
have no clue, would this be enough for my application? Room to spare?
Karl
>I like the price of this one best, its the cheapest. And, Automation Direct
>has always been good to me. I see the software is free for 100 words max. I
>have no clue, would this be enough for my application? Room to spare?
I'm thinking it would. Download the manual and start coding. The documentation should
tell you how to count the words you are using.
You might want to look here:
http://www.bb-elec.com/product_multi_family.asp?MultiFamilyId=39&Trail=158&TrailType=Main
I never got a chance to use one since I the thing I needed done was easy enough to wire up
using dicrete relays but it was looking like quite a deal at the time.
Wes
--
"Dr. Dobb's Journal of Computer Calisthenics and Orthodontia, Running Light without
Overbyte".
I think it would be plenty, not sure if they consider each bit instruction
as a word or not.
You want open for a couple of seconds if not on open limit and high temp.
You want close for a couple of seconds in not close limit and low temp.
Another timer could reset the open and close timers if still hot/cold after
XX minutes. Maybe if it's hot, opened for a couple of seconds, maybe 15
minutes later if it's still hot open for a couple more seconds.
I'm sure you could get it going in less than 100 words, probably in less
than 20 words.
Some of those other PLC's had analog inputs. If you were to use a
temperature sensor to an analog input you wouldn't need the thermostats. A
thermistor could possibly be used but may need an amplifier to get better
resolution.
RogerN
Also worth a mention, the more expensive ones have the display and keypad
built in. That could be handy for modifying the timers for open/close jog
times. With the Automation Direct software you can make the changes but you
would have to use a PC. .. Unless you programmed it to change time based on
jumpering spare inputs, maybe using spare outputs as indicators.
RogerN
You should have a field day, then, playing with variations on the idea of
Liquid Wench. d8-)
--
Ed Huntress
You must lead a boring (or very odd) life if most of your requirements
for a wench can be satisfied by a PLC!
> You must lead a boring (or very odd) life if most of your requirements
> for a wench can be satisfied by a PLC!
Hell! PLC's can cook and clean, and fetch a beer. For the other things,
one can find a 'temporary wench'.
LLoyd
A local farmer here won an award very recently for his "high tunnel
greenhouse" farming, and here you are doing the same stuff. Local
media didn't attempt to explain what is special about it. We buy
"retail" from their farm, and I don't see anything different about
either the crop or the greenhouses they have, other than maybe an
extended season. Lots of agriculture around here under plastic
"glass", maybe several hundred acres. Not as much as in the
Leamington area, known as the Ontario Sun Belt, where that would be in
the thousands of acres I would think. So, in a few short words, can
you tell me what a "high tunnel greenhouse" is, and why it is special
anyway?
Take care.
Brian Lawson,
Bothwell, Ontario.
ps....lot's of older and "NOS" PLCs available on the internet auctions
to try. I'd like to give some a go, but the availability of the
programmers required is not so easy to find at "that looks like fun"
prices.
XXXXXXXXXXXXXXXXXXXX
google on <greenhouse OR hydroponics "computer control"> for c.
21k hits.
also see
http://computer1.software.informer.com/download-computer-control-hydroponics-monitoring/
http://www.cropking.com/index.shtml?ref=google&gclid=CO_O7dbTxJ4CFQ_xDAod9RqDpA
http://www.cropking.com/commercial
http://www.agriculture.purdue.edu/aganswers/story.asp?storyID=4557
http://www.icarda.org/Publications/HorticultureResearchatICARDA.pdf
http://www.cgiar.org/pdf/cp_cn_highvaluecrops.pdf
http://www.cgiar.org/pdf/agm07/agm07_cp_highvalue_crops.pdf
http://www.countryroads.net/agjournal/linklist.cfm?section=17
Please let the group know how things work out.
Unka' George [George McDuffee]
-------------------------------------------
He that will not apply new remedies,
must expect new evils:
for Time is the greatest innovator: and
if Time, of course, alter things to the worse,
and wisdom and counsel shall not alter them to the better,
what shall be the end?
Francis Bacon (1561-1626), English philosopher, essayist, statesman.
Essays, "Of Innovations" (1597-1625).
Think simple greenhouse exept $/sq.ft. must be lower. Usually no to limited
electric. Most important crops are planted in soil. The aim is to produce a
crop such as tomato, etc. that harvests much earlier in the season.
Karl
Reminds me of the 3F Rule. If it flies, floats, or f----, rent it.
Told to my cousin at a dermatologist's conference by an old thrice
divorced attendee.
Pete Keillor
So far the simplest unit I found costs $700 each (need four per house) and
fails if 110 Volt isn't there. I got the mechanical part designed at under
$50 per unit that would run days on a deep cycle battery. Control is my
weak subject so I'll spend way more time figuring on this.
Karl
--
"Steamboat Ed" Haas : Currently broke and
Hacking the Trailing Edge! : looking for a job...
www.nmpproducts.com
---Decks a-wash in a sea of words---
> --For a good time you might want to mess with a Basic Stamp. Building
> the circuit and understanding the process will make it much more fun.
There are a number of advantages and disadvantages to this (I was going
to suggest it as a last resort).
- per-piece price will be lower, if you can find a home for it in an
existing enclosure.
- It'll be way more versatile than a PLC
- It may be harder to wrap your brain around than PLC programming
(although maybe not -- relay logic is good if you already do relay logic,
but if you're new to it Basic may be better).
- It'll be easier to put a display on it if you want.
In the final analysis, though, my knee-jerk reaction is to avoid PLCs
'cause I've never used one, yet for this project I'd give it serious
thought.
Your control rule sounds like it could result in continual oscillation
given the right combination of hysteresis, outside temperature, and
inside temperature ('continual' in this case being up - wait - down -
wait - repeat).
Can you find a dead time that will let these things cycle continuously
without draining the batteries, yet will still give you quick enough
response when the sun comes out from the clouds or a cold front blows in?
Instead of a fast motion and then a wait, you could use smaller motors
geared down more, and just let them grind things open or shut really
slowly. This definitely increases the delay and therefore the potential
for oscillation without a fancier control rule -- but then you don't have
to struggle with the 'wait' logic.
=======
This is one of the reasons I suggested using a PC as controller
in the links. "Fuzzy logic," to minimize system
oscillation/hunting, is relatively easy to implement and the
other parameters such as minimum open/closed time are simple to
set/vary.
http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6V05-45MVNXH-5&_user=10&_rdoc=1&_fmt=&_orig=search&_sort=d&_docanchor=&view=c&_searchStrId=1126063724&_rerunOrigin=google&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=03104bbde30e71fc4b9bbb365222f942
http://portal.acm.org/citation.cfm?id=603724
http://www.actahort.org/members/showpdf?booknrarnr=406_46
Another reason is the ability for easy expansion to
simultaneously control many more inputs, for example not watering
during full sun [if that is important].
Inexpensive UPS are now available to maintain the control PC in
cases of a power outage.
google on <"fuzzy logic" "process control" greenhouse> for c 4.7k
hits
> Your control rule sounds like it could result in continual oscillation
> given the right combination of hysteresis, outside temperature, and
> inside temperature ('continual' in this case being up - wait - down -
> wait - repeat).
>
> Can you find a dead time that will let these things cycle continuously
> without draining the batteries, yet will still give you quick enough
> response when the sun comes out from the clouds or a cold front blows in?
>
> Instead of a fast motion and then a wait, you could use smaller motors
> geared down more, and just let them grind things open or shut really
> slowly. This definitely increases the delay and therefore the potential
> for oscillation without a fancier control rule -- but then you don't have
> to struggle with the 'wait' logic.
You described the exact issue. Mechanically, I've got it geared down to
raise/lower 12"/minute with a total travel of 60 inches. Gets hard to gear
it much slower. My "plan A" is two stats so you have a dead band, then play
with % run to get response without oscillation. I suppose if you knew
exactly what percent on/off was optimum you could just gear it for 100% on.
I'm intrigued with this analog input option on a PLC. I should be able to
use a higher percent on when farther from temp target. The high end computer
systems you see on university research houses do this.
Karl
In over twenty years of professional life closing control loops I have
yet to personally see an instance where fuzzy logic was really necessary.
Fuzzy logic is designed as a way to encode an intuitive understanding of
a problem and it's solution into hardware and software, when you have no
way of getting a solid mathematical grasp on things. But you still have
to know enough control theory to verify the resulting -- highly nonlinear
-- controller. If you don't do the verification (and inevitable
reengineering) then you're just using fuzzy logic as a ready source of
mumbo-jumbo to intellectually intimidate the customer while you get paid
lots of money to screw things up.
Not, mind you, that I have anything against fuzzy logic :-).
>> Your control rule sounds like it could result in continual oscillation
>> given the right combination of hysteresis, outside temperature, and
>> inside temperature ('continual' in this case being up - wait - down -
>> wait - repeat).
>>
>> Can you find a dead time that will let these things cycle continuously
>> without draining the batteries, yet will still give you quick enough
>> response when the sun comes out from the clouds or a cold front blows
>> in?
>>
>> Instead of a fast motion and then a wait, you could use smaller motors
>> geared down more, and just let them grind things open or shut really
>> slowly. This definitely increases the delay and therefore the
>> potential for oscillation without a fancier control rule -- but then
>> you don't have to struggle with the 'wait' logic.
>
> You described the exact issue. Mechanically, I've got it geared down to
> raise/lower 12"/minute with a total travel of 60 inches. Gets hard to
> gear it much slower. My "plan A" is two stats so you have a dead band,
> then play with % run to get response without oscillation. I suppose if
> you knew exactly what percent on/off was optimum you could just gear it
> for 100% on.
If only...
I suspect that the optimum percentage will vary depending on the
difference between inside and outside temperature. You're essentially
setting up a temperature control system that has a constant heat input
(from the sun), and variable heat shedding (the vents). But the amount
of heat shedding that you get at any one moment is dependent not only on
the amount that the vents are open, but on the outside temperature and (I
suspect) on the amount of wind.
So the interior temperature delta that you'll see for 1" of opening will
be much bigger on a windy deep-winter day than it will on a mild day in
the spring.
This points to either needing to change your tuning manually with the
season, needing to have an external thermometer that you use to select a
control rule, some sort of adaptive controller, a heavily compromised
control rule that guarantees stability on bad days at the cost of being
really sluggish on good days, or just a happy acceptance of the fact that
your motors are always moving, but your greenhouses are always at a good
temperature and generating money.
>
> I'm intrigued with this analog input option on a PLC. I should be able
> to use a higher percent on when farther from temp target. The high end
> computer systems you see on university research houses do this.
If you want to go there, let me suggest _right now_ that you forget the
PLC approach and lean toward using a PC or a Basic Stamp -- or find a PLC
that uses a real programming language. Unless you want to spend your
time working around the limitations of your controller instead of solving
your problem, you want to start out with a controller that is way more
capable than you think you need -- because with control loops, you
_always_ end up needing more smarts in the controller than you thought
when you started.
I still have this problem, and I've been doing it for 20 years. If you
look at your controller's capabilities and say "that's about right" then
you're severely undershooting your goal.
This is actually an odd case, because while I'm thinking of this as if
you were a client, I wouldn't necessarily take my own advice if I were
doing it myself. Were I doing this for myself I'd start with the simple
route that you have proposed or something close, see how it works, and be
ready to improve on it next winter. You'll learn so much about the
dependability of your mechanical arrangement, the sufficiency of your
batteries, plus all the stuff that no one has anticipated even thinking
about yet.
But if you were paying me to get it working I wouldn't do that. Instead
I'd either walk or I'd get all complex (and expensive) on you. Why?
Because when you engineer a system that shows promise but doesn't make
the customer money, they don't remember the joy of your low-ball bill --
they just remember that you built them a system that didn't @#$% work!
I actually hate PLCs, never got on with ladder logic very well. I'm much
more comfortable with computer programming. Are we talking about a PIC chip
here, like a 16f628A/16f877A?
Would either you or Steamer be willing to get me started with what hardware
to order? And stuff to start reading?
Karl
> I'm intrigued with this analog input option on a PLC. I should be able
> to use a higher percent on when farther from temp target. The high end
> computer systems you see on university research houses do this.
>
You're describing a PID (proportional-integral-derivative) control
system, which, despite being described as "fuzzy logic", is not -- it's a
software emulation of an analog, variable gain, proportional output
system.
Most decent PLCs have freely-available PID loop software available for
them. If you use one of the sorts that allows easy user programming
(usually via both ladder logic and a crippled sort of BASIC) you can
easily set one up for PID control.
You'll need to modify the curtain controller from simply on/off to a
position-sensing controller to make best use of such a system.
I'm not sure they're in the price range you'd like to spend (although
pretty cheap), but the TriLogic PLCs are both capable and easy to program
with free software that comes with them. I have a three NC machines
(dedicated automated machinery for manufacturing fireworks) operating
under control of the TriLogic boards, and have not a single breakdown in
seven years of operation (totalling 21 controller-years, 40-60 hours a
week, year-round).
LLoyd
> Most decent PLCs have freely-available PID loop software available for
> them.
oops! Forgot to say, the TriLogic boards have some user-devised, free PID
samples to play with.
LLoyd
Do you want to program in Basic, assembly, or C?
For Basic, you want to get a Basic Stamp -- these have a PIC on them, but
it's hidden behind a layer of programming, so what you see is Basic.
They're sold by Parallax, who is not pushing their "propeller" chip,
which I can't find it in my heart to recommend because it uses a
proprietary compiler, and those always end up burning you in the end.
For assembly or C you (probably) want to get a PicKit (SP?) designed by
Microchip. They have what you need to get a basic computer up an
running, and Microchip at least used to have a free C compiler for some
of their computers.
I wouldn't recommend the C or assembly route unless you have some serious
programming experience under your belt. C and assembly are each the
programming equivalent of a manual lathe -- you can do anything possible
with them, but you have a lot to learn before you can start doing
anything useful with them.
_Any_ of these routes will get you a board that only drives logic levels
out, and will leave you responsible for all of the surrounding drive
electronics to turn it into motor commands and protection to keep it from
going up in smoke during the first lightning storm. A PLC is much more
likely to have some useful drive capability built in.
Look to the Parallax website and SparkFun electronics for neato modules
that you can assemble into a working system. Used wisely, you should be
able to get away without having to design a board, at least for the
prototype system.
Your last paragraph explains why a gear motor on a thermostat is going for
$700 a copy. its going to take some fool willing to have a few failures to
come up with a $100 solution.
OK, I'm sold on trying this basic stamp approach. Sure could use some help
on what items to purchase. I don't mind spending a few (several) weeks
learning a new subject.
Karl
For what you want to do, the BASIC stamp would probably be the best choice.
Start with Wiki for a good overviwew:
http://en.wikipedia.org/wiki/BASIC_Stamp
More involved:
http://www.parallax.com/tabid/295/Default.aspx
Best place to get started with the Stamp would be the Activity Kit.
(that's probably gonna wrap)
http://www.parallax.com/Store/Microcontrollers/BASICStampProgrammingKits/tabid/136/ProductID/313/List/0/Default.aspx?SortField=ProductName,ProductName
Example Projects:
http://www.rentron.com/BasicStamp.htm
Relay control example:
http://www.rentron.com/pc-relay.htm
http://www.emesystems.com/BS2index.htm
Development and info downloads:
(including Stamp and application manuals)
http://webspace.webring.com/people/au/um_1338/downloads.html
>
>In the final analysis, though, my knee-jerk reaction is to avoid PLCs
>'cause I've never used one, yet for this project I'd give it serious
>thought.
Plc's are great. I had a couple 600 ton St Lawrence forming presses with about 22 control
relays, 5 cycleflex counters or timers that would not stay running.
Took a class at Allen Bradley on programming a plc and in 43 rungs of logic, I replaced
that mess and kept us from shutting down a GM assembly plant.
Wes
--
"Additionally as a security officer, I carry a gun to protect
government officials but my life isn't worth protecting at home
in their eyes." Dick Anthony Heller
...
I just found an Xmas present request. I'll work through this and other
simple projects before even thinking of the task at hand.
Thanks for the advice
Karl
jsw
> I plan to automate the process
>by using a small 12 volt DC gear motor and wench. I've settled on my
>mechanical design and plan to order parts tomorrow.
You can make an analog-ish controller to do what you want.
I had good results using two small audio amplifiers as a servo drive
to power a small gearmotor. For your project I would stick to relay
control of the motor though. If you got two standard thermostats,
and a few relays, I think you would have it.
Look at :http://www.redrok.com/electron.htm for some ideas.
If you could rig a potentiometer with the curtain, then you could have
proportional control. That is, the hotter it is, the more open the
curtain is. With the right gain, it should hold temperature well.
--
Dan H.
northshore MA.
This place has some Basic Stamp kits for a pretty good discount.
http://www.kitsusa.net/phpstore/html/Parallax-Programming-Kits-17-1.html
Yesterday I ordered a Boe Bot (based on Parallax Board of Education kit) for
my son for Christmas.
I first started to recommend a Basic Stamp to you for a control but I
thought by the time you connected it to drivers for the old lady... err
wench it was getting sort of complicated unless you want to fiddle with
electronics.
Basic Stamp and temperature measurement is easy enough but what about the
control of the motor? Do you have a winch control? A couple of relays or a
solid state H bridge? Don't forget to protect the Basic stamp from the
inductive kickback if you use electromagnetic relays. I kind of like the
idea of something like the Gordos or Opto22 solid state optically isolated
relay modules to drive the final electromagnetic relays (understand I don't
know what kind of currents your motor will draw). Of course if you're into
playing with electronics you could get some logic level power mosfets that
would probably do the job.
Many of the Stamp kits have applications for sensing temperature. I would
think the goal for your greenhouse would be to position curtain so that you
have zero rate of change with zero temperature error and adjust to try to
keep the rate of change of temperature proportional to the error in
temperature. That way, if it works out right, as you approach zero
temperature error, you would approach zero rate of change (curtain would be
adjusted to hold temp). Perhaps as part of the program you could have it
record how much adjust time of the curtains accumulated over a day. Try to
tune the algorithm for best temperature control with minimal winch run time.
RogerN
If your goal is KISS, skip the PLC and try something like this:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=Z2695-ND
all the control logic is built in. the alarm can be used to revers the
direction of the motor.
Lots of manufacturers out there with similar options.
I was thinking of an SSR like this:
http://cgi.ebay.com/Solid-State-Relay-SSR-5-220V-DC-40A-Heat-Sink_W0QQitemZ370303229805QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item5637cadf6d
Any problem here? I own a bunch. Also have hundreds of Opto-22 parts, but
that would be two steps and a large board. Want to keep it compact. Here's
the gearmotor:
http://www.surpluscenter.com/item.asp?UID=2009120719340393&item=5-1624&catname=electric
Karl
DC solid state relays like that should be great. I have a few SSR's like
that but mine are mostly (or all?) AC. Also the motor didn't look like it
would be bad with a .2A no load current, at least it isn't like a 200A
starter motor. I guess you could use either 4 SSR's configured as an H
bridge or maybe 1 DPDT relay for direction and the SSR to switch the motor
ON/OFF. You could wire the limit switches to kill power to the motor and
have spare directional relay contacts jump around the limit switches. For
example if the UP limit switch was tripped, it wouldn't allow power to motor
as long a directional relay was set for UP, but change direction to down and
contacts would jumper around the UP limit switch (vice versa for down). Or
just run the limit switches to the Basic Stamp and have it in the program.
For that your parts would be 1 solid state relay to turn motor ON/OFF and 1
electromechanical 4PDT relay motor direction UP/DOWN (2 Poles) and the other
2 poles to jump the limit switches (UP jumps down L/S and DOWN jumps up
L/S). Or if you have and would prefer to use 4 SSR's that should work great
too.
Sounds like you may enjoy tinkering with the Basic Stamp, it would be nice
to detect the rate of temperature change and try to control from there.
I recently used an Allen Bradley PLC 5 to operate my Brinkman electric
smoker. I had an RTD measuring temperature of the Pork BBQ and a
thermocouple measuring temperature inside the smoker. My first ran
oscillated allot because I turned the temp off when it was too high and
turned on when it was too low. If I had put in my program to pay attention
to rate of change I could have eliminated much of the oscillation. For
example if it's one degree too cold but the temperature is raising 5 degrees
per minute you can shut off the heat sooner than if it's one degree too cold
and falling 5 degrees per minute. Anyway, the BBQ came out great, I don't
think the temperature oscillations mattered too much to the pork. My next
program revision will incorporate rate of change. The PLC 5 has a PID loop
function built in but I haven't played with that yet. I bought a complete
AB PLC 5 with 16 slot rack with power supply, a 5/30 processor, and 13 I/O
cards for $85 shipped on eBay.
RogerN
Will a basic stamp power a 4PDT relay coil directly? I haven't checked, but
I assume it won't. If it will, do you set up the controller to sink the
relay? Or can it also source?
Karl
IIRC about all the controller can drive would be an LED, works with SSR's
but would need a driver transistor for a 4PDT relay coil. I kinda like
TIP120 transistors, something like 3A output capable with a current gain of
at least 1000. A ~1K Ohm resistor, TIP120 NPN Darlington transistor and
1N4001 diode should make a nice relay drive... or a lower power SSR could do
the job.
IIRC the Basic Stamp outputs can sink or source. I think they can handle a
little more current sinking than sourcing, though it's been years since I
played with them.
RogerN
> Perhaps as part of the program you could have it
> record how much adjust time of the curtains accumulated over a day.
> Try to tune the algorithm for best temperature control with minimal
> winch run time.
>
Roger, a decent PID algorithm accommodates changes in conditions, and
"learns" the lead/lag characteristics of the system. Most of the even
most-basic PID controllers (ready made) have that capability.
LLoyd
Thanks for the advice. I ordered their starter kit and plan to spend several
weeks with it right after Christmas. If these can play a calliope they must
be "good stuff Maynard"
Karl
> "RogerN" <re...@midwest.net> fired this volley in
> news:d4mdnRlQdZusOoDW...@earthlink.com:
>
>> Perhaps as part of the program you could have it record how much adjust
>> time of the curtains accumulated over a day. Try to tune the algorithm
>> for best temperature control with minimal winch run time.
>>
>>
> Roger, a decent PID algorithm accommodates changes in conditions,
Yup.
> and "learns" the lead/lag characteristics of the system.
Not unless it's adaptive -- a plain jane PID algorithm isn't adaptive,
but can be tuned to be more or less robust to changes in the
characteristics of the system.
> Most of the even
> most-basic PID controllers (ready made) have that capability.
The ones that I know of aren't adaptive -- they're autotune, which means
they'll stimulate the system and come up with a tuning on operator
command, but they won't do it all the time.
I don't think things have changed much -- you don't see much hoopla about
adaptive control anymore, and the definitive texts that I have read
include cautions about when adaptive control won't work (like, blind).
> My first winter project is on my new high tunnel (greenhouse) High
> temperature control by ventilation is critical for good growing. I will
> be ventilating by using a rollup side curtain. I plan to automate the
> process by using a small 12 volt DC gear motor and wench. I've settled
> on my mechanical design and plan to order parts tomorrow.
>
> My query is on control. KISS is the order of the day here. I plan on two
> thermostats - Hi and Lo. Also two limit switches - full open and full
> closed. The control is simple - if you make Hi; roll up for a few
> seconds and go to delay timer. If you make Lo unroll a few seconds and
> go to delay timer. Stop on limit switches. Repeat 24X7.
>
> I'm thinking this is PLC territory. I know nothing about them. Is there
> an inexpensive simple to program unit that runs on 12 volt DC?
> Alternatively, I can see a way to do it with a timer that continuously
> does a few seconds on then several minutes off continuously.
>
> Karl
The more I think about this the more I think you want the roll-up curtain
to roll down over a tapered hole, so that when you're closed you don't
get as much area change as when you're open -- because a given area
change will be much more effective when it's cold and the curtains are
closed up, and because once the curtains are mostly open a bit more isn't
going to change much.
Just a thought, but get it working first.
>Think simple greenhouse exept $/sq.ft. must be lower. Usually no to limited
>electric. Most important crops are planted in soil. The aim is to produce a
>crop such as tomato, etc. that harvests much earlier in the season.
>
>Karl
>
Yabbut what's the difference between "High tunnel" and plain ordinary
polytunnel greenhouses?
Expiring minds want to know :-)
Mark Rand
RTFM
A very cheap contol system would be 2 cheap snap acting home thermostats - 1
mounted high and 1 mounted low, although you might have to monkey with the
location. You can still get units that come with an available proportional
band adjustment, not much but usually 2-6 deg.F. Set 1 for cooling and 1
for heating. They boot up from power failure every time the power returns.
Good luck
Steve
> I don't think things have changed much -- you don't see much hoopla
> about adaptive control anymore, and the definitive texts that I have
> read include cautions about when adaptive control won't work (like,
> blind).
>
I agree, except that many commercial PIDs now offer it as a user-selectable
option. But you need to understand the difficulties it may impose.
LLoyd
If you're looking at the structure the difference is blurred. Few
greenhouses use natural ventilation - large exhaust fans. most high tunnel
have huge natural vent opening.
The main difference is application. Greenhouse grow plant for resale in some
sort of medium normally on shelves. High tunnel grows fruit and vegetables
in the soil.
Karl
It's been a while since I messed with my Basic Stamp but IIRC they used 8
bit integer math. My Basic Stamp 1 had only about 16 bytes ram, I'm not
sure that would do a PID control, maybe. I think the BS2 has about twice
that amount of ram. I'm not to great at working with integer math,
especially 8 bit.
RogerN
>My first winter project is on my new high tunnel (greenhouse) High
>temperature control by ventilation is critical for good growing. I will be
>ventilating by using a rollup side curtain. I plan to automate the process
>by using a small 12 volt DC gear motor and wench. I've settled on my
>mechanical design and plan to order parts tomorrow.
>
>My query is on control. KISS is the order of the day here. I plan on two
>thermostats - Hi and Lo. Also two limit switches - full open and full
>closed. The control is simple - if you make Hi; roll up for a few seconds
>and go to delay timer. If you make Lo unroll a few seconds and go to delay
>timer. Stop on limit switches. Repeat 24X7.
>
>I'm thinking this is PLC territory. I know nothing about them. Is there an
>inexpensive simple to program unit that runs on 12 volt DC? Alternatively, I
>can see a way to do it with a timer that continuously does a few seconds on
>then several minutes off continuously.
>
>Karl
If outdoor temp is higher than your minimum, if the temp ever got high
enough to open the curtain it'd stay open until outdoor temp drops.
If outdoor temp is lower than your min but there's enough sun to heat
the space to above max with curtain closed, then the system would
cycle, alternately opening and closing.
If outdoor temp is lower than min and there's not enough sun to reach
max temp, then the curtain would stay closed.
If you only partially move the curtain and then go to a delay timer
for a while to see if that move drops temp below max, might it take
unacceptably long to fully open on a high temp condition? The time
constant will be quite different on calm days vs windy days.
A PID controller with a temperature sensor would provide better
temperature stability, but at the expense of battery life because the
curtain would be making small moves very often. You'd need curtain
position feedback too.
Specs are on their website. You'll need drive transistors to operate
relays. Someone suggested TIP120, a good suggestion. Holler if you
want some help with that.
>
>"Karl Townsend" <karltown...@embarqmail.com> wrote in message
>news:4b1d5e08$0$77560$892e...@auth.newsreader.octanews.com...
>>
>> You described the exact issue. Mechanically, I've got it geared down to
>> raise/lower 12"/minute with a total travel of 60 inches. Gets hard to gear
>> it much slower. My "plan A" is two stats so you have a dead band, then
>> play with % run to get response without oscillation. I suppose if you knew
>> exactly what percent on/off was optimum you could just gear it for 100%
>> on.
You can't know that because it will change significantly with cloud
cover, sun angle, wind, etc.
>>
Ouch. That's pretty restrictive. You'd need at least 16 bits to do PID
in this sort of thing, and mo is better.
'splain why?
The timing is closer to hours than milliseconds.
A real time interrupt (external 555?) for the long delay?
8 bits of temperature is 256 value spread.
The AtoD function can be external hardware, or an external mux if
an internal AtoD is there. One bit to select from two sources,
two bits for 4.
Motor control is one bit for direction, one for Go.
An eight bit count for run time to position the vent.
Too much bloatware in the world today.
What we need are more Assembly Programmers!
Are you volunteering to assist?
Well, maybe...
If I got a "development system" for christmas?
:)
I was wondering if he could use a string pot on the curtain for position
feedback? I've never eBayed for them but I don't think they are very cheap
new.
RogerN
I would think a simple timing loop would do it.
Run the device and see how long it takes to go from one end
to the other. Divide that by 256 for max resolution, or more
likely by 16 - plenty of resolution for a vent.
I would like to see limit switches at each end just for safety sake.
That would take up two bits of input per vent.
But if the device has comfortable "over-run" areas, it might not be needed.
It ain't hard, it just ain't cheap. I used a double reduction
Sumitomo cycloid drive of 3400:1 to drive the continuous filter I
invented. Web movement maximum was 60"/hour, min was close to zero.
I'd mark the web, go have a cup of coffee, come back and stick a ruler
on it to make sure it was working.
Pete Keillor
I talked this project over with my crop consultant today. He said I should
apply for a research grant and thinks I'd probably win. In that case, this
device needs better EE than I can do. A ways down the road, but would you
like to help design phase two?
Karl
> You'd need curtain
> position feedback too.
>
I said that too, earlier, then realized that you don't need position
feedback.
A PID loop outputs a signal proportional to the amount of correction
required. One could position the curtain according to the correction
signal, and not require that the position be fed back to the controller.
That would still require more complex drive controls than simply "on-
off/up-down", but the position controlling mechanism could be part of the
curtain drive itself, rather than feeding back to the controller. Think
of how a PWM model aircraft servo works.
The receiver never "knows" the position of the servos. It merely outputs
a pulse width proportional to the position desired, and the servo goes
there - then nulls - on its own.
A string pot and a comparator could comprise the basics of such an auto-
positioning mechanism. In use, the controller would not have to output
on-off, or up-down outputs, just an analog signal or pulse width
modulated signal that represented the desired absolute curtain position.
LLoyd
You get some grant money for research and development, I'm your geek.
It would be fun. I haven't done a control project in ages.
I have a little CMOS Z80 controller board worked up that should run on
about 25 milliamps (not counting off board I/O interfaces, of course).
Personally, I'd go that way and just write in Z80 Assembly, or Tiny C, or
as fast as this thing would run maybe even BASIC. Once it's up and running,
anybody could then tinker with the software quite easily.
It would be a little overkill, but if I'm writing code, I'd prefer to do
it on something I already know.
Fewer surprises.
And, like Roger pointed out, the little controllers are, well, little(!)
Richard
Well, not to be contradictory, but it is both easy and cheep - in software.
Once you have the drive running that can handle the mechanical loads,
controlling the speed is simple stuff.
Richard
[snip]
>
> I would like to see limit switches at each end just for safety sake.
> That would take up two bits of input per vent.
> But if the device has comfortable "over-run" areas, it might not be needed.
I agree that limit switches are needed, but they should physically
interrupt power to the motor, and in no way depend on software.
The problem is that once these limits are hit, the computer can no
longer recover control, and a manual reset is needed.
The usual solution is to have two sets of limit switches, inner and
outer.
The inner limit switches are sensed by the computer, telling it to stop
moving in that direction.
The outer set physically interrupts power to the motor, to prevent
damage should the computer fail to do the right thing.
Joe Gwinn
Yeah, you're right if discontinuous works, as in this case. I wanted
continuous motion in the case I described.
Pete Keillor
There is an old saying that,
"If engineers built bridges the way programmers write software,
the first wood pecker than comes along could destroy civilization".
And there is some truth in that.
But no, I'd not design an autonomous system that need manual oversight.
IIRC, Karl said his vent was about 6 feet long.
My first fantasy was a fabric tape/shade (wide enough to cover the vent slot)
that rolls up on rollers at each end. Maybe it has some shaped supports
to keep it snug against the enclosure(?). But there is nothing to jam into
at the end of the run.
So all I'd be doing is rolling the shade up or down.
The computer can monitor the drum and tell, within reason, where the opening
is at any time. If we are rolling up on a fairly small shaft, just count
turns. If it's a big drum, maybe glue some magnets around the drum and count
them with a Hall effect sensor.
You don't see that kind of proactive defense in other mechanical devices.
Printers, Plotters, Flight simulator motion platforms, CARS.
But you do have to be careful about writing any wood peckers into your code.
Richard
Pulse width modulate.
The motor will integrate that into continuous motion.
If the requirements get REAL slow, you may have to pulse both ways.
Drive forward Tx
Drive backwards Tc-n
Keep the motor energized so it doesn't wander off position.
:)
> Joseph Gwinn wrote:
> > In article <deqdnccQKIMCEoLW...@earthlink.com>,
> > cavelamb <cave...@earthlink.net> wrote:
> >
> > [snip]
> >> I would like to see limit switches at each end just for safety sake.
> >> That would take up two bits of input per vent.
> >> But if the device has comfortable "over-run" areas, it might not be needed.
> >
> > I agree that limit switches are needed, but they should physically
> > interrupt power to the motor, and in no way depend on software.
> >
> > The problem is that once these limits are hit, the computer can no
> > longer recover control, and a manual reset is needed.
> >
> > The usual solution is to have two sets of limit switches, inner and
> > outer.
> >
> > The inner limit switches are sensed by the computer, telling it to stop
> > moving in that direction.
> >
> > The outer set physically interrupts power to the motor, to prevent
> > damage should the computer fail to do the right thing.
> >
> > Joe Gwinn
>
>
> There is an old saying that,
> "If engineers built bridges the way programmers write software,
> the first wood pecker than comes along could destroy civilization".
Yes, plus the sayings about "If Microsoft built xxx".
> And there is some truth in that.
>
> But no, I'd not design an autonomous system that need manual oversight.
>
> IIRC, Karl said his vent was about 6 feet long.
>
> My first fantasy was a fabric tape/shade (wide enough to cover the vent slot)
> that rolls up on rollers at each end. Maybe it has some shaped supports
> to keep it snug against the enclosure(?). But there is nothing to jam into
> at the end of the run.
>
> So all I'd be doing is rolling the shade up or down.
Well, the shade may tear. One may decide to simply clean up afterwards
if this happens, but I would think it would prove to be a big nuisance,
enough to justify some limit switches.
Given that shade replacement is manual, manual-reset limit switches (a
pair of normally-closed microswitches in series with the motor power)
may make sense, as reset is far easier and perhaps cheaper than shade
replacement.
> The computer can monitor the drum and tell, within reason, where the opening
> is at any time. If we are rolling up on a fairly small shaft, just count
> turns. If it's a big drum, maybe glue some magnets around the drum and count
> them with a Hall effect sensor.
>
> You don't see that kind of proactive defense in other mechanical devices.
> Printers, Plotters, Flight simulator motion platforms, CARS.
The usual solution is to make sure that the motor will stall without
harm to anything. Also using a pipsqueak motor saves money on the motor
and its power supply. But it takes a lot of engineering to achieve this
kind of balance, and so is worthwhile only for production items, not for
one-off projects.
Industrial gearmotors have *lots* of torque, so unless it doesn't matter
if the motor keeps on running forever, explicit limit switches or some
kind of mechanical torque limiter or mechanical fuse (like a shear bolt)
are necessary.
> But you do have to be careful about writing any wood peckers into your code.
Even with care, one hears the pecking from time to time.
For an extreme example, fly-by-wire bet-your-life avionics code is
developed to the DO-178B standard, which increases the cost per line of
the resulting code by a factor of about ten over the process used to
develop for instance radar signal and data processing code.
The resulting avionics code is very reliable, and yet bugs are still
found from time to time, even in systems with many flight hours to their
names.
Joe Gwinn
Ok, but make the limit switches DPXX types so I can monitor the status
in software. If something did go wrong bad enough to trip the mechanical
limits I want the software to know about it.
Because that's what you always end up needing, that's why!
If you are really using an integrator, either for the integrator or (more
likely) because you're band-limiting the differentiator, then you need
more bits to store the state than you have bits in the input. If you use
an 8-bit number for temperature, you need more bits for the state -- and
in an 8-bit processor, "more than 8" is 16.
Be glad -- many applications I end up doing need more than 16, in
assembly this means you have to decide between 24 and 32.
You may be able to do this effectively with Karl's original algorithm,
which will work fine with 8-bit math. But the advantage of a PID-type
controller is that (if everything comes together) you can maintain a much
more constant temperature inside the greenhouses instead of the constant
up/down you'd get from a hysteresis controller cycling all the time.
...Monitor the motor position so you can actively control it (speaking of
bloatware).
Sure! I have development systems and C compilers for PIC and Atmel
AVR. Cavelamb is probably more competent, so include us both!
>Don Foreman <dfor...@NOSPAMgoldengate.net> fired this volley in
>news:tg6uh5tosul328v5k...@4ax.com:
>
>> You'd need curtain
>> position feedback too.
>>
>
>I said that too, earlier, then realized that you don't need position
>feedback.
>
>A PID loop outputs a signal proportional to the amount of correction
>required. One could position the curtain according to the correction
>signal, and not require that the position be fed back to the controller.
>
>That would still require more complex drive controls than simply "on-
>off/up-down", but the position controlling mechanism could be part of the
>curtain drive itself, rather than feeding back to the controller. Think
>of how a PWM model aircraft servo works.
Then the feedback is in a local loop. Position sensing is still
required, and is provided by the servo mfr. PID provides a signal
proportional to error (and the integral of error, with some
differential modification). In a temperature control situation this
works: if cold, supply more heat. In this app, curtain position is
the time integral of motor excitation. Curtain position is the signal
required to be compared against setpoint to produce an error signal
that PID can use.
>
>The receiver never "knows" the position of the servos. It merely outputs
>a pulse width proportional to the position desired, and the servo goes
>there - then nulls - on its own.
Yes, because the servo has internal position sensing feedback.
>
>"Mark Rand" <ra...@internettie.co.uk> wrote in message
>news:56pth5pd4e6k6549h...@4ax.com...
>> On Mon, 7 Dec 2009 10:09:26 -0600, "Karl Townsend"
>> <karltown...@embarqmail.com> wrote:
>>
>>
>>>Think simple greenhouse exept $/sq.ft. must be lower. Usually no to
>>>limited
>>>electric. Most important crops are planted in soil. The aim is to produce
>>>a
>>>crop such as tomato, etc. that harvests much earlier in the season.
>>>
>>>Karl
>>>
>>
>> Yabbut what's the difference between "High tunnel" and plain ordinary
>> polytunnel greenhouses?
>>
>> Expiring minds want to know :-)
>>
>> Mark Rand
>> RTFM
>
>If you're looking at the structure the difference is blurred. Few
>greenhouses use natural ventilation - large exhaust fans. most high tunnel
>have huge natural vent opening.
>
>The main difference is application. Greenhouse grow plant for resale in some
>sort of medium normally on shelves. High tunnel grows fruit and vegetables
>in the soil.
>
>Karl
>
Ok, That's what I'd know as polytunnels (not the same as the home vegetable
plot variety though...)
regards
Mark Rand
RTFM
> Yes, because the servo has internal position sensing feedback.
That still doesn't make the entire system a cybernetic loop. The error
signal generating equipment derives no feedback from the effector. It's a
"dead reckoning" system; the controller tells the curtain to "move to x",
and only assumes it has happened.
LLoyd
> On Sun, 6 Dec 2009 19:31:56 -0600, "Karl Townsend"
> <karltown...@embarqmail.com> wrote:
>
>>My first winter project is on my new high tunnel (greenhouse) High
>>temperature control by ventilation is critical for good growing. I will
>>be ventilating by using a rollup side curtain. I plan to automate the
>>process by using a small 12 volt DC gear motor and wench. I've settled
>>on my mechanical design and plan to order parts tomorrow.
>>
>>My query is on control. KISS is the order of the day here. I plan on two
>>thermostats - Hi and Lo. Also two limit switches - full open and full
>>closed. The control is simple - if you make Hi; roll up for a few
>>seconds and go to delay timer. If you make Lo unroll a few seconds and
>>go to delay timer. Stop on limit switches. Repeat 24X7.
>>
>>I'm thinking this is PLC territory. I know nothing about them. Is there
>>an inexpensive simple to program unit that runs on 12 volt DC?
>>Alternatively, I can see a way to do it with a timer that continuously
>>does a few seconds on then several minutes off continuously.
>>
>>Karl
>
> If outdoor temp is higher than your minimum, if the temp ever got high
> enough to open the curtain it'd stay open until outdoor temp drops.
No problem.
>
> If outdoor temp is lower than your min but there's enough sun to heat
> the space to above max with curtain closed, then the system would cycle,
> alternately opening and closing.
I'm not so sure -- Karl's control rule as stated could possibly find a
sweet spot.
>
> If outdoor temp is lower than min and there's not enough sun to reach
> max temp, then the curtain would stay closed.
Which is the best you could expect, unless you want an alarm to ring so
that Karl knows he's got to go install heaters.
>
> If you only partially move the curtain and then go to a delay timer for
> a while to see if that move drops temp below max, might it take
> unacceptably long to fully open on a high temp condition? The time
> constant will be quite different on calm days vs windy days.
This is what Karl is describing, and you share your concern with me. I
think it could be alleviated considerably with tapered vents -- when it's
cold and/or windy the vents would stay mostly closed, so make sure that
the vents are narrow there, such that an incremental opening of the
curtain doesn't open the vent up much.
>
> A PID controller with a temperature sensor would provide better
> temperature stability, but at the expense of battery life because the
> curtain would be making small moves very often.
Possibly. A controller with a bit of built-in hysteresis wouldn't. Or
Karl may find that really small motions don't drain the battery badly
enough for it to be a concern.
> You'd need curtain position feedback too.
I don't think you do, necessarily, beyond limit switches. The motor/
curtain system will just act like an integrating plant; this means that
Karl really only needs a PD controller, probably, or a P-double D (ick).
Position feedback on the curtain would help if you were really going for
low power and/or precise temperature control, however. So would a
monitor on the outside temperature, for that matter.
With a DC system it's easy to set up limit switches that'll prevent a
motor from driving any further into a stop, but will let it drive out.
And even though I write embedded code, too, I still prefer to have
mechanical safety devices -- for when someone else starts maintaining my
bug-free code, of course.
I was afraid you were going to over complicate things, but your articles
are pretty clear and readable.
Diodes across the limit switch, so it can only run the other
direction. This was common on Sat dish steering motors, and trailer
jacks. You hit the limit, and the switch opens, but the diode will allow
it to be backed off.
> The usual solution is to have two sets of limit switches, inner and
> outer.
>
> The inner limit switches are sensed by the computer, telling it to stop
> moving in that direction.
>
> The outer set physically interrupts power to the motor, to prevent
> damage should the computer fail to do the right thing.
>
> Joe Gwinn
--
Offworld checks no longer accepted!
You want things just complicated enough -- in my life I've unwound
innumerable vast snarls of kluges that were wound around core functions
that were just too simple. When you can double the complexity of the
core, make it work _right_, and as a consequence take out five times as
many lines of code and/or circuitry from the periphery, then you
understand that there is such a thing as _too_ simple.
This is why I'm kind a torn in Karl's case -- he may well be able to get
it working with a simple state machine implemented with hysteresis and
timing. Unfortunately, the only way to know for sure is to try it out.
But fortunately, if he starts with a processor that can absorb the
necessary algorithms then he can also start out simple and see how it
goes without being married to a too-simple core algorithm from the outset.
Agreed, the entire system isn't a cybernetic loop --unless you include
the operator as part of the cybernetic loop. Either way, there is a
position feedback pot in the servo. The servo is a subsystem with
feedback.
You are also correct that the process varible of interest here is
temperature, so the primary loop sensor for PID control would be a
temperature sensor -- not a curtain position sensor.
That said, curtain position is the time integral of output (motor
drive) so that creates a big fat pole in the system response. If a
secondary loop made curtain position a fn of the PID's output the
system might be both more responsive and easier to stabilize. Curtain
position determines rate of heat loss which the PID control then
matches to rate of (solar) heat input to minimize error from setpoint.
But it seems to me that Karl isn't trying to control to setpoint, he
just wants to try to prevent excursions above a max or below a min. So
a more "fuzzy" approach might be a lot simpler, more responsive and
stable with a simple algorithm something like:
start
if temp_too_high then open_curtain_a_smidge
else if temp_too-low then close_curtain_a_smidge
waitabit
goto start
I was equating PID controller with the temperature controllers
available on EBay for under $50. I don't know if those have optional
hysteresis or not. I have a Honeywell and an Omega and I don't think
either of them has the option of a deadband.
>
>> You'd need curtain position feedback too.
>
>I don't think you do, necessarily, beyond limit switches. The motor/
>curtain system will just act like an integrating plant; this means that
>Karl really only needs a PD controller, probably, or a P-double D (ick).
Yes, and worst case (calm day) that integrate time could get quite
long so the curtain drive speed would have to be very, very slow or
it'll just limit cycle and you could skip the PID.
That makes sense, although the computer may no longer be sane enough to
care.
It would be double throw (two circuits) double throw (each circuit has a
normally-open contact and a normally-closed contact). One circuit stops
the motor, the other tells the computer why it gets no respect.
Joe Gwinn
> Joseph Gwinn wrote:
> >
> > In article <deqdnccQKIMCEoLW...@earthlink.com>,
> > cavelamb <cave...@earthlink.net> wrote:
> >
> > [snip]
> > >
> > > I would like to see limit switches at each end just for safety sake.
> > > That would take up two bits of input per vent.
> > > But if the device has comfortable "over-run" areas, it might not be
> > > needed.
> >
> > I agree that limit switches are needed, but they should physically
> > interrupt power to the motor, and in no way depend on software.
> >
> > The problem is that once these limits are hit, the computer can no
> > longer recover control, and a manual reset is needed.
>
>
> Diodes across the limit switch, so it can only run the other
> direction. This was common on Sat dish steering motors, and trailer
> jacks. You hit the limit, and the switch opens, but the diode will allow
> it to be backed off.
That would certainly work for a DC motor. Multiwinding AC motors are a
bit different, but it can be done.
I wasn't intending to design it sight unseen, but wanted to ensure that
the issue was addressed. And that software was properly distrusted.
Joe Gwinn
Yep. I would insist, not just prefer, unless it could be shown that
fetching up against a stop was harmless.
I wasn't trying to design it, but wanted to make sure people didn't
trust software too much.
Joe Gwinn
> start
> if temp_too_high then open_curtain_a_smidge
> else if temp_too-low then close_curtain_a_smidge
> waitabit
> goto start
>
In which case, no position sensing would be necesary, at all.
If the curtain hits a limit, it just stops at a mechanical limit switch.
If the controller senses that the temperature stays a certain amount past
a warning limit either way, and isn't making an excursion toward the
desired temperature, it signals an alarm saying it can no longer cope.
That's a good idea, Don. Dead-simple, too. No PLC is necessary if the
out-of-control alarms aren't needed: Just a timer and temperature
comparator with a "safe range of temperatures" dead-band. Wait a period
of time, and decide to move the curtain, or not, then do it again, over
and over.
LLoyd
I looked at some of the instructions on the Parallax website and it
refreshed my memory. You can address memory as bits, bytes, or words, so 16
bit math should be OK, but on limited words. The specs for the BS2 say 32
bytes ram, 6 for I/O & 26 for variables, I guess you can have up to 13 word
variables.
RogerN
>Don Foreman <dfor...@NOSPAMgoldengate.net> fired this volley in
>news:cb80i5tauavh8j16u...@4ax.com:
>
>> start
>> if temp_too_high then open_curtain_a_smidge
>> else if temp_too-low then close_curtain_a_smidge
>> waitabit
>> goto start
>>
>
>In which case, no position sensing would be necesary, at all.
Right.
>
>If the curtain hits a limit, it just stops at a mechanical limit switch.
>If the controller senses that the temperature stays a certain amount past
>a warning limit either way, and isn't making an excursion toward the
>desired temperature, it signals an alarm saying it can no longer cope.
>
>That's a good idea, Don. Dead-simple, too. No PLC is necessary if the
>out-of-control alarms aren't needed: Just a timer and temperature
>comparator with a "safe range of temperatures" dead-band. Wait a period
>of time, and decide to move the curtain, or not, then do it again, over
>and over.
It's just my understanding and expression of Karl's idea.
Karl suggests using two t'stats rather than a temp sensor. No A/D
necessary -- although the 14-pin PIC16F684 ($1.96) does have on-chip
A/D. Again, KISS. All that would be needed would be the PIC chip,
some transistors and diodes, the T-stats and limit switches and a
5-volt regulator if it runs off a 12-volt battery. Oh, and a few
lines of assy code.
I think I'd use the A/D and a couple of pots so motor on-time and
delay time could be user-variable, even if the temp sensors are
t'stats.
I agree with Tim about concepts that are "too simple to work well",
but this is so danged easy to try that little would be lost if it
disappoints.
Copy that!
That's what I was referring to re: the small controllers like PICs and
Stamps.
And - the reason I still prefer the Z-80 for control work. It has the room and
power to expand, a very flexible instruction set (Like 16 bit math, for
instance) and decades of practical experience to fall back on.
I really do hate painting myself into a corner.
"Things should be as simple as possible -- and no simpler"
Albert Einstein
Richard
Lose contact with reality for a moment and all is lost, even if the computer is
still working perfectly.
But it is possible to build it so that it can recover.
Aircraft Fly-By-Wire systems HAVE to. There is no choice.
There is no connection between the pilot's controls and the aircraft's control
surfaces.
The pilot's controls tell the computer what he wants and the computer
operates the flight surfaces to make that happen (or even prevent that from
happening!)
You might want to contemplate that for a few hours - next time you fly
commercial. (mad scientist laugh!)
Back in the early days of the space program, Mercury and Gemini used analog
computation machines for control of the hardware.
If a glitch happened, the system recovered as soon as the glitch was gone.
Outputs changed as fast as resistors and capacitors react to the inputs.
But with digital systems, the latency is longer. Sample input, process stuff,
make output, THEN go back and take the next sample.
That can take a considerable amount of time.
>On Mon, 7 Dec 2009 10:09:26 -0600, "Karl Townsend"
><karltown...@embarqmail.com> wrote:
>
>
>>Think simple greenhouse exept $/sq.ft. must be lower. Usually no to limited
>>electric. Most important crops are planted in soil. The aim is to produce a
>>crop such as tomato, etc. that harvests much earlier in the season.
>>
>>Karl
>>
>
>Yabbut what's the difference between "High tunnel" and plain ordinary
>polytunnel greenhouses?
>
>Expiring minds want to know :-)
Who cares? With your feared AGWK, you'll soon be able to grow
tomatoes Over There, too!
--
To know what you prefer instead of humbly saying Amen
to what the world tells you you ought to prefer,
is to have kept your soul alive.
-- Robert Louis Stevenson
>I would like to see limit switches at each end just for safety sake.
>That would take up two bits of input per vent.
Not nessarly. If you are using a DC motor, just cut the power with
the switches. Add a diode across the switch so the motor can reverse
off the limit.
--
Dan H.
northshore MA.
That Lassie!
What a dog.
Do some of the PIC's have the ability to use external memory(pins used as
address and data)? I thought maybe the 17CXXX had that capability, I
thought I read it in the specs but never looked at the detail.
Years ago I bought a PIC Servo chipset and built a nice servo control on my
solderless breadboard. Once it was tuned correctly it was awesome. The
chipset used one PIC to read the encoder and another did the 32 bit math,
PID, and trajectory control. It was supposed to be capable of tracking a
500 line (2000 counts in quadrature) at up to 15,000 RPM. And today PICs
have a lot more RAM, and program memory.
I have a PIC 16F877 and a PICBASIC PRO compiler, I need to start playing
with, maybe make my own robot similar to the BOE BOT my son's getting for
Christmas.
RogerN
The requirement I didn't mention was a lot of torque, in the 100's of
ft-lb. range. That says gearbox, efficent one. Cycloids are about
96%, 2-stage about 90%. Horsepower requirement was low, speed
extremely low, torque high. Worked well.
The torque was caused by several feet of o-ring plus web drag at
pressure with the viscous hot (230C) material being filtered. It was
an unusual requirement, but definitely one for a good gearbox.
Actually, the gearbox was a tiny fraction of the overall cost on this
beast.
Pete Keillor
Another approach (although the 12 volt thing might be an issue) are
regular temperature controllers. They're available pretty cheaply,
take most any sensor input, and can have on-off, time proportioning,
or full analog outputs. Time proportioning might be the ticket. You
can limit the on-time per cycle, and set the cycle time to what you
want.
Pete Keillor
Well, yes, but to the limit of the provided control laws (which capture
the complex and nonlinear aerodynamic behaviour of the airframe in
question). The last few cases where something odd happened in a
fly-by-wire thing (that was not traced to sensor malfunction) it turned
out that the airplane somehow got into a flight regime outside of the
regime where the provided laws were valid, and the fix involved changes
to and expansions of the control laws.
> There is no connection between the pilot's controls and the aircraft's
> control surfaces.
>
> The pilot's controls tell the computer what he wants and the computer
> operates the flight surfaces to make that happen (or even prevent that from
> happening!)
>
> You might want to contemplate that for a few hours - next time you fly
> commercial. (mad scientist laugh!)
Actually the lack of direct connection has been true in large transport
aircraft for many years, long before computers arrived, because the
required forces on the aerodynamic control surfaces of a large airplane
well exceed what a human can generate in the allowed response time.
In the old days, there was a hydraulic control system controlled by a
human. Now the human is either supplemented or supplanted by a computer.
> Back in the early days of the space program, Mercury and Gemini used analog
> computation machines for control of the hardware.
>
> If a glitch happened, the system recovered as soon as the glitch was gone.
> Outputs changed as fast as resistors and capacitors react to the inputs.
True, so long as the analog system didn't oscillate, and aerodynamic
response-time lags can cause oscillation. So can the human pilot:
<http://en.wikipedia.org/wiki/Pilot-induced_oscillation>.
> But with digital systems, the latency is longer. Sample input, process
> stuff, make output, THEN go back and take the next sample.
> That can take a considerable amount of time.
This is not the problem at all. The digital system samples far faster
than the response time of the airframe in question, so the digital
system exactly replicates the behavior of an analog system built to the
same control laws.
<http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem>
The problem is not that fly-by-wire systems are digital sampled-data
systems, it is that they contain computers and especially software, and
a software bug can do literally anything. Pure hardware solutions tend
to degrade far more gracefully. The intent of DO-178B is to eliminate
all software bugs from the control software.
Joe Gwinn
Not many PICs have external memory, but there are some PICs with multiple
kilobytes of RAM -- which would be a reason to go beyond a Basic Stamp.
Roger, if my prototype works out, I need to use a less expensive chip than
the basic stamp. I assume the compiler you have uses a less expensive chip.
What will I have to do to transfer a program? Start all over? Is there a
learning curve here? I ask because I have time to learn in the winter, not
in the summer.
Karl