Skip to main content

Gary E posted:
Serenska posted:

I have a suggestion that isn't as exotic as MP3, TMCC, smartphone connections, etc.

How about creating a circuit that, when activated by a train entering an insulated rail section, causes two separate leads to be energized alternately, for a duration that would follow the other timing settings you've proposed above?  The application I have in mind is causing the lights on an Lionel Postwar 154 Highway Signal to flash alternately.

If you can provide a device which eliminates the use of the wretched 154C contactor, and replaces it with a simple insulated rail trigger, I and a lot of other Postwar guys would beat a path to your door.

Thanks for listening.

Steven J. Serenska

Custom Signals had a nice circuit board to do that function. It could be triggered from either direction. It had the slow on/off blink function for either LEDs or the 154 crossing signal. It also did doubletrack crossings and for the really demanding customers like club layouts had a 3 block operation for each track.

Gary:

Thanks for this, but here's the first sentence from Custom Signals' website:

Dear Customer:

It has been six months since the “doors” at Custom Signals closed.

I appreciate the tip, but it's sometimes tough doing business in our market....

Thanks.

SJS

 

JGL,

It looks like circuit design and philosophy have crossed paths here and has taken us a bit off topic. I'm pretty new to this forum and I know that you've been around here for a while. I know that what I've read of yours has always been geared to help out as best you can. And I know that you have also been a proponent of making use of microprocessors as a tool to help solve problems. In that way, I think we are on the same side of this discussion. It would be wrong for us to not recommend the most appropriate tool to do the job. It's pretty tough when you recommend an idea that gets shut down for being too advanced, especially when you know that it's the right answer. But that's the nature of where we are and what we can expect. So from your experience I trust in your judgement to carry on with this particular project with the target audience being the curious but not so willing to look under the hood. I am confident that you can do this.

I was looking into SD card readers and trying to find out how Arduino binary programs could be uploaded without having to use the IDE. While the SD cards would be a good way to transfer readable program parameters, the bootloader issue is unsettled. There's a whole lot on the net about doing this very thing but it is dated and there doesn't seem to be a concensus of what to use. I'll continue to try to figure that out, at least for myself. If anyone has any ideas about this, please step forward. It would be great to be able to load program changes without having to move things around to do it.

I can't help with the Wifi idea. I'm one of the uninitiated about how that works. But it's an interesting idea nonetheless.

Yeah, we've gotten pretty far off the path now... and at this point I'm hoping some of the folks that are geared to the technical haven't all dropped off.  Technical stuff starts in a paragraph or two below...

Consolidated Leo posted:

 

I was looking into SD card readers and trying to find out how Arduino binary programs could be uploaded without having to use the IDE. While the SD cards would be a good way to transfer readable program parameters, the bootloader issue is unsettled. There's a whole lot on the net about doing this very thing but it is dated and there doesn't seem to be a concensus of what to use. I'll continue to try to figure that out, at least for myself. If anyone has any ideas about this, please step forward. It would be great to be able to load program changes without having to move things around to do it.

I can't help with the Wifi idea. I'm one of the uninitiated about how that works. But it's an interesting idea nonetheless.

I like the idea of SD cards to transfer programs, or some other nice, clean, approach, but at this point I don't have a good way to do that.  My thoughts right now are to have the unit come pre-programed with the whole list of functions coming below and allow the user to choose which one by setting a set of DIP switches.  I have decided to use an Arduino Nano type board here instead of the smaller and less expensive Pro Mini that I usually favor.  This will leave a USB plug on the device that could be used to update the firmware on the unit if additional features are added later.  The process of doing this would be pretty simple to folks in the know, but may be a deterrent to many.  I expect that I would offer to do this for folks if they don't want to do it on their own.   I'm thinking the best course right now is to make it "easily" reprogrammable if needed, but not too worry much about the average user having to flash the thing.  

As for the Wifi, I would likely use something like an ESP8266 module which is a fantastically powerful little thing.  One could actually use this chip as the uP if they wanted to, but I'm not quite comfortable doing that yet.  If you want to learn a little about that try searching for "arduino ESP8266 webserver".  There is a lot of info out there, though some is more useful than others.  I picked up a dozen of these modules a couple years back when they were first gaining popularity, but haven't played with them in a while now.  None the less they are powerful little things that cost less than $3 each.  


