LegoDW

Power Functions 2.0, how to have multiple motors on a single train?

Recommended Posts

Did a quick search and nothing came up.  Sure someone has already asked this question.  Purchased a second new passenger train set 60197.  Needed some more track and wanted a longer train.  I was going to try using dual motors for the train, but there was no where to hook up a second motor.  Original Power Functions let you stack plugs so running dual motors was not to difficult.  What is the trick for running dual motors with Power Functions 2.0?  Do you run one motor from each port of the battery box?  That would allow you to control both motors from the same controller.... just have to remember to adjust both motors simultaneously. 

Share this post


Link to post
Share on other sites
18 hours ago, LegoDW said:

What is the trick for running dual motors with Power Functions 2.0?

I have no idea what the up-to date LEGO software for smart devices (phones/tablets) is capable of ... too many things are happening at the same time. Control+ and so on and so forth.

All LEGO "hubs" (i.e. with regard to trains sets currently sold, the 2IO hub) allow "pairing" of outputs. When you plug in two train motors into the 2IO hub, you can pair them. And then control them via the virtual port, the hub is creating upon request. The 2IO hub creates the A+B virtual port upon request, whereas the Technic 4IO hub can pair the A+B and C+D ports.

But again: This is on the byte code level. I don't know what the apps can do. The remote for sure cannot.

All the best,
Thorsten

   

Share this post


Link to post
Share on other sites

I went back to PF 1.0 in all my designs. The cable length issues, price, inability to stack cables, and needless complexity of the entire system were deal breakers.

Edited by SteamSewnEmpire

Share this post


Link to post
Share on other sites

I have a mix of PF 1 and now PF 2.  I like the idea of PF 2, no receiver.  I am not around a lot of blue tooth devices so that helps for sure.

Share this post


Link to post
Share on other sites

You can create a double motor control with the Powered UP app if so inclined.  The speed is controlled by tilting your phone or tablet.  It provides -100 to 100 based on your phone's/tablet's incline.  Stop can be obtained by pressing the stop program button on the upper right part of the screen.  (Not shown here.)

 

doublemotors.jpg

Share this post


Link to post
Share on other sites
4 hours ago, dr_spock said:

You can create a double motor control with the Powered UP app if so inclined.  The speed is controlled by tilting your phone or tablet.  It provides -100 to 100 based on your phone's/tablet's incline.  Stop can be obtained by pressing the stop program button on the upper right part of the screen.  (Not shown here.)

I put my phone in my pocket and my train went crazy! But seriously though, in an ideal world the app should by default allow you to control multiple ports (and multiple hubs) tied together with a single i/o rather than requiring you to program up your own solution, still good that it is possible and thanks for sharing the simple code

Share this post


Link to post
Share on other sites

@dr_spock Do you *have* to have the tilting of the device as the input though? Judging by the screenshot, it looks like one should be able to associate some other form of input(s)...?

Share this post


Link to post
Share on other sites
On 2/11/2020 at 10:49 PM, zephyr1934 said:

I put my phone in my pocket and my train went crazy! But seriously though, in an ideal world the app should by default allow you to control multiple ports (and multiple hubs) tied together with a single i/o rather than requiring you to program up your own solution, still good that it is possible and thanks for sharing the simple code

I guess features will be added as things progress with the PU app.  But it is good they allow you program your own in the meantime rather than have to wait for them to get around to it.

 

7 minutes ago, M_slug357 said:

@dr_spock Do you *have* to have the tilting of the device as the input though? Judging by the screenshot, it looks like one should be able to associate some other form of input(s)...?

You can use other types of inputs too.  I picked the tilt input so that I don't have to look at the screen while I control my train. 

 

Share this post


Link to post
Share on other sites

Do you think TLG will come out with a plug extension, basically allowing two devices (motors, lights, whatever) into a single plug.  Basically a extension cable with multiple plugs on one end.  Suppose it wouldn't be to difficult to DIY one from two extension cables. 

Regarding the app from Dr Spock, that would work.  Only issue is if you have multiple dual motored trains, app only allows one battery box to be controlled at a time.  One would need multiple smart phones.  That us why I like the physically controllers over my smart phone.  

 

Share this post


Link to post
Share on other sites
23 minutes ago, LegoDW said:

Do you think TLG will come out with a plug extension, basically allowing two devices (motors, lights, whatever) into a single plug.  Basically a extension cable with multiple plugs on one end.  Suppose it wouldn't be to difficult to DIY one from two extension cables. 

Regarding the app from Dr Spock, that would work.  Only issue is if you have multiple dual motored trains, app only allows one battery box to be controlled at a time.  One would need multiple smart phones.  That us why I like the physically controllers over my smart phone.  

 

 

