{"id":1032,"date":"2016-12-08T00:02:05","date_gmt":"2016-12-08T08:02:05","guid":{"rendered":"http:\/\/thenscaler.com\/?page_id=1032"},"modified":"2017-02-12T23:23:16","modified_gmt":"2017-02-13T07:23:16","slug":"an-intro-to-model-railroading-with-arduino","status":"publish","type":"page","link":"https:\/\/thenscaler.com\/?page_id=1032","title":{"rendered":"An Intro to Model Railroading with Arduino"},"content":{"rendered":"<p>If you are looking for basic information and ideas on how to use Arduino boards on your model railroad layout, you&#8217;ve come to the right place.<\/p>\n<p>I happen to model in N scale, but everything I write about in this blog can work in any scale from G to Z. Everything I&#8217;m doing is independent of the locomotive control system, so most techniques and technologies work equally well on DC or DCC layouts. This is for all modelers in all scales using any control system.<\/p>\n<h4>What is Arduino?<\/h4>\n<p>The <a title=\"The Arduino Project\" href=\"http:\/\/www.arduino.cc\">Arduino Project<\/a> is one of the best known, and by far best developed <a title=\"Open source\" href=\"http:\/\/en.wikipedia.org\/wiki\/Open_source\" target=\"_blank\">open source<\/a>\u00a0microcontroller board systems on the planet. In <a title=\"Arduino - Introduction\" href=\"http:\/\/www.arduino.cc\/en\/Guide\/Introduction\">their words<\/a>:<\/p>\n<blockquote><p>Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It\u2019s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board.<\/p><\/blockquote>\n<p>Microcontrollers are integrated circuit chips that have the basic logic and input\/output capabilities that constitute a simple computer. Microcontroller\u00a0boards place that chip with a few essential external components on a board with power and ways to plug things in. Your program (called a &#8220;<strong>sketch<\/strong>&#8221; in the Arduino world) gets loaded into the chip&#8217;s permanent memory and runs efficiently with little overhead between your code and the device.<\/p>\n<div id=\"attachment_181\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2014\/11\/Uno.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-181\" class=\"size-full wp-image-181\" src=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2014\/11\/Uno.jpg\" alt=\"Arduino Uno R3\" width=\"600\" height=\"399\" srcset=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2014\/11\/Uno.jpg 600w, https:\/\/thenscaler.com\/wp-content\/uploads\/2014\/11\/Uno-300x199.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-181\" class=\"wp-caption-text\">Arduino Uno R3<\/p><\/div>\n<p>Arduino boards come in several designs that are broadly useful for model railroading. <strong>I recommend that model railroaders stick to the 5 volt boards<\/strong> for general purpose layout applications because the vast majority of sensor and actuator technologies use 5 volt logic. This will keep your life easy, and these are usually the least expensive boards in the family.<\/p>\n<p>The issue with the 3.3 volt boards is that 3.3 volt peripherals are less common than 5 volt ones. You can use a 3.3 volt board with a 5 volt peripheral, but you have to use a level shifting circuit between the board and the peripheral. Board-to-board serial communication between a 3.3 volt board and a 5 volt board would require level shifting.<\/p>\n<p>That said, 3.3 volt boards can be used where low power matters and you are not attaching to 5 volt peripherals; lighting applications come to mind. I haven&#8217;t gotten my hands on one yet, but I think its worth looking at the new <a href=\"https:\/\/www.arduino.cc\/en\/Main\/ArduinoMKR1000\" target=\"_blank\">MKR1000, a new 3.3 volt board that includes WiFi<\/a>. With WiFi solving your communication problem, this is a very attractive board for lighting and other 3.3 volt applications in far parts of the layout.<\/p>\n<p>The 5 volt boards most broadly useful for model railroading are:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.arduino.cc\/en\/Main\/ArduinoBoardUno\" target=\"_blank\"><strong>UNO R3<\/strong><\/a>\u2014The original style and most popular design. The UNO is a great first board and a great foundation device for your layout. The UNO was specifically designed to accommodate plug-in, stackable peripheral boards called <strong>shields<\/strong>.<\/li>\n<li><a href=\"https:\/\/www.arduino.cc\/en\/Main\/ArduinoBoardMega2560\" target=\"_blank\"><strong>MEGA<\/strong><\/a>\u2014This is the big cousin of the UNO, equipped with a microcontroller that has much more memory and supports many more pins than the UNO, but will also work with UNO shields. While many are drawn to the pin count, the real utility of the MEGA is the relatively massive amount of memory available for code and data storage and manipulation. The MEGA is the board of choice for high graphics applications such as a touchscreen control panel.<\/li>\n<li><a href=\"https:\/\/www.arduino.cc\/en\/Main\/ArduinoBoardMicro\" target=\"_blank\"><strong>Micro<\/strong><\/a>\u2014This is one of the smallest boards of the family, measuring a mere 48mm x 17mm, yet it still has the same basic capabilities as an UNO. The two main differences from the UNO are that the Micro does not use shields and the power handling capability of each I\/O pin is limited to 20 mA.<\/li>\n<li><a href=\"https:\/\/www.arduino.cc\/en\/Main\/ArduinoBoardNano\" target=\"_blank\"><strong>Nano<\/strong><\/a>\u2014A little larger than the Micro (0.73&#8243; x 1.70&#8243;), this little board is virtually indistinguishable from an UNO in all material aspects. This board is officially &#8220;retired,&#8221; but remains readily available from Gravitech and many other sources. A few shields have been developed for it, including Ethernet and WiFi shields.<\/li>\n<li><a href=\"https:\/\/www.arduino.cc\/en\/Main\/ArduinoBoardMini\" target=\"_blank\"><strong>Mini<\/strong><\/a>\u2014This is a smaller version of the Nano, measuring only 30mm x 18mm. It achieves its small size by omitting a USB interface, so an adapter is needed for programming. This board is a particularly good choice for applications where it needs to be hidden in a tiny space and you are unlikely to be reprogramming it frequently.<\/li>\n<\/ul>\n<div id=\"attachment_387\" style=\"width: 444px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/09\/Uno-with-Ethernet-Shield.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-387\" class=\"wp-image-387 size-full\" src=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/09\/Uno-with-Ethernet-Shield.jpg\" alt=\"Uno with Ethernet Shield\" width=\"434\" height=\"298\" srcset=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/09\/Uno-with-Ethernet-Shield.jpg 434w, https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/09\/Uno-with-Ethernet-Shield-300x206.jpg 300w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><\/a><p id=\"caption-attachment-387\" class=\"wp-caption-text\">Uno R3 with an Ethernet Shield<\/p><\/div>\n<p><strong> Shields<\/strong> are peripheral boards that can be plugged into the pins (<strong>pins<\/strong> are the connections, or I\/O points, for attaching things to the board) of a microcontroller board. Multiple shields can be stacked on top of each other to add interfaces and other capabilities to the microcontroller. A wide variety of peripheral boards in shield format are available from a robust and competitive international market. &#8220;Development&#8221; shields are available that are like prototyping PC boards, allowing you to create a custom shield.<\/p>\n<h4>What can I do with Arduino Boards?<\/h4>\n<p>These little boards are computers that can do anything from reading a wide variety of sensors to running devices like servos and communicating with each other using a variety of technologies and protocols.\u00a0 Here are some common applications for model railroading:<\/p>\n<ul>\n<li><strong>Turnout Control<\/strong>\u2014A frequent motivation for modelers to explore microcontrollers is the desire to use common off-the-shelf micro servos to run turnouts. Servos require a microcontroller; however, the microcontroller is not limited to just controlling servos. <strong>Any kind of turnout motor commonly used in model railroading can be managed by a microcontroller<\/strong>, either directly or\u2014where voltage or power consumption require\u2014through a switching device such as a transistor or relay. The advantages are simplified wiring and the ability to programmatically drive other actions or devices in response to turnout actions and status. If using micro servos instead of stall motor units, the cost per turnout is significantly reduced.\n<p><div id=\"attachment_868\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/08\/turnout-servos-mounted.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-868\" class=\"size-large wp-image-868\" src=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/08\/turnout-servos-mounted-1024x681.jpg\" alt=\"Servos 1, 2 and 9 mount in their final positions.\" width=\"610\" height=\"406\" srcset=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/08\/turnout-servos-mounted-1024x681.jpg 1024w, https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/08\/turnout-servos-mounted-300x200.jpg 300w, https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/08\/turnout-servos-mounted-768x511.jpg 768w, https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/08\/turnout-servos-mounted.jpg 1350w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><p id=\"caption-attachment-868\" class=\"wp-caption-text\">Servos used as turnout motors.<\/p><\/div><\/li>\n<li><strong>Block Occupancy Detection<\/strong>\u2014Detecting block occupancy is a sensor problem, and the Arduino world is all about reading and responding to sensors.\n<ul>\n<li><strong>For DC layouts<\/strong>, the ACS712 sensor provides excellent detection at a cost of less than $2 per block on eBay and elsewhere. For most small layouts, the 5A version will work; big layouts might need the 20 or 30 Amp ones. You won&#8217;t need a special ADC; the 20mA resolution you get with the internal ADC (accessed through the analog pins) is enough to detect your locomotives. A trailing car or caboose (several on long trains) that draws 20 mA or more from the rails (use a resistor or some other load such as lighting) will allow you to detect trains occupying multiple blocks.\n<p><div id=\"attachment_523\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/11\/ACS712-Board.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-523\" class=\"size-medium wp-image-523\" src=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/11\/ACS712-Board-300x232.jpg\" alt=\"\" width=\"300\" height=\"232\" srcset=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/11\/ACS712-Board-300x232.jpg 300w, https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/11\/ACS712-Board.jpg 998w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-523\" class=\"wp-caption-text\">ACS712 Board<\/p><\/div><\/li>\n<li><strong>On DCC layouts<\/strong>, the alternating wave form of DCC rail power allows the use of current transformers. Although the ACS712 sensor works down to around 10 &#8211; 12 mA with a high resolution ADC, that will not detect resistor wheelsets or the newest non-sound decoders in idle mode when draw is around 5mA with all lights and accessories off. The better current sensing solution for DCC is current transformers. These are very sensitive; even with the 10 bit ADC built into an UNO you can detect a 10k resistor wheel on the track when using CT sensors. Current transformers are directly attached to an analog pin on your Arduino, or an input on an external ADC, and read by your sketch.\n<div id=\"attachment_1071\" style=\"width: 210px\" class=\"wp-caption alignright\"><a href=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/12\/current-transformer.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1071\" class=\"size-full wp-image-1071\" src=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/12\/current-transformer.jpg\" alt=\"\" width=\"200\" height=\"200\" srcset=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/12\/current-transformer.jpg 200w, https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/12\/current-transformer-150x150.jpg 150w, https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/12\/current-transformer-50x50.jpg 50w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/a><p id=\"caption-attachment-1071\" class=\"wp-caption-text\">Current Transformer<\/p><\/div>\n<p>Open market parts are inexpensive at around $2 each. Digikey sells them, as does <a href=\"http:\/\/www.rr-cirkits.com\/\" target=\"_blank\">RR-CirKits<\/a>. I&#8217;ve found them singly and in small kits on Amazon and eBay. Alternatively, you can interface an Arduino with off-the-shelf BOD systems based on current transformers (such as the RR-CirKits system) that produce a digital (on\/off) DC output signal.<\/li>\n<li><strong>All Layout Systems<\/strong> &#8211; Other options include various types of optical sensing, magnetic sensing or anything where a train can cause a sensor to change state. Using Arduino technologies gives you the flexibility to use several different sensor types at the the same time.<\/li>\n<\/ul>\n<\/li>\n<li><strong>RFID Detection<\/strong>\u2014RFID is a common application in the broader Arduino universe, and it has been used on layouts to identify specific locomotives and rolling stock. The only limitation is the size of the sensor coils and tags; currently available parts are best suited to HO or larger scales. RFID coupled with block occupancy detection is a big step toward fully or partially automated train operations.<\/li>\n<li><strong>Lighting<\/strong>\u2014Lighting is an application where microcontrollers shine.\u00a0 For example, an Arduino can turn lights (both LED and incandescent) on and off at random, in response to\u00a0 some other action or according to a programmed sequence or schedule. You can use a special capability of microcontrollers\u2014<a href=\"https:\/\/www.arduino.cc\/en\/Tutorial\/PWM\" target=\"_blank\">PWM \u2013 pulse width modulation<\/a>\u2014to finely control the brightness of a light over time, creating fades and other effects such as a fire or welding simulation. Using RGB LEDS you can synthesize 16 million colors by manipulating the relative levels of Red, Green and Blue output by the LED.<\/li>\n<li><strong>Signals<\/strong>\u2014A subset of lighting that has to be singled out because you can easily implement layout-wide signaling logic and protocols using the Arduino platform. With turnout status (and block occupancy data, if you have it) at your digital fingertips (your digits? I think that is an Arduino pun), implementing signal logic is a snap.<a href=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/01\/Station-and-Signal-5-for-slider.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-602\" src=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/01\/Station-and-Signal-5-for-slider-1024x341.jpg\" alt=\"Station and Signal 5\" width=\"610\" height=\"203\" srcset=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/01\/Station-and-Signal-5-for-slider-1024x341.jpg 1024w, https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/01\/Station-and-Signal-5-for-slider-300x100.jpg 300w, https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/01\/Station-and-Signal-5-for-slider-768x256.jpg 768w, https:\/\/thenscaler.com\/wp-content\/uploads\/2016\/01\/Station-and-Signal-5-for-slider.jpg 1200w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/li>\n<li><strong>Mechanical Animations<\/strong>\u2014Want to turn a windmill or water wheel, raise and lower a drawbridge, run a turntable, run carnival rides or animate a grade crossing gate? You can do that easily with Arduino technology.\u00a0 For mechanical animation you have your choice of servos, linear actuators or nearly any type of DC motor.\u00a0 Inductive loads such as DC motors generally require a transistor based switching\/power management system. Stepper motors, which can be positioned precisely, can be run with the help of a Darlington array or similar control device.\u00a0 Motor control peripherals are inexpensive and plentiful in the marketplace.<\/li>\n<li><strong>Fast Clock Operation<\/strong>\u2014You can use an Arduino to create and display a fast clock. Why just display a fast clock when you can do more? Your entire Arduino-based system can respond to the fast clock appropriately with lights, animation and whatever else you can think of. Integrating a fast clock into your master controller, and having it send time signals to other boards in addition to showing you the &#8220;fast time&#8221; strikes me as a real enhancement of layout operation and functionality.<\/li>\n<li><strong>Control Panels<\/strong>\u2014Instead of creating a rats nest of wiring for a complex control panel, how about home-running every panel object back to a single connection point and using program logic to read buttons and switches, run LEDS and tell layout objects what to do? If you are doing <strong>DC with multiple cabs<\/strong>, simplify your wiring and let your UNO or MEGA run power relays to switch cab control. Using a networking technology (Ethernet, WiFi, etc.) a control panel can control the entire installation through the network interface. Adding local sub-panels to a master control system is easy using these methods. You can also go a completely different direction from the usual control panel designs and create touchscreen controls.\n<p><div id=\"attachment_446\" style=\"width: 370px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/09\/testloop_menu.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-446\" class=\"size-full wp-image-446\" src=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/09\/testloop_menu.jpg\" alt=\"Test Loop Controls\" width=\"360\" height=\"216\" srcset=\"https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/09\/testloop_menu.jpg 360w, https:\/\/thenscaler.com\/wp-content\/uploads\/2015\/09\/testloop_menu-300x180.jpg 300w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/a><p id=\"caption-attachment-446\" class=\"wp-caption-text\">Test Loop Turnout Controls<\/p><\/div><\/li>\n<li><strong>Communications<\/strong>\u2014Arduino boards can communicate with other boards, using a wide variety of methods and protocols. Board-to-board serial communication works well without special peripherals. For broader communication among many boards, use wired Ethernet, WiFi or other wireless technologies such as Bluetooth or XBee. Communication technologies allow you to assign tasks to boards\u00a0 &#8220;geographically&#8221; (where on the layout) or &#8220;functionally&#8221; (task type), and have everything function as a coherent whole. Using networking technologies\u00a0 you can communicate with pretty much anything else that uses the same protocols, even things out on the Internet (that said, for security reasons I&#8217;d never expose my private layout to the Internet).<\/li>\n<li><strong>DCC Applications<\/strong>\u2014For those specifically interested in interfacing Arduino boards with DCC systems, the <a title=\"MRRWA\" href=\"http:\/\/mrrwa.org\/\" target=\"_blank\">Model Railroading with Arduino<\/a>\u00a0project, an off-shoot of the <a title=\"Open DCC\" href=\"http:\/\/sourceforge.net\/projects\/opendcc\/\" target=\"_blank\">Open DCC Project<\/a>, is all about working on direct Arduino\/DCC interfaces. It\u2019s technically complex but straight forward to interface an Arduino with the DCC command bus. Check out this project using an <a href=\"http:\/\/model-railroad-hobbyist.com\/node\/19446\" target=\"_blank\">Arduino Mini to create a 17 function DCC decoder<\/a>. Projects like that are not for newbies, but once you are comfortable with the techniques and technologies involved it&#8217;s very doable.<\/li>\n<\/ul>\n<p>One of my goals is to make my layout <strong><em>semi-autonomous<\/em><\/strong>, making it a <strong><em>dynamic environment within which I can operate trains<\/em><\/strong>. I can accomplish this with multiple boards running a selection of the applications listed above, communicating and working together in a cohesive system.<\/p>\n<h4>Is it Hard to Program an Arduino?<\/h4>\n<p>The <a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\" target=\"_blank\">IDE available on the Arduino website<\/a> (Integrated Development Envronment &#8212; the software you use to write, compile and upload sketches to your boards) supports C++, an object-oriented super-set of the C language that has been the mainstay of professional development for 5 decades. You don&#8217;t have to write in an object oriented (OOP) style if you don&#8217;t want to &#8212; procedural C is fine. If you&#8217;ve ever programmed in C, C++, PHP, JavaScript or any similar structured language, you are good to go.<\/p>\n<p>Arduino was designed as a teaching\/learning tool so it is ideal for learning the basics if you&#8217;ve never programmed before.\u00a0 Get an UNO starter set that includes parts and instructions for some basic projects\u2014that will help you get started with both circuits and code. The <a href=\"https:\/\/www.arduino.cc\/\" target=\"_blank\">Arduino website<\/a> is an excellent resource for beginners, with plenty of information, tutorials and user forums for support.<\/p>\n<h4>Where can I buy Arduino boards?<\/h4>\n<p><a href=\"https:\/\/www.sparkfun.com\/categories\/103\" target=\"_blank\">Sparkfun<\/a> and <a href=\"https:\/\/www.adafruit.com\/category\/17\" target=\"_blank\">Adafruit<\/a> are official distributors of Arduino products in the US, including some unique versions they have created.\u00a0 You can find official goods at their websites, <a href=\"http:\/\/amzn.to\/2h5QXv2\" target=\"_blank\">Amazon.com<\/a>, <a href=\"http:\/\/www.digikey.com\/product-search\/en?keywords=arduino\" target=\"_blank\">Digikey<\/a>, <a href=\"http:\/\/www.jameco.com\/shop\/StoreCatalogDrillDownView?langId=-1&amp;storeId=10001&amp;catalogId=10001&amp;freeText=arduino&amp;search_type=jamecoall\" target=\"_blank\">Jameco<\/a>, <a href=\"http:\/\/www.mouser.com\/Search\/Refine.aspx?Keyword=arduino\" target=\"_blank\">Mouser<\/a> and elsewhere.<\/p>\n<p>On <a href=\"http:\/\/amzn.to\/2h5QXv2\" target=\"_blank\">Amazon<\/a> and <a href=\"http:\/\/www.ebay.com\/sch\/i.html?_from=R40&amp;_trksid=p2050601.m570.l1313.TR12.TRC2.A0.H0.Xarduino.TRS0&amp;_nkw=arduino&amp;_sacat=0\" target=\"_blank\">EBay<\/a>, you&#8217;ll find counterfeit copies, usually at ridiculously cheap prices. This is a <a href=\"https:\/\/blog.arduino.cc\/2013\/07\/10\/send-in-the-clones\/\" target=\"_blank\">touchy subject<\/a> because the vendors of counterfeits are not doing anything original or making any contribution to the development costs. Arduino is an open-source platform, and they encourage experimentation and extension to the point that they provide the board design files so that you can modify them and manufacture your own if you wish. They like genuinely original variations on their designs. What they are less keen about is the counterfeits that are cheaply manufactured copies of the Arduino designs; these are often marked deceptively about the country of manufacture.<\/p>\n<p>Official boards and the quality variants are well made. Solder joints are perfect and the parts excellent quality. I&#8217;ve yet to see an official product fail unless it has been abused (which happens to the best of us).<\/p>\n<p>Having worked with a few knock-offs, I can say there is a quality difference.\u00a0 I&#8217;ve had a couple of unofficial Nano&#8217;s spontaneously burn out on me. The solder joints are often atrocious. I&#8217;ve had heat dissipation issues with knock-off Ethernet shields. Most of the time the boards will work fine, but the trade-off for the low price is quality and occasional failure. The general rule in life\u2014you get what you pay for\u2014applies.<\/p>\n<h4>Getting Started<\/h4>\n<p>Get a starter kit with an UNO and materials for basic projects.\u00a0 Here are a few examples:<\/p>\n<ul>\n<li><a href=\"http:\/\/amzn.to\/2h4KzVy\" target=\"_blank\">Official Arduino Starter kit<\/a><\/li>\n<li><a href=\"http:\/\/amzn.to\/2g8VZu2\" target=\"_blank\">Official Arduino Starter kit with additional materials.<\/a><\/li>\n<li><a href=\"http:\/\/amzn.to\/2g91EjG\" target=\"_blank\">Elegoo Starter Kit<\/a>. A fairly complete knock-off set.<\/li>\n<li>The <a href=\"http:\/\/amzn.to\/2gjbHBe\" target=\"_blank\">RIASpire Master Starter Kit<\/a> comes with a knock-off MEGA.<\/li>\n<\/ul>\n<p>If you already have an Arduino board, there are some great starter project kits with multiple parts and fun starter projects:<\/p>\n<ul>\n<li><a href=\"http:\/\/amzn.to\/2g8VrEw\" target=\"_blank\">SunFounder Project Super Starter Kit<\/a>. I like this one because it includes a couple of shift registers (which I used extensively) and a small LCD display.<\/li>\n<li>If you want to try out lots of sensors try the <a href=\"http:\/\/amzn.to\/2h4Qg5E\" target=\"_blank\">Elegoo 37-in-1 Sensor Module Kit<\/a>.<\/li>\n<\/ul>\n<p>Once you are generally familiar with the Arduino platform and comfortable building circuits for use with the boards, explore this blog and other sites for basic ideas and techniques.<\/p>\n<p>Most people want to start by controlling some turnouts from a control panel. Here are a few posts that you may find helpful:<\/p>\n<ul>\n<li><a href=\"https:\/\/thenscaler.com\/?p=942\" target=\"_blank\">Running a Small Layout with an UNO<\/a>.<\/li>\n<li><a href=\"https:\/\/thenscaler.com\/?page_id=174\" target=\"_blank\">Turnout Control with Arduino and Servos<\/a>.<\/li>\n<li><a href=\"https:\/\/thenscaler.com\/?page_id=661\" target=\"_blank\">Multiple Turnouts and Other Multitasking<\/a>.<\/li>\n<\/ul>\n<p>From there you can move on to signals and lighting, and perhaps even some mechanical objects. You can quickly find where I&#8217;ve written about these and other subjects by using the tag cloud you&#8217;ll find in the left column of every page.<\/p>\n<p>Good luck.\u00a0 I think you&#8217;ll find Arduino and related electronics technologies worthy additions to your model railroading tool chest.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are looking for basic information and ideas on how to use Arduino boards on your model railroad layout, you&#8217;ve come to the right place. I happen to model in N scale, but everything I write about in this blog can work in any scale from G to Z. Everything I&#8217;m doing is independent [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1032","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thenscaler.com\/index.php?rest_route=\/wp\/v2\/pages\/1032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thenscaler.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thenscaler.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thenscaler.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thenscaler.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1032"}],"version-history":[{"count":37,"href":"https:\/\/thenscaler.com\/index.php?rest_route=\/wp\/v2\/pages\/1032\/revisions"}],"predecessor-version":[{"id":1126,"href":"https:\/\/thenscaler.com\/index.php?rest_route=\/wp\/v2\/pages\/1032\/revisions\/1126"}],"wp:attachment":[{"href":"https:\/\/thenscaler.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}