JopieK

PF Trains to the limit

Recommended Posts

Well, that was a long weekend (sorry about that). LEGOWorld 2010 preparations took too much time.

But I managed to even entertain the crowd with the PF functions as we speak (since I'm currently at LEGOWorld while typing and uploading).

overview.jpg

First of all the finished signal post. It has 3 small (Robbe) servo's that can pull up to 10 grams. They work very well!!! I'm especially pleased with the points. The arm signals do work as well, but they need a little bit more tweaking. The lines to pull the switches and the arm signals are also realistic for the era that we have (about 1935-1950).

B.t.w. I have experienced one problem with the servo's. They need a large capacitor otherwise the LEGuanO keeps resetting itself because of power brownouts.

The train also works very nice using the LEGuanO base. Kids like the blinking blue LED and the front and end signals.

I thought of creating an extra remote to activate / deactivate certain sections. That works well but it turns out that we don't need it (at least not at a large event) since we can just point to the LEGuanO that we really want to have.

pf_remotes.jpg

I used a nylon thread and hot glue to connect to the points. This should not demonish the LEGO and could be peeled off again.

track_closeup0.jpg

Here another overview of the signal post and the two trains that I currently use:

trains.jpg

B.t.w. connecting to a PF motor is quite easy I have just cut the cables :) they are quite cheap and easy to get (at this moment at least).

Share this post


Link to post
Share on other sites

Hi everyone,

@JopieK the technique you used looks very intresting as I dont have space on my layout to put motors too close to the track. Do you mind if I try using it? Either way have fun at LEGOWorld.

Thanks, CB

Share this post


Link to post
Share on other sites

Hi everyone,

@JopieK the technique you used looks very intresting as I dont have space on my layout to put motors too close to the track. Do you mind if I try using it? Either way have fun at LEGOWorld.

Thanks, CB

Of course I don't mind. I quess no real new inventions exist today anymore, only new combinations of old inventions occur :) so feel free to expand on it! Hope you share your results!!!

Share this post


Link to post
Share on other sites

Hey, just found this thread so i'll join the discussion.

Well, as you all, i'm interested in automation of Lego trains. I actually sold all my 9V train stuff (motors, tracks...) and fully switched to PF, but i'm quite active in the local Lego LUG that has 1 or 2 lego exhibitions every year. So i decided, i'll make the trains a bit smart. I don't have a working solution yet, but i ordered some stuff and i'll keep you posted on the results. Some (the Lego purists) wont like this, but since TLG doesn't give us the complete solution, i guess we have to use some non-lego elements.

The idea for the whole system is:

Fixed 9V, high current power supply on the tracks. Every PBrick (trains, lights, switch points, crossings, ...) should (idealy) get the power from the tracks.

Power:

1.) Modification of 9V motors (to break the direct power connection from wheels to motor), 2 cables out (one for the power supply from the wheels, other for getting the power back to the motor - PF cable)

2.) Power pickups (similar to 12V motors) for getting the power of the tracks (XL / M / PF train motors)

3.) Battery box onboard (XL / M / PF train motors) - not really much point in this, since it's basicly the PF system...

All three should be interchangable (the "PBrick" or how to call it should have some sort of power input and power output, preferably in 2x2 standard / PF connector).

Functions:

1.) Wireless Transceiver

2.) PWM powered H-Bridge for motor control

3.) Servo motor output(s)

4.) Light output(s)

5.) Sound output

6.) Some other sensor input (read below)

"PBricks"

1.) Train brick

- Wireless

- Motor control

- Light outputs

- Sound outputs

- Camera input (1x2 / 1x4 tiles on the tracks with printed "barcode", read with the sensor taken from a cheap optical mouse)

2.) Switch point

- Wireless

- Servo control

- Light outputs - optional

3.) Crossings

- Wireless

- Servo control (multiple or all 4 servos connected to the same output)

- Light outputs - blinking lights

- Sound output

4.) Lights/Semaphores

- Wireless

- Lights (multiple)

5.) Master brick

- Wireless

- USB / serial interface (opt)

- Bluetooth (opt)

- WLAN (opt)

The parts that i ordered:

Servo motors:

http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=14839

Dimensions: 8mm x 16mm x 18mm - if you cut off both "wings" (do the measures remind you of something :) - hint 1x2 brick/plate)

Was thinking of cutting the friction parts of the switch points but now i'm planning to use thread + spring or rubber band to control the inner part of the switch point (as seen in JopieKs post).