With PUP App version 3.0, you can control up to 4 battery boxes at a time.   Here is an example of two trains controled by one app. 

 

 

 

 

Share this post


Link to post
Share on other sites
23 hours ago, dr_spock said:

 

With PUP App version 3.0, you can control up to 4 battery boxes at a time.   Here is an example of two trains controled by one app. 

 

 

 

 

So after watching this video, many question are now in my head.  I assume there are some threads that explain the PUP APP and what extra stuff you need on the train to keep them from crashing.  Can someone point me the right direction for these treads.  Also if the video is possible assuming there is some sort of reader or prox switch that could be placed at a train station to make a train pause like it was making a scheduled stop and then proceed.  Are there any treads on this?

Thank you for sharing.

Share this post


Link to post
Share on other sites
1 hour ago, LegoDW said:

So after watching this video, many question are now in my head.  I assume there are some threads that explain the PUP APP and what extra stuff you need on the train to keep them from crashing.  Can someone point me the right direction for these treads.  Also if the video is possible assuming there is some sort of reader or prox switch that could be placed at a train station to make a train pause like it was making a scheduled stop and then proceed.  Are there any treads on this?

Thank you for sharing.

Programming Powered UP app is similar to LEGO BOOST app.  If you used the BOOST app before, it'll be very familiar.  If you haven't,  EB user kbalage put together a nice PUP programming block guide:  https://racingbrick.com/powered-up-code-block-guide/

I used the Powered UP Color & Distance Sensor: https://www.lego.com/en-us/product/color-distance-sensor-88007

Here are some other stuff you can do with it:  https://www.eurobricks.com/forum/index.php?/forums/topic/175758-powered-up-train-automation-experiments/

Have fun.  :classic:

 

Share this post


Link to post
Share on other sites
On 2/14/2020 at 6:39 PM, LegoDW said:

Do you think TLG will come out with a plug extension, basically allowing two devices (motors, lights, whatever) into a single plug.  Basically a extension cable with multiple plugs on one end.  Suppose it wouldn't be to difficult to DIY one from two extension cables. 

No, there won't be any splitters because PUP devices are designed to be "smart" and require the four wires so they can communicate with the hub. Also no official PUP extension cables exist yet. Some PUP devices like the lights, simple medium motor (from the App-Controlled Batmobile) and train motor are actually "dumb" (data lines just have resistors for identification, no actual communication from device-to-hub). Such identical devices could theoretically be DIY-stacked but the modification would be destructive and I wouldn't try it unless you have some experience and familiarity with electronics (plus you may run into per-port current limitations).

Edited by izx

Share this post


Link to post
Share on other sites

@dr_spock Thanks so much for all of your tips and posts. I've been using BAP for PUP control and automation so far but looks like its time to crack open my Boost kit!

One question though...is there a simple increment/decrement input to control dual-train-motor AB/CD ports instead of tilt? I was able to use the controller option in PUP 3.0 projects to let one slider control two motors, but that doesn't fit our train model. Sorry if this is a dumb question...I'm very comfortable with traditional coding but just getting the hang of this flowchart-type block-based style PUP uses.

Share this post


Link to post
Share on other sites
12 hours ago, dr_spock said:

Programming Powered UP app is similar to LEGO BOOST app.  If you used the BOOST app before, it'll be very familiar.  If you haven't,  EB user kbalage put together a nice PUP programming block guide:  https://racingbrick.com/powered-up-code-block-guide/

I used the Powered UP Color & Distance Sensor: https://www.lego.com/en-us/product/color-distance-sensor-88007

Here are some other stuff you can do with it:  https://www.eurobricks.com/forum/index.php?/forums/topic/175758-powered-up-train-automation-experiments/

Have fun.  :classic:

 

Ok, looks like I have some reading to do.  Have a few questions if you don't mind.

1) Appears the color sensor has a blue light with it.  Is this light on all the time....i.e it lit the tracks up blue in your video.

2)  In reading about the the color sensor appears you can control what a train would do after reading a certain color.  The program list actions to do after seeing a given color, but couldn't see where you could adjust what colors do what exactly.  Program has if it sees a red brick stop.  Would the program allow you to change seeing a red brick to say speed up, or are you stuck with red bricks are just for stop?

I'm trying to figure out how to make this look pretty on my layout.  I keep things on the darker side for layou, a blue light under my 60197 might look a bit odd.

Share this post


Link to post
Share on other sites
On 2/11/2020 at 5:25 AM, LegoDW said:

Purchased a second new passenger train set 60197.   I was going to try using dual motors for the train, but there was no where to hook up a second motor. 

1.) One hub / one motor on each port / Use App or Handheld

2.) Two Hubs / one motor on each Hub / Use App or Handheld

 

On 2/16/2020 at 9:03 AM, izx said:

