Jump to content

Recommended Posts

Posted
On 10/16/2022 at 11:14 PM, Toastie said:

Wait: You run the rechargeables: a) with the 12V power supply plugged in almost all the time and just using the rechargeables for power interruptions to keep the EV3 memory alive, or b) you charge them "off-line" and then drain them without power supply attached and then re-charge them with 12V?

Case a) would not do much harm (other than unavoidable, natural material degradation), case b) may stress them much more. I have 8878's here that live "forever" (so far :pir-laugh:) being constantly "charged" off from 15V DC rail power on my PF/PUp trains.

Best,
Thorsten   

The 12V is constantly plugged in when running the setup, I take out the adapter when I shut all bricks down. So on show days they are plugged into the EV3's from 8:00 untill 18:00 and keep the batteries between 8.2-8.4V.

When testing at home they are also plugged in during the day, and not running constantly, just some code debugging etc. All my machines until now are designed to be able to be charged and run 24/7 (no need to charge off-line). I do/did plan to make an AGV (Automatic Guided Vehicle) driving from and to my warehouse, but that would require offline charging.. so it's shelved for now.

  • 3 weeks later...
Posted

Linking Fischertechnic and Lego.

With FT I use the TXT controller, with Lego I use the Maindstorms inventor hub and the Techinc hub. To make them work together I use 2 Lego remote controllers. On each  remote control there are 4 servos. This controls 4 buttons, the 3 remaining buttons can be operated manually. The servos are controlled by the TXT controller. The RoboPro program on the PC is used for this purpose. The servos themselves are controlled by my DE0 module but this can also be done with an I2C module on the TXT. All hubs use the Pybricks Python software: v3.2.0b4 Pybricks Beta v2.0.0-beta.9
There are 2 Pybricks programs running simultaneously, each controlling a different type of hub.

It is now easy to send commands from the TXT to both hubs. This can be done simultaneously or separately. The big problem with Lego hubs is that they have almost no inputs. Thus, we lack the nice 8 channel digital inputs that are present with the TXT. Through my DEO module, I even have 120 digital inputs. Via the servo controlled remote I can now at least send multiple commands to the Lego modules. The large PC screen where the program can be displayed is also indispensable.

Now to send commands from the Lego hubs to the TXT are a number of possibilities. I use a lot of hall sensors. Small magnets connected to Lego parts can send commands this way quickly and easily. I can also listen in on multiple serial lines from the hubs. That data can be used by the TXT. Thus, positions of the motors can be displayed, as well as other data from the hub. The TXT can display this data on the PC screen.

Pybricks does not have a hub to hub at this time. Now, however, commands can be sent from one hub to the TXT which then forwards them to the 2nd hub. This photos shows the total test setup.

52480401952_587d585029_b.jpgremote-hubs-111305 by Frans, on Flickr

52480903221_38aefa280f_b.jpgservo-remote-test by Frans, on Flickr

52481173494_9c59a0d96d_b.jpgremote-detail_141406 by Frans, on Flickr

52480903266_70df0e887a_b.jpgremote-servo-20221101 by Frans, on Flickr

Frans.

Posted (edited)

This is a very nice thread, and I've always thought some day we can make all of our 'toys' talk to ne another. Example? How about running my DJI FPV Joystick (motion controller) to control lego contraptions and/other hardware ... Yes, one needs a very detailed/flexible API but not too crazy I think.

There is one PROBLEM however with this thread: Lego is available/sold everywhere in the world ... but sadly that is not the case for FisherTechnik. I visited Germany many years ago, and you guys have a much wider collection of 'toys' than us west of the ocean. I'm grateful we at least have Arduino and Raspberry PI over here. Oh, has anyone heard of Lincoln Logs? ... It's a very primitive 'construction' set available here.

Enjoy your new 'fusioned' hobbies/systems.

 

PS. I was not aware liftarms come now in magenta :)

Edited by DrJB
Posted
15 hours ago, DrJB said:

