JopieK

Powered Up - A tear down...

Recommended Posts

10 hours ago, Toastie said:

In the whole line of Mindstorms, let it be VLL, let it be Spybotics, or the way the NXT brick communicates … we never got a >real< handle. People needed to find out, use "leaks", retro-engineering, a complete waste of resources.  

For the EV3 there is a complete Communication Developer Kit and HardwareDeveloper Kit, both released  by LEGO in 2013

Share this post


Link to post
Share on other sites

I had a bit of spare time this morning, so I had a chance to put some of my code to the test. I put up a temporary train layout in my living room with a couple of trains, and decided to automate it. Here's a video:

LPF2 components used:

* Maersk 10219 - Powered Up Hub, Powered Up Train Motor, and Boost Color Sensor

* Horizon Express 10233 - Powered Up Hub and Powered Up Train Motor

* Outer Switch - Powered Up Hub with WeDo 2.0 Medium Motor

* Inner Switch - Boost Move Hub with Boost Interactive Motor

* Stop Detection for Horizon Express - WeDo 2.0 Smart Hub with WeDo 2.0 Distance Sensor

Description of the layout:

1. Maersk goes round, and hits the first yellow marker. Train stops, changes outer switch to go into siding, and reverses.

2. Hits the second yellow marker. Train stops, changes the inner switch, and goes forward into the second siding.

3. Hits the third yellow marker. Train stops, changes the outer switch to mainline again.

4. Horizon Express does a loop. Detection sensor senses the train and stops it. Maersk starts reversing again.

5. Hits the yellow marker, train stops. Changes inner switch to point outwards to main loop and outer switch to point inwards.

6. Maersk goes forward at slow speed for 3 seconds, then accelerates to faster mainline speed.

7. Hits yellow marker (mainline), changes outer switch back to mainline. Train continues without stopping.

8. Hits RED marker. Maersk stops, horizon goes, does a loop.

9. Horizon is detected by stop sensor and stops. Maersk goes. Go back to beginning. :)

Share this post


Link to post
Share on other sites

Hi, that's really awsome.

Could you please tell us what you used, Arduino, tablet or other?

And give a short example, just a few lines,  of the code to see how complex  that is?

Edited by Lok24

Share this post


Link to post
Share on other sites
8 minutes ago, Lok24 said:

Hi, that's really awsome.

Could you please tell us what you used, Arduino, tabelet or other?

And give a short example, just a few lines,  of the code to see how complex  that is?

Sure. :)

All the hubs talk directly to my laptop via Bluetooth (You can get a glimpse at it near the end).

Here is the code for this layout, build ontop of the node-lpf2 code library I've been building: https://github.com/nathankunicki/node-lpf2/blob/master/examples/automated_train_layout.js

Share this post


Link to post
Share on other sites

I see!

That's already  very abstracted and easy to be handled due to the predefined classes.

I'm not familiar with that all, my latest experiences were the Red Keep from Game of thrones (Four  EV3 in a PAN, Java) and my fully automated train layout (Raspberry Pi, Python), have a look for some pictures and a short Video: https://www.1000steine.de/de/gemeinschaft/forum/?entry=1&id=400488#id400488

As I understand your solution is written in Java Script?
Do you use some IDE like eclipse?

 

 

 

Share this post


Link to post
Share on other sites
27 minutes ago, Lok24 said:

I see!

That's already  very abstracted and easy to be handled due to the predefined classes.

I'm not familiar with that all, my latest experiences were the Red Keep from Game of thrones (Four  EV3 in a PAN, Java) and my fully automated train layout (Raspberry Pi, Python), have a look for some pictures and a short Video: https://www.1000steine.de/de/gemeinschaft/forum/?entry=1&id=400488#id400488

As I understand your solution is written in Java Script?
Do you use some IDE like eclipse?

 

 

 

Indeed. :) The point of the library is I don't want to keep writing individual byte streams to send to the hubs to control stuff, it's nicer to abstract it out. :) Especially because there are subtle differences in the protocol between wedo/boost/poweredup and the hubs and the remotes, it's better to abstract those differences away too so they can all be treated the same.

Yes, the library is written in Javascript and intended to be used with the Node.js runtime. I use Visual Studio Code, but the IDE/text editor can be whatever you prefer.

That layout is excellent! I like it a lot. I see you've modified quite a few of the components to allow computer interface? How are the trains controlled on your layout? (Edit: I just read you used SBricks)

 

 

Edited by Mr Hobbles

Share this post


Link to post
Share on other sites

Thanks a lot for your additional information.

There are very few modifications to LEGO parts. The PF cables are just clipsed into the connectors, but th 9V connectoers were opened to solder new long cables. Feedback ist given by reed contacs and magnets under the locos. In other words: that's all wired (and so very cheap)!

