> Yes, it's a good suggestion and may stop your PIC locking up, > which would be quite OK in possibly many applications, but if > it were me I'd like to find the reason for the hanging. Hate > unfinished business, but I appreciate the difficulty you have > finding out what's causing it to hang I agree; ideally, I'd love to get to the root of the basic problem too > > My guess would be the 240V switching. How's that being done - > relay, solenoid, triac, other ? > A small relay that in turn drives the 3 phase motor starter coil. > Would it be possible to run it off a battery (eg a gel cell) for a > while and maybe even opto-isolate the sensor ? May help to > pin down the fault Because of the frequency of occurrence, I dont think this would be practical. I was toying with the idea of using the battery as a supplement to the 7805 supply, to clean out the DC at my most desperate moment, though. > Maybe a 4-20mA loop for signal rather than whatever it is > now - voltage , resistance ? Often used in noisy environments The 'sensor' is actually a PWM out from the pic galvanically isolated (cap in series at the output, and in series at the inputs), returning to the input pin thru' the water body. No DC content in the current, works great. > > On the other hand, if this is a one-off and it really really really > does work, then screw it, get it going and move on > Unfortunately, it is not! This is a pilot installation, many more would be hopefully made once I sort out the issue! Regards, Anand > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu ---------------------------------------- My Inbox is protected by SPAMfighter 549 spam mails have been blocked so far. Download free www.spamfighter.com today! -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu