relder

Greetings,

I am writing to ask about the difference between a Relay Shield and the Motor Shield for my newly constructed Arduino Uno DCC++ base station.  

Here is an image of the Relay Shield:

M%281%29.png 

 

 

 

 

 

 

 

I have tested the relay while connected to the Uno and have verified the pin communication.  

My question: are the motor shield and relay used in the same way? If yes, how can I connect the main track power into the relay?

Thank you and I look forward to learning more all the experts on this topic.

~ Ryan Elder

 

Reply 0
Prof_Klyzlr

Very Different, accept no substitutes

Dear Ryan, A relay is a hardware electrical Switch (like a toggle switch), Which is changed/flipped by an electromagnet rather than your fingers. They can typically switch some decent current (Amps) but have a switching _Frequency_ (how fast it can cycle on/off/on/off) which is relatively slow. The switching is also quite "noisy", both audibly (you hear the relays going "buzzzzzzz" which is really a very very fast "click click click click"), And electrically (if you were to look at the electrical output of the relay "switch", it would be very "spiky"). Neither the speed, or the noisy-ness is a good way to create a "DCC track signal". (expect some mis-behaviour from the decoders, at best.... Decoder damage is a very real possibility at worst) In contrast, a "H-bridge Motor driver" circuit uses 4X transistors in a "H" shape, (with the motor forming the horizontal bar of the H). Functionally it is still "a switch, controlled by some form of Circuitry" rather than manually by human fingers, But a H-bridge can "switch quicker", with less noise, and is arguably easier for the "upstream control Circuitry/software" to control with very precise predictable behaviour on the Output. Upshot: for the specific application of a DCC++ system, leave the hardware relays alone, Reach for a L298p H-bridge shield, And enjoy a DCC++ system which works as intended... (save the relay shield for a future "general animation" project, something which needs to switch relatively high-current animation motors and lights, or switch other circuits which need to be kept electrically isolated from the Arduino 5Volt lines...) Happy modelling, Aim to Improve, Prof Klyzlr
Reply 0
Geoff Bunza geoffb

@Ryan

Hi Ryan,

Prof K is spot on correct, and offers a good, detailed explanation. There are other features of the motor driver shield that DCC++ uses, as well, like current sensing.

This is the typical DCC++ motor driver board used, and it is still available:
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
relder

Thank you

Geoff and Prof K.

Thank you for your responses and clarity.  Also, thank you for the ebay link to the L298P board.  

Would you also consider the  HiLetgo L293D as a viable option?


Again, thank you for sharing your knowledge with me.

~Ryan

Reply 0
Geoff Bunza geoffb

@Ryan re:HiLetgo L293D

Hi Ryan,

No, that board is neither hardware nor software compatible. For another alternative try the Pololu Dual MC33926 Motor Driver Shield for Arduino found here:  https://www.pololu.com/product/2503
towards the bottom of the page on how to use it. You will also have to modify the selections in the Arduino sketches if you use this 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
Reply