Control of BLDC with Raspberry Pi5

Thread Starter

HeinzKetchup

Joined Aug 25, 2025
12
Okay, I've done some more consideration and will give this one a try next week when I have the parts. I've done the following changes:
1) I've swapped the relays so that they are all the same 5V relays (Amazon Link), I'll configure them with Jumper so that it is HIGH trigger.
2) I've also added 10kOhm pull-downs on the two GPIOs that activate the 5V relays, reason being that I've read that during boot the Raspberry Pi GPIOs can float and unintentially trigger the relays.

Are the changes reasonable?

Circuit 4.png
 

be80be

Joined Jul 5, 2008
2,395
Raspberry pi 5 is not 5 volt output on gpio and can only drive 50 ma max out all IO at one time and a max of 15 out of one IO and adding a pull down on a IO is wasting your drive power
 

Thread Starter

HeinzKetchup

Joined Aug 25, 2025
12
Okay, I tried out the new circuit and tested and confirmed the relays switch ON and OFF on command and deliver the correct voltages, but still not working.

I broke my initial motor apart to have a look inside (everything is fully enclosed when you buy it) and got a bit puzzled when I saw the white writing near the JST header on the left-hand side. Can I from how it is written here, deduce what number the actual "physical" pins on the PCB are? By that I mean, if I pick the bottom JST header pin on the PCB (the pin nearest to my thumb), is that pin then either:
a) Pin 1: 24V or
b) Pin 8: ENC_A?

1757941123998.jpeg

If the answer is b) then it doesn't match up with the numbering on the injection-molded JST-Female connector, because when I connect the female connector to the header on the PCB then the 24V line ends up on the ENC_B pin! See photo below, where I have marked wires based on the markings on the JST-female connector

1757942765563.png
Note: the ENC_A and ENC_B pins are not wired up currently to my Raspberry Pi (too high output voltage on those two)

EDIT:
Nevermind definately f*cked up the wiring as I just noticed this tiny detail. Apparently there is not a numbering convention for JST-connectors, cause my female connector is opposite numbering?

1757947418966.png
 
Last edited:
Top