Wireless:

http://www.sparkfun.com/products/9582

Wireless receiver / transmitter (both ways) with microcontroller interface.

Camera:

http://www.trust.com/products/product.aspx?artnr=16257 - optical sensor taken out from a 2€ mouse (if i got the specs right, it's a simple 18x18 ccd sensor with serial digital output).

As you probably noticed, i'm trying to keep the cost low as possible, while not making my life to complicated with building everything from scratch.

Every "PBrick" will have an Atmel AVR microcontroler, dimensionwise i'll try to keep everything inside a 3 studs x 4 studs x 4 bricks box, made out of plates & panels, glued together. The mats price of each train brick should not exceed 20€, other bricks are capped at 10€ (that's after i figure everything out, the prototypes will ofc cost a bit more). The servos are so small and cheap enough (and if they work as i hope they will), that they can be used in train passenger cars to open the doors, in the city part of the diorama to make some of the minifigs "alive" etc...

LDD version of the powered switch point:

Design:

http://www.pavsic.com/kocke.si/Smart9V/kretnica1.png

Taken apart:

http://www.pavsic.com/kocke.si/Smart9V/kretnica2.png

(the black "thingy" is the actual size of the servo motor mentioned up there - ok i didn't account for the cables, but that's a minor thing)

I'm thinking of gluing a 1x2 brick / tile at the bottom - vertical position or 2x2 brick / tile at the side - horizontal position.

Working idea (in the ideal world ofc, we'll see how it turns out in the Lego / real world):

Every PBrick will have an address, when they got something to send, they'll transmit a send request, if multiple try to send at once, the one with lowest / highest ID will have priority. Since they all transmit / receive on the same frequency, they'll be able to "talk" to themselves.

Example:

Train drives over a barcode, transmits "Train X drove over Barcode Y" and slows down. On the other side the crossing will respond to that like this "If some train over barcode Y, lower the gates, turn on the blinking lights and sound". On the other side of the crossing, there will be another barcode, which will make the train go fast again and send the position to the crossing which will open the gates and turn off the lights & sound. Similar applies to semaphores, etc...

This would be the automated mode.

Another mode would feature the Master Brick, which would be just a gateway between a notebook / netbook / NXT brick / cell phone or any other bluetooth / usb / WLAN device.

The bricks would work in the "slave" mode, which would be "send all info, wait for commands" mode. In this mode the Master brick would receive all messages from the PBricks and forward them to the controler screen and vice versa.

Well, this is basicly it, i'll work on the protocol, address space (8-16 bit, not sure yet) and everything else after i receive all parts and try them out separately (connect each of them to an atmel, make them work. I'll need to make a DC-DC converter to power the chips (3.3 - 5v max from 9V supply with some capacitor power backup), PCB antennas for the wireless part, maybe some shielding - not sure how the RF part will react to motors connected to the same microcontroler. Lots of things to try and figure out, but my goal is to make something small enough to not worry how it will "break" the whole Lego MOC design but durable enough to work 8h straight on a Lego convention.

Edited by Bojan Pavsic

Share this post


Link to post
Share on other sites

I am at this moment doing experiments with this motor driver:

http://www.sparkfun.com/products/9457

It is very small and no heatsink required, so could be a nice feature. It is suitable for the M-motors according to the Philohome findings.

For wireless this could be a good option:

http://www.a-blocks.org/productdetail.aspx?id=34134699ea8e4a07949c9260fa2e43c4

Share this post


Link to post
Share on other sites

To know the location of a train RFID can be used with tags on the rail and a RFID reader in the train.

Just a thought; I would do this the other way around.

That way, you could place a tag on each piece of equipment, and it could be used for car tracking as well. You'd know where every individual piece of equipment is on your layout.

Share this post


Link to post
Share on other sites

Just a thought; I would do this the other way around.

That way, you could place a tag on each piece of equipment, and it could be used for car tracking as well. You'd know where every individual piece of equipment is on your layout.

It is of course much better to tag the equipment. Sparkfun has a lot of cheap readers ;) http://www.sparkfun.com/search/results?term=rfid&what=products

Share this post


Link to post
Share on other sites

Sorry for kicking this old topic, but I am new and very interested in this project. I have read about it in railbrick issue 13 today, and I have just ordered a Arduino uno board to experiment with. Hope to do some nice things with it. Is there any news on this from anyone, or os there more information on a other topic?

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.