JopieK

Powered Up - A tear down...

Recommended Posts

Is there a reason why you use the speed control and not the motor power control? Do both of your motors have rotation sensors?

It might help to put a delay of about 0.2 seconds after the motor block because the program might cause too many reads.

Share this post


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

Is there a reason why you use the speed control and not the motor power control?

 

Yes, because I wand to control the speed

1 hour ago, Tcm0 said:

Do both of your motors have rotation sensors?

 

Sure. Type of motor doesn't change behaviour

1 hour ago, Tcm0 said:

It might help to put a delay of about 0.2 seconds after the motor block because the program might cause too many reads.

1.) it doesn't help

2.) as I wrote it works without problems on technic hub or move hub

3.) no matter what useless programm, motor have to stop when program is cancelled. It doesnt.

4.) Hub looses connection

Share this post


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

Sure. Type of motor doesn't change behaviour

The "dumb" motors (train motor and wedo 2.0/ batmobile) motor can't measure their speed so you can't control them via speed. You can only control them via power.

The program works for me with 1x Hub v4 and 2x boost medium linear motors.

Share this post


Link to post
Share on other sites

Thanks for testing.

I tried with boost, L and XL, all the same. But not with two boost motors.
Doesn't work with hub No. 4, works with move hub and technic hub.
FW is 1.1.02.0000, SW is 3.0.0

As you can see there are two icons for tacho motors.
You should regulate the speed of A when turning motor B by hand.

According to "Power":
You can set the max power per motor, but this is something different.
All other icons set "speed" from -100 to 100 (percent) , which is not the real speed, cause it depends on battery voltage.

The real speed can set i.e. with micro python and EV3, you can set rpm there.

Edited by Lok24

Share this post


Link to post
Share on other sites

I'm not sure about the FW; it should be the current one. Powered Up SW is 3.0.0.

But yeah, you're right. Boost motor + Control+ XL Motor don't work. 2x Boost however do work

Share this post


Link to post
Share on other sites

Thanks.

If SW is 3.0.0. your hub should have been automatcally updatet to 1.1.02.0000

You can easily install Brick Controller 2 App and with "devices" and "search" find out FW versions of your hubs.

 

Share this post


Link to post
Share on other sites

I'm wondering what are the semantics of such block configuration.

Is it:

a) PU app reads back the value from motor B from the hub, then feeds the hub with the "set speed" command with value obtained

b) the hub is instructed to maintain such "dependency" between the value produced from B and value feed to A

 

Now, the advantage of b) would be that it wouldn't suffer from the BT latency, but I think it's unlikely it's implemented this way (I think it would hard thing to do?).

Why am I mentioning this? Well, that's something I've been wondering after I saw your blocks, and it's something that would kinda explain why it wouldn't work with one hub and work with others...but really, this seems to be far fetched, correct me if I'm (terribly) wrong. :)

Share this post


Link to post
Share on other sites

Hi,
b.) doesn't work, the commands are always trasferred to the app.

The purpose of the programm is very simple: assume a merry-go-round with a motor, then you can regulate the speed with the second motor, using it as a sensor.
This is for stationary modells. Of course you still need the app running. (not with Large Hub, for other hubs this is expected: compiling a prog and load it permanently into the hub and start it without smart device)

The original  program has much more blocks and can be used for mobile and remote usage, setting some parameters (hub No, port no) , but didn't work, reducing to only one block showed this strange behavior. It calibrates the input motor, sets it to 0, here is a version with two hubs for mobile use, the white box is sender with the wheel and a switch for forward, reverse and stop, the technic hub is the receiver:

PUP1-2.jpg

Edited by Lok24

Share this post


Link to post
Share on other sites

OK, so here's my first question: why would I pay for an app when there is already a great free alternative available?

Share this post


Link to post
Share on other sites

@Jetro

Yes, I am sure about it that you have a great alternative from LEGO, but I can understand when somebody likes a different design, add custom tunes, be able to control the speed more flexible through moving the seek bars in an easier way than the LEGO app and connecting faster than with the standard LEGO app. I have also realized that the standard LEGO app has problems with connection. You also have Volume-Button-Control option that let's taking control over the hub by pressing volume buttons of your phone. You can run the app easily in background so this also a feature that does not always work in the android PU app. Why do I want to get money for it? The main reason is that I am a 15 years old android app developer and want to earn some pocket money. I would never do it when LEGO would not be my hobby. Hope you understand it.