There is one PROBLEM however with this thread: Lego is available/sold everywhere in the world ... but sadly that is not the case for FisherTechnik. I visited Germany many years ago, and you guys have a much wider collection of 'toys' than us west of the ocean. I'm grateful we at least have Arduino and Raspberry PI over here.

@DrJB

Yes FT is of German origin. Well available in Europe. But no worries, it doesn't necessarily have to be FT to control servos. I use the FT program because it has a very nice and good GUI with windows. Also the Robopro software for the TXT is still super good. It supports multitasking very well. If you don't have all this then nothing stops you from using your own faforite hardware. This is mainly about using the different Lego type hubs with one type of software namely Pybricks. So all credits go to @Pybricks for their great contribution.

With the servo remote control you send commands in one direction, to Lego. Now to obtain the other direction from the Lego to your own controller there are several possibilities. One of the most extensive commands you can process by monitoring at least 1 serial line of a powerup devices. The Lego master sends commands to the device if you change, for example, the LEDs of the distance sensor. You then have 4 values available between 0 and 100. Also the color sensor has 3 LEDs which can be read and processed in this way. The led matrix 3x3 has 9 values available. The beauty of this system is that it is extremely fast. There is no delay between the device receiving the data and your detection. In fact, I currently have 8 lines available that can listen in on serial lines. Since I use an FPGA module in my hardware, everything is handled in parallel, with no delays between them.

On the FT side, via the FPGA I have a total of 12 controllable motors, 12 servo motors, 12 digital outputs, 120 digital inputs, 8 analog 12bit inputs and 4 extra scope outputs lines that can output any digital signal up to 50 MHz. On the TXT, 4 high-speed digital inputs, 8 analog inputs and 4 motor outputs and the I2C interface. The I2C interface goes to my FPGA but additional standard I2C modules can also be connected. And exactly all of these results are displayed on the PC screen.

Thanks to Pybricks, all my hubs now have the same firmware. With the Lego 51515 RI and 3 technic powered up modules I have up to 18 hubs available.

Frans.

Posted

Sending multiple commands from the Fischertechnic TXT to the Lego hubs.

I use the color sensor on the Lego hub for this and the CMDs via the TXT PC screen buttons.  The TXT sends the color data to the neo LEDs over an I2C connection. So with 1 color sensor, different commands can be recognized. With the scope I measured the delay. The scope is connected to the I2C line ( 2 channels) of the TXT and also to the Lego hub pin5 output (1 channel). A small Python program on the Lego side provides the feedback in this way. The delay is about 16 msec, values between 12 and 25 msec. The light pulse of the TXT is 25 to 30 msec. The TXT program is set to 25 msec. By reducing this value, you can easily see when the hub does not always respond to the narrow pulse. For the neoleds, I use a short string of 3 consecutive LEDs. The distance between the sensor and the neoleds is not critical. This measurement confirmed that the response times of the TXT and the Lego hub are quite small.
Here in the example I use 3 different colors but you can use more. For the color value of the neo LEDs you may have to do some searching. But the basic colors red, blue and green always work.  Also the brightness for this is not critical.

The picture is a UHD image. So you can zoom in nicely to all the details.

52499239832_abd490c1c3_b.jpgI2C-to-hub-delay by Frans, on Flickr

 

Frans.

Posted (edited)

Herewith a small test to enable the hub to hub in Pybricks Python while waiting for them to have the Pybricks hub to hub software available. This setup uses the internal hub1 color LED. This makes 4 commands available by using the colors Red, Green, Blue and None. Detection is done by a color sensor connected to hub2 and mounted on hub1. 2 Python programs are used. The communication is very fast.

52503361852_bae5633989_b.jpgTechnic-hub-to-hub_setup by Frans, on Flickr

The 2 Pybricks Python programs:

52504332110_6910b81eec_b.jpgTechnic-hub-to-hub by Frans, on Flickr

Update:
De typical delay between hub1 and hub2 is 25 msec, min 10msec max 50 msec.

Frans.

Edited by fotoopa
added delay hub1-hub2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...