??? 07/24/04 08:49 Read: times |
#74784 - This is how generally... Responding to: ???'s previous message |
"Question 1
How do I read a ON/OFF input ( not from switch but relays and pressure switches ) " Let us assume that this is an industrial setup. Source 24V dc from your control system to the pressure switch (PS) contacts in the field. Wire the return to the opto isolater LED ( I prefer 4N35 as compared to MCT2E ) and read off the staus from the other end ( viz transistor )which can directly feed a MCU port pin. Thus when the PS contacts close, the LED fires and inturn triggers the transistor which should pull the relevant port pin LOW that is configured as an input ( SETB...) earlier. (gasp..) Important : DONT derive your 5V for MCU, from the 24V that you are using as the interrogation supply ! Maybe this is stating the obvious, but I have seen this happen many times. If really you want to do that, use a DC/DC convertor, that will isolate both grounds. "Question 2 If tomorrow the client changes the input sensors MCT2E will act as a protection at inputs ." Client or circuit or sensor ? OK in any case the MCT2E will provide the required isolation. "Question 3 If I read inputs from relay how can I stop chattering of relay. " Precious little ! the relay is an input to you from the client and how on earth can you ask it not to chatter ? But you can always handle contact bouncing - if thats what you meant. Search on this forum for "debouncing" & you will hit a treasure. And if its really chattering that you meant - well change the relay; check the coil drive Volt; or dampen that damn process that causes the chatter. No debounce method can handle a chattering relay, as it is a bad thing that should NOT happen. Raghu |