First Stamp Controller Project with Schematic
smlcaerus
Posts: 18
Hi everyone
I have attempted to build my FIRST true use project and board for use in my home.· Basically I have a this wonderful new remodel taking place in my home, so I am putting every little bit of home automation into it.· Anyway, in my shower I have installed this very neat, but very expensive waterfall bodyjet system.· It works much like a jacuzzi tub, in that it recirculates about 120 gallons of water thru a waterfall and 10 bodyjet sprays.· The key to the system is the reservoir of water it must have to recirculate.· We designed a "mini pool" under the shower floor which is square (6ft by ft bt 1 ft deep).· Now this will hold plenty of water, but the question came to be, ok, fill it, but how do you know when it is full.· Hency my interest in learning to program STAMPS.
The device built uses the stamp to talk to the parallax PING device, which is embedded under into the floor system, looking downward into the mini pool.· It runs a cable (Signal, +5V, GND) back to my controller.· My controller also runs a 10 wire cable to a LCD display with a few buttons.
Also, having a ULN2003 chip driven by the STAMP, which drives a relay that in turn drives a 3/4" water valve (eg irrigation valve).
So the working process is, press a button it begins to fill (by actuating PIN 15 to high, triggering the RELAY to OPEN the irrigation valve), it monitors the PING device for distance of the water line.·When the water lines comes within 2 inches, it knows the POOl is full, so it LOW's PIN 15, causing power to cease going to the irrigation valve, causing the water to stop filling.
All the while showing a nice pretty display on the LCD panel of the current fill level.· I have also added (1) LED for simply a power light, another LED (2 color), to show the current valve/relay action.
Attached is the schematic, i have this pretty much bread-boarded and working, but want to put this simply on my own PCB and install it.· I have attached the schematic and would appreciate anyone/everyone's feedback on if I am missing anything here???
Couple of items which probibly need explination:
NC4MAV is the cable which runs to the REMOTE Parallax PING unit.
IC3 is a 5V Regulator
JP1 is a DC Input Jack for Power
The relay being used is a TQ2-SA-5V
The irrigation valve is your run of the mill irrigation valve, meant for 24V, but works just fine with 7V DC as input.
I would really appreciate any feedback before I actually move this thing to my own PCB and find I needed to add something [noparse]:)[/noparse]
Thanks
Shawn
I have attempted to build my FIRST true use project and board for use in my home.· Basically I have a this wonderful new remodel taking place in my home, so I am putting every little bit of home automation into it.· Anyway, in my shower I have installed this very neat, but very expensive waterfall bodyjet system.· It works much like a jacuzzi tub, in that it recirculates about 120 gallons of water thru a waterfall and 10 bodyjet sprays.· The key to the system is the reservoir of water it must have to recirculate.· We designed a "mini pool" under the shower floor which is square (6ft by ft bt 1 ft deep).· Now this will hold plenty of water, but the question came to be, ok, fill it, but how do you know when it is full.· Hency my interest in learning to program STAMPS.
The device built uses the stamp to talk to the parallax PING device, which is embedded under into the floor system, looking downward into the mini pool.· It runs a cable (Signal, +5V, GND) back to my controller.· My controller also runs a 10 wire cable to a LCD display with a few buttons.
Also, having a ULN2003 chip driven by the STAMP, which drives a relay that in turn drives a 3/4" water valve (eg irrigation valve).
So the working process is, press a button it begins to fill (by actuating PIN 15 to high, triggering the RELAY to OPEN the irrigation valve), it monitors the PING device for distance of the water line.·When the water lines comes within 2 inches, it knows the POOl is full, so it LOW's PIN 15, causing power to cease going to the irrigation valve, causing the water to stop filling.
All the while showing a nice pretty display on the LCD panel of the current fill level.· I have also added (1) LED for simply a power light, another LED (2 color), to show the current valve/relay action.
Attached is the schematic, i have this pretty much bread-boarded and working, but want to put this simply on my own PCB and install it.· I have attached the schematic and would appreciate anyone/everyone's feedback on if I am missing anything here???
Couple of items which probibly need explination:
NC4MAV is the cable which runs to the REMOTE Parallax PING unit.
IC3 is a 5V Regulator
JP1 is a DC Input Jack for Power
The relay being used is a TQ2-SA-5V
The irrigation valve is your run of the mill irrigation valve, meant for 24V, but works just fine with 7V DC as input.
I would really appreciate any feedback before I actually move this thing to my own PCB and find I needed to add something [noparse]:)[/noparse]
Thanks
Shawn
Comments
One thing springs to mind: Is the PING sensor going to be able to deal with the moisture? You might want to consider a float switch instead.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
???
Shawn
Building a PING unit like you describe with long wires may be a little problematic. The TX side would be no problem, but the RX side would probably need to have the amplifier located near it. Sending a weak signal over a distance with a wire is likely to pick up a lot of noise.
I still have concerns, even though you have protected the electronics side of the ping. The transducers are a moving mechanical device, and not designed for a humid enviorment. Perhaps contact Parallax support and ask them what they think. There was a thread a year or two ago, and I can't remember if the person had actually tried the PING (for a water tank, I think) but there was at least discussion about the suitibility of this sensor for this type of application.
I didn't realize that you needed to know the depth, your original post only mentioned "full". If you need to know depth, two other possibilities spring to mind:
Float connected to a pot or an encoder. You can get sealed pots I think, or you could seal it up yourself. Just have a shaft seal on the float shaft.
A capacitive sensor. Think of a piece of plastic pipe with thin stainless steel wrapped around the inside and outside. As the water level rises, the capacitance increases. You could use the RCTIME command.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
If any of these electronic components fails in this moisure rich environment, your going to come home to a house with thousands of gallons of water all over the house and basement.
Your going to need a safety float valve no matter what, like the tried and true float valves found in toilets. The PING for example is probable going to fail from moisture damage and chlorine within a week. The float valve will need to be able to hold up to the chlorine in the water as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Are you going to install an electric water heater in the 150 gallon pool. I hate cold showers!
Jonathan might have the right idea. Warm water going up a plastic 1/4" riser tube with a series of LM34 sensors going up the outside of the tube might give you a reading of the water level.
Post Edited (LilDi) : 9/13/2007 6:17:06 PM GMT
but you could find a way to have the float valve turn a pot as well so you don't have to use the ping sensor.
perhaps a toothed bar turning a gear mounted on the pot
Yes, the water is heated inline by the Kohler Waterfall/Bodyhet system, as the water circulates thru the pump there is an inline heater [noparse]:)[/noparse] So no cold showers [noparse]:)[/noparse]
As for the mositure/humidity etc, i totally agree, as why I had hoped surrounding the entire ping inside a plastic casing then with gasket sealer thought may prolong the death, but seems may not be enough.
Ok, so now I have also added a DS2423 1 Wire chip, which also has a COUNTER on it. I have placed (theoretically) a water flow meter (simple valve box which PULSES with each 1/10 of a gallon), so if water is detected flowing when unit is not in FILL mode, it can close the valve and generate an alaram on my home automation system.
Moving on to the "depth gauge" application part. I like where this headed, but would think there should be an easier way of doing this rather than lining up a bunch of costly sensors. Thinking along the line of resistance and conductivity. Water is a conductor, even though minimal as well with DC voltage and all the impurities in water. Could not a single +5V be run to a say a 12 inch high plastic boxbox. (12x1x1), which ran along the side of the tub. (As it is under the shower floor we dont see it). Could I not run a series (say 10), of equally spaced same size resisertors in parallel down the board. The leads would be about a 1/4" inch apart on the outside, and resistors on the inside (Yes the inside would need to be waterproof).
The return wire would carry a load based on the number of resistors that were conducted ? I could compute the empty and full loads, and then divide the actual return to get my approximate depth.
Additionally, I could have a top 11th one (failsafe), which was its own +5v lead, with a resistor in the same fashion, and if I got back any voltage on that whatsoever, failsafe shutoff ?
As I said I am a complete newbie to electronic circuits, but this is a $2.00 solution and seems like it would work?
Shawn
Thermal resisters on the outside of the plastic riser tube.
This is an after thought edit:
If I read you correctly, your not going to reuse the 150 gallons of water so your not going to add chlorine to the water. Your going to drain 150 gallons of water after each use of the shower. Don't bother adding a brick in you toilet to conserve water. How much does 150 gallons of water add to your water bill anyway?
Thermisters aren't going to work with the in-line heater. I would go the inductive/capacitive proximity sensor route in this case. (on the outside of the riser tube)
Like Jonathan said. A plastic riser tube with a thin metal tube on the entire outside of the riser. (A plastic tube inside a metal tube). Using··a single·Parallax touch sensor (QT-113) with the outside metal tube as the antenna should work. You shouldn't need a metal inside tube though. The water should make an excellent ground return loop for the touch sensor.
Post Edited (LilDi) : 9/13/2007 8:57:56 PM GMT
And if i hadnt said - thanks for everyone's help.
I'm sorry. The Touch sensor is not a good fit here. Just read its specs and it definately won't work here.
Post Edited (LilDi) : 9/13/2007 9:52:18 PM GMT
The thermistor idea sounds good. I still like the idea of the capacitive sensor, but I have never actually done it, so I can't really say how well/long it would work. Would be super cheap though. Just get a couple pieces of the thinest sheet stainless steel you can find, roll it to fit the I.D. and O.D., glue in place. Since stainless doesn't solder well, use a mechanical contact and coat it in epoxy.
Another route would be to use a pressure sensor. Stick one on the end of a piece of pipe, then lower the pipe into the water. As the water rises, so will the pressure in the pipe. One thing here is that the air in the pipe will be absorbed (very) slowly by the water. I imagine it would take quite a while for that to be a problem, and I presume you will empty and clean it periodically, so that would probably take care of the absorption issue.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
First of all I love Parallax and the abilities it has and I'm relatively new to microchip programming.
I would like to suggest back off the elctronics a little bit and consider some electrical sensors that will work in wet, hot, corrosive evironment that can be globalized under a controll relays which will interface with Parallax . Kind of like a PLC design.
Looked at it, but i am in the middle of a complete home remodel, to which (no joking), i have over 9,000 feet of new cabling, everything his home automated. The bathroom remodel for the master is my pet project, so i the approach here is much like a PLC in that, the "sensoring" being done will report back to the HA systems, as well as monitor this stuff. While everything still has a manual control, they are located just out of the way.
The bathrooom is like disneyland, jaccuzzi, steamer, sauna, and for all men - a urinal.
So, as with most home projects this has grown into something much larger than anticipated, and now im devising this more for fun (knowing i could spend 450.00 on the flowline unit) if i need too.
for me its more about the education of electronics themselves (as i am a 15 year programmer) i never much ventured to the circuit side of things till now. the idea will be to integrate this into touchscreen control and more, sensor input, graphical display, and who knows what else, and likely will in the end cost me more than 450.00, but will have gained a ton of knowledge (and hopefully not a flooded bathroom)
[noparse]:)[/noparse]
http://www.parallax.com/detail.asp?product_id=30064