user trying to connect a drv8825 to an arduino mega (wokwi doesn't have the same driver so using a substitute). how does this look: { "version": 1, "author": "ger", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-mega", "id": "mega", "top": 0, "left": 0, "attrs": {} }, { "type": "wokwi-a4988", "id": "drv1", "top": 216, "left": 513.6, "attrs": {} }, { "type": "wokwi-stepper-motor", "id": "stepper1", "top": 326.19, "left": 641.97, "rotate": 180, "attrs": { "size": "17" } }, { "type": "wokwi-gnd", "id": "gnd1", "top": 49.4, "left": 585.4, "rotate": 180, "attrs": {} }, { "type": "wokwi-vcc", "id": "vcc1", "top": 39.16, "left": 556.8, "attrs": {} } ], "connections": [ [ "stepper1:B-", "drv1:2B", "green", [ "v0" ] ], [ "drv1:2A", "stepper1:B+", "green", [ "h0" ] ], [ "drv1:1A", "stepper1:A+", "green", [ "h0" ] ], [ "drv1:1B", "stepper1:A-", "green", [ "h0" ] ], [ "mega:GND.5", "drv1:GND.1", "black", [ "v145.55", "h166.6", "v-28.8" ] ], [ "drv1:DIR", "mega:51", "green", [ "h-76.8", "v-136" ] ], [ "drv1:STEP", "mega:49", "green", [ "h-48", "v-134.4" ] ], [ "drv1:MS1", "mega:29", "green", [ "h-19.2", "v-192" ] ], [ "drv1:MS2", "mega:31", "green", [ "h-28.8", "v-182.4" ] ], [ "drv1:VMOT", "vcc1:VCC", "red", [ "h0" ] ], [ "drv1:GND.2", "gnd1:GND", "black", [ "h0" ] ], [ "drv1:ENABLE", "mega:GND.4", "black", [ "h0" ] ], [ "drv1:RESET", "drv1:SLEEP", "red", [ "h-9.6", "v9.6" ] ], [ "drv1:SLEEP", "mega:5V.2", "red", [ "h-38.4", "v-259.2" ] ] ], "dependencies": {} } Show more --- assistant For a DRV8825, using the A4988 model in Wokwi is generally fine because the STEP/DIR interface is nearly identical. Looking at your wiring: Things that look correct ✅ Stepper coils connected to 1A/1B and 2A/2B. ✅ STEP and DIR connected to Mega pins: STEP -> D49 DIR -> D51 ✅ RESET tied to SLEEP: RESET -> SLEEP ✅ SLEEP pulled high: SLEEP -> 5V ✅ ENABLE tied low (always enabled): ENABLE -> GND ✅ Logic ground connected between Mega and driver: Mega GND -> Driver GND Missing connection: VDD This is the big one. On a real A4988/DRV8825 you need: Arduino 5V -> VDD Arduino GND -> GND I don't see a connection to the driver's logic supply pin (VDD). Without that, the STEP/DIR inputs won't have power. Check whether the Wokwi A4988 part exposes a VDD pin. If it does, connect: JSON ["drv1:VDD", "mega:5V.1", "red", ["h0"]] Missing motor supply capacitor Real DRV8825 boards require a capacitor across VMOT and GND, typically: 100µF electrolytic VMOT ↔ GND Wokwi won't care, but real hardware often behaves erratically or dies without it. Microstepping pins You have: MS1 -> D29 MS2 -> D31 but MS3 is not connected. For a DRV8825: MS1 MS2 MS3 Mode L L L Full step H L L 1/2 L H L 1/4 H H L 1/8 L L H 1/16 H L H 1/32 If you're controlling microstepping from software, add: MS3 -> D33 Otherwise tie it to GND or 5V as needed. Motor voltage You've got: VMOT -> VCC component which is fine in simulation. For a real DRV8825: VMOT = 8.2V–45V Don't power the motor from the Arduino's 5V rail unless it's a very tiny motor and you've verified the current requirements. One thing I'd add DRV8825 also has a FAULT pin. It's optional, but if you want fault detection: FAULT -> Mega input pin with a pullup. Summary For a real DRV8825 I'd expect: Mega 5V -> VDD Mega GND -> GND STEP -> D49 DIR -> D51 ENABLE -> GND RESET -> SLEEP SLEEP -> 5V MS1 -> D29 MS2 -> D31 MS3 -> D33 (or fixed) VMOT -> external motor supply VMOT/GND -> 100µF capacitor Motor coils -> 1A/1B/2A/2B If you can show the code as well, I can verify that the pin assignments and stepping logic match the wiring. --- user ok, how would I add two more steppers (and two more driver boards), which pins. I think two motors would need precision to microstepping, but one would not. I also want to avoid pins used here so I can combine projects: { "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-mega", "id": "mega", "top": 10.2, "left": -3.6, "attrs": {} }, { "type": "wokwi-microsd-card", "id": "sd1", "top": 294.83, "left": -21.47, "rotate": 270, "attrs": {} }, { "type": "board-ssd1306", "id": "oled1", "top": 291.14, "left": 86.63, "attrs": { "i2cAddress": "0x3c" } }, { "type": "wokwi-pushbutton", "id": "btn1", "top": 335.4, "left": 214.2, "rotate": 90, "attrs": { "color": "green", "xray": "1" } }, { "type": "wokwi-pushbutton", "id": "btn2", "top": 335.4, "left": 339, "rotate": 90, "attrs": { "color": "green", "xray": "1" } }, { "type": "wokwi-pushbutton", "id": "btn3", "top": 335.4, "left": 271.8, "rotate": 90, "attrs": { "color": "green", "xray": "1" } } ], "connections": [ [ "mega:GND.2", "oled1:GND", "black", [ "v74.7", "h-49.45" ] ], [ "mega:3.3V", "oled1:VCC", "gold", [ "v45.9", "h-20.75" ] ], [ "sd1:VCC", "mega:5V", "red", [ "v-57.6", "h135.84" ] ], [ "sd1:GND", "mega:GND.2", "black", [ "v-38.4", "h153.71" ] ], [ "mega:52", "sd1:SCK", "orange", [ "v49.7", "h-341.79" ] ], [ "sd1:CS", "mega:53", "#8f4814", [ "v-28.8", "h355.26", "v-97.1" ] ], [ "mega:2", "sd1:CD", "green", [ "v-47.4", "h197.6", "v259.2", "h-441.6" ] ], [ "mega:50", "sd1:DO", "yellow", [ "v-8", "h-428.2" ] ], [ "mega:51", "sd1:DI", "cyan", [ "v1.6", "h26.2", "v96", "h-355.11" ] ], [ "mega:20", "oled1:SDA", "purple", [ "v-37.8", "h98", "v306.6", "h-268.87" ] ], [ "mega:21", "oled1:SCL", "gold", [ "v-28.2", "h78.9", "v287.4", "h-269.1" ] ], [ "btn1:1.r", "mega:26", "magenta", [ "v19.4", "h278.4", "v-364.8", "h-180.2" ] ], [ "btn2:1.r", "mega:26", "magenta", [ "v19.4", "h144", "v-365.85" ] ], [ "btn3:1.r", "mega:26", "magenta", [ "v19.4", "h220.8", "v-365.85" ] ], [ "mega:25", "btn3:1.l", "white", [ "v0.95", "h83.8", "v268.8", "h-134.4" ] ], [ "btn1:1.l", "mega:24", "#8f4814", [ "v-28.8", "h182.4", "v-260.15" ] ], [ "mega:23", "btn2:1.l", "#8f4814", [ "v1.1", "h93.4", "v288", "h-67.2" ] ] ], "dependencies": {} } Also, here: { "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-mega", "id": "mega", "top": 0, "left": 0, "attrs": {} }, { "type": "wokwi-potentiometer", "id": "pot1", "top": 242.1, "left": 413.8, "rotate": 180, "attrs": {} }, { "type": "wokwi-rgb-led", "id": "rgb1", "top": 234.4, "left": 193.1, "rotate": 180, "attrs": {} } ], "connections": [ [ "mega:GND.5", "pot1:GND", "black", [ "v59.15", "h89.8" ] ], [ "mega:A0", "pot1:SIG", "green", [ "v36.3", "h233.1" ] ], [ "pot1:VCC", "mega:5V.2", "red", [ "v0" ] ], [ "rgb1:COM", "mega:GND.4", "black", [ "v-23", "h147.7" ] ], [ "rgb1:B", "mega:8", "blue", [ "v-42.6", "h-209", "v-240", "h186.6" ] ], [ "rgb1:G", "mega:7", "green", [ "v-33", "h-227.9", "v-259.2", "h211.2" ] ], [ "rgb1:R", "mega:6", "red", [ "v-23.4", "h-255.4", "v-278.4", "h220.8" ] ] ], "dependencies": {} } But I only need a reasonable interface, maybe the potentiometer plus a button is enough and could be merged. Gimme a list. I want to do a schematic on KiCAD. Show more --- assistant Given everything you've shown, I'd reserve pins in a way that's easy to remember and leaves room for future expansion. Already occupied SPI / SD card 50 MISO 51 MOSI 52 SCK 53 CS I2C OLED 20 SDA 21 SCL Buttons 23 Button 1 24 Button 2 25 Button 3 26 Common button rail Potentiometer A0 RGB LED 6 Red 7 Green 8 Blue I'd move your first stepper You originally had: STEP = 49 DIR = 51 MS1 = 29 MS2 = 31 But 51 is already MOSI. While it can be shared if the SD card isn't active, I'd avoid it. Proposed Mega pinout Stepper 1 (high precision) STEP1 40 DIR1 41 MS1_1 42 MS2_1 43 MS3_1 44 Stepper 2 (high precision) STEP2 45 DIR2 46 MS1_2 47 MS2_2 48 MS3_2 49 Stepper 3 (full-step only) STEP3 30 DIR3 31 Tie: MS1 = GND MS2 = GND MS3 = GND on the board. Shared signals For all three DRV8825s: RESET -> SLEEP SLEEP -> 5V ENABLE -> GND No Arduino pins needed. Optional enable control If later you want software power-down: ENABLE1 32 ENABLE2 33 ENABLE3 34 Not required initially. Resulting usage map 6 RGB R 7 RGB G 8 RGB B 20 SDA 21 SCL 23 Button 24 Button 25 Button 26 Button common 30 STEP3 31 DIR3 40 STEP1 41 DIR1 42 MS1_1 43 MS2_1 44 MS3_1 45 STEP2 46 DIR2 47 MS1_2 48 MS2_2 49 MS3_2 50 MISO 51 MOSI 52 SCK 53 SD CS A0 Potentiometer If this is for a KiCad PCB I'd strongly consider not wiring MS1/MS2/MS3 directly to Arduino pins. Instead put a 3-pin jumper block (or DIP switch) on each driver: MS1 -> jumper MS2 -> jumper MS3 -> jumper Then: Stepper 1 fixed at 1/16 or 1/32 Stepper 2 fixed at 1/16 or 1/32 Stepper 3 fixed at full step That saves 6 Arduino pins and simplifies the firmware considerably. In most projects, microstepping mode is chosen once and never changed during operation. My KiCad version would probably be: Stepper 1: STEP 40 DIR 41 Stepper 2: STEP 45 DIR 46 Stepper 3: STEP 30 DIR 31 All microstep settings: DIP switches / jumpers which uses only 6 digital pins total for three motors and leaves the Mega with plenty of I/O for limit switches, sensors, encoders, relays, etc. later.