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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
The World in Motion
  • Challenges & Projects
  • Project14
  • The World in Motion
  • More
  • Cancel
The World in Motion
Blog Pulse Width Modulation a Speed Equalizer(2): Introduction
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join The World in Motion to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: colporteur
  • Date Created: 28 Jul 2022 11:50 PM Date Created
  • Views 808 views
  • Likes 8 likes
  • Comments 0 comments
  • motor projects
  • worldinmotionch
  • pwm
Related
Recommended

Pulse Width Modulation a Speed Equalizer(2): Introduction

colporteur
colporteur
28 Jul 2022

The exercise of trying to use PWM to control motor speed is a subsection of a larger project that was also used to demonstrate some prototype techniques in the Project 14 Circuit Prototype Techniques challenge. I've continued to work on the project. The Project 14 opportunity motivates me to take up the task and do some documenting along the way.

image


The goal of the larger project is to develop a train animation sequencer. Train#1 (TR1) leaves the station and travels a loop of track to return to the station to stop. Train#2 (TR2) then leaves the station, travels the same loop and returns to stop at the station. Once Train#2 returns Train#1 runs the pattern again. This sequence continues indefinitely. The final design has both an east and west set of trains shown in the drawing.

The animation sequence has been broken down into a series of stages for each of the train pair. The stages are Train Stopped, Train Departing, Train in Transit, Train Arriving to end with Train Stopped. All the stages will need to be able to control the speed of the train by either accelerating it, decelerating it or stopping it. This is where PWM techniques should come in handy

The sequencing project layout uses a series of IR sensors, track switches and motor controllers all managed by Arduino code to make the whole animation possible. This submission looks at applying PWM to move a locomotive.

Bill of Materials:
 Geekcreit® L298N Arduino module Dual H Bridge Stepper Motor Driver Board
 Geekcreit® MEGA 2560 R3 ATmega2560 MEGA2560 Development Board
 Andrea Lombardo/L298N Arduino Library
 Test locomotive(s)

image

The Arduino using the L298N software library, will produce PWM to the L298N driver module. The driver module using a train power supply will feed PWM signal to the locomotive. 

I'm told, the Model Railroaders club has a device to establish the speed of the locomotive to scale. How fast a locomotive moves through the sidings versus in the loops is critical for realism. I hope to use the device to determine code values so the speeds can be accurate for the stages.

  • Sign in to reply
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