Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

May I introduce.....

2218 views
14 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    November 2016
  • 196 posts
May I introduce.....
Posted by khier on Friday, October 25, 2019 7:26 AM

..... my DIY DCC coach lighting decoder.

 

The decoder is based on Attiny85 micro controller and 7-channel darlington transistor array IC. The decoder is intended to control internal lights of passenger and dining coaches. It has a directional lighting control for motor coaches, driving trailers and trailing wagons. It supports service mode and capable of having 14 bit (long) address as well as conventional one byte addressing. It measures only 13x18 mm hence fits easily in H0 rolling stock. The project started originally as a fun project, but it also saves money for other investments. I have not calculated the cost down to the single penny, but each decoder costs 3-4 $US.

Enjoy.

Walid

https://www.youtube.com/watch?v=eNPl_lrVsxU

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Friday, October 25, 2019 11:32 AM

Walid:

That is very interesting! Excellent use of your electronics skills.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    November 2016
  • 196 posts
Posted by khier on Friday, October 25, 2019 2:31 PM

Thanks, Dave, for your nice words. Actually my intention was to share the knowledge and offer my support if anyone is interested, but I do not mind words of praise Big Smile

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Saturday, October 26, 2019 12:12 AM

Walid,

Do you have a schematic and a components list? I can build the stuff. I just don't understand how it works.DunceLaugh

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    November 2016
  • 196 posts
Posted by khier on Saturday, October 26, 2019 1:54 AM

Dave, yes, I have the PCB design and I can prepare components list. You will need to program an Attiny85. I can send you the hex cone needed if you have the equipment to do that.

  • Member since
    November 2016
  • 196 posts
Posted by khier on Saturday, October 26, 2019 2:17 AM

Dave,

You will need the following:

-------------------------------------------------------------

1K                          R1206        RESISTOR

22UF                      C1206K       CAPACITOR                                           

78L05                    SOT89        POSITOIV-VOLTAGE REGULATORS

100NF                   C1206K       CAPACITOR           

ATTINY85              8S2          8-bit AVR Microcontroller 

D1                        ZENER-DIODESOD80C  SOD80C                                            DBS101G              DBS          Single Phase 1.0 AMP Bridge Rectifier

ULN2003              SO16         DRIVER ARRAY  

 

The PCB Files will follow.

 

Regards

Moderator
  • Member since
    June 2003
  • From: Northeast OH
  • 17,249 posts
Posted by tstage on Saturday, October 26, 2019 2:39 AM

khier
100nF and 22uF. Both SMD 1206

Walid,

I assume these are capacitors?

Tom

https://tstage9.wixsite.com/nyc-modeling

Time...It marches on...without ever turning around to see if anyone is even keeping in step.

  • Member since
    November 2016
  • 196 posts
Posted by khier on Saturday, October 26, 2019 3:11 AM

Yes indeed. Writing using the cell phone is not my strong point. I missed the word capacitor.

tstage
khier
100nF and 22uF. Both SMD 1206

Walid,

I assume these are capacitors?

Tom

  • Member since
    November 2016
  • 196 posts
Posted by khier on Saturday, October 26, 2019 4:59 AM

hon30critter

Do you have a schematic and a components list?

 




Dave, 

Here are the schematic and board design
   
 
 
 
 
  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Saturday, October 26, 2019 10:28 PM

Thanks Walid,

I have to confess that I have to take back my claim about being able to "do it". I can solder components to a perf board but making my own circuit boards is way beyond anything I will try. I totally admire your work but it is so far over my head that I'm dizzy looking at it!  I do hope that others can make use of your information. Thank you for taking the time to document your work.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    November 2016
  • 196 posts
Posted by khier on Sunday, October 27, 2019 5:27 AM

Dave, 

 

I am not trying to pursuade you with anything, I am just trying to clarify a couple of things:

You can fix the components to a prototyping board it will be only larger in size.

I can provide you with the Gerber files used to make the PCB. Any PCB service shop will convert the design to board for you.

 

I have a plenty of bare PCB boards. I can send you one (enough for 35 decoders) for the production cost I paid (about 7.5 EUR) plus shipping. You can solder the components yourself.

All these are trivial, the critical issue in my opinion is if you can program the attiny (with a code I provide you with), and to gear it up to 8MHz.

Regards

Walid

 

PS. The above applies to any forum member interested in a DIY decoder.

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Sunday, October 27, 2019 1:01 PM

 It's actually a lot easier than I ever thought it would be, with modern services and software. I only recently made my first PCBs, despite graduating with a degree in electrical engineering more than 30 years ago.

 There are some PCB makers that will even assemble SMD boards for you, for a ridiculously low price - as long as you are using standard components. 

 I actually have a programmer for the Tiny85, although it's for the 8 pin DIP version. I plan to use them in my structure lighting - I like distributed operation compared to Mel's use of one big Arduino running the whole thing. I didn't design it though - the schematic is all over various Arduino forums as it is the circuit that goes with the sketch that turns the Arduino into a programmer for other microcontrollers. That one I built on a perf board that I got a stack of that are in the form factor for an Arduino shield board for the standard Uno. It's also the basis of the one I built and had a PCB made that is designed to program the bigger ATMega 328, which is the controller I am using for my servo controller and for my CMRI nodes for the block detectors, signals, and turnouts. 

                                       --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Sunday, October 27, 2019 11:33 PM

khier
I am not trying to pursuade you with anything, I am just trying to clarify a couple of things: You can fix the components to a prototyping board it will be only larger in size. I can provide you with the Gerber files used to make the PCB. Any PCB service shop will convert the design to board for you.   I have a plenty of bare PCB boards. I can send you one (enough for 35 decoders) for the production cost I paid (about 7.5 EUR) plus shipping. You can solder the components yourself. All these are trivial, the critical issue in my opinion is if you can program the attiny (with a code I provide you with), and to gear it up to 8MHz. Regards Walid

Hi Walid,

I didn't feel any pressure so no need to worry about trying to persuade me.

I figured that the decoder could be built on a larger board but that kind of defeats the ability to fit it in small spaces.

I'll be honest with you. Right now I have more than 18 separate projects on my 'to do' list for the club and a couple of friends. Each of those projects will take a considerable amount of time to complete. For example, I have to build more than 60 HO Search Light signal heads and that is only part one of building the signals. I also have to build four bridges, both steel and wood, totalling more than 1200 scale feet. I also have to get back to building the Huntsville station. The list goes on. For that reason I think it would be foolish of me to start to get into electronics of this nature at this time despite how interesting I find it to be.

Having said that, I think that it is great that you have offered to share this project with other modellers. That is very generous of you.

Take care Walid!

Cheers!!

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    November 2016
  • 196 posts
Posted by khier on Monday, October 28, 2019 3:56 AM

hon30critter
Right now I have more than 18 separate projects on my 'to do' list



Hahaha.... join the club....

Actually the reason why I am so proud of this decoder is because it is the only project I finished out of the already started ones and the others still floating in mind.

Regards

Walid

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Monday, October 28, 2019 7:09 AM

 Join? I'm a founding member! Going to be interesting when I unpack all the previous "waiting to be built" projects and combine them with everything I've acquired since. In addition to the electronic projects - which just might take a hit because I finally got a good bid for redoing my basement so that will start up hopefully next week, which means soon it will be time to start building an actual layout again.

                                    --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!