[Grbl_Esp32 Issue#666] Anyone have problems with GPIO33,25,26,27,14 as control switch inputs?

未分类 bolang 5个月前 (10-14) 39次浏览

Issue #666 | 状态: 已关闭 | 作者: stvcmhr | 创建时间: 2020-11-12


I have probe, door, start, hold, and reset connected to GPIO33, 25, 26, 27, 14 respectively. They are correctly called out in my machine definition file. When running, grbl shows them as all active (i.e. low). There is some signal conditioning circuitry (series 100 ohm resistor, 10K pullup, 100nf cap to ground). When I check them with a voltmeter, they are low. They aren’t connected to switches yet, so that isn’t the issue. Is there a chance that they aren’t being correctly configured as inputs?

Any help would be appreciated.

Thanks,

Steve


评论 (10)

#1 – bdring 于 2020-11-12

Do they switch states when activated?

If so, you can invert the logic in config.h

https://github.com/bdring/GrblEsp32/blob/ec5c95919f738a61399d518d21b61a324579817b/GrblEsp32/src/Config.h#L55


#2 – stvcmhr 于 2020-11-12

They do not appear to change state when I drive the pin high or low. I can drive the pin high by connecting it to 3.3v with a low resistor (220 ohm). I verify that it is high with a voltmeter. However, grbl reports it as low.

To be clear, I can drive the pin high or low, verified with a voltmeter, but grbl always reports them as low.


#3 – bdring 于 2020-11-12

Please paste your machine definition and startup text here.

https://github.com/bdring/Grbl_Esp32/wiki/Requesting-Help#boot-messages


#4 – stvcmhr 于 2020-11-12

I will post the machine definition, but I’m not sure what you mean by the startup text.

grblESP32board.h.txt

C++
#pragma once
// clang-format off

/*
SCMlargeCNC_engraver.h

Covers all V1 versions V1p0, V1p1, etc

Part of Grbl_ESP32
Pin assignments for the grblESP32board
2020-09-16 - S. C. Maher

Grbl_ESP32 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Grbl_ESP32. If not, see .
*/
#define MACHINE_NAME "grblESP32board"

#ifdef N_AXIS
#undef N_AXIS
#endif
#define N_AXIS 4

#ifdef ENABLESDCARD
#undef ENABLESDCARD
#endif

// === Special Features

// I2S (steppers & other output-only pins)

#define USEI2SOUT
#define USEI2SSTEPS

#define I2SOUTBCK GPIONUM22
#define I2SOUTWS GPIONUM13
#define I2SOUTDATA GPIONUM21

// stepper control pins

#define XSTEPPIN I2SO(0)
#define XDIRECTIONPIN I2SO(1)

#define YSTEPPIN I2SO(2)
#define YDIRECTIONPIN I2SO(3)

#define ZSTEPPIN I2SO(4)
#define ZDIRECTIONPIN I2SO(5)

#define ASTEPPIN I2SO(6)
#define ADIRECTIONPIN I2SO(7)

#define STEPPERSDISABLEPIN I2SO(8)

// axis limit switch pins

#define XLIMITPIN GPIONUM34
#define YLIMITPIN GPIONUM35
#define ZLIMITPIN GPIONUM36
#define ALIMITPIN GPIONUM39

// spindle control

//#define SPINDLETYPE SPINDLETYPE_HUANYANG // only one spindle at a time
#define SPINDLETYPE SPINDLETYPE_PWM

#define VFDRS485TXDPIN GPIONUM_17
#define VFDRS485RXDPIN GPIONUM_4
#define VFDRS485RTSPIN GPIONUM_16

#define SPINDLEOUTPUTPIN GPIONUM17
#define SPINDLEENABLEPIN GPIONUM16
#define SPINDLEDIRPIN GPIONUM4

// probe

//#define PROBEPIN GPIONUM_33

// coolant mist (probably used for dust collection)

#define COOLANTMISTPIN I2SO(9)

// discrete control inputs

//#define CONTROLSAFETYDOORPIN GPIONUM_25
//#define CONTROLRESETPIN GPIONUM14
//#define CONTROLFEEDHOLDPIN GPIONUM_27
//#define CONTROLCYCLESTARTPIN GPIONUM_26

// === Default settings
#define DEFAULTSTEPPULSEMICROSECONDS I2SOUTUSECPER_PULSE


#5 – bdring 于 2020-11-12

The boot messages. Follow the link I provided.


#6 – stvcmhr 于 2020-11-12

I will grab the boot messages as soon as I get home. I don’t have access right now.

Thanks for the timely support!

Steve


#7 – bdring 于 2020-11-12

It looks like your control inputs are commented out.

These are all well tested and simple features. It is likely there is something wrong with your circuit or wiring.


#8 – stvcmhr 于 2020-11-12

I just commented them out last night to get the rest of the system going. They were not commended out when I did the testing. I agree there must be something wrong on my end. I was just wondering if there was anything special about those pins, as they can be capacitive inputs.

I’ll do more debug on my side before I waste any more of your time.

Thanks for all the hard work,

Steve


#9 – bdring 于 2020-11-12

Some pins have some special features and restrictions. See this page.

https://github.com/bdring/Grbl_Esp32/wiki/Setting-Up-the-I-O-Pins


#10 – stvcmhr 于 2020-11-17

Well, it turns out when you accidentally swap the 100 ohm series resistor with the 100nf parallel capacitor, things don’t work so well. Damn, those 0603 parts are tiny…


原始Issue: https://github.com/bdring/Grbl_Esp32/issues/666

喜欢 (0)