Rob Klingberg Posted January 6, 2011 Posted January 6, 2011 Hello all-- Has anyone decoded (or has Lego released) the protocol that governs communication between a PF remote and a PF receiver via Infrared? I'd like to make my own automated controller (driven by Arduino or some such) with just an IR LED soldered to the board (not using the PF remote at all) and have this device be able to control up to 4 trains (as PF remotes can). Just checking to see if anyone has the code..... Thanks! --Rob Quote
Lemelisk Posted January 6, 2011 Posted January 6, 2011 I believe the information you are looking for is here. Quote
JopieK Posted January 6, 2011 Posted January 6, 2011 I believe the information you are looking for is here. I have both the sketches for a remote and the receiver. Links are gone: there will be new files for the RailBricks articles very soon! ... A bit more structured: moodle I have also created my own LEGuanO (Arduino + LEGO) print (produced in China). I run one train with it (at this moment), operate a level crossing and several points and signals with them. See also: Brickshelf And my previous topic: here Quote
Toastie Posted January 6, 2011 Posted January 6, 2011 I have both the sketches for a remote and the receiver ... Hi JopieK, as far as I am concerned, we need to arrange all your wonderful(!) input and other "stuff" into a way more organized manner. We have sort of discussed the Arduino approach before here at EB, but the whole thing got more or less "swamped" (Teddy's well articulated terminology) by other interesting(!) forum entries. Is there any way that we can focus this whole thing a little? I'd be very happy to try out your ideas, I just don't know how to get a hands-on instruction (My world is restricted so far to Microchip's PICs and then NXT, Scout, Spybot, and RCX micro controllers - lets call them PBricks). Also, I guess I am pretty familiar with the PF protocol; but we need a "focused place" to discuss these issues, don't you agree? I guess Teddy, you are with me? All the best, Thorsten Quote
peterab Posted January 7, 2011 Posted January 7, 2011 I just noticed an article on Railbricks. It seem to imply we would be able to control both RC and PF trains with this new 'sensor' brick. Quote
Rob Klingberg Posted January 7, 2011 Author Posted January 7, 2011 Thanks all for the great pointers-- I had a feeling this group would be "in the know" as usual. And Jopiek, it was your original topic that got me interested in the Arduino platform-- I have two Mini Pro boards on the way from SparkFun and can't wait to get started. (One problem-- I can't seem to get into your Moodle site-- I registered but it says I can't enroll myself in the course..... ) I agree there is value to creating an area to discuss PF automation in greater detail-- perhaps a pinned topic? I saw the BL article on coming NXT/PF control as well-- it looks interesting but I have never gotten into the NXT platform (though I did get the RCX 1.0 set back in 1999) and am going to approach things from the standalone (embedded) Arduino board approach and/or Arduino integrated with Zigbee WiFi boards or USB controlled by a PC vs. getting into the Scout, RCX, etc. modules. When you can pick up an Arduino Mini Pro board for $18, that's hard to beat! Prices for Scout, NXT, etc. on BrickLink are too high to justify populating a layout and stations/signals with them. Just my preference tho. I hope to have some cool 12v and 9v automation projects to share with this forum soon. And once I get the train detection circuit down (I found a really cheap and great-looking integrated IR detector/transmitter on SparkFun) I look forward to providing real-time control of RC trains as well. A guy can dream, right!? Thanks everyone for the tips, and Jopiek if you can give any pointers on getting into the Moodle site, that would rock. Thanks! --Rob Quote
JopieK Posted January 7, 2011 Posted January 7, 2011 I'll have a look at it :) I installed moodle just yesterday so the settings aren't optimal yet. Quote
Toastie Posted January 7, 2011 Posted January 7, 2011 Thanks all for the great pointers-- I had a feeling this group would be "in the know" as usual. I agree there is value to creating an area to discuss PF automation in greater detail-- perhaps a pinned topic? Rob, I think a pinned topic would be perfect! I saw the BL article on coming NXT/PF control as well-- it looks interesting but I have never gotten into the NXT platform (though I did get the RCX 1.0 set back in 1999) and am going to approach things from the standalone (embedded) Arduino board approach and/or Arduino integrated with Zigbee WiFi boards or USB controlled by a PC vs. getting into the Scout, RCX, etc. modules. ... And once I get the train detection circuit down (I found a really cheap and great-looking integrated IR detector/transmitter on SparkFun) I look forward to providing real-time control of RC trains as well. A guy can dream, right!? Nope no dream at all, a challenge, but a fun challenge!!! I am working on more or less exactly the same thing for about 8 years now it took me a little time to learn PBrick programming (RCX, Scout, now NXT), PIC programming (I do PICs, as said), "programming" (VBasic, and since it takes that long, I have to switch now from VB6 to VB.net, damnit) - well I guess my programming style is rather interesting than elegant but it works. I picked up 6 Scouts for $6 each in 2006, and 10 MicroScouts for $5.50 each in 2005 so I decided to go all LEGO. The RCX bricks hurt funding-wise, but I am collecting the ones with the jack (1.0 version) for about 10 years now, so there are 6 waiting to run trains. The NXT is form 2008. My PICs are handling the RF transceiver logic, since I am working with discrete receivers/transmitters, for no other reason that I did not know better. I'd love to share all this stuff and some ideas - it would perfectly fit into the entire work discussed here and in JopieK's Arduino thread. My PC based control program handles RCXs directly, PF and soon RC trains via a NXT translator running RobotC with the IRControl sensor (Xander Soldaat has thankfully implemented an RCX driver for RobotC in 2010), and takes care of all the switch points. With RCX and Scout PBricks communication is bidirectional (sort of handshaking), with dumb PF and RC trains one-way. Do you think this could be of any interest within the framework discussed here (Arduino etc. etc.?) Rock on, Thorsten 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.