Lowa

Brick to connect PF motor to Arduino board

Recommended Posts

On 8/4/2017 at 6:18 PM, Lowa said:

There are indeed quite a few members of the train community working with Arduino.  I'm not sure what would be the best place to re-post: train or general discussion.  I don't want to start posting it everywhere because then it becomes spamming...

Yeah, you are correct!

I would like to see more Arduino/LEGO users interact on a regular basis. I think having a few conversations about how different folks are using Arduino to enhance their LEGO creations would be very interesting. 

I will try to follow up with something as soon as I complete my current project. Right now I am rebuilding my annual Halloween display, I expect it to take most of August, but then it is back to Arduino.

I have an idea for a motion control project using Arduino. We will see if I can do such.

Andy D

Edited by Andy D

Share this post


Link to post
Share on other sites

Hi! Again, I am very impressed with what you guys are coming out with! Having a huge interest in Lego trains and automation with Arduino, I can appreciate making the whole process easier. (as long as the cost doesn't negate the gain) I definitely think this motor controller is a step in the right direction..I personally think that size is so important in automating Lego trains because you really don't have a lot of room to work with and this brick would mean less soldering and possibly a size advantage..
What I haven't worked out yet, is how, when you have multiple trains running on a layout, can you identify each train so you know which train to stop and wait whilst another train goes thru the point or whatever?? I am trialing using a colour sensor paired with an LDR to detect a coloured tile on the bottom of the train so it knows which train is at that point on the track..
Any thoughts? :-)  P.S: how much is the motor control brick going to cost?

sPy from Oz

Share this post


Link to post
Share on other sites
On 8/5/2017 at 8:59 PM, spy1101001 said:

Hi! Again, I am very impressed with what you guys are coming out with! Having a huge interest in Lego trains and automation with Arduino, I can appreciate making the whole process easier. (as long as the cost doesn't negate the gain) I definitely think this motor controller is a step in the right direction..I personally think that size is so important in automating Lego trains because you really don't have a lot of room to work with and this brick would mean less soldering and possibly a size advantage..
What I haven't worked out yet, is how, when you have multiple trains running on a layout, can you identify each train so you know which train to stop and wait whilst another train goes thru the point or whatever?? I am trialing using a colour sensor paired with an LDR to detect a coloured tile on the bottom of the train so it knows which train is at that point on the track..
Any thoughts? :-)  P.S: how much is the motor control brick going to cost?

sPy from Oz

You can use this brick to control a train, but we're also working WiFi based train controller.  You can find some pictures in this Eurobricks discussion:  

The motor control brick would be around $15, the WiFi train controller around $25.

Tracking trains on a track is indeed a challenge.  We have been thinking about a sensor in the train that can identify markers on the track (e.g. reflective sticker on a tile).  When the train detects a marker, it would inform the control software that would use that to track the position of the trains.  As it's the train that sends the information, distinguishing the trains is easy.  Tracking the position of the train would be harder but should, in theory, be possible with this system.  If you know where the train started and you know the position of the marker on the track the software should be able to figure out where the train is.  This would be a cost effective approach as you only need one sensor in the train and multiple cheap markers.

 

Share this post


Link to post
Share on other sites
On 8/8/2017 at 8:00 AM, Lowa said:

You can use this brick to control a train, but we're also working WiFi based train controller.  You can find some pictures in this Eurobricks discussion:  

The motor control brick would be around $15, the WiFi train controller around $25.

Tracking trains on a track is indeed a challenge.  We have been thinking about a sensor in the train that can identify markers on the track (e.g. reflective sticker on a tile).  When the train detects a marker, it would inform the control software that would use that to track the position of the trains.  As it's the train that sends the information, distinguishing the trains is easy.  Tracking the position of the train would be harder but should, in theory, be possible with this system.  If you know where the train started and you know the position of the marker on the track the software should be able to figure out where the train is.  This would be a cost effective approach as you only need one sensor in the train and multiple cheap markers.

 

Yeah I thought of that, but I didn't really want to deal with two-way communication from controller to all trains, then ALL trains back to the controller...sounds messy!!

It''l be interesting to see how the colour sensors work when they arrive..I'll let you all know!

sPy from Oz

Share this post


Link to post
Share on other sites
Just now, spy1101001 said:

Yeah I thought of that, but I didn't really want to deal with two-way communication from controller to all trains, then ALL trains back to the controller...sounds messy!!

It''l be interesting to see how the colour sensors work when they arrive..I'll let you all know!

sPy from Oz

Well, we use the MQTT protocol and it's pretty straightforward to avoid a messy situation.  Each message has a topic and devices can subscribe to the topic(s) they want to receive.  So it's pretty simple to send a message to one particular train only.  

I'm very interested in your experience with the color sensors, please keep us posted!

Share this post


Link to post
Share on other sites

I finally got back to this thread...

@Lowa have you made any progress with the Arduino to PF motor interface?

I am still interested.

Andy D

Edited by Andy D

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.