Geoff Bunza geoffb

SMA35 Interactive DCC Decoders IDEC The Next Generation - Sequencing Movement Sound & Lighting v1.08  https://forum.mrhmag.com/post/sma35-interactive-dcc-decoders-idec-the-next-generation-sequencing-movement-sound-lighting-v1-08-12216854  describes the construction and use of a new series of low cost decoders that interact with the environment around them (significantly more than in the past). The library of 13 or more decoders represents more than 12,000+ lines of code and some more sophisticated design constructs than usual. I had been asked before if there was any internal documentation for the prior SMA20 series of decoders, but I have neglected detailing the internal operation of nearly all my technical efforts thinking that no sane modeler would ever be interested in pursuing this. This article, therefore, represents a token effort on my part to placate the severely inflicted modelers among us that strive for every morsel of operational information – for whatever purpose. I hope someone, somewhere finds this of interest. Otherwise, it will be an ongoing reminder to jog my memory years from now, when some modeler rediscovers the SMA35 decoder series, asks some intricate, obtuse question, and requires me to fire up that one tiny brain cell remaining which remembers how I built these things!

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
Geoff Bunza geoffb

Comments on SMA35 and with Lessons Learned(?) re:SMA20 Decoders

These notes are specifically written for those modelers who want to know a bit more about the internals of the IDEC decoders. Modelers only interested in their end use can ignore this (and maybe should for their own sanity).

To make it easier for those interested, and keep this more compact, you can download this blog as pdf here:
pdfSMA36_IDEC_Principles_of_Operation.pdf

IDEC.jpg 
The IDEC generation of decoders have some interesting differences:

--They have multiple external switch inputs directly to the DCC decoder which control its operation
--They combine both decoder DCC function controls and input switches in a defined, predictable manner
--They have a master disable for the entire decoder
--They can be powered directly from DC (+5 or +12 Volt power) to operate independently of any DCC bus
--They can be set up to operate on power up, independent of any DCC commands
--They have  programmable CV variables which can be accessed dynamically (with immediately visible results) 
    as a mobile decoder and then operate independently of a DCC bus, different from the SMA20 series
--They combine interactive motor control, playing selected sound tracks, and lighting control
--They can switch LEDs/pins, combinations of pins, set servos, and play audio tracks
--Some decoders can support 1,2,3 or 4 audio players, each with 2 channel, near stereo quality sound
--Some decoders support up to 10 independent, non-interfering timing chains of differing events
--An IDEC Sound Set decoder can play up to 10 sound sets simultaneously with independent timing, each with
   5 groups of CV controlled timing delays (from 1/1000 of a second to 255 minutes – 4 hours 15 minutes),
   independent volume control, and a selection of 254 sound tracks; each sound set can directed to 1-4 players,
   or a random track can be selected at any time from a specified group of tracks
--An IDEC Switching Set decoder can run up to 10 Switch sets simultaneously with independent timing, each
   with 5 groups of CV controlled timing delays (from 1/1000 of a second to 255 minutes – 4 hours 15 minutes),
   with independent parameterized commands, controlling any of 8 Switch pins, by single pin or in groups, with
   direct, random, weighted random, alternating pairs, with sound generation, servo control, and daisy chaining
   switch sets to create up to a timed chain of 45 controlled events
--An IDEC Large Switching Set decoder can run up to 2 Switch sets simultaneously with independent timing,
   each with 25 groups of CV controlled timing delays (from 1/1000 of a second to 255 minutes – 4 hours 15
   minutes), with independent parameterized commands, controlling any of 8 Switch pins, by single pin or in
   groups, with direct, random, weighted random, alternating pairs, with sound generation, servo control, and
   daisy chaining switch sets to create up to a timed chain of up to 49 controlled events
--A user switch can enable the listing of most all configurable CVs to the serial connection on power up

Many of these things are obviously new “features” but many were stimulated by experiences using many of the SMA20 decoders. These new decoders were built to instrument buildings, scenes, and animations around a layout.

I hope it is of help to those interested. As things evolve, and if there is any interest, I may add to these comments in the future.

Have fun!  [smile]
Best regards,
Geoff Bunza

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
James Maxted

New CAD software

Geoff;

Now that EAGLE has been absorbed by AutoCAD and is only available by subscription, do you have any ideas about a difference schematic capture/PCB layout application?

James Maxted

Reply 0
taholmes160

Following

Following this thread -- interested to see the build plans

Reply 0
Geoff Bunza geoffb

@Tim re:Build Plans

Hi Tim,

