Geoff Bunza geoffb

Every once in a while there is a need for something a bit more than the 1-2 Amps of DCC power that the typical DCC++ combination of the Arduino plus motor shield can deliver. With a separate H-Bridge driver board and your Arduino Uno or Mega2560 you can put out a DCC signal with 15 Amps of power. Let’s see how you can do it.

                 HBridgeS.JPG 
                   15A FET H-Bridge Driver

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

More Power to you and your DCC++ base station

I have detailed building a DCC++ base station in my article in the March, 2017 issue of Model Railroad Hoobyist, DCC projects using the Arduino   http://mrhpub.com/2017-03-mar/online/html5/?page=204  As built as described, this assembly is limited by the 2 Amp rating of the Arduino motor shield. There is a tested, compatible equivalent H-Bridge driver (Amazon:  Dual Motor Driver Module Board H-bridge DC MOSFET IRF3205 3-36V 10A Peak30A  Peak 30A https://www.amazon.com/Liobaba-H-Bridge-IRF3205-Controller-High-Power/dp/B07KW9H12F/ref=sr_1_3  or ebay: 3V-36V Dual Motor Driver Board Module H-bridge DC MOSFET IRF3205 Peak 30A  https://www.ebay.com/itm/253945326185  ), which you can use to directly substitute for the motor shield. Cost is generally between $15-20, sometimes cheaper.

It has a peak current rating of 30 Amps, and most rate it between 10-15 Amps continuous use, but I have not run it up that high. There are no heat sinks for the two rows of Field Effect Transistors that are the actual H-Bridges. Their metal tabs must not be shorted together.

You will also need a pretty hefty power supply for this too. A short protected, well regulated power supply is a good idea. Try something contained like this from Amazon.com:  12V 20A 240W AC/DC Power Adapter with 5.5x2.5mm DC Plug and 2.1mm Adapter  https://www.amazon.com/LEDwholesalers-Power-Adapter-5-5x2-5mm-3262-12V/dp/B074GGMD5J/ref=sr_1_5  or perhaps:  DC 12V 10A 120W Power Supply Adapter Converter Regulator  https://www.amazon.com/BINZET-Adapter-Converter-Regulator-Flexible/dp/B00Z9X4GLW/ref=sr_1_5  .

Connections are shown in the diagram below:
nections.jpg 

Jumper or solder the connections to the Arduino with pin headers. The DCC connections can be made with heavy copper wire. You do not need the Arduino motor shield to use this board.

Now for all the warnings:

Ten to fifteen Amps is a lot of current! The is NO SHORT CIRCUIT PROTECTION on this board, and yes, I have already destroyed one myself.  Adding fuses, circuit breakers, or DCC power protection devices are all really good ideas. If you run this at the high end of its range, be prepared that those small metal fins are likely to get hot. You cannot simply add a common heat sink to them all without insulating all of the fins (on the FET’s).

You can easily operate this with a 8-22 Volt supply voltage. To achieve the nominal 14 Volts on the track for DCC for HO operation, you can use a 15 Volt supply, but most DCC decoders I have used will operate with this arrangement with a 12 Volt supply. Much lower and you are asking for trouble. Remember too that many HO keep alive devices will self destruct above 15 Volts on the track. The same, single supply will feed the H-Bridge DCC++ uses for the programming track. I do not personally use DCC++ at all for programming decoders of any sort. I use these for supplying power and control off the rails as a separate DCC bus for layout lighting and animation. In this manner, with no exposed connections, the likelihood of a short circuit on the DCC bus drops dramatically (until I make another goof along the way!).

I hope some modelers find this useful. Appropriate comments and suggestions are always welcome.
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
dapenguin

How bout this one?

24V 7A

https://www.ebay.com/itm/1PC-DC-12V-24V-7A-160W-Dual-Motor-Driver-Module-Board-H-bridge-L298-Logic/282396352230

http://trainelectronics.com/DCC_Arduino/DCC++/

 

