G Scale Model Train Forum banner
1 - 20 of 24 Posts

·
Premium Member
Joined
·
451 Posts
Discussion Starter · #1 ·
The MRC AD322 DCC decoders that have been discussed recently do a fair job of operating under DCC control. The weaknesses that have been documented are most likely the fault of the microcontroller and/or its resident program.

When I got a batch of them for experimentation I was more impressed with the non-DCC specific components on the board than their DCC capabilities. Specifically, I found that the board contains:
  1. a set of four 3 amp diodes that act as a bridge rectifier
  2. a power Mosfet that controls the motor's speed - it is rated for at least 8 amps
  3. a DPDT relay to determine the train's direction
  4. a sound generating circuit that generates a number of locomotive sounds (bell, whistle, etc)
  5. an amplifier that gives good volume for the sounds
  6. a 12 volt and a 5 volt voltage regulator
That got me to thinking about removing the factory installed microcontroller and replacing it with one that I could program myself. One thing led to another and I now have a pair of Christmas trolleys running on a point-to-point layout under the control of an AD322 (that has had a frontal lobotomy) and a PIC 16F88 microcontroller.

The trolleys will run (one at a time) on a point-to-point track on the front of our house from December 1 --> January 1. I have done something like this for the last 6 years and am always challenged to come up with a system that can run day in and day out without failure.

Last year I converted two Bachmann trolleys to run from constant AC power on the track. This is not too far from running DCC as it uses something like AC to provide continuous, high voltage. The AC that I supply to the track is nothing special, but it is high enough in voltage to keep the trolley from stopping when it gets onto a dirty or wet section of track. It also keeps the lights on when the trolley pauses before reversing.


Inside of the trolley is a circuit that converts the AC into DC and a controller that operates the motor, senses the end of the track, reverses and makes appropriate bell & whistle sounds. Most of the components that I used in last year's trolley controller are already on the AD322.

I have documented what I put together on my web page and welcome you to have a look.

http://www.trainelectronics.com/AC_Trolley/index.htm

The AD322 equipped test units are working like a charm. So, before you pitch any "defective" AD322 decoders you may want to see if you can salvage the really interesting part of them!


dave
 

·
Senior Member
Joined
·
3,010 Posts
Hi Dave,

I wish I could say that I understood the information on your web site but most of it was over my head.

Still, I think it is great that you have discovered additional applications for the AD322.

One thing I would like to use some of the AD322's for is as a simple on/off switch to control some accessories such as street lights, business building lights etc.

Rather than take track power away from the DCC system I would prefer to use external power that is currently powering the building lights etc. but simply use the decoder to connect or break those lighting circuits (like a remote controlled wall switch).

The relay seems perfect for this. It appears to have two connections for powering the relay and two SPDT switches that it controls. I would expect that in effect it is a DPDT motor direction control switch.

I would like to remove the motor circuit from the relay and instead use the relay as a decoder controlled double SPDT switch (no outgoing power). With a 5 amp 24VDC rating it could be a very useful switch. This could be a LOT more useful than the 0.1 amp available from F1 - F3.

My problem is that I do not understand enough about the decoder (and I cannot see one side of the board wiring) to tell what I would need to do to isolate the relay from everything else and if I can do so without destroying everything.

Any suggestions you or anyone else can make would be appreciated.

Thanks,

Jerry
 

·
Senior Member
Joined
·
3,010 Posts
Yet another use for the AD322 decoder just occurred to me.

I have installed several of the LGB 4135/4235 series Sound Car sound boards in various locomotives. These are relatively inexpensive analog sound units but I rather like them and I have been able to get them to work with MTS/DCC.

Their main limitation is that they are chuff (or diesel rumble) only with no bell or whistle.

I am already using the AD322 to power some of the LGB 4135/4235 sound systems but it just now occurred to me that I can use the same AD322 to provide the currently non-existent bell and horn as well.

