Author Topic: Controlling a model train.  (Read 4787 times)

0 Members and 1 Guest are viewing this topic.

Phobophile

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 7
    • View Profile
    • Facebook
Controlling a model train.
« on: November 09, 2014, 01:37:05 PM »
During the inspection of all the useless stuff in my appartment, waiting to be thrown into the trash, I found an old PIKO model train, which is almost my age.



It turned out, it worked ok, but needed a couple of tweaks to satisfy my laziness. First I attached a Raspberry PI with relay to the circuit and created a page on Raspberry's web server to start/stop the locomotive from my phone.



But I still didn't feel like a real Lokomotivführer, so I decided to implement a voice control. Since I don't know what's the proper way to command a German train, I use Russian words - Yuri Gagarin's catchphrase "poehali" (let's go) to start the locomotive and army command similar to "as you were" to stop it.



Sure, my layout is pretty inferior, compared to those of train modelling enthusiasts. Maybe that's a good thing that I don't have too much free space at my home, because I've suddenly found another perfect way for me to waste a lot of money.  ;D

PS: Here's a little POV-video from a GoPro camera, which I've attached to the wagon.
https://vimeo.com/111342281

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Controlling a model train.
« Reply #1 on: November 09, 2014, 01:57:33 PM »
Really funny  :D
And a lot of "men toys" arround your home ;)

A german phrase to start the train: "Achtung, Zug fährt" (english: "Attention, train runs")
A German phrase to stop the train: "Zug hält" (english: "train stops")
***********  get excited and make things  **********

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Controlling a model train.
« Reply #2 on: November 09, 2014, 02:26:53 PM »
 :clap

You've taken "laziness" to a whole new level.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Controlling a model train.
« Reply #3 on: November 09, 2014, 02:41:34 PM »
Any further plans for the project?
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Controlling a model train.
« Reply #4 on: November 09, 2014, 03:01:37 PM »
You are (still) my hero!  Great stuff.  ::bow

Phobophile

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 7
    • View Profile
    • Facebook
Re: Controlling a model train.
« Reply #5 on: November 09, 2014, 04:00:34 PM »
A german phrase to start the train: "Achtung, Zug fährt" (english: "Attention, train runs")
A German phrase to stop the train: "Zug hält" (english: "train stops")
So, I guess I'll need yet another instance of VoxCommando for this. ;)

Any further plans for the project?
Actually, I would like to have a bigger railroad layout with track switches, lights and stuff - maybe then I could think of something more interesting than just start/stop. But, sadly, I just don't have that space at home at the moment, so maybe later. :)

You are (still) my hero!  Great stuff.  ::bow
:yay

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Controlling a model train.
« Reply #6 on: November 09, 2014, 05:10:13 PM »
Somehow we need to get your train to deliver you your beer during movie time, and your coffee in bed in the morning ...

(OK, maybe I'm over-reaching.)

btw, the aerial footage you've captured with your DJI Phantom is amazing. The Pskov footage -- nice!

How far from you can it get before you lose control?
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Phobophile

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 7
    • View Profile
    • Facebook
Re: Controlling a model train.
« Reply #7 on: November 10, 2014, 03:39:59 AM »
Somehow we need to get your train to deliver you your beer during movie time, and your coffee in bed in the morning ...
(OK, maybe I'm over-reaching.)
Funny, that's the first thing I thought about! If you think you're overreaching, check this video.

btw, the aerial footage you've captured with your DJI Phantom is amazing. The Pskov footage -- nice!
How far from you can it get before you lose control?
Thanks! The safe distance is probably about 1 km. Anyway, it should come back automatically if signal from the radio is lost, but I didn't try that, cause it's scary.  ;D

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Controlling a model train.
« Reply #8 on: November 10, 2014, 09:41:36 AM »
Funny, that's the first thing I thought about! If you think you're overreaching, check this video.

There you go, then. All you need is a private wait staff, $700,000, and you're set!

Looks like the model train restaurants arrived in Prague several years after my last visit. But I'm pretty sure I know those old guys sitting at the bar.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Casmo

  • $upporter
  • Contributor
  • *****
  • Posts: 85
  • Karma: 0
    • View Profile
Re: Controlling a model train.
« Reply #9 on: November 10, 2014, 11:20:40 AM »
Ha! no way, ive been trying to come up with a way to vc a christmas tree train! all the cheapo ones i've seen are battery operated and therefore no use. I came to the conclusion that the only way would be to buy some proper train kit, but its not cheap..


Phobophile

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 7
    • View Profile
    • Facebook
Re: Controlling a model train.
« Reply #10 on: November 10, 2014, 01:50:53 PM »
Looks like the model train restaurants arrived in Prague several years after my last visit. But I'm pretty sure I know those old guys sitting at the bar.
Somehow I missed it during my visits too, but now it's defintely on my to-do list!

Ha! no way, ive been trying to come up with a way to vc a christmas tree train! all the cheapo ones i've seen are battery operated and therefore no use. I came to the conclusion that the only way would be to buy some proper train kit, but its not cheap..
Actually, it's not that expensive, you should go for some analog starter kit, where you need only to apply DC voltage to the rails (most of modern and expensive sets use fancy PWM-controllers, I think).
For example, this one or this one.
« Last Edit: November 10, 2014, 03:38:12 PM by Phobophile »