TC Carr
Malheur, Kopperton & Tejas * Sn3½ in 1923
(the I don't know yet) * Sn2 "Gilpin in Idaho"
​Anaconda, Oregon & Pacific * S Scale Heavy Electric
My Blog Index

Reply 0
Prof_Klyzlr

Compatibility

Dear TC, Unlike the trainelectronics.com link you've provided, it appears Dr Geoff's option is a plug-on fit, and does _not_ require the addition of any "interface chip" intermediate circuitry to make the "Enable PWM" pins work... I was looking at having to do the trainelectronics.com "kitbash", but will take the "plug-on compatible" option if it's available... Happy modelling, Aim to Improve, Prof Klyzlr
Reply 0
Prof_Klyzlr

+ve connection to UNO?

Dear Dr Geoff, A question. For the normal DCC++ 2A Motor Shield install, it's Reccomended to cut a PCB link, which would pass the Motor Shield +ve supply voltage to the Arduino. This is noted as being important esp if the motor-shield is powered by>12V. Assuming the 20A shield is powered by 15V, Should the "5V connection" at left of the diagram be omitted? (I may be getting my +ve lines mixed up, Or the difference between a SMA application VS a DCC++/RasPi application?) Happy modelling, Aim to Improve, Prof Klyzlr
Reply 0
zerbe

programming without current sense?

I thought that in order to program a dcc decoder and read back the results, that you needed to rely on the current sensing. If this setup doesn't pass current sense back to the arduino, how does it read the CVs from the dcc decoder? I guess you can program via poke and hope, or better yet ONLY ever use this for ops, which I believe is what you are implying anyway. 

I have a dcc++ setup with a Mega and original motor shield that works just fine for programming. I did have to tweak some settings in the software for it to program my Bachmann K4, but it still seems to work just find for my limited number of decoders. 

I think with this particular motor controller, I'd consider running the same PWM leads to both sides and run it as leads to two OPS power districts. 

Reply 0
Geoff Bunza geoffb

@Prof K re: VIN Connect line

Hi Prof,
Quote:
Assuming the 20A shield is powered by 15V,
Should the "5V connection" at left of the diagram be omitted?

The VIN Jumper on the motor shield board only apples to the higher voltage applied to the motor shield itself at the screw terminals on the motor shield. If you leave the VIN jumper alone, the higher voltage (in your example, 15V) is routed to the VIN on the Uno, which is spec'ed at a maximum ov 12 Volts. The 15 Volts expressed to the Uno 5 Volt regulator would be exceeded and damage the regulator. Thus the recommendation to cut the VIN jumper on the motor shield if you apply greater than 12 Volts to the motor shield.

If you use the FET H-Bridge I specified in this article,  you can apply a separate higher voltage to the screw terminals on the FET H-Bridge, and the VIN jumper on the motor shield is irrelevant unless you connect the same> 12V supply to the motor shield also.
"Hope this is clear and helps. Have fun! 
Best regards,
Geoff

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

@John Z re: Current Sense

Hi John,
 
You can use this H-Bridge only as a substitute for track power, and leave the Programming track using the motor shield with its current sensing still engaged. ...and yes it will then not have any current sensing for ops mode programming.  As I said in the article, I do not use DCC++ in any mode for decoder programming, as I have not found it to be consistently reliable for all the decoders I use. That is my personal, experienced preference. This is not a recommendation, just my personal preference.
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
zaki

Can i use monster motoshield VNH2SP30

Dear Geof, I have Monster motoshield VNH2SP30 board, can i replace "Dual Motor Driver Module Board H-bridge DC MOSFET IRF3205 3-36V 10A Peak30A Peak 30A" with VNH2SP30 board? Is this compitable? If compitable, how about pin connection? Regards Zaki
Reply 0
pipbaker

15A H-Bridge board with Arduino Mega

 

Dear Geof,

When I connect this up to my Mega do I use the same pins as you have indicated for the Uno?, also can I leave the arduino motor shield in place for for the PROG track. Thanks for all your great work.

Regards

Pip

Reply 0
Geoff Bunza geoffb

@Pip re: Attaching a Mega

Hi Pip,

Quote:

When I connect this up to my Mega do I use the same pins as you have indicated for the Uno?

No, the Mega uses different pins connecting to the driver board.
On the Driver Board (Top to bottom P2 connector): instead of Uno Pins GND, 11, 5, 3, 10, and +5 Volt
Use Mega Pins GND, 11, 2, 3, 12 and +5 Volt (again top to bottom on the Driver P2 connector as pictured).

Main Track is still from Motor1 screws, Prog Track is from Motor2 screw terminals.

Quote:

also can I leave the Arduino motor shield in place for for the PROG track?

Maybe. You would not connect Pin2 and Pin11 to the driver board, but the current sense connections are still in place to the shield and I think that might confuse the DCC++ code. I do not recommend this configuration without some very careful experimentation.
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
pipbaker

15A H-Bridge board with Arduino Mega

Dear Geoff,

Thank so much for this, I will just connect pins 3 and 12 from the Mega and use another DCC++ on a Uno to program the decoders.

Regards

Pip

Reply 0
barr_ceo

A few questions....

1)  What in the world are you running that drinks that much power? My locos run at less than a 10th of an amp each... granted they're N. but still...I could run 150 locos on that... and my DCC command station only handles 120!

2) What is the circuit you've got that monster plugged into rated for? Many houshold circuits are 15 amp....

3) and with that in mind... do you have ANYTHING else on that circuit? Anything at all..   even a 20 milliamp LED, would result in the circuit being overloaded in the event of a short.

