[kodera2t] discovered the VL53L0X Time of Flight sensor and thought it would make a great way to control the operation of a model train without touching it. He explains it in his own words in the demo video.
The sensor was small enough for an N-gauge train, which translates to 1:148 scale or about 9mm from rail to rail. His idea was to build a tiny control board that could fit inside the locomotive: 10mm by 40mm. His board consists of the ToF sensor, an ATMega328P-MMH, USB-serial, and a Texas Instruments DRV8830 motor driver. he powers the board via the 6V running through the track.
Right now [kodera2t]’s using the ToF as sort of a gestural controller to get the train to start rolling, but one could imagine the sensor could be incorporated into more advanced programming, like having the train speed up on straightaways and slow down on a curve, based on the height of the bridge over it.
We’ve published a bunch of [kodera2t]’s tiny circuit board projects here on Hackaday, including the smallest basic computer, his minimal frequency counter, and his VFD amplifier.
Cute! If you put the ToF sensor on the front of the train, you could use it to prevent trains from colliding with each other, and could establish a safe following distance, perhaps?
Or make it follow your finger around the track, for example, at a fixed distance. And if your finger gets too close (i.e. approaches the train), start reversing ;-)
When I read the first few lines, that’s what I was expecting it to be (automatic collision avoidance/following) rather than as a human control interface.
If you wanted to augment it even further, one could add RFID (maybe a barcode depending upon the space) under the tracks as a way to determine what the track type was ahead (such as corners, stations, straights, crossings, etc) and automatically adjust the speed as appropriate.
Model trains always reminds me of This stuff
https://www.youtube.com/watch?v=35pzZ9bgJLk
I came in to post this. Well done ya fat c… fat c… fat controller
https://www.youtube.com/watch?v=w23Mn0bZY5w
I remember when digital control systems for model trains costed hundreds of dollars… I never bought any such things, and just relied on good old stock standard DC speed controllers…
I’m realizing that with the right boards, you could probably add digital controls to each train for a few bucks a piece. These days, you could probably just control it all by WiFi or something.
Certainly could add a Esp8266 and use NFC around the track to trigger things.
I recently bought an N-scale locomotive, brand new, for about $50 with a pre-installed DCC decoder. Been trying to put together a home-built DCC transmitter out of some motor control drivers and an Arduino.
The official N-gauge is NOT 1:148, it’s 1:160. It’s a bit like H0 where some manufacturers make 1:100 models instead of 1:87.
And if you want tiny, why add a huge (what look like) mini-USB socket and even a USB-Serial chip… I mean, it takes half the board…
Actually 1:148 is an ‘official’ n gauge scale, it just isn’t the one used where you happen to live. I know it’s hard, but please try not to forget that there are other countries on this planet.
I have many 1:160 friends who need that reminder. Thanks.
My first foray into electronics as a kid was for model railroading. I was going to build an analog command control system using crystals to select the locomotive, similar to a far more expensive analog system called DYNATROL. The intent was to use the crystals as a filter for the frequencies being broadcast down the rails.
I never got the funds to build it and frankly knowing what I know now, I can see it would not have worked. Would have blown those crystals. But I learned a lot about electronics with that :-)
Good to see a SiLabs CP2102 part on that board. Is SiLabs (Silicon Laboratories) the last U.S. chip company that hasn’t been “bought-out”? I like what SiLabs does, especially when it comes to timing/clock-distribution.
Errm, don’t think so. By ‘bought out’ do you mean owned by a company outside the us? If so then I think Ti, linear, Maxim, microchip, atmel, Fairchild, Intel, amd… might have something to say!
Several of those have been bought out…
Microchip owns Atmel. ON Semiconductor owns Fairchild. Analog owns Linear.
I *think* the others are still their own companies…
Hello everyone, that decoder is big, ESU from Germany just released a Nano decoder it’s only 8x7x2.8mm in size, Now That’s What I Call small. Here is a link to read more about it mi http://reynaulds.com search for ESU nano decoders.
Nice and small thing! For smaller trains an Attiny Arduino compatible digispark board
http://s.click.aliexpress.com/e/ZJyn2je
Could fit easily, Looks like a small thumb drive, no programmer needed, and some models have the usb plug etched in the PCB so no cable needed!
Just a matter of time before full sized trains run like our models…No engineer needed! Cars, planes, ….trains?