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.
YouTube - Push Button Controller.MOV
'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.
-
Controller for ANY DVD player, laptop or remote –
02-15-2011,01:06 PM
-
02-15-2011,04:20 PM
Pretty cool Steve! Great idea
MY PIRATE PICS http://smg.photobucket.com/albums/v4...ate%20Gallery/
"This is clearly another case of too many mad scientists, and not enough hunchbacks."
-
- Join Date
- Sep 2007
- Location
- Kansas City
- Posts
- 6,885
- Blog Entries
- 50
02-15-2011,05:01 PM
Wow, that's awesome! A really handy solution for starting a VSA program on the computer.
-
02-16-2011,04:15 AM
Thats cool.
I could use two of those.
are you going to do a tutorial in laymans terms?
dont quite understand what is being explained below the clip.
-
02-16-2011,08:19 AM
Before I explain, please read through the entire reply to see how easy this is, even if you have no prior experience with assembling electronics. The VLC (Very Low Cost) was one of my first projects and got me hooked on building my own controllers. All the programming was Greek to me and I could barely solder 2 wires together.
The info below the video is the code that's downloaded to the micro-controller which you assemble. It does require some soldering but the directions are very good.
You can purchase a kit here that comes complete with the most expensive part, the download cable. Once you purchase the cable, the VLC's are less than $10 each. I currently have 4 running different props and will be adding more before Halloween. Here's a link to one supplier-http://www.robotshop.com/picaxe-08m-...-pack-usb.html
Then build out the VLC that Fritz_42 designed. Here is his great tutorial - http://www.ipprofessional.com.au/VLC...Controller.pdf
Once you have the controller built, you simply cut and paste the code I provided into the Picaxe programmer which comes on the DVD in the kit and download it on to the chip.
Connect the servo, battery pack and the PIR and and the program will run. Then you can adjust your servo settings and time requirements to fit your remote and prop. I built a simple wood holder for the remote and just zip tied it in place.
This can be used for so many applications by some simple adjustments to the programming and the mounting bracket.
-
02-17-2011,03:13 AM
so that servo dosent run continuously in a circle?
dont know much about servos.
used one for a "useless machine"
thought I had to modify that one.
-



LinkBack URL
About LinkBacks
Controller for ANY DVD player, laptop or remote





Bookmarks