Reptile Cage Controller
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!
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
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
http://www.parallax.com/html_pages/downloads/siccurriculum/documentation_sic_curriculum.asp
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick
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
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
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.
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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 Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
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
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
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