Asper

Controlling two circuit cubes with one LEGO remote

Recommended Posts

The circuit cube bluetooth kit with it's tiny motors keeps spreading within the AFOL train community (e.g. see this review or this wonderful model).

I see two drawbacks with the current version of the official app:

  • only one module can be connected
  • it needs some kind of (expensive) smart device

So I asked Tenka (the manufacturer of these kits) for details about the protocol. They kindly shared the documentation and so I started implementing a "bluetooth hub". Using the information from the legoino project my program connects to one LEGO Powered Up remote and up to two circuit cube modules. It runs on a tiny Computer ("M5 Atom") which measures 3x3 studs. So you still need an additional device, but this is tiny and inexpensive and can be placed somewhere on the layout - or even built into the trains. In the videos this is the small grey box connected to the USB power supply.

In one mode you can control the official kit: as long as the buttons of the remote are pressed the motors spin with the maximum velocity:

 

The other mode is useful for trains: when a button is pressed the velocities of all motors connected to the corresponding module are increased/decreased:

This is currently a "proof-of-concept" - the source code is available in github but using it will require some (basic) knowledge about programming Arduino-like devices.

Share this post


Link to post
Share on other sites

Thanks for sharing! Great work. Wish I had the time soon to experiment with, as it looks very nice and working well.

Share this post


Link to post
Share on other sites

Cool.  Does the code require PlatformIO to install on the ESP32? 

Share this post


Link to post
Share on other sites
11 minutes ago, dr_spock said:

Cool.  Does the code require PlatformIO to install on the ESP32? 

Tanks. This should also work with the Arduino IDE. But I did not test this.

Share this post


Link to post
Share on other sites

Oh this is cool!!! Very nice. I like your approach very much; it also clearly shows the strengths of the PUp system!

Must have a look at your code!

Thanks a lot,
Thorsten

Share this post


Link to post
Share on other sites

This is really fantastic! Thanks for making your code available. My coding and Arduino skills are pretty rudimentary in comparison, but projects like this and @Toastie's Crocodile point-to-point controller are inspiring me to dig in and learn more.

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.