Hello everyone.
After my relay setup started failing i started looking into alternative optiins to run my chickendoor and came across the IBT-2 H-bridge module.
Now i am desperately looking for infos on how to use it but somehow i cant find info on what needs to be connected where on an d1 mini.
Am i am actually right in the assumption that this module can be used the way i hope as a left/right/stop driver without relays?
Its all just 12 volt and 5 volt for the d1 mini is already available.
Thx for any input
You need to give more info about your setup.
What motor is used, what power source?
With IBT you mean BTS7960 driver?
Esp is 3.3V chip, so you connect 3.3V to VCC of the driver. GND to GND.
L_EN, R_EN, LPWM and RPWM to Esp gpio-pins.
You can use either just plain output components or h-bridge fan component.
Unfortunately, the H-Bridge Fan page does not help at all.
The section for the pins does not take my D1 or GPIO5 and always wants an ID of some sort but page does not explain what that could be
Error i get:
Couldn't find ID 'GPIO5'. Please check you have defined an ID with that name in your configuration
EDIT1:
Found a tutorial stating i have to define the ports as output…
So it looks like like this:
- platform: esp8266_pwm
id: motor_forward_pin
pin: GPIO0
- platform: esp8266_pwm
id: motor_reverse_pin
pin: GPIO2
fan:
- platform: hbridge
id: chickendoormotor
name: "Chicken Door Motor"
pin_a: motor_forward_pin
pin_b: motor_reverse_pin
# enable_pin: motor_enable
decay_mode: slow # slow decay mode (coasting) or fast decay (braking).
I also get a webinterface now and have a slider, on/off and a reverse selector...
But i dont have function on the motor.
I have tried the 3.3 to VCC, GND to GND, LPWM on GPIO0 and RPWM on GPIO2 and got no movement...also tried on the 5 volt to vcc but nothing...any idea?
Edit2:
Code works, but R_EN and L_EN need to be both connected to VCC as you initially mentioned.
The instructions on the fan page are very limited...and i dont really agree with them since they dont help.
Thx to you for your hint into the right direction