element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experimenting with Current Sense Amplifiers
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Current Sense Amplifiers
  • More
  • Cancel
Experimenting with Current Sense Amplifiers
Challenge Blog Blog #1: Challenge Introduction
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: colporteur
  • Date Created: 13 Apr 2022 11:56 AM Date Created
  • Views 10213 views
  • Likes 7 likes
  • Comments 5 comments
  • raspberry pi
  • current sense amplifier
  • MAX40080
Related
Recommended

Blog #1: Challenge Introduction

colporteur
colporteur
13 Apr 2022

The goal of this challenge is to use the MAX40080 Current Sense Amplifier to detect the locomotive of a model train passing over a section of track rail.

image

In model railroading, determining if there are rail cars on a section of track is called Block Detection. There are a few methods that are used on model railroad layouts to accomplish the task. My plan is to look at current sense as a detection method.

image

There are two types of control systems for model train layouts. Direct Current (DC) and Digital Command and Control (DCC).

In the DC system, a DC voltage is applied to the power bus that supplies each isolated section of track through pig tails. The motor in the train locomotive picks up DC power from the track rails. The magnitude of the voltage determines the speed of the train. The polarity of the DC voltage determines the direction of travel for the locomotive.

In the DCC system a steady voltage is applied to the power bus. The power bus provides power to the locomotive and also acts as a communication path between a controller and the decoder inside the locomotive. Pulse signal are sent along the communication path as coded instruction picked up by the decoder. The decoder gets power from the track rails to operate. It controls the power used to drive the motor. In the DCC system, two signals that are sent to locomotive decoders are speed control and direction of travel.

The locomotive motor draws current from the rails. Track rails are isolated from each other, detecting current in a section of track will show the locomotive is present in that section of track.

At a cursory glance, this exercise seems pretty basic for the MAX40080 Current Sense Amplifier, simply detect the current drawn by a motor. The challenge becomes the model train control system.

The DC system varies the voltage and polarity of the power bus in order to control speed and direction of the locomotive. These are two parameters that are used in the current sense process. How will the variations impact performance?

For testing three speeds, slow, medium and fast will be used. Slow speed will be the voltage that just starts the locomotive moving and fast being the highest speed the locomotive operates at. Medium being some value in between. In this experiment, the fast speed is capped at 12VDC. The slow speed will be determined based on the locomotive used.

Besides variable voltage applied to the current sensor, the polarity of the power bus will change as the direction of the locomotive changes. How will the variations impact performance?

The DCC control system has its nuances that need to be considered for current detection. The voltage applied to the power bus and the polarity of the voltage in this system are constant. The decoder controls speed and direction of the locomotive. The aim is to show that the power bus provides more current as the speed of the locomotive varies. Direction of the locomotive travel should have no impact.

In addition, the DCC system uses the power distribution mechanism as a communication path. Will this impact the performance of the current sense?

To summarize, here are the conditions for examining the MAX40080 Current Sense Amplifier across the two systems:

DC system
-varied voltage
-varied polarity

DCC system
-constant voltage
-varied current
-communication signals

When I initially looked at this challenge, my first question was, how is the MAX40080 Current Sense Amplifier installed? Here is the approach I am going to take. Dear reader, if you see something amiss, please provide feedback.

image

With the MAX40080 Current-Sense Amplifier installation resolved a python script to detect the current will be required. I’m making an assumption the details for the script as well as installation and configuration of the Click 6, MAX40080 Current-Sense Amplifier model to the Raspberry Pi are available. Documentation suggests prior development material is provided through the vendor’s resources that can support the board.

  • Sign in to reply
  • colporteur
    colporteur over 3 years ago in reply to dang74

    Not much has changed in terms of age demographics. They may even be older!

    I have been talking with some of the old guards about appealing to younger audiences. My involvement in creating animation is a way I hope to appeal to a different age demographic.

    The hobby has little for immediate gratification. Investment of time and energy produces results. That is a hard formula to sell in today's market.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dang74
    dang74 over 3 years ago in reply to colporteur

    I wonder to what extent the hobby will continue.  I remember when I was a kid most of the die-hards were older men.  I guess with DCC and the ability to control things with a phone app... that could be the sorts of things to draw in a new generation.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • colporteur
    colporteur over 3 years ago in reply to dang74

    According to an Internet search, DCC was adopted by National Model Railroad Association in 1993.

    It has some complexity with decoders and controllers but also provides some flexibility like controlling a locomotive with a phone app. I am not a model railroader but if I was to take up the hobby I would invest in a DCC system and bypass the DC system altogether. The unfortunate part is that the hardware is not cheap.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dang74
    dang74 over 3 years ago

    Because model trains have been around for so long I never imagined anything like the Digital Command and Control system to be at work.  Of course I imagine DCC is a more recent advancement.  Thanks Colporteur, you opened my eyes.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • aspork42
    aspork42 over 3 years ago

    Nice project!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube