Arduino Forum

Using Arduino => Motors, Mechanics, Power and CNC => Topic started by: dc740 on Aug 25, 2019, 09:37 pm

Title: [SOLVED] Controlling 28BYJ-48 (bipolar mod) with L9110S
Post by: dc740 on Aug 25, 2019, 09:37 pm
Hi,
I have this H bridge, but with two L9110S:
https://www.bananarobotics.com/shop/HG7881-(L9110)-Dual-Channel-Motor-Driver-Module

And modded some  28BYJ-48 to use them as bipolar motors.
I successfully identified the two coils by measuring the resistance between the 4 cables.

I can hear a small buzz or vibration, like when you connect a coil, but there is definitely no movement.

Wiring:
* pins 8,9,10,11 in Arduino are connected to A-IA,A-IB,B-IA,B-IB respectively.
* The A coil cables are connected to the A motor pins in the L9110S, and the same for the B coil cables.
* 9V power supply connected to the Arduino UNO.
* Took 5V from the Arduino into the L9110S

Code:
Stock, unmodified Arduino example found in Examples -> Stepper -> stepper_oneRevolution

I tried:
* changing the order of the wiring for the stepper motor
* ignoring my measured resistance in the wires and mix the wires (assuming I was wrong when detecting the two coils)
* Trying another L9110S
* Trying another 28BYJ-48
* Trying to connect L9110S to Vin instead of 5V, so providing 9V

None of those seem to work. I have searched online for the answer and saw some people is already using it, but none had to do anything special for it to work, so I really don't know what is going on with my setup.


Disconnecting the L9110S VCC does NOT change anything! I can hear the buzz and the L9110S led turn on as long as the GND pin is connected, but connecting and disconnecting VCC doesn't make any change, at all.
Title: Re: Controlling 28BYJ-48 (bipolar mod) with L9110S
Post by: dc740 on Aug 26, 2019, 12:41 am
I made it work. It works like any other bridge. The problem was that the speed was too high for this motor. I had to set it to a number lower than 17 or it would miss steps.

Code: [Select]

#include <Stepper.h>

const int stepsPerRevolution = 2047;  // 28byj-48 steps per revolution

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);


void setup() {
  myStepper.setSpeed(16); //setting a value higher than 17 will not work
}

void loop() {
    // step 1/10 of a revolution:
    myStepper.step(stepsPerRevolution/10);
    delay(2000);
}