zweihander Posted June 27, 2014 Posted June 27, 2014 Hey everyone, First, I considered using my raspberry pi to create a DIY customizable PF remote. Then I read somewhere that someone had done it, and sometimes it failed because of raspberry pi not being real time and missing some IR emitting intervals. Then I found this article. It explains how to record IR signals as audio stream using 2 IR LED's and a headphone jack, and replay them. I want to give it a try, and if it succeeds, develop an app for smartphones that can be used with a DIY emitter and used as a customizable PF remote. Has anyone tried this before? What do you think? Quote
OzShan Posted June 27, 2014 Posted June 27, 2014 Sounds very interesting. The IR transmitter sends square wave pulses at 38kHz. It sends 6 pulses to represent a bit in the stream, and then the delay afterwards is interpreted as either a 1, 0, start or stop bit. All the low level details of the protocol are published by lego. Search for version 1.2. (If you have trouble finding it let me know). It also specifies how tolerant the receivers are of timing errors. If the app can accurately generate tones, and switch the tone on and off again accurately in time, it should work. You are right about the pi, I also started there and put it aside favouring an arduino instead. Even though the output from the phone may not be square wave you could probably put a little amp in between to drive the LED on fully at the start of the pulse. I think it's worth a go for sure. Quote
zweihander Posted June 27, 2014 Author Posted June 27, 2014 I read the protocol and was planning to implement it, but the problem with the pi gave me cold feet, which is why I decided to go the replicator way. I'll try to test it over the weekend if I can find some old remotes :) Quote
imurvai Posted June 27, 2014 Posted June 27, 2014 Hi, I started developing such an app for my android phone. Actually I managed to communicate with the PF receiver, even the servo is working OK proportionally. I also created my own transmitter using 2 leds and a 3.5 jack plug. The only drawback is that it only works within 30-40cm. This is a significant limitation for a remote controller so I temporarily gave up this development. Anyway there has been already such an app in the play store: https://play.google.com/store/apps/details?id=com.designame.droidpf But I didn't manage to get it working :) I also tried this hardware to amplify the audio out with no luck: http://www.irdroid.com/ For some reason the signal was not recognized by the PF receiver coming out from this amplified device. I also gave a try to this one: http://www.dx.com/p/lx-b3503-bluetooth-v3-0-wireless-audio-receiver-black-171089#.U613gPmSz08 I wanted to put it next to the PF receiver with my audio-to-IR converter to be able to control the Lego using bluetooth but unfortunatelly no signal was coming from this transmitter. The headphone is working ok, but the IR converter is not. I assume there must be some protection in it avoiding the converter to work. Maybe if I have some time I'll continue the research... :) Quote
legolijntje Posted June 27, 2014 Posted June 27, 2014 But, it only works if a phone as a IR blaster. My phone (Nexus 4) sadly hasn't one... Quote
LegoGBC Posted June 27, 2014 Posted June 27, 2014 (edited) That could open many options, like programming the PF motors from the smartphone itself - no need for an NXT - just tell the smartphone when to send and what to send (like every 5 seconds flip the motor direction) Also, some of the high-end smartphones today come with IR blasters, maybe you should check them out? Edited June 27, 2014 by LegoGBC Quote
zweihander Posted June 27, 2014 Author Posted June 27, 2014 Hi, I started developing such an app for my android phone. Actually I managed to communicate with the PF receiver, even the servo is working OK proportionally. I also created my own transmitter using 2 leds and a 3.5 jack plug. The only drawback is that it only works within 30-40cm. This is a significant limitation for a remote controller so I temporarily gave up this development. Anyway there has been already such an app in the play store: https://play.google....signame.droidpf But I didn't manage to get it working :) I also tried this hardware to amplify the audio out with no luck: http://www.irdroid.com/ For some reason the signal was not recognized by the PF receiver coming out from this amplified device. I also gave a try to this one: http://www.dx.com/p/...89#.U613gPmSz08 I wanted to put it next to the PF receiver with my audio-to-IR converter to be able to control the Lego using bluetooth but unfortunatelly no signal was coming from this transmitter. The headphone is working ok, but the IR converter is not. I assume there must be some protection in it avoiding the converter to work. Maybe if I have some time I'll continue the research... :) One of my concerns is the strength of the IR. Maybe I can try using the raspberry for playback. But, it only works if a phone as a IR blaster. My phone (Nexus 4) sadly hasn't one... Not really, the link I sent includes how to emit IR using the same LED and headphone jacks in a different configuration. Therefore the phone only needs a 3.5 mm headphone jack. That could open many options, like programming the PF motors from the smartphone itself - no need for an NXT - just tell the smartphone when to send and what to send (like every 5 seconds flip the motor direction) Also, some of the high-end smartphones today come with IR blasters, maybe you should check them out? My flatmate has a galaxy s5, If it has one, I may try it. other than that, I don't have the money to spend on a new smartphone just for this. Buying 9398 and 8110 set me back a little :D Quote
LegoGBC Posted June 27, 2014 Posted June 27, 2014 (edited) One of my concerns is the strength of the IR. Maybe I can try using the raspberry for playback. Not really, the link I sent includes how to emit IR using the same LED and headphone jacks in a different configuration. Therefore the phone only needs a 3.5 mm headphone jack. My flatmate has a galaxy s5, If it has one, I may try it. other than that, I don't have the money to spend on a new smartphone just for this. Buying 9398 and 8110 set me back a little :D The Galaxy S5 has an IR blaster used to control TVs, so it can be used & probably has enough range as well. And of course you shouldn't buy a new smartphone just for that, I was just suggesting in case you have one already ;) The more I think about controlling PF with a smartphone the more I like it. Think about using the phone's sensors as toggles for PF actions (light sensor, proximity sensor, gyro, etc.. maybe even use the camera to detect colors!) Edited June 27, 2014 by LegoGBC Quote
grum64 Posted June 27, 2014 Posted June 27, 2014 The Galaxy S5 has an IR blaster used to control TVs, so it can be used & probably has enough range as well. And of course you shouldn't buy a new smartphone just for that, I was just suggesting in case you have one already ;) The more I think about controlling PF with a smartphone the more I like it. Think about using the phone's sensors as toggles for PF actions (light sensor, proximity sensor, gyro, etc.. maybe even use the camera to detect colors!) Love the idea. Now hate my S3! Quote
imurvai Posted June 27, 2014 Posted June 27, 2014 There are another IR emitter harwares from the IRDroid guys: http://www.irdroid.com/irdroid-usb-ir-transceiver/ This is an USB IR emitter but I don't really know how hard would it be to fit it to an android phone. Obviously the phone's USB should support USB OTG but this is quite common nowadays. http://www.irdroid.com/irdroid-wifi-version-3-0/ This one however is using WIFI, so the IR emitter could be decoupled from the phone and should be working out of the box. I haven't tried these two though. Quote
anton1678 Posted June 28, 2014 Posted June 28, 2014 With a computer you could send out signals in any frequency, but I've seen it with a phone too, just get one of them frequency blast apps. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.