Ok, back to the nuts and bolts...

Right now I'm looking at a basic hardware outline as follows:  An arduino Nano type board will be the brains of the operation.  Each module will have 2 inputs and 2 relays for output.  A set of 8 Dip switches will be used to configure settings. There will be 5 Potentiometers, one for sensitivity adjustment, then a corse and fine adjustment for timing on each of the two circuits.  These might be used to adjust special functions in some cases as well.  Two push buttons will be used to set minimum and maximum limits for functions that require them (ex: X number of laps to trigger).  Terminals will be provided to connect manual-override buttons, this way the user can use whatever style of button they like to match their control panel... or none at all if they like.  A header will be provided to allow for later Wifi connection as well as for connection to other devices if a user wants to interface with the device, The header will provide signals for when a train is on the insulated rail, as well as if the connected accessory is on or off, ex the states of inputs and outputs.  I'm considering placing an RGB LED for each potentiometer to give some feed back of the pot's position, ex green for zeroed, blue for middle, and red for end of travel.  The pots I'm looking at are a 30 turn adjustment and have no stops, so you can keep turning forever, and I think it might be helpful for users to have some kind of feed back of how far they have turned it.  

We're going to end up using quite a bit of I/O here to get everything done so I'm looking at using a 16 bit I2C port expander, giving us 14 more I/O pins than we'd otherwise have.  I think the added functionality is worth an 80 cent part.  All told I think I'm still under $10 in parts, not including the cost of the PCB.  Through OSH Park PCB costs about one dollar per square inch in minimum of 100 sq" orders.  I'd like to find a little less expensive option, but even if we end up at 4 or 5 dollars for the PCB I don't think it will hurt too badly.  As a kit to be assembled the cost would still be easily in the price range I'm hoping for.  I won't know how much of my time it takes to assemble these until I've done a few and have to base an assembled cost on that.  I think it can still be done for around half the price of the detection units offered by the big players.  It is also possible to drop the cost a bit by using some SMT parts, though not a ton.  There really isn't much in the way of parts going on here besides buttons, pots, relays, and screw terminals, none of which can be reduced in size.  It's also possible that I could produce my own circuit boards for a while and that might help drop the parts cost, but would produce a less refined looking product.  

Anyway, at this point heres the features I'm planning for:  

Please pardon my trying to keep things short, if you need better explanations of a function, just let me know.  

1 channel means that each module can only do this option once, it takes both inputs and/or outputs to do.   2 channels means that each module can do this function for 2 separate accessories, each accessory needs only 1 in and out.  

Functions:  

Standard:  2 channels.  Relay turns on whenever triggered, turns off when not triggered. 

Delay turn-off:  2 channels.  As with Standard, but remains on for adjustable time after trigger goes off.  

One-Shot:  2 channels.  Turns on for an adjustable amount of time the moment its triggered then shuts off, regardless if the trigger is still active.  Turns on again the next time trigger is activated.  

Timed Loop:  2 channels.  Turns on when triggered remains on for an adjustable amount of time.  iIf still triggered when time runs out timer is reset and the accessory remains on until the time runs out.  

Alternating output:  2 channels.  First trigger turns on relay,  second trigger turns off relay, repeat.  

Alternating Output (timed duration):  1 channel.   First trigger turns on relay one for an adjustable amount of time.  Second trigger turns on relay 2 for adjustable time.  Repeat.  

