JopieK

Powered Up - A tear down...

Recommended Posts

26 minutes ago, AVCampos said:

That's valuable feedback, with a specific scenario where the current implementation of PU (PUP? PUp?) needs to change. You may want to transmit it to TLG by commenting here: https://lan.lego.com/news/overview/powered-up-afol-community-answers-r146/

I have indeed. :)

EDIT: I've gone with PUP as it rolls off the tongue easier to say "pup" as in a small dog, than it is to say "pee-you", or, dare I say it, "poo"...

Edited by Mr Hobbles

Share this post


Link to post
Share on other sites

Got a few sets of the new lights today. Pretty easy to get working for us Bluetooth guys figuring out the protocol. It's the same command as setting basic motor speed:

Powered UP Hub and Boost Move Hub:

[0x08, portId, 0x81, 0x00, 0x11, 0x51, 0x00, brightness]

Sent to the main BLE characteristic used for everything. Brightness is 0-100 (0x00-0x64)

WeDo 2.0 Smart Hub:

[portId, 0x01, 0x02, brightness]

Sent to the MOTOR_VALUE_WRITE characteristic (000015651212efde1523785feabcd123). Brightness is 0-100 (0x00-0x64) same as above.

Pictures: https://imgur.com/a/ZUGOtyZ

I've added support to my Node.js library: https://github.com/nathankellenicki/node-poweredup

EDIT: Forgot to mention, AutoID value of 0x08. Wonder what 0x04 will be then? (0x01 is medium motor, 0x02 is train motor)

Edited by Mr Hobbles

Share this post


Link to post
Share on other sites

For the electronics engineers out there, please note that VCC is NOT 9v (or 7.2v if you use rechargeables) but actually 3.3v, which is the microcontroller operating voltage and not the battery voltage. You cannot use these 'power' lines to drive anything heavy as they appear to be only intended for providing a Logic 1 or Logic 0 reference for the ID pins or possibly powering low voltage, low current peripherals such as sensors. With PF, you can just pull the full battery voltage from the +V and GND pins up to the current limit (0.8A) of the battery box. 

I have stripped a set of PUP lights so I can use the PUP ports with a breakout cable (also a PUP>PF adapter) for my testing and experimenting. I have posted a circuit diagram of the PUP lights in 2018 Train Tech if anyone is interested. Not very different from the PF lights, except the resistor values are lower (510R instead of 4K7). This did make me think that the LEDs are driven at 3.3v by the H-Bridge drivers rather than the full motor voltage (and that output voltage is somehow dependent on ID codes), but my PWM signals on M1/M2 (C1/C2 in PF notation) appear to scope out at full battery voltage. PF lights are somewhat brighter on full tilt than the new PUP ones.

Share this post


Link to post
Share on other sites
8 hours ago, retrotecchie said:

I have posted a circuit diagram of the PUP lights in 2018 Train Tech if anyone is interested.

Yes, sure. Where can I find that?

Thanks!

Share this post


Link to post
Share on other sites
On 8/8/2018 at 1:52 PM, Mr Hobbles said:

I've gone with PUP as it rolls off the tongue easier to say "pup" as in a small dog, than it is to say "pee-you", or, dare I say it, "poo"...

I call it PUP as I think that is what LEGO have sold us....

Share this post


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

I call it PUP as I think that is what LEGO have sold us....

Well, for my needs it's a big step up from Power Functions, so I'm quite happy with what they've sold me. :) 

Share this post


Link to post
Share on other sites

@JopieK I don't suppose you (or anyone you might know) with the new Duplo train hub would be able to send me the manufacturer data string and the port notifications sent at startup? :) I'm trying to avoid buying a Duplo train just to add support for it to my library!

Share this post


Link to post
Share on other sites

I got my hands on the Duplo train base. Manage to figure it all our through a combination of sniffing and playing. Has some interesting features:

1. As @JopieK said, the front light actually behaves the same as the RGB indicator light on other hubs.

2. There are three sounds - 0x05 is a "train departing jingle", 0x07 is the train whistle, and 0x09 is the sound of water filling. All are played through an onboard speaker.

3. The downwards color sensor is a bit different from the Boost color sensor. It does color detection, of course, and it also does distance detection. It seems to count down rather than up though (i.e. further away has larger values). I suspect this is used in combination with the color value to ensure that the colors it detects are on the rails rather than under the rails (ie. ignore carpet color).

