Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/24/04 12:52
Read: times


 
#74792 - RE: Reed Relay *INPUTS*
Responding to: ???'s previous message

There's a couple of mistakes in the circuit - firstly the port pin should go to pin 5 of the opto NOT pin 4 (as pin 4 is set to 0v). Also, the value of R1 at 470R
seems a tad low, try something like 4700R. Try these changes and the circuit has a fair chance of working. What you have described is the usual input in an industrial PLC. The addition they make is a zener diode for some protection on the input of the opto for reverse and over voltage.

Onto the 'chattering' relays - I gather you mean contact bounce - as mentioned earlier do a search on 'debounce'. My usual technique is to sample the inputs at a constant rate (say 10mS) and shift each bit into a byte. If the input is bouncing you will get a sequence of 0 and 1 bits. When the input sequence is all 0's (your opto circuit places a 0 on the input when active) for 8 samples (80mS total) then you can assume the input is actually active. Depending on the application, you may want this to be longer to give you more immunity to noise.



List of 35 messages in thread
TopicAuthorDate
Reed Switch Sensor            01/01/70 00:00      
   RE: Reed Switch Sensor            01/01/70 00:00      
      RE: Reed Switch Sensor            01/01/70 00:00      
         RE: Reed Switch Sensor            01/01/70 00:00      
   RE: Reed Switch Sensor            01/01/70 00:00      
   RE: Reed Switch Sensor            01/01/70 00:00      
      galvanic isolation twice?            01/01/70 00:00      
         RE: galvanic isolation twice?            01/01/70 00:00      
            RE: galvanic isolation twice?            01/01/70 00:00      
               But Why??            01/01/70 00:00      
                  RE: But Why            01/01/70 00:00      
                     This is how generally...            01/01/70 00:00      
                        RE: This is how generally...            01/01/70 00:00      
                     Reed Relay *INPUTS*            01/01/70 00:00      
                        RE: Reed Relay *INPUTS*            01/01/70 00:00      
                           RE: Reed Relay *INPUTS*            01/01/70 00:00      
                              some clarification for KAi            01/01/70 00:00      
                           RE: Reed Relay *INPUTS*            01/01/70 00:00      
                              RE: Reed Relay *INPUTS*            01/01/70 00:00      
                           You do NOT need an Opto!            01/01/70 00:00      
                              RE: You do NOT need an Opto!            01/01/70 00:00      
                                 RE: You do NOT need an Opto!            01/01/70 00:00      
                                 RE: You do NOT need an Opto!            01/01/70 00:00      
   Start again - what do you really want?            01/01/70 00:00      
      Assumed Scenario            01/01/70 00:00      
      RE: Start again - what do you really wan            01/01/70 00:00      
      RE: Start again - what do you really want?            01/01/70 00:00      
         more clarification            01/01/70 00:00      
            RE: more clarification            01/01/70 00:00      
         RE: Start again - what do you really wan            01/01/70 00:00      
            PLC not a option            01/01/70 00:00      
               RE: PLC not a option            01/01/70 00:00      
                  RE: PLC not a option            01/01/70 00:00      
   OPTO inputs from Reed Switch DONE            01/01/70 00:00      
   Admin please close this thread            01/01/70 00:00      

Back to Subject List