I was able to use the controller option in PUP 3.0 projects to let one slider control two motors, but that doesn't fit our train model.

So you got a solution, what does it mean "doesn't fit train model"?

I have a program here that uses the slider and can control up to 4 engines.

 

Share this post


Link to post
Share on other sites

This is my solution: I already had two PF motors, I just got an extension cable and a PoweredUp ligths (the cheapest). I made an adapter cable and I also opened one of the motors to switch its polarity. I think I found all the info for these changes on this forum.

I was also experimenting with using 2x18650 Li-Ion batteries (3200 mAh = 3x capacity) instead of the AAAs with the PU circuit board, but I have to figure out how to fit them in the Maersk. However, a full charge of AAAs gave me a long enough runtime, so I put that project on pause.

I really like the Bluetooth capability and hope to find time to experiment with some python scripts to run my trains from a Raspberry Pi. Also it is nice to have the extra room when you scrap the PF IR reciever.

vlak.jpg

Share this post


Link to post
Share on other sites

 

On 2/16/2020 at 3:03 AM, izx said:

@dr_spock Thanks so much for all of your tips and posts. I've been using BAP for PUP control and automation so far but looks like its time to crack open my Boost kit!

One question though...is there a simple increment/decrement input to control dual-train-motor AB/CD ports instead of tilt? I was able to use the controller option in PUP 3.0 projects to let one slider control two motors, but that doesn't fit our train model. Sorry if this is a dumb question...I'm very comfortable with traditional coding but just getting the hang of this flowchart-type block-based style PUP uses.

There is a node.js PUP project on Github, if you prefer writing code.  You would have to set up a node.js server running on PC or laptop or Raspberry PI.  I think it is better for larger more complex programs.

On 2/16/2020 at 12:39 PM, LegoDW said:

Ok, looks like I have some reading to do.  Have a few questions if you don't mind.

1) Appears the color sensor has a blue light with it.  Is this light on all the time....i.e it lit the tracks up blue in your video.

2)  In reading about the the color sensor appears you can control what a train would do after reading a certain color.  The program list actions to do after seeing a given color, but couldn't see where you could adjust what colors do what exactly.  Program has if it sees a red brick stop.  Would the program allow you to change seeing a red brick to say speed up, or are you stuck with red bricks are just for stop?

I'm trying to figure out how to make this look pretty on my layout.  I keep things on the darker side for layou, a blue light under my 60197 might look a bit odd.

You can set the color of the sensor light with the light block.  I think it defaults to blue. There is white, blue, red, green, etc.  

It is up to you what function you want to execute on the detected color. 

Share this post


Link to post
Share on other sites
1 hour ago, dr_spock said:

 

 

You can set the color of the sensor light with the light block.  I think it defaults to blue. There is white, blue, red, green, etc.  

It is up to you what function you want to execute on the detected color. 

Great, next time I'm at the Lego store will have to pick one up 

Share this post


Link to post
Share on other sites

@dr_spock you fiend! After seeing all your stuff I had to buy myself a distance sensor (in the mail) and will start playing around with this soon. Much as I must resist PowereUP (I like the set and go of PF and the fact that you can stack motors on a single output), I built a PCC streetcar before PUP, the clearance was too tight that I could not do PF (no room for the connector on the top), but then the PUP box fit perfectly. Now looking at the sensor, it appears to fit the one bit of the bottom that has no conflict in the build above. So I must accept it as destiny. Neat stuff

Share this post


Link to post
Share on other sites
On 2/11/2020 at 5:25 AM, LegoDW said:

 That would allow you to control both motors from the same controller.... just have to remember to adjust both motors simultaneously. 

Yes. But here is a first idea to resolve this by using the two knobs in the middle

RemoteControl.jpg

The 1x8 plate belongs between the knobs to control the two stop buttons.

It's not yet finished, just an idea  .... please feel free to improve ....

 

Edited by Lok24

Share this post


Link to post
Share on other sites

What a great idea!  We need to adjust slightly so when you push one of the levers one control goes up, the other down since the motors will be installed 180 deg off each other (both motors will be installed in one cable, wiring will be back to back.

Share this post


Link to post
Share on other sites
46 minutes ago, LegoDW said:

What a great idea!  We need to adjust slightly so when you push one of the levers one control goes up, the other down since the motors will be installed 180 deg off each other (both motors will be installed in one cable, wiring will be back to back.

That sounds unnecessary - the PUP controller allows you to turn the controller knobs around, doesn’t it? So you can just turn one upside down and keep the mechanism as depicted.

Share this post


Link to post
Share on other sites
On 2/18/2020 at 5:10 AM, Lok24 said:

Yes. But here is a first idea to resolve this by using the two knobs in the middle

That's brilliant!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.