537
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 22 Aug 2023
537 points (98.4% liked)
Asklemmy
44183 readers
1154 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- !lemmy411@lemmy.ca: a community for finding communities
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
founded 5 years ago
MODERATORS
We built the layout when DCC was first coming out after going to a train show. We ended up picking up one of Digitrax's first systems (Empire Builder IIRC, with DB150 base station). That's still what we use for DCC. I designed a LocoNet to serial adapter (MS100 compatible, but very cheap and simple) in college (2010 ish) and we're using that to connect it up to a Pi 3 running JMRI. Our layout is HO scale. N scale is probably too small for even a Raspberry Pi Zero with camera module, as the setup barely fits on an HO scale car.
I have set up a DCC++ Ex setup at my house for testing and experiments. Just got a loop of EZ Track on the floor with an Arduino as the base station and another Pi with JMRI that is configured similarly to the real layout.
Here is an early picture of the camera car design with the servo. I've since condensed everything on to one car with a custom 3D printed design. I want to publish it eventually but haven't had time. I even 3D printed trucks with power pickups in my latest design (just had to buy metal wheel sets to put in them). I also made a tiny Python webserver that has buttons for different servo positions so you can easily move the servo from a browser.
https://files.mastodon.social/media_attachments/files/110/456/482/672/249/884/original/398d0e7f581517cf.jpg
https://files.mastodon.social/media_attachments/files/110/456/483/176/756/180/original/3434f015434fb542.jpg
https://mastodon.social/@CalcProgrammer1/110456485998532640
For the DCC controlled turnouts, lights, and turntable, I built up an Arduino Nano based DCC decoder from a design I found online and a DCC decoder library that is available in Arduino. Since the layout spans multiple tables, instead of putting a DCC decoder for each table/PCB I just had the one decoder echo the DCC commands as serial messages over a serial bus that spans all the tables. The other boards (turnout controllers, light controllers, and turntable controller) all just have their RX pins wired to the decoder's TX and can receive commands that way. Turnout controllers are a mix of SG90 micro servo based ones and L293D motor drivers for Tortoise switch machines. Light controllers use transistors to switch 12V outputs on and off to drive bulbs and LEDs. Turntable controller is an EasyDriver based stepper controller with some pre-programmed position offsets for each turntable track (each track position is mapped to a DCC function address).