If I leave the diesel rumble turned off the engine sound will come from the LGB sound units and (by adding the MRC 2" speaker to the AD322 as well as the LGB speaker) I will then have a better quality (LGB) diesel sound plus bell and horn - all at ZERO additional cost.

Heck, I might even add the speaker to some LGB 2-4-0's. After all some of the existing steam locos now have a horn as well as a whistle.

I love a bargain and this one seems to be getting better and better.

Jerry
 

·
Premium Member
Joined
·
451 Posts
Discussion Starter · #4 ·
Jerry - there are a few ways that you could operate lights and such with the AD322. If you don't want to modify the board you could simply use the lighting outputs to operate external relays that would control the lights. Just make sure you put a diode across the relay terminals to protect the electronics on the board from spikes that the relay will generate when the coil's field collapses.

If you want to use the relay on the board you can access a SPST, normally open set of contacts with minimal changes. I removed the relay from one of my boards and took some photos that will help to explain what has to be done.

Here is what is under the relay on the top of the board. Pins 1 and 2 go to the coil. Pins 3 and 4 are normally closed, pins 5 and 6 are common and pins 7 and 8 are normally open.

As you can see there is a trace under the relay that goes from pin 4 to pin 7 - that is part of the wiring that is needed to reverse polarity. Since you can't easily get to that trace to cut it you are limited to using only two of the pins for a SPST set of contracts. You need to cut the trace just to the left of pin 6 (where you see some black marker). If you can't get to that trace with a razor blade you can just cut the center lead on the power transistor and pull it up and out of the way.



On the bottom of the board (seen below) you will have to cut the trace to the right of Pin 6 and the trace that goes between Pins 3 and 8. That will give you a completely open SPST / Normally Open contact that you can use to control a good bit of power, say 5 amps or so.





Hope that all makes sense.

dave
 

·
Premium Member
Joined
·
712 Posts
makes me wonder if you could just solder wires to the pins that run the coil and add a relay off the board ....... though you could use the fuction outputs and do the same thing or add a dioide to the output power so you only have one polarity that is on power
 

·
Senior Member
Joined
·
3,010 Posts
Hi Dave,

That is exactly what I was looking for.

Seeing the top traces as well as the bottom traces made all the difference for me.

The markings on the side of the relay suggested that it would work but my electronics training was 40+ years ago and I have not used it since.

I've learned to distrust the obvious without some sort of confirmation.

Do you know if the relay top is glued on or if there is some non-destructive way to remove it to clean the contacts?

While simple and rugged I think the relay is the main problem with the decoder because it appears to take about 5 volts to energize it during which time the loco will be attempting to run in the wrong direction and as the relay flips the loco instantly changes direction.

I am guessing that DCC avoids this by having a higher starting voltage and raising the analog starting voltage may help resolve the issue. One of these days I plan to do some experimenting with it.

The killer for me with this decoder for steam locos is that there is no function output with 1/2 amp output for smoke via F1.

Thanks,

Jerry
 

·
Senior Member
Joined
·
3,010 Posts
Hi Dave,

Another question or two:

You mentioned the AD322 has both "a 12 volt and a 5 volt voltage regulator"

I don't know how to tell one from the other (or how much power they could handle) and is there a way that the decoder switches these on and off such as when the decoder is selected or deselected? If so, how could 5 (or 12) volts be tapped from the circuit? If they could handle 1/2 amp I could see how they could control a remote smoke unit such as in a chimney. I think I still have some old Bachmann smoke units that I had replaced with LGB smoke units.

I am not sure where I am going with this other than the 5 volt regulator seems to offer some possibilities.

Thanks,

Jerry
 

·
Senior Member
Joined
·
3,010 Posts
Posted By Trains West on 11/21/2008 7:08 AM
makes me wonder if you could just solder wires to the pins that run the coil and add a relay off the board ....... though you could use the fuction outputs and do the same thing or add a dioide to the output power so you only have one polarity that is on power


I realized that I could do that but using the decoder's relay would save me the expense and effort of adding an extra relay plus it has the advantage of being rated for a full 5 amps.

Thanks,

Jerry
 

·
Premium Member
Joined
·
451 Posts
Discussion Starter · #9 ·
Jerry - the top of the relay is glued to the base and would not be easy to remove - that shouldn't be much of a problem as the contacts are not likely to need cleaning unless you are using them to control high voltages that will arc as the contacts open / close.

I would still recommend that you try adding your own relay to the lighting outputs on the decoder - that will give you much more flexibility than using the on-board relay - it will also give you a way to control the power to your smoke unit. If you want to maintain the lighting as it is you could use the "coupler sound" output on the microcontroller to activate a relay.


All you need is a 12 volt relay and a diode (note that you would have to add a transistor if you connect directly to the microcontroller to use the "coupler sound" for activation). If you would like to give it a try I can do some testing and draw you a wring diagram - that might come in handy for others, too.

dave
 

·
Premium Member
Joined
·
451 Posts
Discussion Starter · #10 ·
Jerry - the 5 volt regulator is a 78L05 which is only good for about 100 ma - the 12 volt regulator is a 7812 (it is the larger of the two with the tab at the top) is rated for 1 amp but to pull that consistently you would need to add a heat sink. I would recommend against using either of those to power anything other than what they are powering now -



The decoder does not turn either of them on or off - they are always connected and doing their regulation duties.

dave
 

·
Senior Member
Joined
·
3,010 Posts
Hi Dave,

I am interested in anything that you may come up with even if I do not do anything with the information. At the moment I am somewhat swamped with other projects including putting more AD322's in additional locos.

Bear in mind that while I know what diodes, capacitors, relays etc. are that I only know what they do and not now to determine which ones to use. A trip to Radio Shack uses about $5 worth of gas and a trip to any other electronics store would cost about $25 in gas so unless I need a quantity of something and order on line Radio Shack gets most of my business and lately it seems like they are trying to move away from stocking electronic parts. I almost need a Radio Shack part number to know what to buy.

Living in rural Arkansas has many benefits but having handy access to electronic components is not one of them.

Thanks,

Jerry
 

·
Senior Member
Joined
·
3,010 Posts
Posted By dbodnar on 11/21/2008 7:48 AM

Jerry - Ill let you know if I come up with a circuit for you- most of the parts I use are ordered from various on-line vendors - a better choice than Radio Shack as the price (and frequently the quality) are better.

dave




Hi Dave,

On-line vendors are fine as long as I know which vendors and their part numbers. On-line shipping costs and gas to drive to Radio Shack cancel each other out for me. I agree about the quality. I have never been impressed with RS quality but when it's the only game in town...

Thanks,

Jerry
 

·
Premium Member
Joined
·
251 Posts
Hi dave
very intresting topic. I have been think of using a relay to control the smoke unit, as it draws more current than the decoder can handle. when you say add a diode to the relay circiut do you mean to the trigger circiut?
Thanks,
Bill
 

·
Premium Member
Joined
·
451 Posts
Discussion Starter · #15 ·
Bill - the diode goes in parallel with the coil contacts on the relay - when a magnetic field (like the one creaeted in the coil of the relay) collapses it produces a spike in voltage that can get back into the electronics that activated the relay - the diode blocks this spike - the system will work without it but only for a while - eventually the transistor that triggers the relay will fail.

I did some experiments yesterday and find that the current that is available at the lighting terminals is too anemic to close most relays - I plan on doing a test with a transistor in the circuit that should take care of the problem - I'll post a wiring diagram when I get something working properly.


Stay tuned!

dave
 

·
Senior Member
Joined
·
3,010 Posts
Hi Dave,

Another question...

If the sound part of the decoder is not being used is there a way to tap the F1 function for other purposes? One major problem with the AD322 for some of the applications I would like to use it for is the lack of an external F1 function.

I am thinking about LGB circuit boards which only have contacts for F1, FOF and FOR.

Thanks,

Jerry
 

·
Premium Member
Joined
·
451 Posts
Discussion Starter · #17 ·
Jerry & Bill - I spent some time with the decoder and relays this morning - I put step-by-step instructions for adding a relay that will latch on whenever you activate the BELL sound. You could use any of the sounds to activate the relay but the others are only momentary - the bell latches on, something you would want for a relay that operated a smoke unit, for example.

http://www.trainelectronics.com/MRC_DCC/index.html#Relay_Installation_Notes_

The toughest part of the wiring is soldering a wire to pin #2 (the BELL's connection) on the microcontroller - you may want to use thinner wire than I used as it might be easier. I would also suggest using non-stranded wire as shorting to other pins is more likely with stranded wire.








You could also connect the yellow wire to any of the lighting connections ( I tested white & yellow ) to activate the relay. That would make the above connection unnecessary!


Please let me know if you have any questions.

dave
 

·
Super Modulator
Joined
·
21,372 Posts
I found relays that only took about 28 ma at 24 volts at Mouser. Using the full voltage of the DCC source has helped me run relays from the outputs when the current budget was low.

Regards, Greg
 

·
Premium Member
Joined
·
251 Posts
THANKS Dave and Greg,
I had not concidered the current required to drive the relay. I now see 2 issues
if I add a transistor to amplify the relay current then that transistor will need a power supply or, if i use the current from a lighting source I will only have a max of 20 volts as that is what my boster outputs. It maybe easyest to wire the smoke unit to the track with the existing switch and a fullwave rectifier leaving the dcc board out of the circiut.
 
1 - 20 of 24 Posts
Top