# Wi-Fi control



## Sewell (Sep 28, 2016)

I have started a project to make my garden railway computer controlled using Wi-Fi, based on open source hardware and software currently using Arduino. The development during the past years have made this an affordable alternative. In addition, with two-way communication, a whole new world of traffic management opens when the train can report status and position on the track, back to a central control system. I am already incorporating an RFID reader in my onboard system to be able to both get exact position and directly order trains to react based on read RFID tag information.
For the wayside to train and train to wayside communication there is a need for a protocol. DCC has a standard protocol but as all older protocols made for low speed communication it is bit oriented and not very user friendly. With high speed Wi-Fi my plans are to specify a readable protocol, sending text based information. 
So now to why I am posting this!
Working on this I realized that I might not be the only one with similar thoughts. Why not start an open source project, similar to what exists for DCC (http://opendcc.sourceforge.net/), but with the addition to develop a new standard Wi-Fi based protocol and share onboard hardware and software development?

Is there any interest out there?


----------



## Jerry Barnes (Jan 2, 2008)

These guys are using Bluetooth.
http://bluerailtrains.com/


----------



## Greg Elmassian (Jan 3, 2008)

Wi-fi will give better range and performance. Low cost wi-fi has come of age.

Your difficulty is not the communication medium, but designing a protocol, and getting people to adopt it.

That in of itself is not enough, new people want more functions. as clunky as DCC is, it has a very rich set of features, that work, and a lot of hardware that works with it.

The other underestimation that is often made is that the key is motor control. Nope, the key will be having a decoder with sound and lighting features and smoke control and servo control

After all that, can you make these for the same price as what is available? No, because you don't have the volume, and a general purpose lost cost processor will NOT accomplish what high power DSP and purpose-built ASICS do.

While I believe that low power wi-fi will be superior in range and speed to bluetooth, both are really not the problem.

Greg


----------



## Stan Cedarleaf (Jan 2, 2008)

Now that I'm out of the G Gauge train running, I've been running MTH's PS2 and PS3 locomotives with the DCS WiFi on an O gauge layout. We run at the Prescott Gateway Mall on the first Saturday of the month. The MTH DCS Wifi is a very, very nice system. The full blown "APP" hasn't been released yet but the original "APP" can run 3 locomotives with most all the bells and weasels (horns) working just fine.. 

Range is excellent and very responsive.


----------



## Martan (Feb 4, 2012)

Sewell, I'm doing similar but with Xbee. I have large amounts of code (including DCC output) written and hardware designed and working. I don't use Ardunio, however my design is based on the Atmel chipset, so more or less the same thing. I am going to open source mine as well. Feel free to drop me an email if you are interested. [email protected]


----------



## riderdan (Jan 2, 2014)

Greg Elmassian said:


> Wi-fi will give better range and performance. Low cost wi-fi has come of age.
> 
> Your difficulty is not the communication medium, but designing a protocol, and getting people to adopt it.
> 
> ...


I think this is all doable with an Arduino micro and expansion boards--motor, servo, lighting control, MP3 sound, etc. The keys are cost and the inefficiencies of a general-purpose microcontroller. 

As far as cost, I can get Arduinos for $12 and motor control boards for about $8. But the MP3 boards are ~$30 and WiFi boards a similar cost. So you're already at $80 and you still need all the associated folderol for connections (screw terminal boards, some sort of transistor for controlling higher voltage items like smoke and non-LED lights) 

On top of this, you have to write a program that's responsive enough to do pseudo-real-time control AND it has to fit in 32K of flash memory.

Unless someone is really interested in all aspects of programming a roll-your-own DCC-type solution, it just doesn't seem worth the effort. That's my personal cost-benefit analysis, YMMV


----------



## Greg Elmassian (Jan 3, 2008)

You cannot equal the top sound systems with an mp3 player, in the old days when no one really wanted or could afford sound, you could make an inexpensive control system.

You need specialized hardware AND a large sound library to make a good sound decoder.



Greg


----------

