PLC?

Karl Townsend wrote:


For a production part see... http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat%56109&ksic%20stamp $8 to $12 for various versions of the Stamp.
As for moving to a different processor... Well, yeah, you do sorta have to start over. But at that point you would have a working model to base the new system on.
These little guys (heck, ANY computer) architecture is everything. Instruction set, how Input/Output is accomplished, Interrupt capability, etc All effect how the code gets put together.
That's one of the selling points for higher level languages like C or BASIC. Supposedly it's easier to transfer the application to a new processor.
Richard
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Thu, 10 Dec 2009 10:26:50 -0600, Karl Townsend wrote:

How much is the Basic Stamp? The PIC processor itself can be had for a couple of bucks in small quantities from Digi-Key. You do, of course, still need to put it all on a board whether it's a Basic Stamp or a PIC.
Unless there are tools out there to 'roll your own' Basic Stamp from a PIC then yes, it'll need translation. And there's a learning curve for newcomers to C or assembly.
--
www.wescottdesign.com

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

The PIC Basic Pro compiler is meant to compile PIC Basic programs to use on a PIC. The differences come in because some PIC's have A/D, more memory, more I/O, etc. You wouldn't need to start over but you could use some PIC capabilities that the Basic Stamp doesn't have. I haven't used my compiler much but I did write some code to read the A/D and send it out RS-232 that I was able to view with HyperTerminal in Windows.
My recommendation would be to proceed as you plan for generation 1, see what changes you would like to make for generation 2, and try to get a final product for generation 3. There are ways to upgrade the firmware on products that have been released. If you get to hardware right, you can make better software available and customers can upgrade to the latest and greatest firmware. For my own project idea (a super duper battery charger) I would like to make the source code open so that the greatest programmers interested can provide the code to best utilize the hardware.
As far as hardware, I would recommend to use the PIC and external drives (Relay and H-Bridge). Use a heavy duty PIC and H-bridge on generation 2, and try to optimize hardware and software for the 3rd generation.
RogerN
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 09 Dec 2009 00:53:28 -0600, cavelamb wrote:

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.
--
www.wescottdesign.com

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
<snip>

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
"Lloyd E. Sponenburgh" <lloydspinsidemindspring.com> fired this volley in

oops! Forgot to say, the TriLogic boards have some user-devised, free PID samples to play with.
LLoyd
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

You can't know that because it will change significantly with cloud cover, sun angle, wind, etc.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Tue, 08 Dec 2009 22:06:17 -0600, Don Foreman

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Pete Keillor wrote:

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Yeah, you're right if discontinuous works, as in this case. I wanted continuous motion in the case I described.
Pete Keillor
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Pete Keillor wrote:

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.
:)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 09 Dec 2009 08:24:15 -0600, cavelamb wrote:

...Monitor the motor position so you can actively control it (speaking of bloatware).
--
www.wescottdesign.com

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
What's that Lassie? You say that Karl Townsend fell down the old rec.crafts.metalworking mine and will die if we don't mount a rescue by Sun, 6 Dec 2009 19:31:56 -0600:

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.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
"Karl Townsend" wrote

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Sun, 06 Dec 2009 19:31:56 -0600, Karl Townsend wrote:

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.
--
www.wescottdesign.com

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Sun, 6 Dec 2009 19:31:56 -0600, "Karl Townsend"

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.