4. There is a speedometer on the front wheels! The front wheels are completely free wheeling, but the speedometer also reports the speed that they're going at.

Interestingly, if there's no movement on the front wheels, the motored wheels don't go, no matter what commands you give it. So if you tell it to go at speed 100 while holding it in your hands, it will turn on for a second or so, but then turn off again, as the front wheels aren't rotating. It remembers though - if you manually spin the front wheels, it will start moving again.

I've added support to my Node.js library (https://github.com/nathankellenicki/node-poweredup) - since, in LEGO's own words, they consider the new Duplo trains part of the Powered UP range. :)

Share this post


Link to post
Share on other sites

Tanks for this information.

But: What ist the "Duplo train base "? What Number? Which Set?


Thanks for any help.

Share this post


Link to post
Share on other sites
6 hours ago, Lok24 said:

Tanks for this information.

But: What ist the "Duplo train base "? What Number? Which Set?


Thanks for any help.

Duplo #10874 and #10875. Like other Duplo trains, the locomotive is in two pieces - a black base with wheels attached, and a body shell you place on top. JopieK did the electronics teardown earlier in the thread.

The new Duplo train base is Bluetooth and app-controlled like the new Lego trains.

Edited by Mr Hobbles

Share this post


Link to post
Share on other sites

Hello all!

I realize that this thread is mainly about the PUP software, but I figured this should go here for possible future hardware mods to the PUP train hub?

A few days prior to writing this, I discovered that a 9V battery could fit inside the top half (brain) of the hub. I didn't have any ideas on how to make contact electrically though.

43427520985_e610f87e9d_n.jpgTablescrap: PUP Battery Box + 9V battery by Nick Jackson, on Flickr

I came back to this potential find and gave it a bit more thought & effort:

42632959750_e248828731_n.jpgFrom Tablescrap to Technique? (3) by Nick Jackson, on Flickr

That ring terminal piece (22-18 ga. #10 stud, non-insulated) allows the positive terminal of the 9V battery to make contact with the one inside the hub. Coincidentally, there happens to be a small groove that goes down the middle of the hub that holds the ring terminal at a nice angle for electrical contact:

30573099538_3c1057daa4_n.jpgFrom Tablescrap to Technique? (2) by Nick Jackson, on Flickr

And we have power! This technique saves a whole brick's worth of height:

29504347027_1be712ac02_n.jpgFrom Tablescrap to Technique? (1) by Nick Jackson, on Flickr

Unfortunately, I don't have enough electrical knowledge to really test this out, but maybe @JopieK and @Philo could take a more in-depth look at this?

 

~M_slug~

Share this post


Link to post
Share on other sites

If you got the hub to light on, well, you made the job ;)

Now the drawbacks;

  • It is not fullproof (you can easily put the battery backwards, with chances of frying the hub)
  • the capacity of 9V batteries is low compared to AAAs
  • you lose bottom antistud connectivity.

Share this post


Link to post
Share on other sites

The drawbacks are not severe...

The battery holder can be removed so the bottom can be mounted again. Source here

The 9V block is available as Li-ion battery and can be recharged. The capacity is comparable with a standard AAA cell.

Let's look for a low profile clip for the 9V block which fits into the hub to make the mod foolproof.

Edited by Giottist

Share this post


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

The 9V block is available as Li-ion battery and can be recharged. The capacity is comparable with a standard AAA cell.

Nice, somehow I didn't know those were available. I guess they're not that common.

To me the biggest advantage of 9V batteries is their size - some of them (not sure if the li-ion ones you mention), have the depth of 16mm which allows them to be fitted in 2-stud wide space.

Share this post


Link to post
Share on other sites

I've found them on Ebay and ordered some for testing. I will report the results when they arrive (they come from China, it takes a couple of days ...) I expect a voltage of only 7.4V but with a very low internal resistance but perhaps a step up converter is included in those batteries - we will see.

If you like to know more use "Li Ion 9V" or "Li ion 6F22" for searching.

Share this post


Link to post
Share on other sites

I ran into a problem with one of the Duplo train hubs. I borrowed one from an educational set, from the outside (HUB 5) it is identical to the one from the Duplo steam train though. The one from the steam train set recognizes all colors, the borrowed one only recognizes blue (water) and white (light) but ignores reverse (green), stop (red) and whistle (yellow). I replace the batteries to be sure but same behavior. It seems to be faulty, I also can't update it through the Duplo app or something.

