Electronics Computer Programming Q&A
9 posts • Page 1 of 1
do you have the transducers yet?<p>can you describe the set up you wish to control? tank, water source, control valve, purpose? what do you do when the water is too high? too low?<p>why have you chosen the 12C509? it seems a bit odd to first pick that. <p>the basic concepts are pretty simple - emit an ultrasonic chip, measure US chirp time of flight, compute distance, do something with it (which is very vague at this point).
Here are docs for a commercial hobby ultrasonic ranger module. The ranger is based on a 12c508. Schematics and asm source code are also included.<p>http://www.robot-electronics.co.uk/htm/srf04tech.htm<p>It would probably be easier to just buy the ready made module.<p>Harrison
Hi<p>Basically my mother who is getting on, forgets the bath tap running with the usual catastrophic results, so I thought of a unit, maybe battery operated that could be hung on the edge of the bath and would give an audible warning when a preset level is reached. While I was about it I thought of my brother who fills his fish tank and wanted to incorporate in the design a feature to run the pump to drain tank but not letting it run dry. Lastly to keep costs down I was thinking of using a PIC12C509A. I am trying to learn pics and programming and it's taking too long, hence my need for some help<p>Cheers
ah, multipurpose solution. You really don't NEED a microcontroller. That said, I built a pump controller that does a lot of what you need. I used the 16F628A. I used the comparators in the 628A to measure the voltage through a divider, one side of the divider was the resistance across the water probes. No water - very high resistance. Water - reasonably low resistance. I used to two sets of stainless steel screws for probes (actually 3 - one was shared ground). This probably won't work for distilled water but that doesn't come out of a tap anywhere...<p>The 509A doesn't have comparators but you could use an external one.<p>Or, you could use the 12F629 which has one. I don't know what the cost is in SA. Here in the US, a 628A is around $1.70, the 12F629 and the 12C509A are about $1.10. I'm not a big fan of the C series since I don't get the program right the first time. The F (for flash) chips can be reprogrammed many many times.<p>On learning PICs, there are several tutorials on the web. This one seems pretty good. There is a ton of info out there for the googling. also, the microchip datasheets are very worthwile reading, even if you don't understand them. Another great resource are Microchip application notes. They usually take you through a specific project in quite some detail.<p>Finally, unless you have done some programming before, I suggest you use C or Basic rather than assembly language. There are several free compilers out there. drop me a line if you want more info on that.<p>Hope this helps.<p>Phil<p>[ September 28, 2005: Message edited by: philba ]</p>
Back in the late '60s I used a CK-722 germanium junction transistor in the common collector configuration to sense water level directly. The input impedance of the common collector configuration is very high, and the output impedance very low, so all one needed was a power supply, a moderately-sensitive relay, and a pair of probes to sense water between the probes. <p>Just a hint for a dumb, simple circuit to sense water level. No other components were needed... no bias resistors, no nuthin'.<p>(The CK-722 was one of the first readily-available germanium PNP audio junction transistors.)<p>[ September 28, 2005: Message edited by: terri ]</p>
Often the leakage on transistors was more bias current than you really wanted. Bias resistors tended to be in the 100K to 500K range. Tap water between two electrodes will be muck lower resistance than that.<p>For the bathtub alarm, all you would need is one or two transistors and a sonalert. A resistor in series with the base to limit current wouldn't hurt. When the water reaches the electrodes, the alarm sounds.<p>The aquarium could be similar. Water above electrodes, pump runs. Shut down pump when electrode drys out. You probably need another resistor or two to set a threshold on the electrode current. Another transistor could be used to give positive feedback for a latching action.<p>Or you can use a micontroller.
Users browsing this forum: No registered users and 6 guests