Is anyone using an arduino-controlled S88 network? - Page 2 - Model Train Forum - the complete model train resource
Model Train Forum - the complete model train resource

Go Back   Model Train Forum - the complete model train resource > Model Train Workshop > DCC Forum (Digital Command Control)
Forgotten your password?


Reply
 
Thread Tools Display Modes
Old 08-25-2019, 03:53 PM   #11
Severn
Engineer
 
Join Date: May 2016
Location: Annapolis, Maryland
Posts: 551
How about ant?

https://en.m.wikipedia.org/wiki/ANT_(network)
Severn is online now   Reply With Quote
Sponsored Links
Advertisement
 
Old 08-25-2019, 04:44 PM   #12
wvgca
Station Master
 
wvgca's Avatar
 
Join Date: Jan 2013
Location: yorkton, sask
Posts: 3,143
Scales Modeled: HO 1890's
Images: 48
i'm in favour of anything arduino controlled, mainly because of cost and availability of the arduino's themselves
__________________

wvgca is online now   Reply With Quote
Old 08-25-2019, 06:26 PM   #13
gregc
Engineer
 
Join Date: Apr 2015
Location: somerset, nj
Posts: 911
Quote:
Originally Posted by wvgca View Post
i'm in favour of anything arduino controlled, mainly because of cost and availability of the arduino's themselves
maybe not because of the processor, but because of the libraries for the Atmel processors used on Arduinos.

while I think the avr compiler can support other processors, the avr toolchain uses board names. see https://www.avrfreaks.net/sites/defa...avr_cpunames.h
gregc is offline   Reply With Quote
 
Old 08-25-2019, 07:05 PM   #14
Shdwdrgn
Dispatcher
 
Join Date: Dec 2014
Location: Longmont, Colorado
Posts: 1,901
@Severn -- you dropped the closing parenthesis on your wikipedia link so it doesn't quite work, but I did find the article. Looks like that is just a wireless network, but the arduinos don't have wireless built into them so it would require an additional component. If I were going that route I would just stick with an ESP32 which already has wifi and bluetooth built in.

My network thus far is using a raspberry pi as a wifi access point (and provides the link to my main network so I can connect through my desktop). The base station is an ESP32 with a small OLED display for status info. The ESP32 is connected to the Pi via USB which gives me the option of flashing new code to the base station over wifi, very handy at this point until I have all of my options decided.

For controlling devices via DCC I am using these nano-strong boards. Other than a 5V power source (which I get from my 16V track power), I have a tiny board that connects between the nano and the track to filter the DCC signal. Otherwise the only connection to the board is up to 16 servos plugged in directly. It's so dead-simple that I found it ideal for use with turnout servos. It costs around $4 for the board plus less than $2 for my DCC filter board, and the servos are around a buck each. Basically for the cost of a single turtle motor I can put together the controller and 16 turnout motors.

Because I'm already using the nano-strong boards, I thought they would be really nice to use for the sensors as well. This board has 3-wire output for every I/O pin, so I could build a whole cable including IR transmitter and receiver to plug in, and even with the four wires needed for S88 I could still handle 16 inputs at each board.

Beyond that, as I mentioned I plan to use RFID detectors to verify a train is pulling all of the expected cars (at least when leaving the yards). Worst case, I can handle that over wifi with an ESP32. I think that would probably cover everything though?

So I just need to settle on which wired network to use for at least the block detection and other simple sensors, and if that network can do output as well as input then I won't have to clutter up DCC on the rails for things like turning on lights (buildings and track signals).
Shdwdrgn is offline   Reply With Quote
Old 08-27-2019, 07:54 PM   #15
Shdwdrgn
Dispatcher
 
Join Date: Dec 2014
Location: Longmont, Colorado
Posts: 1,901
I've been doing some reading on LCC (aka: OpenLCB) and I think I'm starting to figure out how it interconnects. I also found some brief discussion on how to transmit RFID, but nothing solid and no working examples yet. Ah well, that part is still off in the future for me anyway.

For now, it looks like there are several working node examples that can be used with standard IR pairs and getting a pair of nodes to talk to each other. However the part I'm having trouble finding any kind of info on is the bridge from LCC to wifi... Has anyone seen any working arduino examples? If I can find something showing how the information is transmitted then I'd know what I need to work with in order to receive the data in a computer program. From just the way the nodes transmit and receive information I am strongly reminded of a standard MQTT arrangement, and I could certainly set up an ESP32 to talk to an MQTT server (if the data arrangement is really as similar as I think).

Anyway, if anyone has run across examples of receiving the LCC data with an arduino and transmitting it to a computer/network could you please point me in that direction? Thanks. In the meantime, I'll keep digging...
Shdwdrgn is offline   Reply With Quote
Old 08-27-2019, 08:11 PM   #16
gregc
Engineer
 
Join Date: Apr 2015
Location: somerset, nj
Posts: 911
here's an intro to OpenLCB and here's an OpenLCB Forum where I had read of people using Arduino.

again, LCC is CSMA/CD using CAN.
gregc is offline   Reply With Quote
Old 08-27-2019, 10:39 PM   #17
Shdwdrgn
Dispatcher
 
Join Date: Dec 2014
Location: Longmont, Colorado
Posts: 1,901
You found a forum??? *Bows to your google-fu*

Quote:
Originally Posted by gregc View Post
again, LCC is CSMA/CD using CAN.
I'm not sure what you're getting at here?
Shdwdrgn is offline   Reply With Quote
Old 08-28-2019, 06:46 AM   #18
Severn
Engineer
 
Join Date: May 2016
Location: Annapolis, Maryland
Posts: 551
for some RFID work, take a look here:
http://www.silogic.com/trains/RFID.html

As for ANT, well it was just a thought. Mainly I like that it's wireless and pretty well used outside model trains in the sport market. And seems to have some nice features. I have no actual hands on experience with it and only know of it as its mentioned in products I don't buy as a selling pt.

There seems to be some support for it -- https://github.com/cujomalainey/ant-arduino

anyway it was just informational.
Severn is online now   Reply With Quote
Old 08-28-2019, 06:57 AM   #19
gregc
Engineer
 
Join Date: Apr 2015
Location: somerset, nj
Posts: 911
i was told about the LCC group by a proponent of LCC while trying to understand LCC better. It seemed a challenge to develop the SW for a CAN node. RR-CirKits sells LCC hardware (prices). By using CSMA/CD, LCC uses bandwidth more efficiently, minimizing response time on very large layouts with a very large number of nodes (100+).

Quote:
Originally Posted by Shdwdrgn View Post
again, LCC is CSMA/CD using CAN.
I'm not sure what you're getting at here?
are you familiar with CSMA/CD or CAN used by LCC? As I've said, this requires special HW or bitbanging SW with HW to detect the collision and SW that suspends transmission before the next bit and reschedule transmission.

A polling approach such a C/MRI requires no special HW and can use a UART. That SW is relatively simple, allowing you to focus on the purpose of the node. KISS. (please look at the links)
gregc is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


» Visit These Sites:
LGB World

Or Our European Train Website ModelRailForum




All times are GMT -5. The time now is 02:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.