# Controller for ANY DVD player, laptop or remote



## halstaff (Nov 18, 2009)

I've been trying to come up with a controller that could be used to turn on any device that required a button to be pushed. I've read everything I could on hacking remotes and keyboards in order to be able to control them and although these are very clean and elegant solutions, each one required a new learning curve. I wanted a single unit that could be triggered by a sensor, was easy to build, inexpensive (less than $30) and could be adapted to start any push button device automatically. I didn't want to have to manually trigger my laptop to start my 3 axis build or the DVD player to run my Madame Leota projection. With lots of help and ideas from Fritz42_male, this is the result.
It uses the VLC Picaxe controller Fritz designed and some coding which I've included. When the PIR from Parallax is triggered, it sends a signal to a micro-servo (I used a Hitec HS-55) which rotates and pushes the button. It's easy to adjust the code to allow the servo to move to fit any application and the pause code at the end can be changed to fit your requirements. I have mine set so that the projection will run and then will wait a bit before it can be re-triggered although the video and the program below have a 10 second pause.






'Picaxe 08M

Init: 'Just a starting point label 
debug 
Pause 5000 'Wait 5 secs for PIR to 'settle down 
Servo 4,75 'Move Servo on Port 4 to start position 
Symbol delay = 5000 'Sets variable delay

Testit:
readadc 1,b0
debug b0
pause 5 'Brief pause on the checking loop
b0 = b0 + 5 * Pin1
if b0 < 100 then Testit 
goto Pressdown

pressdown:
servopos 4,160 'Move servo to other end to press button 
pause 500 'Hold the button down for a half a second	
servopos 4,75 'Move the servo back to the other position	
pause 10000 'Wait for the specified delay 
goto Testit 'Go back and wait for the PIR again

Thanks again to Fritz for his help with this project.
I hope others find this useful as well.


----------



## SPOOKY J (Nov 20, 2009)

Great Job! Another great use of the Picaxe controller. Very resourceful way to "hack" the remote without sacrificing it for ever.


----------



## niblique71 (Dec 2, 2009)

Very Cool Halstaff. I swear I'll get a picaxe project going this year.


----------



## fritz42_male (May 5, 2009)

Thanks for the thanks Halstaff. Glad to be of service!


----------



## MonkeyBasic (Mar 22, 2009)

Very nice... My first thought would have been to open the remote and hardwire it... but this is a lot less destructive


----------



## hpropman (Jul 27, 2008)

Very simple and elegant solution Nicely done! I was originally going to use this method to control the $5 MP3 player but I hacked the button instead.


----------



## halstaff (Nov 18, 2009)

hpropman said:


> Very simple and elegant solution Nicely done! I was originally going to use this method to control the $5 MP3 player but I hacked the button instead.


That was my first idea as well but my wife objected. Something about taking it apart and never getting it to work again. Imagine that!


----------

