Close

Board

A project log for Unlock a Comcast XR16 remote control

x

lion-mclionheadlion mclionhead 01/14/2023 at 22:150 Comments

The atmega328 once again lost to the PIC16F1508 since there's no way 32 pins are going to take less space than 20 pins.  Due to lack of space, the servo controller for the camera head would be the IR receiver for the rep counter.  Usage for rep counting would depend on unplugging the servos while the thing would always run on the USB port.

The trick was detecting the button matrix edges.  There's no guarantee a column edge TP27, TP28, TP31, TP32 would happen in the same clockcycle as a row edge TP20, TP21, TP22, TP23.  Fortunately, we know the rows are always high if inactive while only the columns go low if inactive.  Only the columns require detecting a falling edge.  A DC voltage is enough to detect an active row.

In the interest of supporting the crummiest receivers, the IR protocol would be 500us pulses, 500us between pulses for a 0, 1500us between pulses for a 1.  32 bit start code.  5ms pulse every 100ms for a repeat.

Strangely, PWM4 couldn't drive PNP transistor Q1.  It would successfully pull the base low for 300us, then switch back to input mode on its own.  It didn't matter if it was PWM or DC.  It was failing down to 3mA of current sinking.  This was traced to an improperly set duty cycle of 5%.  The duty cycle had to be 50% for it to drive the transistor.

Noted the green LED doesn't relight for some time after the button is released even though every button press transmits.  It's forcing the red LED to stay on for a certain time to indicate an error.  The decision was made to connect the red LED to the PIC & disconnect all the other LEDs so every button press would light red every time.

The last problem was an intermittent glitch from I to right arrow.  The problem happened if I was held down.  1 solution is never to press I.  Another idea is to reject the next button press without a timeout.  

LED hookups to Q2 & Q1.

Buttoned up for enclosure.

Hard won, traditional red LED.

Snazzy button LEDs.  There are universal remote controls with similar lighting, but they're ugly, bulky & aren't as fast at replaying codes as the custom programmed PIC.  Some design effort went into the commie.

Receiver test program.

The case is a bit chewed up from many openings.  It relies on friction instead of farsteners, but fortunately doesn't use broken tabs.

Discussions