I'm upgrading the problem to Phantom rating.
Update:
I placed a .1uF cap right on the +/- for the 'F88 [still have the 1000uF on there]
I purchased a rechargeable battery: +12V
I built a 5V Regulator with .1uF on IN and OUT [L7805CV 1.5A]
I am now supplying power from the battery to the logic circuit, including:
PIC16F88
74HC165 PISO CASCADE
74HC164 SIPO CASCADE
411GHR R NETWORK
ULN2004 DARLINGTON ARRAY
5V RELAYS [16A 240VAC CONTACTS]
VARIOUS SWITCHES AND DIALS
The reset problem persists. ratsass.
The motors are 220VAC 1.5Horse and drive belt conveyors.
I have tried running the program without power to the motors [power from chip to darlington, to 5V relays; 110VAC through those relays to the motor drive relays,no load on those relay contacts] and it is an unqualified success. At no point during tests that range from 2 cycles to 25 cycles does the 'F88 reset itself. Yet, when I run the program with power to the motors, I get an intermittent restart. Restart occurs anywhere from 2 cycles to 7 cycles, 7 being on the high end. Even when I'm running under battery power!
spooky.
I made sure that it's not a full moon, and I didn't see any witchcraft paraphenalia in the vicinity. I don't think anyone holds a deep grudge against me... except for B, but he's living in a different state, and in any case he would get back to me through a much different route.
I'm attaching the code in-line below. sorry not to add a link, but it's late.
The only consistency that I've observed is that the restart happens at the moment the conveyor motors are started. Sure, they will draw a heavy load... they have alot of resistance to overcome at startup. BUT I'M USING A BATTERY!
If you've got any smart ideas, helpful or otherwise, I'd love to hear them.
Already thought of EMF, moved wires around [though didn't shield with grounded foil..] and still a restart.
Code below, and yes I do use that many comments when I'm writing.
Links to photos and a schematic to follow tomorrow.
Oh yeah, I haven't debugged the status bits yet. I'm 98% that it's a power-down reset... could that still help? [duh, stupid question]
Thanks for your time
Joel
PS well, I just got an error from the forum that my post is too long...
I'll try to post it in another reply, otherwise it'll wait to tomorrow for a link.
And I only got ONE crossing page boundary warning!!!
j
And I assume the motors are kicked on by a relay...
Have you added a 'back EMF' diode across the relay's coils yet? The ULN2004 may have a back EMF diode built into them ( and I don't think they do), but I'm assuming that the ULN2004 isn't sitting right next to the relays either. Ya gotta have that diode in there. It's cause you pain. Have you thought about getting rid of the relays and switching over to a solid state relay?
the ULN2004 has clamping diodes built into it. I have not put diodes across the relays, and as I've said, the system works without glitch until I apply power to the motors.
I'll think about where I could put a diode...
j
skimask,
A quick look at the datasheet would have shown that the ULN2004 does have Output Clamp Diodes. Datasheet boy.
Joel,
Maybe you need a snubber on the relay driving the contactors coil.
I use .022uF 400V and a 47ohm 1/2w resistor in series across the output, but then I'm using SSR's
Works good for all the contactors I've used.
<br>
DT
Ya I know, I just downloaded it and lookedThat'll learn me for not learnin' me...
But still, what if the '2004 isn't right next to the relays? What if it's on the PCB and the relay is X feet down the road on a cable.
Maybe an opti-iso would be the ticket in this case...still doesn't resolve the relay spike but it might isolate it a bit better...
How 'bout a decent cap across MCLR? If there's a pullup on MCLR, maybe it's being dropped out on occassion?
Just wanted to add that skimask's idea of Solid State Relay's can also reduce that spike, by waiting for the Zero-Crossing point of the AC wave before turning on.
A relay can't do that, and may turn on at the peak of the AC, causing a very large spark and spike.
<br>
DT
Do you have MCLR tied to +5V directly or have you used a resistor ?
Or have you done what I did on a protoype board and forgotten it. My board had been in used for months as I was developing code and was working fine. I kept adding bits of code and other circuitry and then one day started getting spurious random resets.
I had forgotten a pull up on the MCLR pin and it was now triggering on noise picked up from the ratsnest of prototype wiring. fitted a 1K resistor and it has been fine since![]()
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks