I’m still working on my copy stand motor drive project. For various reasons I’ve upgraded from the original -C6 to an -S3 and now to the -S3 Plus. In the end I needed more GPIO pins than either the -C6 or -S3 offered, so -S3 Plus it is. My system uses a stepper motor to drive the copy stand traveler (that holds the camera) via an acme screw. I’m using a TMC2209 stepper driver chip which has stall detection that can be used for limit-switch-less homing.
The -S3 Plus can be powered by any of the following:
-
USB-C
-
5V pin (Pin 14) via Schottky diode (anode to external 5V source, cathode to 5V pin)
-
Battery pads on the underside of the board
For this project I’m using #1 for code development, while #2 is to be used for the final device. The 5V source for this is a 24V - 5V buck converter. (The motor power is 24VDC.)
While I’m still fine tuning the code, basically everything works…as long as I power first the -S3 Plus and then the 24VDC. The net of this is that the board is running on USB-C sourced power, not the buck converter. This allows me to do development of the code and have the serial interface for testing purposes. (Once the project is done, there will be no UI other than various buttons to control the motor operation.)
The issue I’m experiencing is when attempting to only power the device from 24V. In this case, the buck converter supplies 5V to the -S3 Plus board, the red charging LED on the board light up for about 45 seconds, and then nothing else happens. Unlike when I power the board via USB-C, when powered solely by 24V (with the -S3 Plus board powered via the buck converter), device doesn’t respond to any button presses. (There is nothing in my code that should cause this to happen.)
Interestingly however, if I power the device initially with USB-C, then add the 24V power, start using the device, and then remove USB-C, the device continues to work as expected! This leads me to think that the issue may be a boot problem. Two possibilities come to mind. a) there is something funky happening with the board boot up sequence that doesn’t like being powered by 5V (I experienced a similar issue with an Arduino Nano Matter board last year, but that was a community preview board that was being sold as full production - a long an frustrating story, the fault of which lies almost entirely with Arduino). Or b) the strapping pins are being mucked with such that the board is booting in a different mode. I have my sights primarily on b) because it seems more likely (with a caveat), and honestly it is more in my control (I know wanting something to be doesn’t make it so!).
From Espressif ESP32-S3 Series Datasheet
Table 2-11. Chip Boot Mode Control
Boot Mode | GPIO0 | GPIO46 |
---|---|---|
Default Configuration | 1 (Pull-up) | 0 (Pull-down) |
SPI Boot (default) | 1 | Any Value |
Download Boot | 0 | 0 |
Invalid combination* | 0 | 1 |
*This combination triggers unexpected behavior and should be avoided.
The caveat is that nowhere have I found anywhere that GPIO0 and/or GPIO46 are exposed on the -S3 Plus board! This seems very odd to me because Seeed goes through the trouble of including a section about the strapping pins in their Getting Started wiki page. (Why do that if these pins aren’t exposed?)
I am using D0 (which is marked as GPIO1 on the same wiki page) as an output to the DIR pin on The TMC2209, which in turn has an internal pull-down resistor. So if GPIO0 is actually D0, then I might have my smoking gun that could explain the issue I’m seeing. But I’d prefer to not have to modify my board on the long shot that the Seeed wiki is wrong about which GPIO D0 actually is. (FWIW, Seeed’s KiCAD library part for the board also shows D0 as being GPIO1, and GPIO0 is not shown at all.)
Seeed also lists GPIO3 as a strapping pin, in this case for JTAG signal source. I have that pin connected to the Enable (ENN) pin of the TMC2209. Trinamic says this about this pin: “Enable not input. The power stage becomes switched off (all motor outputs floating) when this pin becomes driven to a high level.” Not sure if/how that might result in erroneously triggering the JTAG interface, but …?
If I figure out where to upload my schematic for review, I will, but as of now I’ve not found a way to do that.