I have built a simple watering system using a PIC 1684. Works well on the test bench but am having problems running live. I am using a 24V power pack (1A). The 24v is to power the solenoids to open/close the water valve. I then cut this 24v down to 12v via a 7812 to power the 12 relays that I use to activate the solenoids. I then use a 7805 to get 5v to power the control circuitry. My problem is that I seem to be getting spikes (back EMF) into my control circuitry that is reseting my PIC. I have put a diode across each solenoid to limit the spike but this doesnt seem to be enough. I put the diodes inside the box I built. Should I put something right across the solenoid itself. I was thinking a filter cap. What sort of cap and what value should I use. 12v 24v | | | | RA1-4 |\ ULM2803 | -----| \---------+ | | / | | |/ O -----+ O \ Relay O ------+-------------//-------------+ | | O | --- Long Cable O solenoid | /\ Diode +---//-------------+ | -- | | | | | | | GND ----+---------+---------+ 12v | 24V +--------+ | +--------+ 5v to pic etc --------| 7812 |--+---| 7805 |------- +--------+ +--------+ | | | | | | |+ | | --- 200uf | | --- | | | | | | | | | GND ----+---------------+--------+ -- Daryl Sayers Corinthian Engineering Ph: (02) 9906 7866 Suite 19, 401 Pacific Hwy Fax: (02) 9906 1556 Artarmon, NSW, 2064 email: daryl@ci.com.au Australia www: http://www.cordoors.com.au -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.