This is a little scary... like the guy who came in to buy a 10 amp fuse...  when I told him we were out of them, then he wanted me to sell him a 15 to put in the same circuit. I refused, obviously....

Reply 0
Logger01

Small Thinking

Quote:

1)  What in the world are you running that drinks that much power?

Although I usually run with smaller loads my SD-45s and E8s have two motors in each truck capable of drawing over an Amp each under load sometimes pulling in excess of 6 Amps total. Now each engine does pull less when double heading, but with two engines the total can easily push 10 Amps peak pulling a string of heavy passenger cars or pushing the limit with long freight trains. So a ten Amp booster can actually be marginal. I blew several NCE 10 Amp boosters before I started building some rated for 15 Amps but capable of supplying 20 Amps in a pinch (Mainly because of heat dissipation not current capacity). My Shays (3 motors) can pull 6 Amps each so again double heading could stress a 10 Amp booster. (Need to get the log cars and buggies updated with roller bearing.)

Quote:

2) What is the circuit you've got that monster plugged into rated for? Many houshold circuits are 15 amp....

Note my little power box is capable of supplying 24 VDC at 50 Amps (1200 Watts). A 120 VAC 15 Amp circuit (1800 Watts) will generally be OK, but I usually run on 20 Amp circuits.d

Quote:

3) and with that in mind... do you have ANYTHING else on that circuit? Anything at all..   even a 20 milliamp LED, would result in the circuit being overloaded in the event of a short.

Not really - Again a 15 Amp circuit can drive 1800 Watts which even if my box were fully loaded provides 400 Watts of headroom, but I usually do not push it. We have occasionally plugged into the same circuit powering the water feature pump and lights, but even then we have rarely had a problem. Having the GFIs trip is a bigger problem.

Ken K

gSkidder.GIF 

Reply 0
Geoff Bunza geoffb

A Matter of Perspective

Hi barr_ceo (name?),

One of the things I really like about Model Railroading is the wide application of interests it gathers from many contexts and perspectives. There is a great deal to learn using new materials, tools, techniques, and methods, even if they do not directly apply to one's personal modeling context. But this is generally true only if one is open to actually widen his perspective.

I personally use, and intend to use four and possibly five electrically independent DCC systems on my layout: 1. train control, 2. model lighting, 3. animation, 4. signaling, and 5. room lighting. Only the first, train control, has an exposed DCC bus (the rails). All other DCC systems have no direct exposed wiring by design. I do not expect 1., 3., and 4. to use more than 8 Amps each. However, I do expect DCC systems 2, and 5. to use significantly more power, monitored by the equivalent of power districts therein. This is in an HO scale context.

I also operate a small amount of G scale equipment. Some locos weigh over 10 pounds and can easily draw over 3 Amps under load with sound. Many Garden Railway modelers use power on board (battery) and not DCC. However in this context, I am working with a friend to build a closed DCC system with wireless handhelds to control garden lighting and animation, over one pair of wires and not routed via the rails. I expect it will control the equivalent of a 12 Amp plus, low voltage, garden lighting system.

This is my perspective and context. I do not expect it to be anyone else's.

There are many other modeling contexts from which we can all learn, even if they do not mach our own.
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
dapenguin

Monster Motoshield VNH2SP30

This was mentioned above by Zaki but I did not see a response.

Interesting shield.  It does have current sensing and fault reporting. It will do about 6 amps without a heatsink.  However, it is limited to 16 volts.  Is it compatible with DCC++ and if so what changes are needed.

https://www.makerlab-electronics.com/product/motor-driver-shield-vnh2sp30/
This company is in Manila. Lots of info and data sheets etc.

https://protosupplies.com/product/vnh2sp30-dual-monster-motor-shield/
This company is in Portland OR.  Good price, lots of data, and all needed parts.

It is of course cheaper on eBay if you have the parts.

 

