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.

4F-1.png

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!

 

PTHAT-Test-Rig.jpg

 

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.

 

Pthat-RaspberryPI.jpg

 

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.

 

SMALLPulseTrainScaraExample.jpg

PTHAT-Parallel-Scara2.jpg

 

SMALLPulseTrainHatSerialExample.jpg

SMALLPulseTrainHatCoiWinderScreenshot.jpg

PTHAT-Coil-Winder-2.jpg

 

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.

 

ClockSettingsPTHATV1.jpg

 

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

BothBoardsTogether-MotorWiring.jpg

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

 

scope10000Hz3.jpg

 

scope1-2-4-8kHz3.jpg

 

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