Shop OBEX P1 Docs P2 Docs Learn Events
First Stamp Controller Project with Schematic — Parallax Forums

First Stamp Controller Project with Schematic

smlcaerussmlcaerus Posts: 18
edited 2007-09-13 23:07 in BASIC Stamp
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
1654 x 1279 - 166K

Comments

  • JonathanJonathan Posts: 1,023
    edited 2007-09-12 16:20
    Shawn,

    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
  • smlcaerussmlcaerus Posts: 18
    edited 2007-09-12 16:26
    The float switch does not provide the "current depth" only really a means of detecting FULL or NOT. Not sure about the moisture holdup, I have encosed it, and sealed it with gasket liquid (rubber now). I looked trying build my own sensor, with just having outdoor TRANSDUCERS below the floor, but I am not that advanced yet to tackle that feat. Basically the optimal situation would be just like the PING except the guts of the PING would be back at the controller area and the only items below the shower floor would be the 2 transceivers for the SONAR PING'ing, with 4 wires running back to the PING guts.

    ???

    Shawn
  • JonathanJonathan Posts: 1,023
    edited 2007-09-13 14:33
    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
  • LilDiLilDi Posts: 229
    edited 2007-09-13 16:49
    I am overwhelmed with one thought here!!
    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.
  • JonathanJonathan Posts: 1,023
    edited 2007-09-13 17:00
    Agreed on the safety float valve. Good thought on the chlorine. I should have thought of that myself. I have a hot tub that uses a LM34 sensor in a 1/4 tube. My first one was brass tubing, and failed at the waterline. I'm sure the bromine had something to do with it. I replaced it with stainless.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • LilDiLilDi Posts: 229
    edited 2007-09-13 17:29
    Instead of a float valve, you might go with a safety drain like in your bathtub.

    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
  • cyplesmacyplesma Posts: 76
    edited 2007-09-13 18:49
    use the float valve as a limit switch to shut water off just like toilet tank.

    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
  • smlcaerussmlcaerus Posts: 18
    edited 2007-09-13 18:59
    Ok, all good points. comments/questions/answers:

    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
  • LilDiLilDi Posts: 229
    edited 2007-09-13 19:53
    Thermisters are a special kind of resister that are very sensitive to temperature and are very inexpensive. There value changes with temperature, but you have to ask yourself, I've spent hundreds of dollars building a really cool shower, and I'm concerned about a few dollars worth of sensors.

    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
  • smlcaerussmlcaerus Posts: 18
    edited 2007-09-13 20:46
    Ok, going the inductive/capacitance route, what i need to know (as you guys already do [noparse]:)[/noparse] ) What I need to do ( a little more exactly ) so I can model it, then build it [noparse]:)[/noparse]

    And if i hadnt said - thanks for everyone's help.
  • LilDiLilDi Posts: 229
    edited 2007-09-13 21:06
    The antenna is the outside metal tube and the finger is the water in the tube as you look at this schematic.


    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
    512 x 384 - 13K
  • smlcaerussmlcaerus Posts: 18
    edited 2007-09-13 21:22
    Ok, so would I run "10" similar setups of this to read 10 various levels? Or by running this to a metal "pipe" will it actually give me back different readings depending how much water flows up the pipe? (and I assume the wire just needs to be connected to the 12" pipe in that case), if needing 10 similar positions i dont see the need of a pipe.
  • JonathanJonathan Posts: 1,023
    edited 2007-09-13 21:37
    The resistive contact route will end up being a hassle with cleaning contacts. I tried a similar idea in an electrolysis chamber I built. Worked great at first but then failed.

    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
  • Larry SutherlandLarry Sutherland Posts: 77
    edited 2007-09-13 22:01
    Food for thought!

    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.
  • smlcaerussmlcaerus Posts: 18
    edited 2007-09-13 22:25
    Yup 450.00 - flowline.com

    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]
Sign In or Register to comment.