Share this post


Link to post
Share on other sites

I'm also a bit put off by the price. I'm sure Jetro wasn't comparing your app with the official Control+ and PU from TLG, but rather third-parties like BrickController 2 (which uses a gamepad, which means physical controls) and BuWizz (which was made to control BuWizz bricks but also works with PU), both of which are free.

Share this post


Link to post
Share on other sites

@AVCampos

Hi, 

yes I understand what you mean. I will think about reducing the price or make the app completely free, maybe even Opensource. Thanks for your feedback BTW:)  

Share this post


Link to post
Share on other sites

I am not against some payment, but I'd like to be able to test it first!

Share this post


Link to post
Share on other sites

@Philo

Thanks for this great idea. I will post a demo version, for example with a watermark so you will be able to test it out. If you like it than you will be able to download the full version. What do you think about posting an apk on Google Drive and sharing the link for this test version than.

Edited by PF Remote

Share this post


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

@Jetro

Yes, I am sure about it that you have a great alternative from LEGO, but I can understand when somebody likes a different design, add custom tunes, be able to control the speed more flexible through moving the seek bars in an easier way than the LEGO app and connecting faster than with the standard LEGO app. I have also realized that the standard LEGO app has problems with connection. You also have Volume-Button-Control option that let's taking control over the hub by pressing volume buttons of your phone. You can run the app easily in background so this also a feature that does not always work in the android PU app. Why do I want to get money for it? The main reason is that I am a 15 years old android app developer and want to earn some pocket money. I would never do it when LEGO would not be my hobby. Hope you understand it.

I am very appreciative of you building a functional Android App at age 15. Well done. Don't let the feedback here discourage you from continuing to build your skills as a programmer.

That said the world of apps is a tough place, and just like when building your professional career you sometimes have to start with doing work for free (internships, volunteering etc) to build up your credentials. Especially since there are already other apps out there that do PU control and are free (either because the publisher decided to give the app away for free, or because the app is tied to a paid product (e.g. BuWizz)), your hands are basically tied. 

Now if your app has some unique capabilities that others dont have, you could put those behind a paid subscription, while keeping the rest of your app free (the so-called "freemium" model).

Good luck!

Share this post


Link to post
Share on other sites

@Phil B

Thank you for your tips and motivation to make other cool projects;) I think that "freemium" is a great idea to make my app marketing. Although I think that first I will try to sell it and make a free version with a watermark for testing. You are right, there are many competitors when you look at PU software. 

Share this post


Link to post
Share on other sites

Hi, 

I have made a demo now with a watermark. You can download the test version now from google drive:https://drive.google.com/file/d/1x75Fquqs26aOHplBXKrtNT8S-5tFEEA6/view?usp=sharing

This version has all features of PUTools in the Play Store. The only difference is the watermark. If you like it you can download the normal version from Play Store: https://play.google.com/store/apps/details?id=com.pfremote.putools

When there are some bugs please report me about them so I can fix them.

Share this post


Link to post
Share on other sites

Hi,

I have decided to move from this thread. So if you want to get some more informations about PUTools read here: 

 

Share this post


Link to post
Share on other sites

Hello.

actually apps are not my primary interest, for that reeason i build a Bluetooth Car control, that i am using with LEGO Rally car as shown here at the end of review comments.

 

 Feel free to ask whatever you lie, if you like .

 

 

Share this post


Link to post
Share on other sites

Dear All,

I have a question regarding the Technic hub (4I/O, Control+, whatever) - the one that has 4I/O ports and comes with e.g. the Liebherr 42100 Monster:

What are the port IDs / hub properties for the internal tilt sensor?

The LEGO Wireless Protocol 3.0.00 Documentation (r17) on Github is simply static - nothing much has changed there since the initial publication. This document tells me that the internal tilt sensor is of type 0x0028. The bare Technic Hub replies during discovery etc. with:

                 Port         Type

