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

Featured Replies

Posted

Hi all!

I'm new to Eurobricks and couldn't find where to post this question... I've seen a lot of posts about motorized train functions so thought this might be a good spot to put this. If not, let me know!

I want to power 4 different Lego coasters simultaneously (Haunted House 10273, Loop Coaster 10303, Roller Coaster 10261, and Carousel 10257). I set up a Lego Train display every year to raise money for my town’s local food bank, so my layout also includes 3 motorized powered up trains.

I want all coasters to run at set intervals - once every minute or so to get the cars through 1-2 rotations before resting for a minute, then repeating, so the 4 motors I purchase (Technic Large Motor 88013) don’t burn out due to constant usage.

I wanted to know what my best strategy would be to make this happen? My only powered up experience is connecting 3 trains to 1 Powered Up remote control/occasionally using the Powered Up app to move a train.

I’m not familiar with how the Technic Hub operates, but could I connect all 4 motors to this hub, download a program for each of the motors within the hub and call it a day? Can I control the hub with the Lego Remote Control? I’d prefer not to use the powered up app, as I don’t want it to be constantly open on my phone to operate.

Any insight/recommendations would be greatly appreciated!

The Powered UP app can control up to 4 hubs.  A custom profile can be created to run them at set interval using the motor and timer blocks.

Another method is to use PyBricks.  Create the programs and replace the hubs firmware with them. 

Powered UP app would be easier to do but requires a smart phone or tablet to run the display.  It would also be easier to make changes on the spot.

  • Author
1 hour ago, dr_spock said:

The Powered UP app can control up to 4 hubs.  A custom profile can be created to run them at set interval using the motor and timer blocks.

Another method is to use PyBricks.  Create the programs and replace the hubs firmware with them. 

Powered UP app would be easier to do but requires a smart phone or tablet to run the display.  It would also be easier to make changes on the spot.

Powered Up definitely seems easier for me, the only drawback I have is needing a secondary phone/tablet that needs to stay on the app to run the program.

Thanks for the PyBricks recommendation. I'll check it out.

there is one difference:

with pybricks you need a really small program (see example below, for a train)

All other solutions need more complex programming and any external device (tablet, mc, PC or other)

 

from pybricks.pupdevices import DCMotor
from pybricks.parameters import Port
from pybricks.tools import wait

train_motor = DCMotor(Port.A) # port Motor is connected

while True:
	train_motor.dc(50)	#speed
	wait(10000) 		#time motor running, in milliseconds
	train_motor.dc.stop 
	wait(10000) 		#time train stops, in milliseconds

 

Edited by Lok24

14 hours ago, jacey98penny said:

Powered Up definitely seems easier for me, the only drawback I have is needing a secondary phone/tablet that needs to stay on the app to run the program.

If you ask around someone you know might have an old iphone 8 or similar obsolete android phone that no longer has a sim that you could leave plugged in and hidden in the display

14 hours ago, lego3057 said:

@jacey98penny

Sometimes a link tells more than a thousand words, sometimes - well - not.

As per usual: It depends.

Do you want to control your "setup" = various hubs/trains/whatever (let's call these servers) from one device (let us refer to that as client)? In other words, the servers are all the PoweredUp hubs, the client is a controlling program/device.

Or do you prefer individually operating smart devices, running on their own? I believe @Lok24 is touching on the latter, whereas @lego3057 refers to the former.

In an exhibition, I'd rather connect from one controlling client to all the servers; this would render the synchronization of all devices more reliable. And in this case, I'd go with @lego3057 suggestion, and use the BAP code, you can download at the website addressed by that link he provided: Easy hub sign up and very nice control. Using this software, you are not restricted to any number of hubs signing-up, other than imposed by your hardware. Yes, this needs a computer to operate all servers, but you have a nice and clean user interface and a rather stable connection means. 

In a show, all the numerous cell phones, and other BLE devices around may cause some interferences, but that is exactly the same for any other BLE client/server connection, be it the PoweredUp app or the referenced BAP software. With PyBricks you can create self-contained programs, not suffering from heavy BLE traffic - as well as BLE communication type controls (e.g. using the PUp remote), but that can BAP do as well. And then both a prone to heavy BLE traffic interference - to be expected at shows. 

I'd say: Try it out!

Best regards,
Thorsten

Hi,

I used BAP since 2019 on exhibitions and was in contact with Vincent from the beginning.

I never had the BLE traffic problem, but that trains run out of range.
But yes, it's a pretty powerful tool.

And I did not understand "display" as "exhibition" but as "shop window" :laugh:

And that the 4 Motors and 3 trains are independent form each other.

Perhaps @jacey98penny can explain in detail.

The central question: is there a requirement to manipulate that all?
Or really just on and than three hours later off, with all 4 motors periodically running?

To answer a question: yes , the 4 motors can be handled by  on hub, but the are no extention cables ...................

 

 

 

 

 

Edited by Lok24

Hi jacey98penny, what you want to do is perfectly possible without the use of phones, ble or control apps which may lose support.
I have been running fairground rides with intermittent motion for 15ish years using simple dc motors controlled via an Arduino. However Lego, in their wisdom, no longer make a simple two wire motor. If you have the confidence, strip the excess 4 wires from a PU or the outer wires from a PF motor cable to leave just the 9V and GND power wires. If I understand correctly, you are not using motor feedback, so do not need more than theses 2 wires to switch the motor on and off. The motor can now be connected to an Arduino Motor Shield (or your own H-bridge circuit).
For a purely Lego solution I find EV3 Mindstorms programmed with EV3Basic (a Small Basic plugin with thread support) or Pybricks the best solution, but, again, in their wisdom, Lego discontinued EV3.
For the Technic Hub Pybricks is the way to go. The program is saved to the brick and does not rely on a phone, an app or bluetooth to work.
I don't own a smart phone and use a mix of the above for 1-3 day shows with no problems.

Whichever option you go for it will be beneficial to add acceleration and deceleration to the on/offs.

15 years ago I found a good introduction to the Arduino in a publication called "How To Build A Robot" by Denis Publishing Ltd, London W1T 4JD. ISBN 1-78106-313-3

EV3, PF and PU extension cables are available from PV Productions (workmanship not top notch) and Green Gecko Workshop.

Edited by hollielucas

Related to my above reply, for simple on/off operation there is no need to use the relatively expensive Lego motors. Good quality motors with tapped holes on the front face allow a Technic brick can be bolted on, plates can also be glued to the casing. Heresy? Possibly, but I'll sort that out on Judgement Day!

40 minutes ago, hollielucas said:

Possibly, but I'll sort that out on Judgement Day!

And I bet, you will be not only granted entry to the heavens, but surely be complimented in ... and then maybe asked how to fix the burnt motors of His train layout, who knows ... :pir-laugh:

Have fun and all the best,
Thorsten

12 hours ago, hollielucas said:

again, in their wisdom,

... LEGO published the wireless protocol and offers the possibility to load any FW to the hubs ;-)
Or control that all with some ESP.

BTDT.

LEGO motors with feedback function (and so much better to be controlled) are available for less then 10 USD.
And the Pybricks solution is installed in less than 5 minutes.

All plug and play.

 

 

 

 

Edited by Lok24

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