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
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Pulse Train Hat for the Raspberry Pi
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
GPIO Pinout
Raspberry Pi Wishlist
Comparison Chart
Quiz
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: pthat
  • Date Created: 14 Apr 2017 1:49 PM Date Created
  • Views 3691 views
  • Likes 1 like
  • Comments 14 comments
Related
Recommended
  • pthat
  • raspberry pi
  • pulse train hat
  • dds generators
  • pulse train
  • raspberry pi hat

Pulse Train Hat for the Raspberry Pi

pthat
pthat
14 Apr 2017

I am hoping that a new HAT we have designed and released will be of interest to anyone wanting to control motors within their own projects using the Raspberry Pi computer.

image

The Pulse Train Hat is an add-on board for the Rapsberry Pi computer and allows clean, fast and accurate pulses to be created using simple ASCII commands.

 

There are many hardware designs where a variable frequency pulse is needed, but one that is the most popular is for driving stepper/servo motors that use pulse and direction lines.

Motors like this are found in machines such as 3D Printers, CNC machines, Robot Arms and not to mention the other endless motion control and automation machines.

 

Below is a Test Rig we used while developing the code.

 

It allows us to test all 4 channels of the PTHAT by sending the pulses to stepper drivers, that were connected to small Nema 17 motors. It also has all the limit switch inputs brought out to switches, the ADC inputs connect to 10K pots and AUX outputs connected to LED’s.

 

We decided to use low cost stepper drivers that are usually found in 3D printers as they are not brilliant, but do the job. Our thinking is if the PTHAT can control these noisy little drivers, then handling the more expensive drivers would be easier!

 

image

 

Controlling motors may seem simple, but when you get down to detailed control, it can all become very confusing and a big learning curve.

 

With the new Pulse Train Hat (PTHAT) add-on for the Raspberry Pi and a new dedicated support site http://www.pthat.com , we plan to make that task very simple and allow everyone to easily create their automation product.

 

image

 

We have created an number of example applications using Visual Studio 2015 that can be used with Windows 10 IOT.

These examples have been written in C# as a Universal Windows Platform (UWP) and all the source code can be downloaded from the website.

 

image

image

 

image

image

image

 

We have also designed the PTHAT to have it's firmware upgraded easily using a JTAG programmer that we supply with each board.

Also full details on the ARM processor we use has been released covering all the GPIO information, Clock settings and peripherals for people wanting to write their own firmware.

 

image

 

Also there are a number of wiring diagrams released covering various stepper driver hook ups.

image

Of course you do not have to use the PTHAT to control motors and can be used as a pulse generator for other projects.

 

image

 

image

 

Please feel free to check out the dedicated support site for more information http://www.pthat.com

  • Sign in to reply

Top Comments

  • pthat
    pthat over 8 years ago +4
    Yep most of controllers out there accept raw Gcode commands and do all the calculations in firmware, including G01 Linear interpolation commands and G02 Circular interpolation commands. So software like…
  • pthat
    pthat over 8 years ago +3
    There are already a lot of dedicated controllers out there for CNC machines and 3D printers etc, that are used as either dedicated toolpath engines, accepting Gcode and they work well. The Pulse Train…
  • Robert Peter Oakes
    Robert Peter Oakes over 8 years ago in reply to pthat +3
    Thanks for the prompt response, checking the specifications of the CPU, looks like it would be more than able to take a port from any of the Arduino based GCode engines and provide a better performance…
  • dougw
    dougw over 8 years ago in reply to balearicdynamics

    The signals are there, but can it perform PWM?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to dougw

    Doug, I was meditating on the same question. ThenI saw the last image Wiring motors to the ... and the answer is yes. Every motors has all the signals (direction, enable and pulse. Depending on the case maybe needed to add a couple of transistors to drive with a single *** both the motor (6 wires) wiring connections always inverted but this is a minimal intervention.

    I appreciate they have also provided an emergency stop button. It seems that the last PI derivative developments are exploring the great number of industrial applications.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dougw
    dougw over 8 years ago

    It looks like it drives separate motor driver cards to convert the pulse train to stepper phase signals - presumably the pulse train and direction signals are 5V as there is a 5V line.

    Some H-bridge drivers for DC motors require a direction signal and a PWM pulse train. Could this card drive such H-bridges?

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 8 years ago

    Interesting board.

     

    I will keep it in mind for future projects.

     

    DAB

    • Cancel
    • Vote Up +2 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 © 2026 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