Hey new member here! I've been building and programming "toys" for a while now and have not had issue anything like this before. I'm working on a controller for a car's load-levelling rear suspension. It uses a PIC16F88, reading a position sensor (0-5V signal) and controlling a solenoid valve and relay, as well as an indicator lamp, and an on-board LED.
The circuit works well on the bench, driving test lights, however when connected to the acutal hardware it is to control, I get sporadic resets, lockups, and garbled operation.
The problem happens when the relay turns off. I have checked and double-checked the MCLR pin (turned off in configuration, and set to output and LOW in program), all unused pins are output and LOW. The outputs are simple NPN switching transistors, biased through a 330R resistor. The relay coil has a diode to block inductive kickback, as well as a .1uF capacitor across its incoming wires.
The solenoid valve output is constructed the same, and it does not cause any resets, in spite of the fact it is a much higher current load.
The power supply is a 7805 regulator, with a 1000uF cap on the input side, a 1000uF cap on the output side, and the chip has a .01uF cap directly across the +5V and Gnd pins.
If I replace the relay with a resistive load, the problem goes away. I've replaced the output transistor, back-EMF diode, PIC chip, and all filter capacitors, and the rests and lockups continue.
I've built several other 16F88 based controllers that drive relays using the same configuration of transistor, and nothing like this has happened.
Ahy ideas?!?
Thanks in advance!
David
[email protected]
Bookmarks