Freerails Home 
Home Search search Menu menu Not logged in - Login | Register
Freerails > Model Railroad Forums > D.C.C. Electrical & Sound > Signals & Switches & L.C.C. Oh My !

Freerails IS ACCEPTING new Members ... To join Freerails ... See how to Register as a Member in the 'Joining Freerails' Forum

Signals & Switches & L.C.C. Oh My !
 Moderated by: . Page:  First Page Previous Page  1  2  3   
New Topic Reply Printer Friendly
 Rating:  Rating
AuthorPost
 Posted: Wed Jun 5th, 2019 07:49 pm
  PMQuoteReply
21st Post
Steve P
Registered
 

Joined: Fri Apr 20th, 2018
Location:  
Posts: 85
Status: 
Offline
Hi,

I just sent the 'Switchman' to fab.

This is basically a 16 channel PWM controller,
with positive feedback of switch position,
via a pair of micro-switches on each channel. 

It uses my "standardized" i2c bus,
to send commands and receive micro-switch feedback.

 

Attachment: rrs2.png (Downloaded 123 times)

Back To Top

 Posted: Wed Jun 19th, 2019 06:47 pm
  PMQuoteReply
22nd Post
Steve P
Registered
 

Joined: Fri Apr 20th, 2018
Location:  
Posts: 85
Status: 
Offline
Hi,

Boards back from fab, bringing up 1st:


Attachment: 2019-06-19-124207.jpg (Downloaded 104 times)

Back To Top

 Posted: Fri Jun 21st, 2019 03:25 pm
  PMQuoteReply
23rd Post
Steve P
Registered
 

Joined: Fri Apr 20th, 2018
Location:  
Posts: 85
Status: 
Offline
Hi,

I have been working on the SignalMan (ie LED controller) board in the background.
It had become way too large, unwieldy, hard to configure, etc. 
So I stepped back and took another approach.

First I made a little board (on the left),
that connects my "standardized Wire/i2c cable",
to the PWM LED control module I am using. 

I made the right end of this board match the modules,
so that they can be connected together in an arbitrarily long chain,
using right-angle stacking headers.

Note the 2x15 IDC  connector on the top edge of the 1st module. 
This mates perfectly with the cluster of 12 LED drivers on that edge. 
Using this, you can connect a ribbon cable directly to 12 LEDs (or 4 RGB LEDs).
 
I will make another board that has 12 of my 3 Watt LED drivers,
with a 2x15 IDC socket on one side,
and appropriate high power connectors on the other.  
Using this you can connect the 3 Watt LEDs.

The combination of the above gives an easily configurable,
relatively inexpensive solution for prototype signal control.


Attachment: 2019-06-21-091848.jpg (Downloaded 89 times)

Back To Top

 Posted: Sat Jun 22nd, 2019 11:11 pm
  PMQuoteReply
24th Post
Steve P
Registered
 

Joined: Fri Apr 20th, 2018
Location:  
Posts: 85
Status: 
Offline
1st SwitchMan board finished and tested. 
Seems to work well, including the management of the 32 INTerrupts it can generate!

Starting to assemble the 2nd,
after which I will get the software working with multiple boards.
(not an easy task, the Arduino libraries don't expect these things to be stacked on 6 different i2c buses  :td:)


Attachment: 2019-06-22-170717.jpg (Downloaded 72 times)

Back To Top

 Posted: Sun Jun 23rd, 2019 07:48 pm
  PMQuoteReply
25th Post
Steve P
Registered
 

Joined: Fri Apr 20th, 2018
Location:  
Posts: 85
Status: 
Offline
 
2nd Switchman board assembled and tested:
 

RRswitch.cpp, build Jun 23 2019, - 13:34:48

pca9685 control pins:
  GND: GND, Vcc: 3.3v, SDA: Wire:SDA, SCL: Wire:SCL, OE: unused

  6 servos
  Servo calibration:
    calculated minimum pulse: 204, programed: 90
    calculated center pulse: 307, programmed: 267
    calculated maximum pulse: 409, programmed: 445

SX1509 track switch monitor.

------------------------------------
Starting trackswitch board on wire 0
TrackSwitchBoard::begin(), _i2c: 0x200021cc
TrackSwitchBoard::wireScan()
   SX1509 #1 found @ 0x3e
   SX1509 #2 found @ 0x3f
   PCA9685 found @ 0x40
 trackswitch board found
 all modules found on trackswitch board
------------------------------------
Starting trackswitch board on wire 1
TrackSwitchBoard::begin(), _i2c: 0x200016c8
TrackSwitchBoard::wireScan()
   SX1509 #1 found @ 0x3e
   SX1509 #2 found @ 0x3f
   PCA9685 found @ 0x40
 trackswitch board found
 all modules found on trackswitch board
config file: track switch board #0
config file: track switch board #1

==============================
controlling track switches ...
> s 4
setting servo to #4
servo #4, pulse length: 267
> tp
Switch #4: diverging
>  brakeman requests we move trackswitch 4 to main line
  ... moving ...
#4 main line
> td
  ... moving ...
#4 diverging


Both boards recognized and initialized properly.

On to SignalMan, the new design for the LED controller.


Back To Top

 Posted: Sat Aug 3rd, 2019 01:33 pm
  PMQuoteReply
26th Post
Steve P
Registered
 

Joined: Fri Apr 20th, 2018
Location:  
Posts: 85
Status: 
Offline
Hi again,

Been very busy writing code to connect my hardware to JMRI,
specifically an openLCB (aka Layout Command Control, aka. LCC) gateway to JMRI.
Has proven very challenging as I have no knowledge of JMRI itself.

At this point I have a prototype (in the computer programming sense of 'prototype'),
of a gateway that hooks my mcus to JMRI, for turnout control and signal mast (ie. LEDs)
control. 

I can click a turnout on the JMRI layout panel, see it filter thru the gateway to the mcu,
which then sends microswitch inactive status of an opening sensor, moves the servo,
and finally sends active status for the other sensor (microswitch). 

I can also flip the control handle on a switch, to send a command uphill to JMRI,
causing it to move the turnout to the opposite position.

I decided to build a complete test setup in the den, to make the development cycle easier.

The signal mast icons move thru clear/stop/advance slow/ etc as appropriate,
sending the associated commands to the mcu for changing the LEDs to those colors.
At this point they are NOT the appropriate aspects, as I haven't figured out signal mast setup of JMRI yet,
but they are distinct/correct commands in the abstract.
 
This allows me to proceed with final programming of an mcu to run turnouts and signals via my hardware!

Steve





Back To Top

 Posted: Sun Sep 22nd, 2019 02:24 pm
  PMQuoteReply
27th Post
Steve P
Registered
 

Joined: Fri Apr 20th, 2018
Location:  
Posts: 85
Status: 
Offline
Hi,


Have working mast and turnout control working on my test track. 


Started a website to document everything: 

 Beaver Lode Railway

It's (ie. the website) still very much a work in progress...


Steve


Back To Top

 Posted: Wed Sep 25th, 2019 09:22 pm
  PMQuoteReply
28th Post
Warren G
Registered


Joined: Mon Sep 28th, 2015
Location: Yorkton, Saskatchewan Canada
Posts: 10
Status: 
Offline
Looks like it's coming together quite nicely.  :)








____________________
Regards, Warren
Back To Top


 Current time is 05:17 am
Page:  First Page Previous Page  1  2  3   

Freerails > Model Railroad Forums > D.C.C. Electrical & Sound > Signals & Switches & L.C.C. Oh My !
Top



UltraBB 1.172 Copyright © 2007-2016 Data 1 Systems