Resetting happens whenever the microcontroller activates the relay that turns on the solenoid valve for controlling the pressure passage. Microcontroller controls the relay through 4n30 opto isolator. The whole circuit shares the same power supply which is approx 31VDC (from 24VAC). 31VDC is stepped down to 9V through switching regulator and regulated again through 7805 which powers the microcontroller. The rating of the relay is 28VDC. Also, 31VDC is connected to one side of relay and the other side is connected to a resistor then to the collector of 4n30. I placed 1N4148 diode across the relay pins which serves as the protection.
4n30 connections:
pin 1 - connected to 330 ohms to microcontroller pin
pin 2 - connected to gnd
pin 4 - connected to gnd
pin 5 - connected to 330 ohms to the other side of relay.
pin 3 and 6 are hanging
Can you help me with this one? thanks.
Regards,
lloyd
- - - Updated - - -
I would like to add something. When the microcontroller controls only the relay, the circuit works fine but when the solenoid is connected the problem then arises.