http://www.matrixmultimedia.com/product.php?Prod=EB060
Is a great Eblock for a Cheap basic DIY infrared remote control.
Important: Jumper must be on A
If you have not got a RC5 Compatible Remote then a Tip would be to buy a universal remote for as little as 99p in our UK 99p store.
Just enter a code in the remote for philips TV and it should not take long to find correct code.
Remote does not have to be for philips TV so long as it is RC5 compatible.
For Example laying around I have got the following remotes that work:
old NTL and newer Virgin media remotes, Philips video remote and a ONE FOR ALL universal remote.
Attached is a Basic Flowcode V5 Flowchart that will control 8 channels using RC5 component.
The secret for keeping the Flowchart small is:
Code: Select all
CH_Output = CH_Output XOR (1 << CHANNEL - 1)
So if port b = 00011100
and CHANNEL = 2 = 00000010
then bit1 (due to CHANNEL-1 part) is toggled
So result = 00011110 which is passed on to port B
If same key is press (2 on the remote)
then result will be 00011100 again.
Operation is simple.
On your Philips RC5 compatible Remote:
Press 1 to toggle bit 0 (Think of it as Channel 1 of Relay 1 Etc.)
Press 2 to toggle bit 1
Press 3 to toggle bit 2
Press 4 to toggle bit 3
Press 5 to toggle bit 4
Press 6 to toggle bit 5
Press 7 to toggle bit 6
Press 8 to toggle bit 7
Press 0 to switch all channels off.
To toggle a channel press key then release.
I have placed a routine that waits for key to be released before channel will change state.
Flowchart will not simulate due to RC5 component but have a play with the formula to understand how it works.
Although I have used a 16F877A, this should work on other devices e.g 16F88.
IR receiver is connected to port A2
This will work well with either Relay Eblock:
http://www.matrixmultimedia.com/product.php?Prod=EB038
Or
Optocoupler Eblock:
http://www.matrixmultimedia.com/product.php?Prod=EB035
Or your own hardware of course
I can't say the range for sure, since the room i was in is 20 ft and there was no issues at the 20ft range.
If you want to adapt with more or less channels and I will alter flowchart for you.
Martin