Shop OBEX P1 Docs P2 Docs Learn Events
Reptile Cage Controller — Parallax Forums

Reptile Cage Controller

edited 2007-01-12 19:07 in BASIC Stamp
First off, I'm new to Basic Stamps, but have done some basic programming, so I'm not clueless on the subject.

I'm building a cage for my Iguana and want to control a few things. I'd like to be able to turn on and off the heat lamps depending on temperature and also turn on a misting system depending on the humidity. I also want to be able to turn on the lights in the morning and back off at night. This is not essential as I can always just use a plug in timer. Whatever is cheapest.

What do you guys suggest?

I noticed that Parallax sells a temperature/humidity sensor. This seems like it would be perfect for my application and give me two sensors in one. Also, the BS1 USB board looks like it would provide all I need and it's nice and compact. Any opinions?

How would I go about turning the lights on and off? I.E. - Would I be able to use a high output to trigger a relay to turn on the lights? Do the outputs output 5v?

Thanks!

Comments

  • CCraigCCraig Posts: 163
    edited 2007-01-11 14:59
    Nitro,

    This is a very common project. There are lots of examples that will help you. Some may not be written exactly for PBasic, but will help you in any case. This could turn in to a big project for the first timer who has not build homebrew circuits before. Here's MHO and I hope others will comment and add.

    First, the BS1 USB will work fine, BUT you will need a solderless prototype board. If you don't have one, you will have to buy one. The Board of Education board might be a better option. I know money is tight, but this gets you upgraded to BS2 and the prototype board. (I think you should consider the BS2 instead of the BS1). The drawback is: once you get things working, you'll have to transfer it over to a solder on board. (more $$).

    Second, ONE THING AT A TIME. Don't work on temperature, misters, AC control, all at the same time. Pick one and get it working. Then, and only then, go to the next phase.

    You have the luck that all your things will use relays. (SSR solid state relays would be best). Once you figure out how to read the temp chip, figure out what hysteresis to use and turn the heat lamp on, you'll be all set to do the same with the misters and the UV lamps.

    It's a big project. Take it one thing at a time. You will learn a lot... AND you will have fun.

    HTH, Chris
  • RDL2004RDL2004 Posts: 2,554
    edited 2007-01-11 15:49
    Go to the Stamps in Class documentation page (link below) and download and read the "Process Control" and "Industrial Control" pdf books. They are based on the BS2 (which would be easier to use) but all the basic concepts are explained with lots of good examples.



    http://www.parallax.com/html_pages/downloads/siccurriculum/documentation_sic_curriculum.asp

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-01-11 16:23
    NitroRustlerDriver,

    I agree with CCraig, but I might also point out that the temperature/humidity sensor uses a communication protocol similar to I2C. If you are not familiar with I2C, that in and of itself can be a learning curve. With that said, the BS1 does not have a built-in SHIFTIN/SHIFTOUT function that can bit-bang the necessary I2C, you will need to implement your own SHIFTIN/SHIFTOUT function to do this. (<--Plenty of examples about doing this are available) The BS2 does·however·have built-in SHIFTIN/SHIFTOUT functions, so it is easier to establish communication with the temperature/humidity sensor right off the bat. (<--You will have to weigh out the amount of time vs. cost for your personal needs) Some of the BS2's have I2C capabilities, but in your case, I think this would definitely be overkill. Since the communication with the temperature/humidity sensor is "similar" to I2C, I don't think that an actual implementation of I2C would be usable. In that case, you would need to resort to using the SHIFTIN/SHIFTOUT routines anyway.


    For BS1<==>BS2 SHIFTIN/SHIFTOUT conversions, see the link below...

    http://www.parallax.com/dl/docs/prod/stamps/BS1nBS2ConvTips.pdf


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 1/11/2007 4:36:10 PM GMT
  • Vern GranerVern Graner Posts: 337
    edited 2007-01-11 16:30
    NitroRustlerDriver said...
    First off, I'm new to Basic Stamps [noparse][[/noparse]snip] I'm building a cage for my Iguana

    Just my two cents here, but I would be inclined to suggest you work on a different first project only because if there is a failure you could injure or even kill your pet. For example, if the heat lamps stay on too long smilewinkgrin.gif or the humidity system pumps water in till the cage becomes an aquarium etc.

    I would say you want to have a breadboarded, fully debugged and working model BEFORE you use it to control habitat for a living creature... I've been using stamps for years and unfortunately, they only do what I tell them to do, not necessarily what I mean for them to do. wink.gif

    Vern

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Vern Graner CNE/CNA/SSE    | "If the network is down, then you're
    Senior Systems Engineer    | obviously incompetent so why are we
    Texas Information Services | paying you? Of course,if the network
    http://www.txis.com        | is up, then we obviously don't need
    Austin Office 512 328-8947 | you, so why are we paying you?" ©VLG
    
    
  • edited 2007-01-11 23:17
    Alrighty, lots of great info.

    Craig, why would I need a solderless prototype board? Just so I can hook everything up and be able to make any necessary changes easily?

    Vern, don't worry. I plan and having the enclosure fully functioning before ever putting her in it.

    From what all of you say, it sounds like the BS2 is the better way to go.

    I do have basic knowledge of electronics. I took a basic electronics class in high school that covered a lot including digital circuits and I have been playing around with process control stuff for a long time. I've programmed robotic arms and CNC machinery (both independently and working together) along with other I/O controllers. I also have plenty of time to get this up and running as I am sort of piecing it together as I go over the next few months. [noparse]:)[/noparse]

    I made a short program of what I think all I will need (see attachment). The numbers given for the inputs are not real, they were just put there because I didn't know what they would actually be (until I get a temperature/humidity sensor). This was also just more to get my ideas down on paper (So to speak) and obviously would not be a final program.

    After looking BS2 stuff, how about this:

    http://www.parallax.com/detail.asp?product_id=27291

    There is also this one, but the I would need a board also.

    http://www.parallax.com/detail.asp?product_id=BS2-IC

    Why is the first one I posted so much cheaper then the second? Is it purely because it needs assembly, or am I missing something.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-11 23:25
    If you’re interested I could post an old Digital Thermostat Program I wrote some years ago to replace a Honeywell Thermostat for my furnace (in NY). It stores multiple programs per day and monitors the current temperature in relation to the set temperature, which can be changed by the program or the front panel buttons. In any event it may help you with some of your programming. A DS1302 was used for the Time/Date information for the schedule/program and a DS1620 was used for ambient temperature measurement. But you could easily change the hardware if need be. Runs on a BS2. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • edited 2007-01-11 23:29
    I would be interested in seeing it, if not only for an idea helper.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-11 23:34
    Okay, here you are...If you have any questions on the code, feel free to e-mail me at the e-mail link on the left.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-01-12 00:36
    The OEM Stamp kit is cheaper mostly because it's on sale. It's normally $45.

    Another kit to consider is the Basic Stamp Activity Kit: www.parallax.com/detail.asp?product_id=90005

    It has an excellent features to price ratio. It has a breadboard for ease of use, but i think it's just held on with double-sided tape, so you could probably remove it if you wanted to. There are prototyping holes below.

    Also, depending on your comfort-level with programming, you might also consider using an SX protoboard (see bottom of this page): www.parallax.com/html_pages/products/by_price/under_30.asp

    They are dirt cheap, and you can get a programmer for $30 (no debugger) or $50 (with in-circuit debugger). There would be a bigger learning curve than with the BS2, but you can still program them in Basic, and there is a lot of learning material becoming available.

    Of course, the Propeller Protoboards are due out soon...

    One last suggestion. Check out the "Sensors" manuals for more info: www.parallax.com/html_pages/edu/curriculum/flow.asp
  • RDL2004RDL2004 Posts: 2,554
    edited 2007-01-12 03:33
    The main difference between the two versions of the BS2 you listed is that you have to assemble the OEM version yourself.

    The OEM version is made with all thru-hole components and once assembled is about 4 to 5 times larger than the BS2-IC version.

    The BS2-OEM board is about 2 inches square with all the pins in one long row, while the BS2-IC is the same size and form factor as a 24 pin 0.6 inch wide dip IC, with 2 rows of 12 pins each. Note that the DB9 serial port socket is included on the OEM board, you have to provide it yourself with the BS2-IC.

    Functionally they are the same.

    Here is a picture to give you an idea how they both look in a breadboard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick

    Post Edited (RDL2004) : 1/12/2007 3:54:50 AM GMT
    752 x 500 - 238K
  • CCraigCCraig Posts: 163
    edited 2007-01-12 15:55
    Nitro,

    Yes, that's why you want/need a solderless proto board. It's easy and FAST. It costs you some money but it will save you lots of time and frustration. Your transfer to a solder on board will be clean (no pulling parts and re-wiring). After your success on this project, you'll have the solderless proto board for your next....

    HTH, Chris
  • hank van burenhank van buren Posts: 57
    edited 2007-01-12 19:07
    Why not use a fan thermostatically controlled by temperature the ideal temp is 85C during the day at night the temp should not fall below 70C The habitat should be well ventilated with cool spots for the animal to hide. The lights will have to put out about 90C the fan will come on at a temp of 86C and don't forget the UV lights.·I have been using this system for more the 2 years. Chris Savage has a good program for the BS2 ·I have been the keeper of a Iguanas ·for more than 12 years. Hank
    640 x 480 - 63K
    640 x 480 - 61K
Sign In or Register to comment.