LEGO+ and PowerFunctions



  • Hello all,

    I would like to connect (old) Lego PowerFunctions motors to the LEGO+ module. There are a few things I need to solve for this. But if anyone has already done so, perhaps I can save some time. I will write up a detailed step-by-step once I get it to work.

    1. The PowerFunctions motors are 9V. I see that the LEGO+ module can take external power input (the yellow XT30 connector) with a nice wide range of voltages, but I also see that the pins on the ports are labeled "5V" (https://docs.m5stack.com/#/en/module/lego_plus). Does anyone know whether the input power Vcc is passed directly to the motor connectors? I also read that the voltage on this external input is passed directly (i.e., unregulated) on to the M5Core itself; is it safe to put 9V on this input?

    2. The module came with a connector cable to an EV3 "telephone type" connector. I have found descriptions of the LPF2 connectors, so I can just buy connector cables from Lego themselves (they're only a few euros each) and cut them up to make compatible connectors. I found "compatibility cables" online, but they are not the correct PowerFunctions type.

    Did anyone here try this before? I found a YouTube video of someone who connected a PowerFunctions motor to an M5Stack, but it was just 30 seconds of a motor spinning and no details about the connection itself...

    Cheers,
    Sander



  • @curlybrace I tried once but haven't had time to do more with the project.



  • @curlybrace said in LEGO+ and PowerFunctions:

    Hello all,
    I would like to connect (old) Lego PowerFunctions motors to the LEGO+ module. There are a few things I need to solve for this. But if anyone has already done so, perhaps I can save some time. I will write up a detailed step-by-step once I get it to work.

    The PowerFunctions motors are 9V. I see that the LEGO+ module can take external power input (the yellow XT30 connector) with a nice wide range of voltages, but I also see that the pins on the ports are labeled "5V" (https://docs.m5stack.com/#/en/module/lego_plus). Does anyone know whether the input power Vcc is passed directly to the motor connectors? I also read that the voltage on this external input is passed directly (i.e., unregulated) on to the M5Core itself; is it safe to put 9V on this input?

    The module came with a connector cable to an EV3 "telephone type" connector. I have found descriptions of the LPF2 connectors, so I can just buy connector cables from Lego themselves (they're only a few euros each) and cut them up to make compatible connectors. I found "compatibility cables" online, but they are not the correct PowerFunctions type.

    Did anyone here try this before? I found a YouTube video of someone who connected a PowerFunctions motor to an M5Stack, but it was just 30 seconds of a motor spinning and no details about the connection itself...
    Cheers,
    Sander

    Hi, Sander,
    that wasn't one of those videos by any chance !?

    Link1: https://www.youtube.com/watch?v=W1jNzYjn_bc

    Link2:https://www.youtube.com/watch?v=xm5Hdaia7po

    These two videos are from me !

    But I used the BASE X module (https://docs.m5stack.com/#/en/base/basex), there you can connect all Lego motors from Lego EV3, NXT, Power Motors L, XL and what other Lego motors are available !

    On the subject of connection I will add more interesting pages:

    Link1:https://www.philohome.com/nxt.htm

    Link2:https://www.philohome.com/nxtplug/nxtplug.htm

    Link3:https://freggelweb.de/bauanleitungen-nxt_pf_steckerbelegung.html

    Link4:https://www.bartneck.de/2015/06/01/building-instructions-for-a-cable-that-connects-lego-power-functions-pf-with-mindstorms-nxtev3/

    Link5:https://freggelweb.de/technic-powerFunctions.html (Go all the way down to the end of the page there you see adapters, but don't know if the adapter cables are still available )

    Greeting skink



  • If you want to do this with the Lego + Modul, you can also connect 6-12V direct current to the XT30 connector, see picture in the documentation !

    Greeting Skink

    0_1591553185704_Unbenannt.jpg



  • In the schematic diagram you can see that the 5V+ are only for the internal supply of the module, the VCC voltage before the voltage regulator also goes to the drivers, so if you connect a 9V DC power supply, the motors are also supplied with 9V via the drivers!

    Greeting Skink



  • Hi Skink,

    These were not the videos I meant, but I also saw yours. You have quite the collection of motors :)

    Perhaps I should have gone for the BaseX module; I picked the LEGO+ one because of its name. My son has a PowerFunctions set (only no servo motor so that’s a project for another day). In fact, I came to M5Stack because I was googling around for MindStorms alternatives :-)

    My challenge is to connect the PF motors to the LEGO+ module. I think I can get this working by buying a PF extension cable and split it in two, and then putting the small 6-pin connectors on the ends which fit in the LEGO+ module. I had already found the pin outs of the LPF2 connectors online, and although I’m more of a software guy than a hardware guy, I’m sure I’ll get something to work.

    I’ll post back here with my results!

    Cheers,
    Sander



  • @curlybrace said in LEGO+ and PowerFunctions:

    Hi Skink,
    These were not the videos I meant, but I also saw yours. You have quite the collection of motors :)
    Perhaps I should have gone for the BaseX module; I picked the LEGO+ one because of its name. My son has a PowerFunctions set (only no servo motor so that’s a project for another day). In fact, I came to M5Stack because I was googling around for MindStorms alternatives :-)
    My challenge is to connect the PF motors to the LEGO+ module. I think I can get this working by buying a PF extension cable and split it in two, and then putting the small 6-pin connectors on the ends which fit in the LEGO+ module. I had already found the pin outs of the LPF2 connectors online, and although I’m more of a software guy than a hardware guy, I’m sure I’ll get something to work.
    I’ll post back here with my results!
    Cheers,
    Sander

    Hi Sander I am curious!

    Another advantage of the Base-X module is, that you can use the glide-wheel sensor from here: http://www.mindsensors.com/ev3-and-nxt/17-glidewheel-as-angle-sensor-for-nxt-or-ev3
    You can control the power motors like the NXT or EV3 motors.
    So you can say how many revolutions or how many degrees they should move. You can also see it in the video.
    But maybe that's something for later.
    I am definitely curious about your projects!
    Greetings Skink



  • Does anyone know the type number of the 6-pin connectors which are on the LEGO+ board..?


  • M5Stack

    @curlybrace 1×6P 1.5 pitch



  • @curlybrace

    You can order the sockets including cable and plug here : https://de.aliexpress.com/item/32497324162.html

    Unfortunately, they are only available in 20 sets and unfortunately only with a straight plug.
    I have searched Aliexpress and this was the only usable result.

    I ordered 2 sets at once

    Greeting Reiner



  • Hi all,

    I thought I'd give you a quick update. I ordered a bunch of pre-wired 6P 1.5 pitch connectors, and by measuring the output of the ports, I figured out the wiring. I just got an XL motor to work.

    XL motor connected to M5Stack Fire

    On the LEGO+ module, the ports are labeled n V B A G M+, with "n" the number of the port, 1 - 4.

    The LPF connectors are wired as shown in https://freggelweb.de/bauanleitungen-nxt_pf_steckerbelegung.html; if you place the connector with the studs up and the cable towards you, then the four wires are (left to right) 0 C1 C2 +V.

    When making a connector, the connections should be as follows:

    0 <--> G
    C1 <--> M+
    C2 <--> n
    +V <--> V

    the A and B wires remain unconnected - I don't know what these are for yet.

    I opted to crimp simple DuPont connectors to the wires as opposed to soldering them together with heat shrink tubing because this way I can also connect everything to a breadboard (which is what I used to test the wiring in the first place).

    When operating directly from USB, there is obviously (exactly) 5.0V available, which means that even when using PWM=255, the motor doesn't rotate very fast. My next plan is to make a LPF connector for the (yellow) XT30 power input on the LEGO+ board, so I can drive the whole thing from a standard LEGO battery box.

    I also ordered a LEGO Servo motor, but this is on backorder and hasn't arrived yet. I know that this is operated via a rather specific PWM scheme, so once it arrives, I'll see if I can get that one to work.

    Kind regards,
    Sander (and son Ruben)