I need to control 4 DC brushless motors. I have no experience with arduino or coding. After some research the cleanest setup seems to be using the Adafruit motor shield, however the motors I'm using have 5 wires. Can I still make this work? I envision the motors being connected to the shield via the negative and positive power wires, but what do I do with the rest? Links are below. Thank you in advance.

Link to Motor Shield: https://www.adafruit.com/product/1438

Link to motor: https://www.aliexpress.com/item/CHIHAI-MOTOR-CHR-GM25-BL2418-DC-Brushless-Motor-with-Built-In-Drive-24V-12V/32819916434.html

marked as duplicate by per1234, VE7JRO, MatsK, sempaiscuba, gre_gor Jan 16 at 23:47

This question was marked as an exact duplicate of an existing question.

  • Those motor have a "built-in drive". It has electronics inside to control the motor. You don't need the adafruit motor shield for those motors. The pwm wire is used to control the speed of the motor with a pwm signal. I think the pwm signal needs to be between 15kHz and 25kHz. That is more than the 500Hz of the analogWrite arduino function. A hall signal output gives pulses when the shaft is rotating. You can use that to measure the speed. There is also a wire to control the direction (clockwise or counterclockwise). – Jot Jan 12 at 13:06
  • I'm trying to get a set-up with the fewest amount of wires. Would it be possible to use these motors without making use of the built in drivers? – Scylly Jan 13 at 9:15
  • Not really. When you don't need to control the speed, then you can tie the pwm input to GND and power them with 12v or 24v. If two wires per motor is okay and three wires is not, then you have an other problem. – Jot Jan 13 at 15:47
  • What if I switch the motors to brushed DC? aliexpress.com/item/… – Scylly Jan 13 at 17:11

You don't need the motor shield at all. The motor you link to has its own driver built in.

According to the connection table on the page you link to:

  • Red wire to +24V
  • Green wire is for sensing the RPM - you can ignore it
  • Yellow wire is the direction select - connect to any GPIO
  • Black wire is ground - connect to 24V GND and Arduino GND.
  • Blue wire is PWM control. Connect to any PWM output on the Arduino

Note that the motor will probably spin immediately power is applied until your sketch tells it to stop by driving the PWM output LOW (or 0% duty cycle). There appears to be a 15-25kΩ (typical) pullup resistor on that pin, so adding a smaller pulldown resistor (say 1kΩ) on it should force it to be off until you turn it on.

  • Majenko, I'm sure that the 15-25k are not resistors but is the frequency for the pwm signal. I read elsewhere ( aliexpress.com/item/… ) that it can operate with a pwm frequency of 1kHz. When the pwm signal is low, the motor is on. And the motor has also a gear. – Jot Jan 12 at 18:17
  • @Jot Could be. It's hard to tell from that Chinglish spec sheet. The OP may just have to make do with having the motors spin out of control at powerup - or add extra power control so they only get power once the IO pins are set LOW. – Majenko Jan 12 at 18:54
  • I'm trying to get a set-up with the fewest amount of wires. Would it be possible to use these motors without making use of the built in drivers? – Scylly Jan 13 at 9:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.