GPIO Triggered by Unknown Program on image

Post Reply
shipmack
Posts: 4
Joined: Mon Mar 08, 2021 10:27 pm

GPIO Triggered by Unknown Program on image

Post by shipmack » Wed Mar 10, 2021 3:49 pm

I have a Raspberry CNC 2.58 board on a RaspberryPi 3B+ and running the CNC Pi image. I have a simple X-Y axis setup.

It was easy to integrate and works as I expected. I tried to use the unused GPIO pins for controlling switches and lights through a Python script. It has become obvious to me that there is something that came along with the image that is also using them.

I am finding my signals controlled by switches being triggered by something else running on the Pi. I have moved these switches around to other GPIO pins and find that no matter where I place them, the unknown program still triggers my switch inputs.

The funny thing is it only happens when I move the y-axis. I can run the x-axis all day and nothing interfere with my switch inputs. As soon as the y-axis starts, the mystery routine triggers the inputs.

I would like to know what this mystery program is and how I can stop it from interfering.

Bertus Kruger
Site Admin
Posts: 1773
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: GPIO Triggered by Unknown Program on image

Post by Bertus Kruger » Sat Mar 13, 2021 8:41 am

A mystery it is...

There is not intentional app that is connecting to them.

On a RPi 3 and up the hardware serial needed some tuning because it was connected to Bluetooth by default.

Thinking of it , we do use some of the pins connected to the Hat with Arduino to reset/program the hat. But that is only if you
use Arduino.

https://github.com/Protoneer/RPI-CNC-Co ... toreset328

shipmack
Posts: 4
Joined: Mon Mar 08, 2021 10:27 pm

Re: GPIO Triggered by Unknown Program on image

Post by shipmack » Tue Mar 16, 2021 1:18 am

Bertus, what goes into the serial tuning? Is this something that was already done on the board or something that has to be done?

Bertus Kruger
Site Admin
Posts: 1773
Joined: Wed Feb 03, 2016 10:26 pm
Location: Wellington , New Zealand
Contact:

Re: GPIO Triggered by Unknown Program on image

Post by Bertus Kruger » Tue Mar 16, 2021 6:21 pm

shipmack wrote:
Tue Mar 16, 2021 1:18 am
Bertus, what goes into the serial tuning? Is this something that was already done on the board or something that has to be done?
This is the current script to enable hardware serial on RPi 3's and up...
https://github.com/Protoneer/RPI-CNC-Co ... -Config.sh

It changes the hardware overlay disabling Bluetooth and enabling the hardware serial pins

shipmack
Posts: 4
Joined: Mon Mar 08, 2021 10:27 pm

Re: GPIO Triggered by Unknown Program on image

Post by shipmack » Tue Mar 16, 2021 10:13 pm

Yes, that was on the RPi desktop and I ran it.

Just for an exercise, I decided to redo the Raspberry PI CNC image. Downloaded a fresh copy from your CNC page and wrote it to a new 16gb card. Problem did not go away.

shipmack
Posts: 4
Joined: Mon Mar 08, 2021 10:27 pm

Re: GPIO Triggered by Unknown Program on image

Post by shipmack » Wed Mar 31, 2021 12:11 am

i found that it was interference from one of my drive controllers. I contacted the company and they were as baffled at what was happening as I was. I decided to require the inputs to be ON for 250ms before accepting the inputs. The interference from the drive was ON for something less that this.

I know it's a band-aid, but one i have to live with for now.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest