Running LinuxCNC on a Raspbery Pi5 using the Byte2Bot daughter board

  • EdWorks
  • EdWorks's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
01 Dec 2025 22:05 #339613 by EdWorks
I recently struggled with getting my Raspberry Pi 5 to accept the estop input. On this forum, I asked the following question. 
I would like to know how to connect the GPIO to LinuxCNC’s E-Stop chain.
From this, I received some tips and advice that pointed me in the right direction, but no working answers. I used a YouTube video on installing LinuxCNC on a Raspberry Pi, but the advice was old and no longer valid. My assessment at this time is: If someone were to attempt what I attempted, I don't see a mechanism for them to follow in my footsteps because they would unlikely use the search term "estop" or "GPIO" to search the forum. So I would like to put together what I learned to make this happen. 
1. Not many users of this form are using Raspberry Pi computers - they have some limitations
2. The Byte2Bot hat does not create a parallel port. Rather is isolates the GPIO pins on the computer board and brings them out using a DB25 connector that is just like the parallel port on your Mesa card or computer. This allows you to use a parallel port breakout board. While a parallel port dedicates PIN2 to a dataline, with the output from a Raspberry Pi, one needs to refer to what is the GPIO line connected to that pin which is GPIO9 in this example. In your setup, you cannot refer to PIN2; you must only refer to which GPIO line it is. When someone sends you suggestions that look like  "=> hal-gpio.PIN12.out" - it won't help you. 
3. There are folks who can help you. The most valuable was the user "unkown". unknown provided this:
Below is a thread that is more or less an index for the Main RPi4/5 thread.
forum.linuxcnc.org/38-general-linuxcnc-q...l-images-only#325007
Has a section regarding GPIO and there is a working config if you follow the links.
They are there, you just have to look.
Just about everything regarding the Rpi4/5 is in this thread
forum.linuxcnc.org/9-installing-linuxcnc...official-images-only
4. The schematic offered by Byte2Bot had some notable omissions that is corrected in the Circuit3.jpg schematic from another user.
5. The eStop button should be NC (Normally Closed) - I did not correct that. The eStop button should be latching - mine is not. 
6. The *.hal file has changed significantly since the requirement of using the GPIO nomenclature
7. I have yet to control the spindle speed with the breakout board.
8. The StepConfig package in LinuxCNC is not intended for a Raspberry Pi with a hat. It is designed for a MESA board setup, which this is not. I'm not aware of a reason to use it, but it does create a *.hal and *.ini file for the machine name you select in setup.
9. If you want to search Google about eStop, do not search "Linuxcnc estop". You will fail. However, if you add the word "latch" to your query, you will have success. Don't ask. If you have a ton of experience, it may make sense. 
10.  When you submit a topic, hit the submit button and go have lunch. Nothing may happen for a while. I became impatient and hit submit again, and two instances of my topic were submitted. 11. How your question looks in the editor may not be how it looks online.12. I have more to learn.

SO
What do I have to promote the cause? If you use a Raspberry Pi 5 with a Byte2Bot parallel hat (it should be called a DB25 hat) with a parallel breakout board, you may have success with the following wiring and code.

Please Log in or Create an account to join the conversation.

Time to create page: 0.247 seconds
Powered by Kunena Forum