-
Content Count
443 -
Joined
-
Last visited
-
I automated this one a while back (10 years I see now, time flies!). You need one sensor per track that you place a meter or so in front of the crossing, minding the direction of the track (if the train can come from either side on the same track, you'll need two sensors for that track). If a sensor detects a train, beams go down, when the train has cleared the sensor a timer is started to make sure the beams remain closed until the train has passed the crossing. After the timer has elapsed, beams go up. For sensors I always use this one: https://www.pololu.com/product/1132 , 10cm variant will do too but needs to be placed further away from the track (or it will detect the train on the adjacent track). Don't try the cheap Ali Express IR sensors: they don't work very well, generate a lot of false positives and so on. For moving the beams you need a motor driver, easiest way to do so is an L293D driver. Google on "L293D" and you'll find a module or Arduino shield that you can use. Read the datasheet of the 293D to understand how to connect the thing. Lights can be directly connected to the controller. As mentioned before, you need a micro controller to control the whole thing. An Arduino Uno will be the most easy thing to use, lot's of tutorials for that online. Bonus 1: Here's a video with the thing in action: Automated 7866 crossing Bonus 2: The Arduino code that I've used: #include <TimerOne.h> int LampsA=8; int LampsB=9; int MotA=6; int MotB=7; int Sensor0=2; int Sensor1=3; volatile int downtime=2000; volatile long StartTime=0,EndTime=0,CurrentTime=0; volatile bool Sensor0Activated=false, Sensor1Activated=false; void setup() { Serial.begin(9600); pinMode (MotA, OUTPUT); pinMode (MotB, OUTPUT); pinMode (LampsA, OUTPUT); pinMode (LampsB, OUTPUT); pinMode (Sensor0, INPUT); pinMode (Sensor1, INPUT); pinMode(13, OUTPUT); attachInterrupt(0, Sensor0ISR, FALLING); //Sensor 0, pin 2 on Micro attachInterrupt(1, Sensor1ISR, FALLING); //Sensor 1, pin 3 on Micro barsUp(); LampsOff(); } void loop() { do { delay(1); } while (!Sensor0Activated && !Sensor1Activated); LampsOn(); barsDown(); do { CurrentTime=millis(); } while (CurrentTime < EndTime); barsUp(); LampsOff(); //attachInterrupt(0, Sensor0ISR, FALLING); //Sensor 0, pin 2 on Micro //attachInterrupt(1, Sensor1ISR, FALLING); //Sensor 1, pin 3 on Micro Sensor0Activated=false; Sensor1Activated=false; CurrentTime=0; } void LampsOn() { digitalWrite (LampsA, LOW); digitalWrite (LampsB, HIGH); } void LampsOff() { digitalWrite (LampsA, LOW); digitalWrite (LampsB, LOW); } void barsUp() { digitalWrite (MotA, LOW); digitalWrite (MotB, HIGH); delay (1000); digitalWrite (MotA, LOW); digitalWrite (MotB, LOW); } void barsDown() { digitalWrite (MotA, HIGH); digitalWrite (MotB, LOW); delay(1000); digitalWrite (MotA, LOW); digitalWrite (MotB, LOW); } void Sensor0ISR() { //detachInterrupt (0); Sensor0Activated=true; StartTime=millis(); EndTime=StartTime+downtime; } void Sensor1ISR() { //detachInterrupt (1); Sensor1Activated=true; StartTime=millis(); EndTime=StartTime+downtime; }
-
MOC: Shell tanker wagon (7813 remake)
AlmightyArjen replied to Brickviller V2's topic in LEGO Train Tech
I love it! It resembles the original so much and it has the 80's flair all over it! I also do like the Octan version, I'd say "typically 90's", odd to see that a simple change can give the whole thing a different perspective. -
This is just magnificent! I love the details and the overall Futuron colour scheme, well done!
- 19 replies
-
- legomathijs
- moc
-
(and 3 more)
Tagged with:
-
This is incredible. The size of the whole thing, the detailing, absolutely fantastic work!!
-
Set 10020 Santa Fe originally also in light bluish gray?
AlmightyArjen replied to AlmightyArjen's topic in LEGO Train Tech
Thank you all. The conclusion is I bought a replica. I'll just have to accept it and I'll try to transform it to light gray in (a long) time. -
GoHabsGo started following AlmightyArjen
-
Set 10020 Santa Fe originally also in light bluish gray?
AlmightyArjen replied to AlmightyArjen's topic in LEGO Train Tech
The circular windows are prints and look original. -
Set 10020 Santa Fe originally also in light bluish gray?
AlmightyArjen replied to AlmightyArjen's topic in LEGO Train Tech
I have no idea, they look original. Thanks for the link! -
Set 10020 Santa Fe originally also in light bluish gray?
AlmightyArjen replied to AlmightyArjen's topic in LEGO Train Tech
Thanks for the compliment on my channel! I was already afraid I've been ripped off, but... ... that is so true indeed! :D -
Set 10020 Santa Fe originally also in light bluish gray?
AlmightyArjen posted a topic in LEGO Train Tech
Hi all, I bought a 10020 Santa Fe set through Ebay. It was a good deal but now the package has arrived, I notice that the whole set is in light bluish gray instead of the old light gray (except for two doors at the back of the train (those aren't available in LBG)). Did it also come originally in LBG? All stickers are applied on the LBG parts. I know that around that time there was a transitional period from light gray to light bluish gray. It's also specifically mentioned on Bricklink for the 10027 Engine Shed set with an additional note: "The early production runs of this set featured Brown, Dark Gray and Light Gray elements but subsequent production runs have contained varying mixtures of Brown / Reddish Brown, Dark Gray / Dark Bluish Gray and Light Gray / Light Bluish Gray elements." Could this also be the case for my 10020 Santa Fe set or have I been ripped off? -
Bulk Material Train Unloading Facility
AlmightyArjen replied to Terry Akuna's topic in LEGO Train Tech
Really cool structure, love it!- 21 replies
-
- lego rotary dump
- lego train
- (and 10 more)
-
Hi all, I was quite pleased with the Lego city 2022 line-up of sets, so I decided to sell some older sets and buy a lot of 2022 sets. By doing so, I also "refresh" my Lego collection. Together with the new train sets, I decided to build a 2022 Lego city and shoot a video of it. Enjoy!
-
Nice design! I tried to build it with 80's-only parts:
-
Very cool, definitely has a vintage vibe to it!
-
[MOC] Alstom - CP2620 - Nez Cassé 1:45 Scale (8wide)
AlmightyArjen replied to Sérgio's topic in LEGO Train Tech
Awesome design! I love hou you've managed to put the nose in the model. That must have been quite the puzzle....- 18 replies
-
- moc
- urbanerwin
-
(and 7 more)
Tagged with:
-
BatteryPoweredBricks started following AlmightyArjen