0F 00 04 | 32 | 01 | 17 00 | 00 00 00 10 00 00 00 10; Type = LED light
0F 00 04 | 3B | 01 | 15 00 | 00 00 00 10 00 00 00 10; Type = Current
0F 00 04 | 3C | 01 | 14 00 | 00 00 00 10 00 00 00 10; Type = Voltage
0F 00 04 | 3D | 01 | 3C 00 | 00 00 00 10 00 00 00 10; Type = ???
0F 00 04 | 60 | 01 | 3C 00 | 01 00 00 00 01 00 00 00; Type = ???
0F 00 04 | 61 | 01 | 39 00 | 01 00 00 00 01 00 00 00; Type = ???
0F 00 04 | 62 | 01 | 3A 00 | 01 00 00 00 01 00 00 00; Type = ???
0F 00 04 | 63 | 01 | 3B 00 | 01 00 00 00 01 00 00 00; Type = ???
0F 00 04 | 64 | 01 | 36 00 | 01 00 00 00 01 00 00 00; Type = ???   

I simply can't find any information on the ??? types.

How can I retrieve the 3D tilt and acceleration data

Any help is appreciated!

Best
Thorsten 

Share this post


Link to post
Share on other sites

@Toastie

You can ask the devices for their capabilities. This is shown in 6.3.1 of the doc (connection info) though admittedly not quite as clearly as one would like. Basically the process would be:

  • send  05 00 21 [port] 01 (3.15. Port Information Request)
  • it replies with 43 (3.19. Port Information), of which byte 7 (counting the first as 1) denotes the number of modes, note this
  • for each mode (or until you're satisfied) ask for the name with  06 00 22 [port] [mode] 00 (3.16. Port Mode Information Request; mode are [0 - number of modes) ), the reply 44 has the mode's name as ascii starting at byte 7 (not \0 terminated, 3.20.Port Mode Information); asking for the symbol (06 00 22 [port] [mode] 04) may also help since it would be relevant to the data (like probably g for accelerattion or DEG for tilt)
  • with this you should now also have the relevant mode to subscribe to for your 41 message

I used this method recently to map out the modes of the color/distance sensor, so this should work.

Hope that helps.

Share this post


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

Dear All,

I have a question regarding the Technic hub (4I/O, Control+, whatever) - the one that has 4I/O ports and comes with e.g. the Liebherr 42100 Monster:

 What are the port IDs / hub properties for the internal tilt sensor?

 The LEGO Wireless Protocol 3.0.00 Documentation (r17) on Github is simply static - nothing much has changed there since the initial publication. This document tells me that the internal tilt sensor is of type 0x0028. The bare Technic Hub replies during discovery etc. with:

                  Port         Type

0F 00 04 | 32 | 01 | 17 00 | 00 00 00 10 00 00 00 10; Type = LED light
0F 00 04 | 3B | 01 | 15 00 | 00 00 00 10 00 00 00 10; Type = Current
0F 00 04 | 3C | 01 | 14 00 | 00 00 00 10 00 00 00 10; Type = Voltage
0F 00 04 | 3D | 01 | 3C 00 | 00 00 00 10 00 00 00 10; Type = ???
0F 00 04 | 60 | 01 | 3C 00 | 01 00 00 00 01 00 00 00; Type = ???
0F 00 04 | 61 | 01 | 39 00 | 01 00 00 00 01 00 00 00; Type = ???
0F 00 04 | 62 | 01 | 3A 00 | 01 00 00 00 01 00 00 00; Type = ???
0F 00 04 | 63 | 01 | 3B 00 | 01 00 00 00 01 00 00 00; Type = ???
0F 00 04 | 64 | 01 | 36 00 | 01 00 00 00 01 00 00 00; Type = ???   

I simply can't find any information on the ??? types.

How can I retrieve the 3D tilt and acceleration data

Any help is appreciated!

Best
Thorsten 

Type 3C is a temperature sensor (there are two of them, don't know where they're located), 39 is the accelerometer, 3A is the gyro, 3B is the tilt sensor, and 36 is the gesture sensor. I added support for the accelerometer, gyro, and tilt sensor modes node-poweredup, here's the code. It may help you parse them:

https://github.com/nathankellenicki/node-poweredup/blob/master/src/devices/technicmediumhubaccelerometersensor.ts

https://github.com/nathankellenicki/node-poweredup/blob/master/src/devices/technicmediumhubgyrosensor.ts

https://github.com/nathankellenicki/node-poweredup/blob/master/src/devices/technicmediumhubtiltsensor.ts

I haven't added the temperature sensor as I haven't gotten around to it yet (and wasn't sure of its usefulness given we don't know its location or what it represents). Same for the gesture sensor.

As @AlecDGeneric suggested, this was figured out by querying the devices for their metadata. The documentation hasn't been updated in a while (and I'd be surprised if it gets an update any time soon!)

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.