Searching \ for 'Gotcha not' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: piclist.com/techref/index.htm?key=gotcha+not
Search entire site for: 'Gotcha not'.

Truncated match.
PICList Thread
'Gotcha not'
2000\03\09@175651 by John Orhan

flavicon
face
Hi PICsters,
I have a really interesting problem that I wish someone could help me with.
I have constructed a watering system controller for my grandmother which is
supposed to eliminate the need for her to water the garden. All I am doing
is looking for sunlight through an photodiode, counting a number of delays
that would equate to around 5 hours, set a bit that corresponds to the water
valve ( this in fact turns on a relay that activates the 24vDC water valve),
waits for half an hour, turns off the valve then does nothing at all until
it sees night and does the whole thing all over again the next day. Simple
is it not? The code is even simpler and when I have shortened the delays to
minutes instead of hour it works fine. Power supply seems O.K, (12 watts),
PIC is 16C84 and the whole thing sits under an acrylic dome. Anyone hear of
heat or light affecting the PICs as it seems to be latching up not turning
off the water valve. I don't think it would ever get more than 40 or 50 on a
hot day   ( degrees C ). Any ideas??

                                                                       John

               {Original Message removed}

2000\03\09@182614 by Dale Botkin

flavicon
face
On Fri, 10 Mar 2000, John Orhan wrote:

8< snip...
> valve ( this in fact turns on a relay that activates the 24vDC water valve),
8< snip...
> PIC is 16C84 and the whole thing sits under an acrylic dome. Anyone hear of
> heat or light affecting the PICs as it seems to be latching up not turning
> off the water valve. I don't think it would ever get more than 40 or 50 on a
> hot day   ( degrees C ). Any ideas??

Do you have a reverse diode across the relay coil?  If not, de-energizing
the relay will cause back EMF as the magnetic field collapses, which will
spike the PIC pin and cause problems.  Pretty common problem, from what I
have heard.  Of course, one would think that would cause it not to turn
the water *on* the next time, but it would probably be pretty
unpredictable.

Another thought -- how are you driving the relay?  I assume you have a
bipolar or a MOSFET to drive the coil?  You might be pulling too much
current thru the PIC pin if you're trying to drive it dirrectly or thru a
bipolar transistor.  That's why I prefer MOSFETs, too lazy to compute
base current. 8-)

The PIC should be good to 125C under bias according to the spec sheet...
but remember to allow for the black PIC absorbing energy from sunlight,
which will raise the temp. of the PIC well above the 50C ambient
temperature.  Shouldn't get over 100C, though, I'd think.

Dale
---
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

2000\03\09@183232 by l.allen

picon face
> The PIC should be good to 125C under bias according to the spec sheet...
> but remember to allow for the black PIC absorbing energy from sunlight,
> which will raise the temp. of the PIC well above the 50C ambient
> temperature.  Shouldn't get over 100C, though, I'd think.
>
Beware running PICs above 60degC.
One problem I had was an A/D conversion with a
PIC 12C672 took seconds above 60 degC, never figured
out why, but a heatsink taking a power mosfet's heat
away from the PIC fixed the problem.


_____________________________

Lance Allen
Technical Officer
Uni of Auckland
Psych Dept
New Zealand

http://www.psych.auckland.ac.nz

_____________________________

2000\03\09@183651 by ND Holmes

flavicon
face
<x-flowed>At 05:25 PM 3/9/2000 -0600, you wrote:
>Another thought -- how are you driving the relay?  I assume you have a
>bipolar or a MOSFET to drive the coil?  You might be pulling too much
>current thru the PIC pin if you're trying to drive it dirrectly or thru a
>bipolar transistor.  That's why I prefer MOSFETs, too lazy to compute
>base current. 8-)

I agree completely on FETs - one thing of note, though, I've seen inductive
kickback spikes come back across the parasitic gate capacitance and nuke
less durable gate drivers (like micro pins... :).  So I'd say be sure to
either make sure you've got any kickback spikes clamped off well or use
some sort of drivers - I usually use a cheap PNP-NPN totem pole arrangement
to buffer the PIC output - also provides faster drive to the gate...

ND Holmes
--------------------------------------------------------------------------
 Nathan D. Holmes   spam_OUTmaverickTakeThisOuTspamdrgw.net, .....ndholmesKILLspamspam@spam@iastate.edu
   122 Shepard #3  Box 328  Gilbert, IA 50105  Iowa State University - EE
   http://www.drgw.net/~maverick   PH: 515-663-9368
   "Unless a man has creativity and self-motivation, freedom is an irksome
burden."
-------------------------------------------------------------------------

</x-flowed>

2000\03\09@190947 by l.allen

picon face
> >Another thought -- how are you driving the relay?  I assume you have a
> >bipolar or a MOSFET to drive the coil?  You might be pulling too much
> >current thru the PIC pin if you're trying to drive it dirrectly or thru a
> >bipolar transistor.  That's why I prefer MOSFETs, too lazy to compute
> >base current. 8-)
>
> I agree completely on FETs - one thing of note, though, I've seen inductive
> kickback spikes come back across the parasitic gate capacitance and nuke
> less durable gate drivers (like micro pins... :).  So I'd say be sure to
> either make sure you've got any kickback spikes clamped off well or use
> some sort of drivers - I usually use a cheap PNP-NPN totem pole arrangement
> to buffer the PIC output - also provides faster drive to the gate...
>
>
The only problem with the spike theory.... John said the
project worked fine if he reduced the time delay to
minutes rather than hours.

>"when I have shortened the delays to minutes instead of
>hour it works fine."

I suspect the heat theory myself, that or a really obscure
code problem.


