Close

Firmware ready to go.

A project log for Raptor12 Wireless AC Dimmer

Christmas, Halloween light string controller that is wireless, 12channel dimmable AC controller, with an AVR for $30

kingofkyatravis-kKingOfKYA(Travis K. ) 07/22/2014 at 15:440 Comments

For about a week I haven't been able to get the code working 100%, occasionally i am getting to where the code appears to get stuck.( during radio.Listen() ) Or for about 3 cycels of the ac wave. It seams to be disabling interrupts or something.


However on the test and DMX transmitter if i hold reset and stop the data the code is stable and never misses the correct dim point. Its only when there is data in the nrf buffer I think.

Thanks to sporadic at the diychristmass.org forum mentioned.

 http://diychristmas.org/vb1/showthread.php?536-NRF-AC-4-8-12-channel-AC-Dimmer-Idea&p=25193&viewfull=1#post25193

"The radio is only being queried for packets every 7.7ms or so. Dunno if its related to your issue, but you may be overflowing the nRF RX pipes as well."

I fixed that it started working almost perfectly, I was still getting a slight error but every 5min or so. After reading up on the avr interrupt stuff and figured out i was likely getting an error because of the non even way 16mhz divides into the AC dimming timeing.  Any way my quick way to fix it is just reset the timer to 0 when zero cross happens. Haven't seen any glitches yet:)

Here is what I ended up with (needs to be cleaned up).

http://kneale.us/raptor12/ver7/RF_In_SoftPWM_Out_Night72114.zip

Discussions