Jump to content

Quick question ...


Martijn Meerts

Recommended Posts

Martijn Meerts

... before I splash out a bit of cash that could possibly help the entire Japanese model train community ;)

 

I'm considering buying the required equipment to design and manufacture (on small scale) circuit boards. I can quite easily get an etching tank that can etch 2-sided circuit boards, as well as a simple programmer to program the most common IC's used for home-built digital control. I've already found a place where they have available all the schematics, component lists, and IC firmware (where required) for a central, booster, turnout decoder, feedback etc. available for free.

 

While I'm not necessarily planning on using that stuff, my intention of the circuit board etching tank is to make replacement lighting boards for loco's that make it easier to connect them to decoders (think a couple of large solder pads that are clearly marked), as well as car lighting strips with a function decoder built-in.

 

What I wanted to ask though, has anyone ever come across any kind of schematics/documentation/etc. for making your own DCC function decoders? What I need is real simple actually. A function decoder with a programmable address, and possibly a programmable light intensity, and only 1 output with around 150mA would be enough (that gives you 4-5 LED's per car. I'm sure it'd be doable to design a circuit board that would allow easy placement of SMD LED's as well as making them easy to install. But being able to integrate the function decoder in the lighting board would be rather crititcal.. (I know they exist already, but they're just too expensive to light multiple 16 part shinkansen)

 

 

Anyone any thoughts/ideas/tips? =)

Link to comment
Martijn Meerts

Obviously, if I buy the stuff I'll gladly make things for everyone here =) The idea isn't to make money from it, so it would only be material cost + shipping.

 

I'm a bit worried about the programmable IC's, the small ones used on locomotive and function decoders usually require a special device to program. The one I can get for a fair price is somewhat limited to what it can program.

Link to comment

Count me in for any assistance I can provide... The accessory decoders I purchased of eBay seem pretty simple... it'd just be the real-time software on the processors that would be the challenge... but I'd love to dig in to it.

 

Programming a surface-mount IC could be a real pain though... unless you can get one that fits in the smaller sockets where the IC has pins on all 4 edges... actually, how the hell do they actually program them? Blu-tac and a boards with soldered pads to stick it down to? ;)

 

This sounds like heaps of fun!

Link to comment
Martijn Meerts

Steven, I'm trying to avoid the really small IC's because they require a more expensive (probably quite a lot more expensive) device to program. I have the tools to manually solder those things though, I have a rather good soldering station which is designed for soldering small things.

 

Anyway, my main interest is the function decoder for lighting boards. Making your own loco decoders is probably doable, but I doubt they'd be much cheaper than lenz/digitrax, especially if you count in all the hours to build them. Turnout decoders and occupancy detectors and such are of course very doable.

 

Eventually I'd like to be able to add lights in all my passenger cars/trains, but with regular lighting boards and seperate function decoders, it'd get far too expensive. In a Tomix 16-car shinkansen with 2 motor cars, I'd need 2 loco decoders for the motor cars, 2 function decoders for the end cars and 12 function decoders for the lighting. Those 12 for the lighting can be really simple, so I don't feel like paying 20 USD a piece for those ;)

Link to comment

Martjin,

 

Continuing on with this... Do you have an IC already in mind (And price?)? You'd want a rectifier set up on board to convert to DC and then transistors to manage the voltage cutting to the functions... as long as the current draw isn't too high...

 

I might look into the sites tonight that Capt posted previously... I'm curious if they use the inputs on ICs directly to the tracks and then just set up a timer to read the bits... you'd then just have to get in sync with the DCC commands and determine the address and request.

Link to comment
Martijn Meerts

Don't have any IC in mind yet. I would say though, the one that is the easiest to use to get the job done ;) Some sort of SMD IC would be best, but I haven't come across an affordable programmer for those. Even the common IC's would work though, the advantage is that the lighting board has plenty space, and it won't be very visible from the outside regardless of what components are used.

 

While I do know a bit of programming, assembly isn't something I know a lot of, so I'd either need help, experiment a lot, or "borrow" some code =)

 

 

Now that I think about it though, I'd need to come up with something that makes the light burn more evenly in the cars, so you don't see 4 bright spots (when you use 4 LEDs for example)

Link to comment
CaptOblivious

I've done a little programming on the bare iron, as it were. Not much, mind, but I had a course in Motorola 68000 assembly. These days there are better choices though; GCC has been ported to just about every microcontroller under the sun, for example, so C is often a good choice. Too, many popular microcontrollers have their own dev environments, too.

Link to comment
Martijn Meerts

Just had a quick look, Lenz uses a PIC16F628A for their function decoder. I believe that's a VERY common PIC and programmable by a LOT of devices. Not sure if its still widely available, it might have been replaced by a newer version, but I have come across the thing at prices of around 1-2 USD a piece with rather large discounts when ordering 100+.

 

Either way, the PIC comes in various forms, including an SMD version. I also believe it can control LEDs directly, since it can output 25mA on at least 1 pin. Not sure it can deliver that 25mA on multiple pins though. If it can, you could actually add some simple lighting effects where you can turn on and off seperate LEDs for example.

 

 

If we can somehow get this to work, I think we'd be able to make digitally controllable lighting boards that are easy to install for probably less than 10 USD per board. Still expensive to light a 16-part shinkansen, but much more interesting than having to buy lighting board and function decoder separately =)

Link to comment
CaptOblivious

Just had a quick look, Lenz uses a PIC16F628A for their function decoder. I believe that's a VERY common PIC and programmable by a LOT of devices. Not sure if its still widely available, it might have been replaced by a newer version, but I have come across the thing at prices of around 1-2 USD a piece with rather large discounts when ordering 100+.

 

Either way, the PIC comes in various forms, including an SMD version. I also believe it can control LEDs directly, since it can output 25mA on at least 1 pin. Not sure it can deliver that 25mA on multiple pins though. If it can, you could actually add some simple lighting effects where you can turn on and off seperate LEDs for example.

 

 

If we can somehow get this to work, I think we'd be able to make digitally controllable lighting boards that are easy to install for probably less than 10 USD per board. Still expensive to light a 16-part shinkansen, but much more interesting than having to buy lighting board and function decoder separately =)

 

So, where do we stand on this? I'm very interested in having lighting decoders that can power directional head- and taillights using only two wires (ala the Lenz LF101FX)…

Link to comment
Martijn Meerts

Haven't looked that much into it anymore. I'm planning on doing an electronics course at some point, but that might be half a year away (depends on if/when I move back to Holland.)

 

The biggest problem I guess would be programming the PIC's.. Getting the hardware and software for it is easy, but the code itself will likely be difficult (at first.)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...