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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/27/06 23:09
Read: times


 
#130206 - Dimmers
Responding to: ???'s previous message
Apart from the current question. Some things you might like to know about light dimmers.

If you want 1 pulse per zero crossing, use a bridge rectifier before your opto. 100hz pulses! A little filtering might help also, since the mains is full of crap.

I usually pick my zero cross off the secondary of the transformer- you get some phase errors here but I correct it in the software by phase and frequency locking my timer values.

Also, with the triac drive, the moc3021 optos are pretty slow - you need to turn off the trigger about 500uS before zero cross, otherwise the triac will trigger for the next cycle. The effect is usually the lamp flashing irregularly. For a resistive load, all you need to trigger the triac is a pulse long enough for it to hold.

You could also do with a snubber for the triac circuit. Even if you're driving a resistive load, the snubber knocks off nasty high voltage spikes that will damage your opto and triac.

Since RC5 is manchester encoded, you really only need to determine the relative pulse widths and levels - short low, short high, long low and long high. Feed these into a state machine and you'll get the data you need. This method is also more tolerant of bit distortion you get with infrared due to reflections etc. If you try to synchronously sample the signal, you're relying on the bit widths to be fairly correct.

The interrupt code only needs to classify the bits and put them into memory. The repetition rate for RC5 frames is quite slow, so you've got a bit of time to actually process the data.



List of 25 messages in thread
TopicAuthorDate
Multiple Interrupts with Infrared RC5            01/01/70 00:00      
   Must be the technique you are using            01/01/70 00:00      
      Test Zero Cross            01/01/70 00:00      
         Couple of questions            01/01/70 00:00      
   Do you disable interrputs when you are in ISR?            01/01/70 00:00      
   use priority            01/01/70 00:00      
      Peter,Please clarify            01/01/70 00:00      
         RC5 within interrupt            01/01/70 00:00      
         RC5 polling            01/01/70 00:00      
            Quality workmanship...            01/01/70 00:00      
               workmanship            01/01/70 00:00      
            Dimmers            01/01/70 00:00      
               Russel Please            01/01/70 00:00      
                  Some more points            01/01/70 00:00      
                     Dimmers            01/01/70 00:00      
                     that does not make sense            01/01/70 00:00      
                        Divide and Rule            01/01/70 00:00      
                           instead of using your first choice, you state:            01/01/70 00:00      
   C sample code            01/01/70 00:00      
      Let me assimilate your code first            01/01/70 00:00      
         .LST?            01/01/70 00:00      
         About the 4n35            01/01/70 00:00      
            Thanks Jerson ,I corrected the picture            01/01/70 00:00      
               Here            01/01/70 00:00      
   F629FAN Schematic            01/01/70 00:00      

Back to Subject List