Enter-On, Exit-Off (mode 1):  1 Channel.  Turns on when first trigger is activated.  Remains on until second trigger has been activated AND deactivated?  (Still working on this one. Al la PLCProf's suggestion early in the thread.  Need more detail if this is the desired operation?)  

Enter-On, Exit-Off (mode 2):  1 Channel. As above but with timer adjustment to remain on for a duration after the train passes.  

Directional Activation (mode 1):  1 channel.  when input 1 is triggered, then input 2 is triggered, turns on relay 1.  when In 2 is triggered, then In 1, turns on relay 2.  Mode 1 remains on until second trigger is deactivated.  

Directional Activation (mode 2): As above, Mode 2 remains on for adjustable time (one-shot) from when train enters the second block.  

Directional Activation (mode 3): As above, Mode 3 remains on for adjustable time after the train leaves the second block.  

Directional Activation (mode 4): As above, Mode 4 remains on until a train passes in the opposite direction.  

Trolly Stop:  2 channels.  When triggered, turns off power to track for adjustable amount of time.  Power remains on until next trigger.  

Grade Crossing (mode 1):  1 channel.  Begins flashing signal when train enters first insulated section.  Remains flashing until train exits that section.  stops flashing after adjustable time after the train leaves first section.  Trains form opposite direction work the same way. result is the crossing begins flashing some time before the train arrives then turns off quickly after the train has passed, in either direction.  Provides 3 outputs.  One turns on while grade crossing is active, out 2 and 3 alternate on and off. out one can be used for gates and such, 2 and 3 connect to lights.  Speed of flashing is adjustable.  

Grade Crossing (mode 2):  1 channel.  Same as above but only turns on relay for crossing signal, no flashing.  For use with signals that have built in flashing circuits.  

Every X Minutes (Triggered):  2 channels (probably).  Output will only activate once in an adjustable amount of time. Once that time passes it will activate on the next trigger.  (Adjustable in minutes and seconds.)

Every X Minutes (Cycle):  2 channels (probably).  Output turns on for an adjustable amount of time once every X minutes and seconds.  No input triggering needed.  

Frequency options:  (options available for all above functions, even though I don't think many of them benefit from it... but you never know what use someone might come up with for a grade crossing that only activates every 17th lap.)

Every Time:  Every time the trigger is activated the output is activated.  

X Number of Laps:  output is only activated every X number of times the trigger is activated.  Number X is programable by the user.  

Random Number of Laps:  Output is only activated after a random number of times the trigger is activated.  User may adjust the minimum number and maximum number of laps  that the random number will fall between.  

Manual Control Button.  Pressing the button will activate the output as if it's corresponding input was triggered.  Any timers in use work as they would if the trigger input was activated.  


These are what I have right now.  Please feel free to offer other suggestions of comment however you like here, Still in the planning phase right now so making changes is easy.  If I counted right we have 17 different functions so far.  I have room for 32 with the design I'm working with right now.  I plan on keeping at least one in reserve, for the 'wifi enabled' function.  

Well, that's all for now.  Hopefully I can get some idea what everyone thinks at this point.  

JGL

Serenska posted:
Gary E posted:
Serenska posted:

I have a suggestion that isn't as exotic as MP3, TMCC, smartphone connections, etc.

How about creating a circuit that, when activated by a train entering an insulated rail section, causes two separate leads to be energized alternately, for a duration that would follow the other timing settings you've proposed above?  The application I have in mind is causing the lights on an Lionel Postwar 154 Highway Signal to flash alternately.

If you can provide a device which eliminates the use of the wretched 154C contactor, and replaces it with a simple insulated rail trigger, I and a lot of other Postwar guys would beat a path to your door.

Thanks for listening.

Steven J. Serenska

Custom Signals had a nice circuit board to do that function. It could be triggered from either direction. It had the slow on/off blink function for either LEDs or the 154 crossing signal. It also did doubletrack crossings and for the really demanding customers like club layouts had a 3 block operation for each track.

Gary:

Thanks for this, but here's the first sentence from Custom Signals' website:

Dear Customer:

It has been six months since the “doors” at Custom Signals closed.

I appreciate the tip, but it's sometimes tough doing business in our market....

Thanks.

SJS

 

I did say "Custom Signals HAD a circuit board" not has. Just trying to give ideas on what once was.

I have several of those boards installed with Custom Signals crossing flashers. For crossing gates I use the Walthers gates. Replaced the fast acting solenoid with a slow motion Tortoise switch motor. 

The list is more along the lines of scenarios rather than capabilities. That's okay. I was just expecting something like:

  • On delay timer.
  • Off delay timer.
  • On board timer adjustment controls.
  • Dual sense activation/termination.
  • One shot with/without completion timer.
  • Range of activation frequencies.
  • etc.

The way that you've done is more appropriate to be sure to cover everyone's pet feature. Well done!

At this point, I'm wondering about some of the components. For example, What type of relay outputs will be available? Are they SPDT (COM, NO, NC) or DPDT? Will the relays be on-board or spun off to a relay module (what Stan2004 likes to call LEGO style)? Also, will the direction sensing outputs come out of the relays or will there be a logic level output as well?

One more thing about the relays. Will they be signal level or track level contacts (1 amp contacts or 10 amp contacts)?

I like the choice of the nano over the mini pro. Everything I've seen about the mini pro requires that you solder in the programming headers that takes away the advantage of being a bit shorter. Having the USB capability trumps the smaller size as this circuit will not be constrained by space. And I do realize that the PCB size is an important consideration at least in terms of cost.

Anyways,

About a hour later I have a fully functioning Train Direction detector using "simulated isolated rails" Simply take and make a smaller block between the two signaled block. (this could also be used to activate [power on] the next coming signal like how the real world automatic signals in a way)  The program simply uses logic from my Arduino Uno signal controller I made up for the model rr club I belong too.

Here is the logic of it simplified:

If Block One is occupied (HIGH) and the "Island" and Block 2 are not occupied (LOW) either East or West (what I picked) is not lit up.

if Block One is HIGH and island  and block 2 is LOW then Westbound LED is activated

If Block One is LOW and Island and Block 2 are HIGH then Eastbound Signal is activated.

I would imagine with a little more tinkering i could make it print text to a small display but for now I'll await feedback and questions. 

Videos attached to this reply. Note that I am only connecting one wire that is simulating the train entering the Island block before the next block.

Attachments

Videos (2)
Video
Video_1

I think you are talking about what is termed "Approach Lighting" for signals. Wouldn't it be easier to just light up your signals when the block becomes occupied. I get that you are only turning on the signal for the direction of travel. That one function shouldn't be too hard for an Arduino.

Block signals are a funny thing. Because they occur where one block starts and another block ends, you can think of them as both an entry signal and an exit signal. I tend to think of them in terms of entry signals because it's the next block and those that are further ahead that the signal represents. The important thing about approach lighting is that the signal be lit before the train arrives.

Good work!

Consolidated Leo posted:

Block signals are a funny thing. Because they occur where one block starts and another block ends, you can think of them as both an entry signal and an exit signal. I tend to think of them in terms of entry signals because it's the next block and those that are further ahead that the signal represents. The important thing about approach lighting is that the signal be lit before the train arrives.

In reality they are just Entry signals..... 

But anyways this was in rely to the first reply in this thread.

Flyboy62 posted:

I would like to see a trigger when a train passes from one isolated track to the next isolated track in a specific direction.  

Dick

I figured rather than keep adding to the list, lets knock some of these features off. 

gunrunnerjohn posted:

An ambitious list JGL, I think I'd stop designing and start building.   Like you say, with the programmability, you can change and/or expand the functionality.  The more important part at this point, at least IMO, is the I/O provisions to allow you to build the functions that might be desired.

I/O is a bit of a problem but not one that can't be solved.  I'm comparing a couple options still, but I think an I2C 16 bit port expander will solve the I/O concerns.  Most of the inputs are going to be used to select the different features and adjust settings, and most the outputs for programing feedback.  

Consolidated Leo posted:

 

At this point, I'm wondering about some of the components. For example, What type of relay outputs will be available? Are they SPDT (COM, NO, NC) or DPDT? Will the relays be on-board or spun off to a relay module (what Stan2004 likes to call LEGO style)? Also, will the direction sensing outputs come out of the relays or will there be a logic level output as well?

Due to cost considerations I'm looking at SPDT relays.  It looks like I can stick them on board for a couple pennies less than the cost of using pre-made modules, so I think thats the way I'm going to go.  The relays I'm looking at are the exact same ones found on those modules, rated for 10 Amps.  The input will be opto isolated form the uP and will accept logic or track level input. We can get away with quite a bit because high-speed switching is not a concern.  For output, the main output will simply be the NC,NO,Com of the relay, however I plan to also have a header pin out providing the logic level out for folks that want that.  It's possible I could add a jumper to allow the relay to be disconnected.  

christhetrainguy09 posted:

Oh boy this looks like a headache and a half! Some of those features seem a bit redundant .... And some of the features can be done with a isolated rail section without the hours of programming it might take to write the code let alone work out any kinks!

 

Which are redundant and in what way?  I'd be happy to remove features that are not needed.  As for the hours of programing and troubleshooting, it doesn't bother me.  I'm not looking for help programing or debugging my code, only help in figuring out what folks would find useful.  Honestly I can't see any of the listed features taking much more than a hand full of If statements to accomplish.  

On block signals, I had not really thought about that much, and I know there are several products out there for that.  I'm figuring this more for accessory activation than signaling, but could look into signaling later on.  

christhetrainguy09 posted:
I figured rather than keep adding to the list, lets knock some of these features off. <
 

Again, which ones, and for what reason?  If there are things that over-lap, then yea, no point in doing the same thing twice, but I don't see any reason not to program in every option that might be wanted as long as it doesn't require more hardware.  It doesn't cost extra to add lines of code.  


For a general update, I'll be tied up with work for much of the next several days.  It shouldn't matter much as I expect parts to take a couple weeks to arrive.  On that, I've ordered some things to test out; multi-turn pots, some Nano clones, stuff like that.  I Still haven't decided which port expander I want to use, or if I will just use shift registers.  I'm leaning toward the port expander though, because it takes up less board space, but need to look into the overhead the wire library would add to the sketch.  

In my free time over the next couple days I'm going to try writing the code for each of the features and try them out.  I don't expect anything to be particularly difficult, but could be wrong.  

I've thought of a couple more complicated functions, such as involving limit switches for specialized accessories, but I don't think it worth the trouble just yet, instead deciding to leave that for later as well.  


One question more from the operating end than the tech end.  Is the 1.5 second or so boot time after power is applied a problem?  Leaving this there makes it simple for a user to install new updated to the device.  On the other hand, the device can be made to boot instantly at the expense of requiring an additional piece of hardware to reprogram with new firmware.  

JGL

 

Functions:  

Standard:  2 channels.  Relay turns on whenever triggered, turns off when not triggered. 

Delay turn-off:  2 channels.  As with Standard, but remains on for adjustable time after trigger goes off.  

One-Shot:  2 channels.  Turns on for an adjustable amount of time the moment its triggered then shuts off, regardless if the trigger is still active.  Turns on again the next time trigger is activated.  

Timed Loop:  2 channels.  Turns on when triggered remains on for an adjustable amount of time.  iIf still triggered when time runs out timer is reset and the accessory remains on until the time runs out.  

Alternating output:  2 channels.  First trigger turns on relay,  second trigger turns off relay, repeat.  

Alternating Output (timed duration):  1 channel.   First trigger turns on relay one for an adjustable amount of time.  Second trigger turns on relay 2 for adjustable time.  Repeat.  

Enter-On, Exit-Off (mode 1):  1 Channel.  Turns on when first trigger is activated.  Remains on until second trigger has been activated AND deactivated?  (Still working on this one. Al la PLCProf's suggestion early in the thread.  Need more detail if this is the desired operation?)  

Enter-On, Exit-Off (mode 2):  1 Channel. As above but with timer adjustment to remain on for a duration after the train passes.  

Directional Activation (mode 1):  1 channel.  when input 1 is triggered, then input 2 is triggered, turns on relay 1.  when In 2 is triggered, then In 1, turns on relay 2.  Mode 1 remains on until second trigger is deactivated.  

Directional Activation (mode 2): As above, Mode 2 remains on for adjustable time (one-shot) from when train enters the second block.  

Directional Activation (mode 3): As above, Mode 3 remains on for adjustable time after the train leaves the second block.  

Directional Activation (mode 4): As above, Mode 4 remains on until a train passes in the opposite direction.  

Trolly Stop:  2 channels.  When triggered, turns off power to track for adjustable amount of time.  Power remains on until next trigger.  

Grade Crossing (mode 1):  1 channel.  Begins flashing signal when train enters first insulated section.  Remains flashing until train exits that section.  stops flashing after adjustable time after the train leaves first section.  Trains form opposite direction work the same way. result is the crossing begins flashing some time before the train arrives then turns off quickly after the train has passed, in either direction.  Provides 3 outputs.  One turns on while grade crossing is active, out 2 and 3 alternate on and off. out one can be used for gates and such, 2 and 3 connect to lights.  Speed of flashing is adjustable.  

Grade Crossing (mode 2):  1 channel.  Same as above but only turns on relay for crossing signal, no flashing.  For use with signals that have built in flashing circuits.  

Every X Minutes (Triggered):  2 channels (probably).  Output will only activate once in an adjustable amount of time. Once that time passes it will activate on the next trigger.  (Adjustable in minutes and seconds.)

Every X Minutes (Cycle):  2 channels (probably).  Output turns on for an adjustable amount of time once every X minutes and seconds.  No input triggering needed.  

Frequency options:  (options available for all above functions, even though I don't think many of them benefit from it... but you never know what use someone might come up with for a grade crossing that only activates every 17th lap.)

Every Time:  Every time the trigger is activated the output is activated.  

X Number of Laps:  output is only activated every X number of times the trigger is activated.  Number X is programable by the user.  

Random Number of Laps:  Output is only activated after a random number of times the trigger is activated.  User may adjust the minimum number and maximum number of laps  that the random number will fall between.  

Manual Control Button.  Pressing the button will activate the output as if it's corresponding input was triggered.  Any timers in use work as they would if the trigger input was activated.  


These are what I have right now.  Please feel free to offer other suggestions of comment however you like here, Still in the planning phase right now so making changes is easy.  If I counted right we have 17 different functions so far.  I have room for 32 with the design I'm working with right now.  I plan on keeping at least one in reserve, for the 'wifi enabled' function.  

Well, that's all for now.  Hopefully I can get some idea what everyone thinks at this point.  

JGL

Grade crossing can be reduced to just one: If you're only allowing one channel for this feature you have to go old school and use a 555 timer to activate "flashing" LED's Timing is adjusted with capacitors on the 555 timers.

"Standard" , "Everytime" and "Enter-On, Exit-Off" seem the same to me, trigger is tripped item on, trigger off item off

Most of these can be done with a relay and isolated rail and a adjustable pot for timing delay.

 

 

christhetrainguy09 posted:

Grade crossing can be reduced to just one: If you're only allowing one channel for this feature you have to go old school and use a 555 timer to activate "flashing" LED's Timing is adjusted with capacitors on the 555 timers.

"Standard" , "Everytime" and "Enter-On, Exit-Off" seem the same to me, trigger is tripped item on, trigger off item off

Most of these can be done with a relay and isolated rail and a adjustable pot for timing delay.

 

 

 For the grade crossing, yes, it could be just one, if folks want to have to add their own flasher circuit.  There is no point in adding a 555 and associated parts here as the uP can do the job with no additional parts.  In my mind, the version that has the flasher built in would be more useful to more people, and the mode that just turns on and off is a throw-in for folks that already have flasher circuits or signals that have them built in.  To get a prototypical activation, where the signal turns on well before the train arrives at the crossing, but turns off shortly after it passes, requires two insulated rails, one on either side of the grade (for two-way operation, anyway).  Since both inputs are tied up anyway, we may as well use both relays and offer a flasher.  

Note that "Every time" is not a function, but a frequency option.  

As for the enter-on, exit-off, this is different than the standard in that it uses two insulated sections.  I'm a little confused on this one myself, but it was mentioned and has yet to be elaborated on.  I expect this would be most useful if instead of using insulated rail one was using IR devices that have only a small detection area.  

There are some things I listed separately that are really the same thing, such as standard and delay turn off.  You get standard if you turn the delay to zero, for example.  

JGL

 For the grade crossing, yes, it could be just one, if folks want to have to add their own flasher circuit.  There is no point in adding a 555 and associated parts here as the uP can do the job with no additional parts.  In my mind, the version that has the flasher built in would be more useful to more people, and the mode that just turns on and off is a throw-in for folks that already have flasher circuits or signals that have them built in.  To get a prototypical activation, where the signal turns on well before the train arrives at the crossing, but turns off shortly after it passes, requires two insulated rails, one on either side of the grade (for two-way operation, anyway).  Since both inputs are tied up anyway, we may as well use both relays and offer a flasher.  
 

I agree, but you have to be careful about driving 4-8 LEDs on 2 arduino channels (20ma/channel I believe), unless you are going to give each LED its own pin. And if the end user has a older lionel bulb style (154??) flasher that will require 2 relays to trigger bulbs to flash. So really you could consumer a arduino just for making a prototypical flasher circuit with time delays.   

As described above, the proposed device already has two relays on board.  My thought is to have one relay remain on while the crossing is active, and the other toggle on and off.  The steady relay will apply power to the common of the other to provide for flashing lights, but can also be connected to crossing gates.  

In NO case will Arduino pins be connected to anything in the outside world.  For most users, the relays will provide on/off functionality for whatever device is connected.  For the rare user that wants a logic-level output for connection to some other device, the logic level output will be isolated from the uP with an optocoupler.  The uP will only ever be driving LEDs and optocouplers (more LEDs)

Anyway, consolidating the list, Standard and Delay turn-off are the same thing.  Both modes of Enter-on/Exit-off look like they are the same as well.  Finally, mode 1 and 3 of the directional function are the same.  

JGL

Getting back to this after having a couple days to mess around...

christhetrainguy09 posted:

Im just trying to help you cut cost a little. Unless you plan on building this "lego" style (using  Shields, relay boards) and not having one pcb with everything on it in the end? 

 

I think I have the costs down as much as possible at this point while being able to offer features that other currently available products do not have.  At this point PCB space is the most expensive thing going.  A tactile push-button costs a penny.  The PCB real estate under that button costs about 6 cents.  And no, the plan is a fully self contained board, though I'm still up in the air on using a relay module or placing them on the board.  I can match costs either way right now.  


I built a test rig on solder-less breadboard with parts I have on hand, mostly as something to use while writing code.  I'll post a pic later is anyone cares.  The basis set up is using a ProMini as the brains, and a second ProMini acting like an I2C port expander for additional IO.  I expect to replace the second uP with a proper port expander chip later on.  I used a couple push buttons to simulate insulated rails for now, and didn't bother with any isolation here.  

Many hours, and about 35 pages of code later (just under 16KB right now),  I have all of the discussed features working on the test rig.  I made a couple changes from the above list, combining some things that essentially did the same thing, and adding one or two that made sense while coding.  More than half of the work was in writing the overhead that is used by all of the various functions.  Ex:  reading in adjustment and programing data and saving it, selecting options, and the like. That also take up half the memory used.  

As of now the main thing remaining is to add the ability for a manual override button on each of the features, as I forgot about that when writing each routine.  Theres a couple other tweaks to finish, but I'd say the code is a good 90% right now, and as a proof of concept it seems pretty sound.  

At this point I've also dropped the idea of an external programer.  Everything I set out to accomplish was doable without one thus far.  The hardware support is still in the plan, but the software will have to wait. For now, my thought is that if anyone needs some custom firmware, it will be simpler to write that on it's own and mail them a pre-loaded uP.  

Anyhow, I'll probably get a photo or video up pretty soon, once I finish up the code.  Then its PCB design time, I suppose.

JGL

 

JohnGaltLine posted:

Getting back to this after having a couple days to mess around...

christhetrainguy09 posted:

Im just trying to help you cut cost a little. Unless you plan on building this "lego" style (using  Shields, relay boards) and not having one pcb with everything on it in the end? 

 

I think I have the costs down as much as possible at this point while being able to offer features that other currently available products do not have.  At this point PCB space is the most expensive thing going.  A tactile push-button costs a penny.  The PCB real estate under that button costs about 6 cents.  And no, the plan is a fully self contained board, though I'm still up in the air on using a relay module or placing them on the board.  I can match costs either way right now.  


I built a test rig on solder-less breadboard with parts I have on hand, mostly as something to use while writing code.  I'll post a pic later is anyone cares.  The basis set up is using a ProMini as the brains, and a second ProMini acting like an I2C port expander for additional IO.  I expect to replace the second uP with a proper port expander chip later on.  I used a couple push buttons to simulate insulated rails for now, and didn't bother with any isolation here.  

Many hours, and about 35 pages of code later (just under 16KB right now),  I have all of the discussed features working on the test rig.  I made a couple changes from the above list, combining some things that essentially did the same thing, and adding one or two that made sense while coding.  More than half of the work was in writing the overhead that is used by all of the various functions.  Ex:  reading in adjustment and programing data and saving it, selecting options, and the like. That also take up half the memory used.  

As of now the main thing remaining is to add the ability for a manual override button on each of the features, as I forgot about that when writing each routine.  Theres a couple other tweaks to finish, but I'd say the code is a good 90% right now, and as a proof of concept it seems pretty sound.  

At this point I've also dropped the idea of an external programer.  Everything I set out to accomplish was doable without one thus far.  The hardware support is still in the plan, but the software will have to wait. For now, my thought is that if anyone needs some custom firmware, it will be simpler to write that on it's own and mail them a pre-loaded uP.  

Anyhow, I'll probably get a photo or video up pretty soon, once I finish up the code.  Then its PCB design time, I suppose.

JGL

 

Sounds like you been a busy guy!

- Have you got a schematic drawn up? 

- are you going to have it all on one PCB? or is it plug and play boards that plug into the pro-mini boards?

christhetrainguy09 posted:

Sounds like you been a busy guy!

- Have you got a schematic drawn up? 

- are you going to have it all on one PCB? or is it plug and play boards that plug into the pro-mini boards?

More busy with work than this, but yes, I put some time into it.  I don't have a schematic right now, but will have one at some point.  Likely after I order some parts and prove everything plays together the way it is supposed to.  In any case the circuit is pretty straight forward.  Power supply, optocouplers, pots, relays, switches, etc.  All simple stuff from an electronics point of view.  All the heavy lifting is done by the uP.  The basic set-up will be similar to the schematic I posted in This thread.  

The plan is to have one board with screw terminals for all the connections.  The Arduino would mount in a header socket so that it could be removed and replaced with an updated one if needed.  I haven't gotten any feed back yet one way or the other about the question I asked on boot-up time, but I think I'm going to error on the side of making a better design over making it easy for people to update at home.  Because of this the on-board USB is not needed as it can't be used anyway to program an ATMega without a boot loader.  

I've found a supply of the same relays used on the cheap modules at a fair price, so I'm going to give a try ay including them on board.  As mentioned earlier, the expensive thing is space on the PCB, not the actual parts going on it. There isn't any point in going SMT however since most of the space-taking parts are through-hole anyway.  Anyway, I'll fumble around with the PCB layout once I have the parts, and after everything is tested out.  

JGL 

 

JGL: What has happened to this project?

There is currently an effort among the electrical group to create a list of all the projects developed on the forum for DIY builds and generally available as PCB designs. I remembered this discussion and brainstorming session and thought that it would be great to include something from the Arduino or microprocessor camp in the list. They are also planning to resurrect some projects that were never completed.

If you've got any interest in taking another run at this idea, I'd be happy to lend support. Just let me know.

I hope all is well with you.

  -- Leo

Life has been happening and I haven't had much time for the various projects I've prototyped lately, however I would like to get back to some of them.  I'll go check out the other thread and see about listing the various things I've got in various states of progress.  

As for this one, it's just a matter of laying out a schematic and PCB and such as the programing, prototype, and, such all worked just fine. 

I use KiCad for PCB and Schematic design, a free, open source, program that is comparable to many of the expensive programs out there, though it does have some quarks to work around.  Once you get past the initial learning curve it is pretty straight forward. KiCad site here.

After reading the other thread it seems more a place for finished projects, of which I don't have any at present that serve more than a single use case.  At present I have three projects that I'd like to finish:

The multi-function detector posted in this thread, which really just needs a bit of time to lay it out and put together a parts list and instructions.  

The biggest project in the works is my TMCC to LionChief control bridge.  This is mostly complete, but I'm hung up on a bug where switching from one LC engine to another sometimes doesn't work correctly. The bridge is also frustratingly expensive to build owing to having to rip apart a universal remote to build it. When I get back to this I may do another thread for feedback on cost vs functionality/ease of use questions. 

The last project that seems like it could be useful is the cruise control board for LionChief engines that I prototyped.  The principle worked fine, but I need to work on the design to make it practical to fit inside an engine.  

I'm hoping to have a little free time over the holidays then a bit more come March where I can try to finish these all up and people can do what they want with them.  

 

I use KiCad for PCB and Schematic design, a free, open source, program that is comparable to many of the expensive programs out there, though it does have some quarks to work around.  Once you get past the initial learning curve it is pretty straight forward. [obsolete web site link]

In your post above you have a link to the obsolete KiCad web site.  The new web site is just “kicad [dot] org” and there are warnings not to go to the old web site due to an ownership change.  


Please take a minute to edit the link in your post.

Thank you,

Post
×
×
×
×
Link copied to your clipboard.
×
×