TC Carr
Malheur, Kopperton & Tejas * Sn3½ in 1923
(the I don't know yet) * Sn2 "Gilpin in Idaho"
​Anaconda, Oregon & Pacific * S Scale Heavy Electric
My Blog Index

Reply 0
Geoff Bunza geoffb

@TC Carr re: New Motor Shield Compatibility

Hi TC,

A quick review of the specs and the example sketch listed in the second reference makes me think this could be used as another DCC++ interface. The vendor warns not to exceed 6 Amp draw without additional heat sinking.

Please note this is not a drop in replacement. The pins for motor driving and current sensing are different. I did not look into the specs at all for how it senses current draw -- I would normally suspect that the code for current limits would need to be changed, as well as a good hard look at all the pin assignments. It does have PWM and DIRection control pins, which are essential to the DCC++ interface, giving me hope that this could be made to work with code modifications. The sketch provided should give much insight as to what needs to be re-coded.One thing that makes me a little nervous is that the maximum PWM frequency is 20 KHz, which should be OK for DCC, but it is getting close to marginal. I did not look any further into the specs to determine under what conditions this speed is specified.

'Hope this helps. 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
dapenguin

11 kHz

I take it that 11 is much too slow for DCC?  Otherwise I found a great shield

https://www.seeedstudio.com/4A-Motor-Shield-p-1954.html

 

TC Carr
Malheur, Kopperton & Tejas * Sn3½ in 1923
(the I don't know yet) * Sn2 "Gilpin in Idaho"
​Anaconda, Oregon & Pacific * S Scale Heavy Electric
My Blog Index

Reply 0
Geoff Bunza geoffb

@TC re:DCC Frequency

Hi TC,

The base frequency for the DCC signal is about 8.6 KHz which would make you think that 11 KHz is fine, but not really. This is because to generate the fine transitions of the DCC waveform actually requires frequency components higher than the base frequency. Otherwise the DCC waveform will distort, and the edge transitions will be slower, possibly introducing errors. Specs for products are often listed under the worst case scenarios for their operation, so if you actually try it out, you might find it works. Personally, I would not advise its use.

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
Erik A. Erik84750

Current sensing

If I understand well then there is no current sensing available with this board?

Grts,

Erik

 

Reply 0
Geoff Bunza geoffb

@Erik re: Current Sensing

Hi Erik,

Sorry, there is no current sensing with this driver board. If you do find and use another board with current sensing beyond the two boards DCC++ supports, you may have to change the code that reads the current measurement for your particular board.
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
Erik A. Erik84750

@Geoff: current sensing

Hi Geoff,

per info: David Bodnar described here in http://www.trainelectronics.com/DCC_Arduino/DCC_Booster/the use of a booster, with possibility of current sensing: however the DCC++ software (from Gregg) current sensing parameter needs to be modified to allow for the much larger than 2A output current to be correctly converted.

I ordered a board per you article, and am looking forward to reception. Thank you for again a sublime article!

Grts,

Erik

 

Reply 0
dapenguin

another shield

OK, Here goes!

To get current sensing with a board that does not have it.  Use a MAX471 as detailed here.   http://locoduino.org/spip.php?article187  It is in French but pictures are a 1000 words.

The previously mentioned 'Monster Shield' is made by Spark fun and others.  It can be had for US$15.00  I has a pair of VNH2SP30 chips which cycle at 20 Khz, 6 Amps (30A peak) at 16v.  It also requires two directional inputs per channel.  Also the current sense is on the wrong pins, but this is fixable.  The max voltage is a bit low for the largest scales which really need 18 or 24 volts.

Another is from Pololu for US$49.00.  It has a pair of VNH5019 chips which again cycles at 20 Khz , 12 Amps (30A peak) at 24 volts.  This on also requires two directional inputs per channel.  However it has a row of external contacts and config jumpers so could be adapted to one dir input per channel.    Also the current sense is on the correct pins.

Both the above boards would be quite a bit of coding to try out.  Not mention the second one is a bit pricy for an experiment.

Now in researching all this I found what may be the best board.

Pololu has a series of 4 boards which use twin discrete MOSFET H-bridges.  These boards cycle at up to 100 Khz.  Prices range from 50 to 70 Dollars US.  The 24 volt 13 Amp is US$49.95.  There is also a 24v18A and two 18 volt at 18A & 22A.  Peak power is a LOT more.   https://www.pololu.com/product/2516

These boards are almost identical in pinouts to the other Pololu board that is already an option.  A single direction and PWM per channel.  The sleep and fault lines are not required, and can be cut at the jumper.  If possible the fault line can be used as an over voltage or short sensor.

I need more info from others. Please!

TC Carr
Malheur, Kopperton & Tejas * Sn3½ in 1923
(the I don't know yet) * Sn2 "Gilpin in Idaho"
​Anaconda, Oregon & Pacific * S Scale Heavy Electric
My Blog Index

Reply 0
Geoff Bunza geoffb

@TC re: Info

Hi TC,

What info are you looking for?  It sounds like you have it all covered.  There are no questions in your post.

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
dapenguin

More looking for confirmation

More looking for confirmation that I got it correct.

I guess I did not make clear that I have no idea about the programming aspect of it.  But I think it may work with the current Pololu option??  I need direction on that aspect of things.

TC Carr
Malheur, Kopperton & Tejas * Sn3½ in 1923
(the I don't know yet) * Sn2 "Gilpin in Idaho"
​Anaconda, Oregon & Pacific * S Scale Heavy Electric
My Blog Index

Reply 0
Reply