The "build plans" are to be found in excruciating detail here:
SMA35 Interactive DCC Decoders IDEC The Next Generation - Sequencing Movement Sound & Lighting v1.08
https://forum.mrhmag.com/post/sma35-interactive-dcc-decoders-idec-the-next-generation-sequencing-movement-sound-lighting-v1-08-12216854

This SMA36 "Principles of Operation" is color commentary for those who seek additional pain! 

Have fun! 
Best regards,
Geoff Bunza

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
taholmes160

LOL

LOL -- I think I'll go for minimum pain!

 

TIM

Reply 0
anno

my conclusion

I did find you project about 2 months ago. i did order a couple of arduino pro mini's and some other components. When i did get it i assembeld it, it was somewhat dificult to reed you documents, i did missed so steps so i needid you overreed you post alot of times and soughts online to more examples.

My first attempt and second and...... i din't get it working on a ecos lokprogrammer and ecos 2. There arduino didn't react on dcc commandos. 

Today i did the next attempt but this time with a arduino nano. And eureka it works. So my me i can't get the pro mini working but i do get it working with a arduino nano. Now i need to know how to get the leds dimmable. 

Ow and last the arduino is't programmeable though cv's on ether the ecos 2 or esu lokprogrammer, why? The arduino gets on and off and on when trying to write a cv. The bootup time of you code is way to long. 

If you want to help me, you are welkom. I did post this out of some fustration and to let my experience know.

Reply 0
Geoff Bunza geoffb

@Anno re: Comments

Hi Anno,

First, if you are using the SMA20 series of decoders, please place your questions and comments in   SMA20 Low Cost 17 Channel DCC Decoders Ver 6.01 with Sound,Triggered Sound,Stepper,Dual Motor,LED and Servo Control  https://forum.mrhmag.com/post/sma20-low-cost-17-channel-dcc-decoders-ver-6-01-with-soundtriggered-soundstepperdual-motorled-and-12201920  or if you are using any of the IDEC SMA35 decoders please place your comments and questions here: SMA35 Interactive DCC Decoders IDEC The Next Generation - Sequencing Movement Sound & Lighting v1.08  https://forum.mrhmag.com/post/sma35-interactive-dcc-decoders-idec-the-next-generation-sequencing-movement-sound-lighting-v1-08-12216854  and only place comments here if they are only specific to the added IDEC Principles of Operation. In other words please place your comments and questions in the specific context.

Quote:

Today i did the next attempt but this time with a arduino nano.

That's great. Did you use an 8MHz Pro Mini by chance? It likely will not work at all or work intermittently, same for a 3.3V Pro Mini. How did you connect the DCC interface to the Nano? What sketches did you try to use that did not work?

Quote:

Ow and last the arduino is't programmeable though cv's on ether the ecos 2 or esu lokprogrammer, why? The arduino gets on and off and on when trying to write a cv.

What decoder sketches are you trying to use and have you made any modifications to them? All my decoders can only be programmed in Ops Mode Programming on the main. They will not program on the programming track with DCC service mode programming. This is well documented. How are you trying to program them and do you get any errors reported?

Quote:

The bootup time of you code is way to long.

What decoder sketches exhibit long boot times? What is "long?" Some of the decoders check all output ports and will reset attached servos one at a time to limit peak power demands. These can be eliminated if you have some overwhelming desire to shorten the power up sequence.

Since it sounds like these are your early trials with these decoders, start with the simplest one in the SMA library: Dec_17LED_1Ftn which is a mobile decoder with 17 switched outputs that you can test with resistor equipped LEDs and has a minimal number of CV's (like an address). Get that working first. The IDEC decoders tend to be much more complicated and have many more CVs. Then load the Dec_17LED_6Ftn decoder which is configurable for each pin and see if you can change the CV's. Please remember that in the SMA series there are several CVs that are only read on power-up, so after changing the CV you will need to power cycle the decoder. Also realize that after loading your decoder sketch the first time, you should change:
// ******** UNLESS YOU WANT ALL CV'S RESET UPON EVERY POWER UP
// ******** AFTER THE INITIAL DECODER LOAD REMOVE THE "//" IN THE FOOLOWING LINE!!
//#define DECODER_LOADED

to

// ******** UNLESS YOU WANT ALL CV'S RESET UPON EVERY POWER UP
// ******** AFTER THE INITIAL DECODER LOAD REMOVE THE "//" IN THE FOOLOWING LINE!!
#define DECODER_LOADED

otherwise power-up will reset all the CVs to their original values listed in the sketch, much like a "factory" reset.

If you still have questions please ask in the appropriate article comments section(s).
Have fun! 
Best regards,
Geoff Bunza

 

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
Reply