Share this post


Link to post
Share on other sites
On 9/8/2018 at 2:35 AM, JopieK said:

I ran into a problem with one of the Duplo train hubs. I borrowed one from an educational set, from the outside (HUB 5) it is identical to the one from the Duplo steam train though. The one from the steam train set recognizes all colors, the borrowed one only recognizes blue (water) and white (light) but ignores reverse (green), stop (red) and whistle (yellow). I replace the batteries to be sure but same behavior. It seems to be faulty, I also can't update it through the Duplo app or something.

That is a strange bug indeed. If it was corrupted firmware I would have thought *nothing* would work...is it just that the educational train hub has less capabilities? Does it come with the other color track pieces in the box?

In another note, I recently moved from London to San Francisco (two weeks ago), and decided to go along to this weeks BayLUG meetup and see what it was about. @M_slug357 happened to be there, and I got to see his 9v battery mod on his Hogwarts Express! Talk about coincidences. I will definitely be going back. :)

Edited by Mr Hobbles

Share this post


Link to post
Share on other sites

But the problem is that both are exactly the same so it must be firmware. I didn't say the firmware is corrupt (I am a teacher in embedded software so I know how such a things work), but it seems the colors are just not being recognized, so it might be some older firmware or something. I called LEGO (was during the day but they had an answering machine saying they weren't available...).

It is a little large so I just linked it: http://www.brickshelf.com/gallery/JopieK/PUP/img_0580.png

Here are the videos:

Reaction is the same when I use the app. Very strange...

Share this post


Link to post
Share on other sites

What education set is the hub from? I didn't know the education sets with Duplo hubs were out already...

Share this post


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

But the problem is that both are exactly the same so it must be firmware. I didn't say the firmware is corrupt (I am a teacher in embedded software so I know how such a things work), but it seems the colors are just not being recognized, so it might be some older firmware or something. I called LEGO (was during the day but they had an answering machine saying they weren't available...).

I didn't mean to say that's what you were suggesting, I was merely saying it seems like it was different somehow rather than broken, perhaps a different/older firmware as you suggest. :) Apologies if I caused offense!

 

Edited by Mr Hobbles

Share this post


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

I didn't mean to say that's what you were suggesting, I was merely saying it seems like it was different somehow rather than broken, perhaps a different/older firmware as you suggest. :) Apologies if I caused offense!

 

It takes a lot to offend a teacher haha but I wanted to elaborate more on it :) I also think it has older firmware, seems to be unlikely that it detects white and blue correctly and ignores the other colors.

Share this post


Link to post
Share on other sites

Hi Folks, I promised to report my experiences with the Li-Ion 9V Blocks I've found at ebay.

Not only ebay sells these batteries but there are a lot more online stores, but the battery is allways the same type:

Dsc00795.jpg.269177888f8247e2f33015b18ac1fb80.jpg

Brandname Soshine, nominal capacity 650 mAh, two cells with 7.4V, no internal step-up converter, made in China

I tested the electrical data with my sophisticated charger, which is also able to test the capacity.

The voltage is ok and like two healthy Li-ion cells 7.4V. I discharged it with 250 mA (typical for pure LEGO train operation) and charged it with 200 mA which is rather quick.

Dsc00793.jpg.10259040eb7735c65bff2a3b86c5ede8.jpg

The capacity is about 460 mAh which is quite reasonable and expectable for the battery size, 650 mAh is only a doubtfull ad promise. Perhaps we can charge it slower with 100 mA and the capacity will increase a little bit but 650 mAh printed on the battery is phantasy. But with 70% we are well served. And I've found the internal resistance is very low, common for Li-Ion batteries. This meansour trains will move as fast as with normal AAA non rechargeable batteries. We will notice no or only minor performance drop despite the missing 1.6 V.

The real capacity will operate a LEGO train for 90 min to 2 hours depending on the load. This is satisfying. Please keep in mind the batteries of this type are cheap and are real Li-Ion types rechargeable multiple times.

Conclusion: A recommendable alternative for AAA cells and much more environment friendly :thumbup:

Share this post


Link to post
Share on other sites

@Giottistnice. May I ask, what are the dimensions? As I've mentioned earlier, for me one of the advantage of 9V battery (some of them at least), is that I can fit it in 2-stud wide space...

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.