Here's a picture of the "brain" with the relais modules, so it's a different approach:

P-013.jpg

 

 

The "serial" cable is just 9 wires for the eight motors, no electronic at all.

As the layout was shown at an exhibition in June, no PU was available, so there are 2 SBricks to setup BLE.

See schematic includuing sound and some examples for command chains (usind things like "motor", "Wait" and so on):

https://www.1000steine.de/de/gemeinschaft/forum/?entry=1&id=400516#id400516

 

Edited by Lok24

Share this post


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

All the hubs talk directly to my laptop via Bluetooth (You can get a glimpse at it near the end).

Here is the code for this layout, build ontop of the node-lpf2 code library I've been building: https://github.com/nathankunicki/node-lpf2/blob/master/examples/automated_train_layout.js

Now this is something I'd love to see running headless on a RPi for shows/etc too! Perhaps via integration with NodeRed for editing? Have a bluetooth dongle and a wifi dongle with a static IP and you're away laughing :)

Share this post


Link to post
Share on other sites
Just now, kiwinewt said:

Now this is something I'd love to see running headless on a RPi for shows/etc too! Perhaps via integration with NodeRed for editing? Have a bluetooth dongle and a wifi dongle with a static IP and you're away laughing :)

Indeed, that's a vision! But yet rather expensiv, that's why I showed my integration of the RPi with very old and cheap motors. Small and only one battery box for the complete layout. But wired.

There might be interesting mixes of both techniques, sensors and loco via BT, but some wires for signals, switches and so on.

 

Share this post


Link to post
Share on other sites

Slighty off-topic, but does anyone know if it would be possible to connect PU motors to PF power? Obviously some kind of non-lego component would be needed to join the two wires, but fundamentally, can the PU motors be run using PF power?

The reason I ask is that I've got into GBCs this year, and most GBCs use PF motors, powered by 9v train controllers, using the Lego adaptor lead. 9v tran controllers are used so that batteries don't have to be replaced, and the motors don't cut out at any point.

PU is worrying in this respect, in that it appears there will be no official way to connect it to PF (and therefore to 9v). However, if it just needs a few wires spliced together, that's less of a worry (although still not ideal).

Share this post


Link to post
Share on other sites

Hi,

 

very nice and useful.

There are many ways to connect a cable to PF-Connectors.

But how did you manage the connection between the red cabel and the PU-Plug?

And: hopefully there will be an adapter cable  soon.

Edited by Lok24

Share this post


Link to post
Share on other sites
25 minutes ago, Paperballpark said:

PU is worrying in this respect, in that it appears there will be no official way to connect it to PF (and therefore to 9v).

It's waaaaay to early to say that. :) PF existed for 11 years. Powered Up has been out less than 2 months. More PF components were introduced throughout its lifetime, and I imagine the same will happen here. I do expect a PUP to PF conversion cable at some point.

@Lok24 I believe he has some other videos where he butchers an mSATA cable to make it compatible, maybe that's what that red bit is?

Share this post


Link to post
Share on other sites
3 hours ago, Mr Hobbles said:

It's waaaaay to early to say that. :) PF existed for 11 years. Powered Up has been out less than 2 months. More PF components were introduced throughout its lifetime, and I imagine the same will happen here. I do expect a PUP to PF conversion cable at some point.

I was only saying that because the Lego trains FAQ says this:

 

Can I use and connect the new LEGO® Powered Up Smarthub, motors and lights with my older LEGO Power Functions battery box and motors?
Unfortunately, no. The change of technology between LEGO® Power Functions (infra-red signal) and LEGO® Powered Up (Bluetooth connection), combined with a change of the wire connectors, means the two systems are not compatible.

 

Which strongly implies that they're not going to release a converter cable.

Share this post


Link to post
Share on other sites
2 hours ago, Paperballpark said:

Can I use and connect the new LEGO® Powered Up Smarthub, motors and lights with my older LEGO Power Functions battery box and motors?
Unfortunately, no. The change of technology between LEGO® Power Functions (infra-red signal) and LEGO® Powered Up (Bluetooth connection), combined with a change of the wire connectors, means the two systems are not compatible.

I'd take that as a description of the current state of the platform. If LEGO were to say anything else they'd get an avalanche of questions on how to make it work right now. Not that I'm optimistic about the chances of it actually happening, but FAQs have been known to change over time.

Share this post


Link to post
Share on other sites

The more I read about boost/pu the more it becomes intersting to me.

Last few days I played around with the Boost app (w/o having any hub) just to see what programming features it offers out of the box. And I think it provides most programming structures one needs for automating trains. So possibly many people could be happy with that. (Although I personally appreciate the effort shown here in the forum to open the new hardware up for more advanced programming languages and generic environments.)

