Page 1 of 1

Man Cave Accessory

Posted: Fri Dec 16, 2022 7:37 pm
by olzeke51
Man Cave Accessory : IR remote volume control

Impetus: needed to change the PC volume
from my Submarine-motif rack [across the cave].

edit:: BTW when switching from IR to the knob/pot -
give the IR one more command - it is in a loop and won't see the changed switch

IRremote kit -
LPC1114 microcontroller - "Special - $10"
USB serial converter - various suppliers
lightweight RC servo - type 90G - arduino kit special
ACE hardware parts - light dimmer, basic light switch
electric PVC box, lid, 2 switch cover plate
small hinge (future) & duct tape (for now)
USB cable - for power ; proto-jumper wires

Ideas & some bits of code from ProtoSupplies
& Arduino projects/libraries & Internet
PLUS: Coridium's ARMBasic IDE - free

Have fun!

Re: Man Cave Accessory

Posted: Sat Dec 17, 2022 1:51 pm
by olzeke51
this is the basic setup [schematic]
Pin assignments are upto you or in the program to be posted later.
CAUTION: A0 needs to be input from a 3.3v device as noted in the drawing.
be sure to isolate all of the pins[used] on the dimmer so the original dimmer circuitry
does not interfere

Re: Man Cave Accessory

Posted: Sat Dec 17, 2022 2:27 pm
by olzeke51
more info:
This is for the NEC codes that the IRRemote transmits.
The Arduino Library has coding/timing for the other brands.
The use of Interrupt timing was garnered/modified from the
Arduino code
I used the falling edge of the signal from the detector
to create an Interrupt. The ISR (Interrupt Service Routine)
grabs the system time [in millisecs - ms] and puts it in
an array. - just falling edges.
Then the array is scanned from the end to the beginning,
{so the math is easier - for me} to get the time differences
between the ending/falling edge of the pulses of the
IR coding sequence that NEC uses. I then manually decoded
the 0's and 1's - oh, watch out that NEC transmits the
LSB first and the final is the MSB {another reason to start
from the end of the timing array- imo}
I added another cap (capacitor)to the 5v line, - the servo motor induced a lot of false signals
to the IR decoder chip. I also put a .01 (?) cap on the decoder PCB also. This reduces
most of the interference.

In the picture you may have noticed an object on top of the microcontroller.
That is a 6 pin header soldered to the long leads of the cap​, then inserted the leads
into the PCB power connector - I ran out of places to put the (proto) jumper cables/wires.

Project files - zipped up
Note : I have attempted to use some C file layouts buy simulating the header.h file usage.