Jump to content
THIS IS THE TEST SITE OF EUROBRICKS!
THIS IS THE TEST SITE OF EUROBRICKS!

Featured Replies

Posted

I got my hands on a 4DBrix Wi-Fi Controller:
tumblr_pilf8mk0DZ1ws4ayp_1280.jpg

It's intended to control LEGO trains through Wi-Fi but it got my attention when I knew it uses MQTT messages. I'm a big fan of MQTT, a light message queing protocol developed by IBM to control satellites in the last century and then released to the community. There are tools to use MQTT in all major operating systems and also on some microcontrollers like Arduino so we can create a mesh of very heterogeneous devices including Arduino, Raspberry Pi... and MINDSTORMS EV3:

So in case someone needs to control a LEGO motor and Bluetooth or Infrared is not an option you can also use Wi-Fi.

MQTT is an asynchronous protocol to exchange messages. There is a 'broker' that receives messages from 'publishers' and delivers them to 'subscribers' and there is a sort of 'namespace' to organize all this messages in 'topics'

In the video I used a fresh installation of current snapshot version of ev3dev 'stretch'. It already includes the tools to 'publish' and 'subscribe' MQTT messages. The 'broker' is my laptop and the 4DBrix had subscribed a topic named 'nControl/one'. So when I type the command

mosquitto_pub -h 10.24.10.121 -t nControl/one -m "mot,f,1023"

i am publishing a message on the broker (my laptop, 10.24.10.121) on the topic that 4DBrix Wi-Fi Controller has subscribed. The payload of the message is "mot,f,1023" and the Controller interprets this a "turn motor ON, forward, at full power".

it is really simple. The only problem i have so far is with the connection to my wireless acces point, sometimes it takes A LOT of time.
 

With just a PF 1.0 connector it isn't exactly a competitor for SBrick, BuWizz or LEGO Powered Up. And for €32 anyone familiar with Arduino and ESP can make their own. But it's always good to have an option.

  • Author

An ESP8266-based module. You can use it like an Arduino, even use the Arduino IDE and libraries.

It should also have a power driver, probably an H-bridge and some sort of power regulator.

The PF connector only exposes C1 and C2 pins, not 9V and GND. So it's not possible to use a PF Servo Motor. Everything else (9V and PF) should work.

That sounds simiIiar to the WEMOS D1 mini ESP8266 and motor driver module I bought for $5. Flashing new firmware to the STM32F4 on the motor driver was an interesting experience.  I still have a ways to go with the WIFI stuff.  The 4DBrix seems easier out of the box. 

motor-shield.jpg

 

  • Author

Nice.

Yes, the idea of buying a 4DBrix was having some immediately usable device. For people with Arduino or other microcontroller platforms experience, it's something we can do on our own for more or less the same price (and more fun :) ) but most AFOLs would prefer something like the 4DBrix (or the SBrick, BuWizz, etc).

4DBrix also have a nice GUI program to use it, nControl, and I believe that's where they score extra points - you can design your own railway (or monorail) project and then control the train with this Wi-Fi controller and the fixed circuits through USB controllers. For pure Train AFOL's that's great.

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...

Recently Browsing 0

  • No registered users viewing this page.
Sponsored Links