PTHAT Introduction using Instant Commands
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!
Usually with stepper motors to get higher speeds, you would take the motor voltage up to 35 volts, but we have left the supply at 24 volts to show that the clean pulses produced by the PTHAT overcomes a lot of issues that sometimes can be seen with noisy, dirty pulses.
Commands used in this example are:
Set Axis CommandStart Axis Command
Stop Axis Command
Pause/Resume Axis Command
Request Current Pulse Count Command
Request ADC Reading Command
Set Aux Output Command
Turn On/Off Received Command Replies
Turn On/Off Completed Command Replies
Request Firmware Version
Reset PTHAT
The end developer has easily modify this example to build their own application.
The example application was developed in Visual Studio 2015 that can be used with Windows 10 IOT on the Raspberry Pi or compiled to x86/x64 for use on a PC.
The example has been written in C# as a Universal Windows Platform (UWP).
You can either download the compiled program from the Windows App Store on the following link
https://www.microsoft.com/en-gb/store/p/pulse-train-hat-serial-example/9pdwtx6gnmsb
Or please use the following button to download the full source code.
Select another example below
Closer look at the PCB's
PTHAT Mainboard
- Single Channel Main Board.
- JTAG Programmer.
- Set of Mounting Spacers and Bolts.
PTHAT Add on Board
- Expansion Add on Board.
- Increases the PTHAT to 4 channels.
- Extra I/O Functionality.
- Set of Mounting Spacers.
PTHAT Full Package
- Single Channel Main Board.
- Expansion Add on Board.
- Increases the PTHAT to 4 channels.
- Extra I/O Functionality.
- JTAG Programmer.
- Set of Mounting Spacers and Bolts.
- Save £10 with this Package