mostlytechnic Posted October 27, 2011 Posted October 27, 2011 I'm still working on my custom controller (it's coming along - just waiting on some parts in the mail). As I looked at the PF IR codes, I noticed that there's 2 different stop commands. One is float - basically just stop driving and coast. The other is brake - actually shorts the motor to actively stop it. So then I was curious which is better for trains and how much difference it makes. Whipped up a quick sketch on my arduino to use the two commands. Then I realized that's not needed - the speed remote sends the brake command when you hit the red button. On the other hand, the simple remote does a float when you let go of the lever. Threw a train on some track - Maersk loco with 4 cars, on a simple circle. From full speed, brake stops it in about a quarter of the length of the locomotive. From full speed, float takes about half the length of the loco to stop. So yes, there is a difference, but it's not large. Too bad - I was hoping that float would let the train stop much more slowly. On the other hand, this was a worst-case test. Not a very long train, on a constant tight curve. Full speed on a straight would I suspect show more difference. Anyone else ever looked at this or have any opinions? Quote
JopieK Posted October 27, 2011 Posted October 27, 2011 (edited) There are some strange commands in the specifications indeed: vs. The left controller gives different commands from the right one. If you use an IR receiver and monitor the commands. B.t.w. Currently I'm experimenting with remote radio frequency connections. Edited October 29, 2011 by JopieK Oversized Image Quote
Tearloch33 Posted October 28, 2011 Posted October 28, 2011 I'm still working on my custom controller (it's coming along - just waiting on some parts in the mail). As I looked at the PF IR codes, I noticed that there's 2 different stop commands. One is float - basically just stop driving and coast. The other is brake - actually shorts the motor to actively stop it. So then I was curious which is better for trains and how much difference it makes. Whipped up a quick sketch on my arduino to use the two commands. Then I realized that's not needed - the speed remote sends the brake command when you hit the red button. On the other hand, the simple remote does a float when you let go of the lever. Thanks for that. I thank the movie industry for making most of us fearful of pushing red buttons. I have never even wondered what that button actually did. That seems so much better than using the speed control wheel since it is very easy to reverse the train accidentally (causing bad things when near a switch). Quote
mostlytechnic Posted October 28, 2011 Author Posted October 28, 2011 There are some strange commands in the specifications indeed: The left controller gives different commands from the right one. If you use an IR receiver and monitor the commands. B.t.w. Currently I'm experimenting with remote radio frequency connections. Yep, and there's even whole sets of commands in the spec that aren't used. For example, the speed remote (the one w/ dials) doesnt' actually tell the motor how fast to go. It just says "go 1 notch faster." There ARE commands defined that say "go speed 3" which are what I'm using with my custom remote. There's also a mode where it sends 1 command and the receiver tells both red and blue channels to do that same thing. That could be handy for people making bigger things that need lots of power (such as dual-motored locomotives) if the receiver can output more power that way (I think it can, but not sure). I think it's pretty clever of Lego to define all these extra codes and build it into the receivers, even when there's nothing that uses them yet. But if they want, it's there, already built into all the receivers already out in the market. Just needs a new remote to do it. Thanks for that. I thank the movie industry for making most of us fearful of pushing red buttons. I have never even wondered what that button actually did. That seems so much better than using the speed control wheel since it is very easy to reverse the train accidentally (causing bad things when near a switch). Yep, that red button is my friend. Just stops the train, no matter what is going on. I hit it all the time :) Quote
Toastie Posted October 28, 2011 Posted October 28, 2011 B.t.w. Currently I'm experimenting with remote radio frequency connections. Hi JopieK, that sounds interesting! I am done with my approach using LINX modules, both for PF (uni-directional) and RCX (bi-directional) communication. Works quite well in my office. Will be back in two weeks and hopefully show some pictures. What is you approach? Regards, Thorsten Quote
Toastie Posted October 28, 2011 Posted October 28, 2011 Too bad - I was hoping that float would let the train stop much more slowly. On the other hand, this was a worst-case test. Not a very long train, on a constant tight curve. Full speed on a straight would I suspect show more difference. Anyone else ever looked at this or have any opinions? Hi Mostlytechnic, since you are into micro controllers - ever thought about replacing the PF receiver with a custom design (instead of customizing the remote)? Or maybe create an add-on to the PF receiver? I guess that the difference between brake and float will not really show with most trains. They would have to be really heavy - however in that case friction would really go up and they would stop faster. I have equipped my trains with RCX PBricks - well that makes them rather bulky but worked reasonably well with the Santa Fe and the GPXX diesel series. The RCX bricks receive (and optionally acknowledge) messages in the RCX format (which is compatible with RCX2, Scout, and Spybotics firmware and you may also tie in NXT PBricks if you have the NXT HiTechic IR "sensor") - and then do what you have programmed with that message. For example, the first message is an address byte, the second a data byte - lets say train #3 go to speed 5. A little piece of software in the RCX looks at the current speed, and then cranks up to target speed rather slowly. The same is true for breaking. When you go from full speed to 0, my trains need a good amount of time to actually stop. Guess this is what they do in the nifty DCC controllers as well; as far as I understand, you can program you response characteristics into the controllers - but I don't have any, just guessing. Regards, Thorsten Quote
ZueriHB Posted October 28, 2011 Posted October 28, 2011 Threw a train on some track - Maersk loco with 4 cars, on a simple circle. From full speed, brake stops it in about a quarter of the length of the locomotive. From full speed, float takes about half the length of the loco to stop. So yes, there is a difference, but it's not large. Too bad - I was hoping that float would let the train stop much more slowly. On the other hand, this was a worst-case test. Not a very long train, on a constant tight curve. Full speed on a straight would I suspect show more difference. Anyone else ever looked at this or have any opinions? Didn't know of that command. If I were you, letting go of the levers, or just putting it back in the middle position floats. Applying the brakes (hitting the lever in reverse, pushing the emergency stop) brake it. Quote
F0NIX Posted October 29, 2011 Posted October 29, 2011 Another thing with the "Float" vs "Break" command in the IR command set is that after a Float command, you can still push the motor and it will go around without much resistance. And it will stay in this state until a new command is received. You can even send a Brake command after the Float, and then the motor will brake. Not sure how useful this is in Trains. But when the motor is in Float you can still push the train without the motor giving you any resistance, may be used for manually turn a switch or something. I use both RCX and NXT to control my trains and I use many of the IR commands there. I mostly use the Break as an emergency switch. I even have made an "Full stop" command where the NXT send out the Break command on all channels to stop ALL trains in their tracks where they are... Quote
JopieK Posted October 29, 2011 Posted October 29, 2011 Another thing with the "Float" vs "Break" command in the IR command set is that after a Float command, you can still push the motor and it will go around without much resistance. And it will stay in this state until a new command is received. You can even send a Brake command after the Float, and then the motor will brake. Not sure how useful this is in Trains. But when the motor is in Float you can still push the train without the motor giving you any resistance, may be used for manually turn a switch or something. I use both RCX and NXT to control my trains and I use many of the IR commands there. I mostly use the Break as an emergency switch. I even have made an "Full stop" command where the NXT send out the Break command on all channels to stop ALL trains in their tracks where they are... The H-bridge in the receiver is blocked when using the brake command. @Thorsten, I translate al PF messages from and to ascii commands so it is quite easy, just adding an radio link in between. At the moment trying my best with the nRF24L01(+) units. Quote
mostlytechnic Posted October 31, 2011 Author Posted October 31, 2011 (edited) since you are into micro controllers - ever thought about replacing the PF receiver with a custom design (instead of customizing the remote)? Or maybe create an add-on to the PF receiver? Nope, haven't gotten to that (I know others have) but we'll see down the road. I guess that the difference between brake and float will not really show with most trains. They would have to be really heavy - however in that case friction would really go up and they would stop faster. Correct, it's a very small difference. A few inches in stopping distance for my test - I was more curious than anything. I didn't notice though what is pointed out later by FONIX that float leaves it pushable, where brake locks up the motor. That could be useful For example, the first message is an address byte, the second a data byte - lets say train #3 go to speed 5. A little piece of software in the RCX looks at the current speed, and then cranks up to target speed rather slowly. The same is true for breaking. When you go from full speed to 0, my trains need a good amount of time to actually stop. Guess this is what they do in the nifty DCC controllers as well; as far as I understand, you can program you response characteristics into the controllers - but I don't have any, just guessing. Yep, that's what the fancy model train stuff does these days. I was actually thinking over the weekend about adding that to my system. It'd be fairly easy to do, just change the software code some. For now I'll get this working, and then I can modify later. That would be cool to have though... although, I'd do it by modifying my controller. The DCC stuff for "real" model trains have the logic in the locomotives themselves for momentum simulation. You pick your desired speed on the controller, it sends that to the train, and then the loco slowly accelerates. You can even pick to simulate different types of trains... a 4 car passenger train would handle much differently than a 100 car coal train. Edited October 31, 2011 by mostlytechnic Quote
JopieK Posted October 31, 2011 Posted October 31, 2011 some of my students are currently making a controller for 3677 with Arduino and RF (radio signals), so hope they will manage to come quite far :) Quote
gambort Posted November 3, 2011 Posted November 3, 2011 (edited) I confess I've not read all this thread but... You can download a PDF with all of the specs for the PFS control commands from... somewhere. I'd guess Philo probably has it and if not knows where to get it. Might be useful for you. Tim Bingo. http://www.philohome.com/pf/LEGO_Power_Functions_RC_v110.pdf Edited November 3, 2011 by gambort Quote
AussieJimbo Posted November 3, 2011 Posted November 3, 2011 Thanks for the link, gambort. :classic: Quote
mostlytechnic Posted November 3, 2011 Author Posted November 3, 2011 Yep, I've been using the heck out of that pdf :) Thankfully, someone else already made a library for arduino with all the code needed, and it supports ALL those PF commands. So I just used the pdf to figure out which modes I wanted to use. Quote
AussieJimbo Posted November 4, 2011 Posted November 4, 2011 Sounds like Arduino has great potential for more realistic train control and other more advanced things like automated signalling, points, level crossings, turntables, etc. What does it take to get started with it? Have you got any recommendations on what to buy, how much it costs, what software you need. Also is there a Lego-only way to drive PF motors/parts from the NXT brick? If not, is there a reliable guide to making an adaptor that won't result in me "bricking" my NXT or killing my motors. :classic: Quote
Snapshot Posted November 4, 2011 Posted November 4, 2011 (edited) Also is there a Lego-only way to drive PF motors/parts from the NXT brick? If not, is there a reliable guide to making an adaptor that won't result in me "bricking" my NXT or killing my motors. :classic: You can buy a suitable cable made by, I think, Firgelli or you can make your own using the instructions on World of Mindstorms (search for 'cables' and scroll down). If you want an IR link then you need a HiTechnic IRLink. Edited November 4, 2011 by Snapshot Quote
AussieJimbo Posted November 4, 2011 Posted November 4, 2011 (edited) Thanks, Snapshot. http://dimastero.wordpress.com/2011/03/26/guide-custom-nxt-pf-cables/ Now I've got to decide if I'm ready to sacrifice a couple of cables to make a couple of adaptors. Might buy some spare NXT cables first, I've already got a few PF extension cables. :classic: Edited November 4, 2011 by AussieJimbo Quote
Snapshot Posted November 5, 2011 Posted November 5, 2011 (edited) I've sacrificed three long PF extensions. The light bley '9V' ends were spliced into short PF extensions to make 'Y' adapters for putting dual PF motors into loco's. The PF ends will be joined to the longest NXT cables to drive automated points. Edited November 5, 2011 by Snapshot Quote
Kisvakond Posted November 17, 2011 Posted November 17, 2011 (edited) Hi JopieK, that sounds interesting! I am done with my approach using LINX modules, both for PF (uni-directional) and RCX (bi-directional) communication. Works quite well in my office. Will be back in two weeks and hopefully show some pictures. What is you approach? Regards, Thorsten Hi Toastie! Sound like a dream for all LEGO Train Fans! :D I'm also interested in modding/ or adding RF communication to the exsisting PF system, becasuse it has its own limits aslo in delivered power, same as working range, due to the limited IR-technology.. I think RF is the best solution for this application. Please brief us, if you manage to 'cook out' something.. Keep up the good work! Edited November 17, 2011 by Kisvakond 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.