> But I think you have a supply problem. Your solution to use the same > rectified and filtered stage for both 7805 and 7824 is almost curious ! I only have 2 sensors that are relevant to this control problem so I use the same powersupply to keep out all other transients that could enter else. They are located just next to this pcb. <500mm > Why do you have used optocouplers if all grounds are common and +5 ( for > microcontroller) and +24 ( for industrial process ) comes from the same > place ? +24V must be a floated supply to avoid noises from the process... Oops.. theres an error in the schematic ! The +24V that is connected to the optocouplers is _NOT_ supposed to come from the 24v onboard.. hrm Tho, all it does is to go to the coils of 2 relays. Atlest it keeps some of the transients from the coils off the pic's pins this way. (also theres protection on the coils for the back emk) > Also when all your led's will be all on, your 7805 will be warm How about a heatsink, doesnt look like I need one tho. /PJ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.