_____________________________

Lance Allen
Technical Officer
Uni of Auckland
Psych Dept
New Zealand

http://www.psych.auckland.ac.nz

_____________________________

2000\03\09@212014 by John Orhan

flavicon
face
Hi all,
Many thanks for the varied and wonderful answers. I am driving the relay
transistor (2N222A) through a 1K resistor from the PIC and the relay has
reverse BEMF protection.

               {Original Message removed}

2000\03\09@221200 by dblain

picon face
Is it a windowed PIC?  Just a thought, but if any UV is getting through the
dome from the direct sunlight, it may be changing ram or even worse, erasing
parts of the program.

Just a thought from a beginner.

David.

2000\03\10@052919 by Ian Rozowsky

flavicon
face
What are the chances that your timing routines have a glitch? When
you use short times, you indicate it works fine. Longer times cause a
problem. Presumably for longer times you are using additional
registers to keep track of time. Do you not possibly have a bug where
these registers are not being incremented correctly, causing problems
with timekeeping?

regards

Ian Rozowsky
Development Engineer
Centurion Systems
Box 506 Cramerview 2060 South Africa
Tel   : +27-11-708-2680
Fax   : +27-11-708-2630
e-mail: rozspamKILLspamcentsys.co.za

2000\03\10@054630 by Spehro Pefhany

picon face
At 05:29 AM 3/10/00 -0500, you wrote:
>What are the chances that your timing routines have a glitch? When
>you use short times, you indicate it works fine. Longer times cause a
>problem. Presumably for longer times you are using additional
>registers to keep track of time. Do you not possibly have a bug where
>these registers are not being incremented correctly, causing problems
>with timekeeping?

To check for a hardware problem... suggest you make a program that
switches the relay on and off rapidly, maybe 1 second on/1 second off
and listen to it operate for a few minutes. It's very important that
the solenoid valve be connected during this test, it's quite possible
that the problems are related to the solenoid inductance.

Best regards,


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany                                    "The Journey is the reward"
.....speffKILLspamspam.....interlog.com
Fax:(905) 271-9838                      (small micro system devt hw/sw + mfg)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

2000\03\10@064015 by Joe Hamilton

flavicon
face
I personally feel the problem could be in your code.  Why not post it and
let some of these experts (me excluded) look it over.

Joe

{Original Message removed}

2000\03\10@102525 by Terry

flavicon
face
Are you using a PCB under the dome? Either enclose the PCB in a water tight
enclosure with a small packet of desiccant prior to sealing it up or use a
good conformal coating sprayed top and bottom of the board. Clear domes are
great for distilling pure water by condensing water vapor. Make sure the
LDR and it's circuit is coated with the conformal coating too. You can tape
a small piece of masking tape on the lens of the LDR and peel it off before
the coating fully dries.

Cheers
Terry



At 01:18 PM 3/10/00 +1100, you wrote:
>Hi all,
>Many thanks for the varied and wonderful answers. I am driving the relay
>transistor (2N222A) through a 1K resistor from the PIC and the relay has
>reverse BEMF protection.

2000\03\10@142128 by mike

flavicon
picon face
<color><param>0000,0000,0000</param>Just a silly thought John, could it  simply be a bird or a clouds
shadow, during daylight, or a car headlight at night confusing the
sensor?. I'm assuming you hav'nt got a check, check,check again
routine to establish day from night.

also ;-)  is'nt it better to water your garden in the evening ;-)

just my 0.01 Euro worth.. Mike W


<color><param>0000,0000,FF00</param>On 10 Mar 00, at 0:11, Automatic digest processor wrote:


Date:    Fri, 10 Mar 2000 09:02:29 +1100

From:    John Orhan <<EraseMEJOrhanspam_OUTspamTakeThisOuTEDM.COM.AU>

Subject: Gotcha not


Hi PICsters,

I have a really interesting problem that I wish someone could help me

with.

I have constructed a watering system controller for my grandmother which

is

supposed to eliminate the need for her to water the garden. All I am

doing

is looking for sunlight through an photodiode, counting a number of

delays

that would equate to around 5 hours, set a bit that corresponds to the

water

valve ( this in fact turns on a relay that activates the 24vDC water

valve),

waits for half an hour, turns off the valve then does nothing at all

until

it sees night and does the whole thing all over again the next day.

Simple

is it not? The code is even simpler and when I have shortened the delays

to

minutes instead of hour it works fine. Power supply seems O.K, (12

watts),

PIC is 16C84 and the whole thing sits under an acrylic dome. Anyone hear

of

heat or light affecting the PICs as it seems to be latching up not

turning

off the water valve. I don't think it would ever get more than 40 or 50 on

a

hot day   ( degrees C ). Any ideas??




John


<nofill>
--
Life is dark and empty for the PIC developer without VirtualBreadboard
go look at it...  http://www.virtualbreadboard.com

2000\03\13@195908 by John Orhan

flavicon
face
Hi all,
Now theres a thought! I have not checked that particular gotcha and cannot
wait to get home tonight to test it out. Thank a million!! I will let you
know how I went.

                                               John

               {Original Message removed}

2000\03\13@200120 by John Orhan

flavicon
face
Hi and thanks for the tip. I will certainely do so but must warn you the
code actually works when the timer values are reduced. Also, it has to be
the second simplest code I have ever written short of flashing an LED. Will
post tomorrow anyway.
       John

               {Original Message removed}

2000\03\13@201117 by John Orhan

flavicon
face
Hi there,
I will post the code tomorrow and I think you'll agree there is little
chance of error due to the utter simplicity of the code. Thanks for your
reponse.

                                               John

               {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...