However, one thing I could not find out (have already searched here and the internet) is: does the current Boost app already allows to connect to and work with the PU smart hub? Can I run e.g. one of the 2018 trains with Boost?

Could someone here who has Boost app and the PU hub give it a try?

Same question for the WeDo hub. Does it require an own app or can one use the Boost app?

The info I found regarding this was not really claer about that...

Also I have noticed that the Boost app had some updates since release and many of the early reviews appear outdated in the meanwhile (e.g. regarding availability of certain programming functions and control structures).

The latest version appears to me at least in some points better than the initial release.

Edited by Brickster12

Share this post


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

However, one thing I could not find out (have already searched here and the internet) is: does the current Boost app already allows to connect to and work with the PU smart hub? Can I run e.g. one of the 2018 trains with Boost?

Could someone here who has Boost app and the PU hub give it a try?

Same question for the WeDo hub. Does it require an own app or can one use the Boost app?

Sadly, no. It is not possible to connect to the PUP or WeDo hubs with the Boost app, and it is not possible to connect to the Boost or PUP hubs with the WeDo app. As a result, official train programming capability is non-existent right now.

I personally hope this will come to pass, but for now we can write our own code.

Share this post


Link to post
Share on other sites
On 7/27/2018 at 10:46 AM, Paperballpark said:

Slighty off-topic, but does anyone know if it would be possible to connect PU motors to PF power? Obviously some kind of non-lego component would be needed to join the two wires, but fundamentally, can the PU motors be run using PF power?

The reason I ask is that I've got into GBCs this year, and most GBCs use PF motors, powered by 9v train controllers, using the Lego adaptor lead. 9v tran controllers are used so that batteries don't have to be replaced, and the motors don't cut out at any point.

PU is worrying in this respect, in that it appears there will be no official way to connect it to PF (and therefore to 9v). However, if it just needs a few wires spliced together, that's less of a worry (although still not ideal).

You can always splice wires and hack something together to make it work if you're not 100% purist.   I've done some nonpurist stuff to power my GBC at outdoor picnics.

Share this post


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

And I think it provides most programming structures one needs for automating trains.

Don't forget that, unlike MINDSTORMS, Boost requires you to have your phone/tablet connected at all times for the programming to work.

Share this post


Link to post
Share on other sites
16 hours ago, AVCampos said:

Don't forget that, unlike MINDSTORMS, Boost requires you to have your phone/tablet connected at all times for the programming to work.

Right, that is a point. On the other hand having the software running on a mobile device is easy to use. And if you are not running a huge static MOC display for hours or even days but just want to play around with automation a mobile device is a really good platform.

However I personally preferr platform independent software as that provides most flexibility.

Open source, open standards and Node/JS, Python & Co. are the right choice to go with... even from a modern commercial point of view.

What I'm missing is a more holistic approach from TLG. It is quite ridiculous that WeDo and Boost are incompatible software-wise while the hardware is compatible. TLG has obviously missed to understand that if WeDo is used in school kids may want to do more at home and may want to use Boost and/or PU. But then it would be VERY useful to have the same programming environmet available for all three product lines. (I'm saying that as an AFOL and parent of two kids in the right age)

So the software is a complete conceptual and product design fail in my eyes. And separating the markets here does not make any sense.

I really hope TLG gets the turn in future.

Edited by Brickster12

Share this post


Link to post
Share on other sites

In some local Lego train FB groups people have been saying they wouldn't be using powered up as it doesn't have a long enough of a range to allow them to run their trains without disconnecting halfway down their big lug group layouts. I was just curious what options would work with powered up. Is powered up compatible with Ble mesh networks? Is just buying a big Bluetooth antenna the best option or is powered up just not suitable for this?

Share this post


Link to post
Share on other sites

So I've managed to acquire all the Powered Up hubs and train motors I want to convert my trains. Mainly the Metroliner, Maersk train, Horizon Express, and Emerald Night. Metroliner, Maersk, Horizon - trivial to convert, and the Maersk train has the added bonus of having room for a downwards facing color sensor with no modification whatsoever!

The Emerald Night, however, has a problem.

Obviously it doesn't use a train motor, it uses a normal PF motor. With PUP, this equates to the WeDo 2.0 Medium Motor (as there is no XL equivalent yet). HOWEVER, the default behaviour of the controller is to "bang-bang" control the motor. This means it has two modes - full speed go and stop. And only for as long as you're holding the button down. There is no continual speed control.

That seems like quite a large oversight!

Now for me, it's not such a problem, as I plan to control the trains with my laptop, which means I can make the controller act however I want. But when connecting the controller directly to the train, it can't be controlled properly.

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.