<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Pulse Train Hat for the Raspberry Pi</title><link>/products/raspberry-pi/b/blog/posts/pulse-train-hat-for-the-raspberry-pi</link><description>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. The Pulse Train Hat is an add-on board for the Rapsberry Pi computer and allows</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Pulse Train Hat for the Raspberry Pi</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pulse-train-hat-for-the-raspberry-pi</link><pubDate>Tue, 25 Apr 2017 13:57:10 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9923736d-7aaa-407f-ac44-ba184936e00c</guid><dc:creator>pthat</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;So software like Gcode sender, simply send out these commands and have nice features like GUI windows plotting the course of each Axis for display purposes.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We have no plans to add this ourselves at the moment as a huge bit of work, but with the undocumented RAW buffer commands, already in the firmware it is possible to send many small commands.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is the screenshot of the Universal Application we have been testing with.&lt;/p&gt;&lt;p&gt;This takes each line of Gcode and converts it to RAW buffered commands. It looks ahead and knows when a command will change direction and hence injects ramping into the start command and finish command of that segment automatically. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Once the motors have started, all you are doing is sending commands with frequency and pulse count for each movement, that get buffered and executed one after the other.&lt;br /&gt;The processor does not have to do much really apart from monitor pulse counts and change the frequency on the fly for each DDS generator.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We have a high speed baud setting as well of 806400 which helps a lot. But you can still run it at 115200 with a change of jumper on board.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Excuse the rough layout, it is only test at the moment.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/1026x801/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-9923736d-7aaa-407f-ac44-ba184936e00c/contentimage_5F00_184219.jpg:1026:801]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2880&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Pulse Train Hat for the Raspberry Pi</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pulse-train-hat-for-the-raspberry-pi</link><pubDate>Tue, 25 Apr 2017 08:13:07 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9923736d-7aaa-407f-ac44-ba184936e00c</guid><dc:creator>pthat</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;To keep the price down, most of the dedicated boards use the processors on board peripherals like timers or hardware PWM&amp;#39;s.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We went a different direction with the PTHAT and decided to use dedicated DDS pulse generators, to give us the resolution and the speed, but also to allow the PTHAT to be used as a square pulse generator for other applications.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;With the PTHAT bundle it has 4 DDS Pulse Generators and these are the AD9833&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://uk.farnell.com/analog-devices/ad9833brmz/waveform-generator-9833-msop10/dp/1581966?st=ad9833&amp;amp;gs=true&amp;amp;ddkey=http%3Aen-GB%2FElement14_United_Kingdom%2Fw%2Fc%2Fsemiconductors-ics%2Fspecial-function" target="_blank"&gt;http://uk.farnell.com/analog-devices/ad9833brmz/waveform-generator-9833-msop10/dp/1581966?st=ad9833&amp;amp;gs=true&amp;amp;ddkey=http%3Aen-GB%2FElement14_United_Kingdom%2Fw%2Fc%2Fsemiconductors-ics%2Fspecial-function&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;And the processor STM32F411&lt;br /&gt;&lt;a class="jive-link-external-small" href="http://uk.farnell.com/stmicroelectronics/stm32f411ret6/mcu-32bit-cortex-m4-100mhz-lqfp/dp/2456967" target="_blank"&gt;http://uk.farnell.com/stmicroelectronics/stm32f411ret6/mcu-32bit-cortex-m4-100mhz-lqfp/dp/2456967&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As you can see if you wanted to build it yourself, the price does add up.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;But we felt it was worth it when accurate interpolation was needed between motors and show an example on our website.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Motor1 that needs 1000 pulses and motor2 that needs 2222 pulses to reach the target travel distance.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can see on the scope shot, by having the resolution of the DDS pulse generators, you can get a very accurate speed on both motors and both should stop and start at the same time, keeping interpolation.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Run motor2 at 2666.66Hz (100RPM)&lt;/p&gt;&lt;p&gt;Run motor1 at 1200.11Hz (45.45RPM)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pthat.com/wp-content/uploads/2017/01/scope-interpolation3.jpg"&gt;&lt;img alt="scope-interpolation3.jpg" class="image-1 jive-image" src="http://www.pthat.com/wp-content/uploads/2017/01/scope-interpolation3.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;We would love to see someone develop firmware for the PTHAT so it can run as a dedicated Gcode engine and by us supplying a JTAG&amp;nbsp; programmer with each PTHAT, makes it possible for people to develop their own firmware and upload it.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As I have said we are still working on the RAW buffer command set in the background, but it has to be done as time allows. We are only a small company and resource can be an issue when busy on other products we make.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2880&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Pulse Train Hat for the Raspberry Pi</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pulse-train-hat-for-the-raspberry-pi</link><pubDate>Mon, 24 Apr 2017 19:20:55 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9923736d-7aaa-407f-ac44-ba184936e00c</guid><dc:creator>pthat</dc:creator><slash:comments>2</slash:comments><description>&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;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.&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;The Pulse Train Hat is a development board to allow people to control motors in all different kinds of ways, including CNC machines if they want to write the software or even the firmware for it.&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;But we did not want to restrict people to just using Gcode commands, as these have to be buffered and executed one command at a time.&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;With the pulse train hat, all 4 pulse train outputs can be controlled individually, so you can set one motor off doing a task and at any time set off a second motor and so on, which is great for a lot of robotic applications. Also they can be set off at the same time and synchronised for interpolation with each other, like a CNC machine requires.&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;In saying that we have been working on a raw buffer command set that we will release in a future version of the firmware which will buffer lots of small movement commands.&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;Most of the controllers based on the Atmel family of processors use the Bresenham algorithm approach to keep interpolation between each Axis. The PTHAT takes a different approach in that it has dedicated DDS Pulse Generators that can have their frequency changed on the fly rather than calculating pulses to form an approximation of a straight line between two points.&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;For advanced users that want to write firmware for a dedicated CNC controller, we have supplied all the processor configuration on the firmware page.&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;&lt;strong&gt;&lt;a class="jive-link-external-small" href="http://pthat.com/index.php/firmware/" rel="nofollow ugc noopener" target="_blank"&gt;http://pthat.com/index.php/firmware/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;The ARM processor we use on the PTHAT mainboard is the&amp;nbsp; STM32F411RE clocked at 100MHz, if you want to compare against the Atmel processors.&lt;/p&gt;&lt;p style="text-align:left;text-indent:0px;font-style:normal;font-weight:500;"&gt;&lt;strong&gt;&lt;a class="jive-link-external-small" href="http://www.st.com/en/microcontrollers/stm32f411re.html" rel="nofollow ugc noopener" target="_blank"&gt;http://www.st.com/en/microcontrollers/stm32f411re.html&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2880&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Pulse Train Hat for the Raspberry Pi</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pulse-train-hat-for-the-raspberry-pi</link><pubDate>Mon, 24 Apr 2017 18:14:54 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9923736d-7aaa-407f-ac44-ba184936e00c</guid><dc:creator>Robert Peter Oakes</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;How well could this handle GCODE or something similar where the co-ordination of 4 axis are needed in cutting arcs or other multi axis features (Sculpturing for instance). this requires either asking the controller directly to drive the steppers in the required arc or having the host interpret that arc into a very large number of small step and direction commands but keeping the movement smooth enough to not leave artifacts from cutting or laying down filament etc.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;is there enough FLASH and RAM space to do this. In comparison... &lt;/p&gt;&lt;p&gt;An Arduino UNO is able to handle 3 axis G Code very well from a serial data stream and includes direct interpretation of arcs etc., &lt;/p&gt;&lt;p&gt;Upgrade to an ATMEGA and it can handle 4 or more axis (Mainly due to more IO pins but the RM and FLASH increase helps too of course.)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What I am trying to see is what this brings to the table that a UNO connected through the serial port does not offer with an off the shelf daughter board to carry the drivers, the PI provides the master control in both cases. the HAT/Serially connected board interprets the G Code or other format commands. So far all i&amp;#39;m seeing is an equivilent to an OctoPI with something like an UNO with a driver board., just with a different MPU and not embedded driver support ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I actually dont have an issue with using separate drivers by the way, it adds more flexibility to the solution. my references are for comparison only.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2880&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Pulse Train Hat for the Raspberry Pi</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pulse-train-hat-for-the-raspberry-pi</link><pubDate>Sat, 22 Apr 2017 17:44:47 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9923736d-7aaa-407f-ac44-ba184936e00c</guid><dc:creator>dougw</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;Some H-bridge drivers for DC motors require a direction signal and a PWM pulse train. Could this card drive such H-bridges?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2880&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Pulse Train Hat for the Raspberry Pi</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pulse-train-hat-for-the-raspberry-pi</link><pubDate>Fri, 14 Apr 2017 17:32:06 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9923736d-7aaa-407f-ac44-ba184936e00c</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Interesting board.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I will keep it in mind for future projects.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2880&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>