Openhab 3 + D1mini/ESP8266 + L298N motor controller + 12v linear actuator

Hello All,
Does anyone have experience in connecting and controlling a 12v linear actuator through openhab?
From research I got a L298N motor controller and a ESP8266 module flashed with tasmota-lite. From many posts, I found that the ESP8266 (or D1mini) with tasmota or ESPhome need to be added to Openhab, ESP8266 connected to L298N (cannot find the GPIO pin configuration required on the net), and a 12v DC power supply powering the L298N which itself can power the ESP8266/D1mini. Then from openhab can turn +/- the ESP8266 which will then send +/- signal to the L298N which will send the current to the actuator and reverse the polarity as required.

I’m using many ESP8266 with openhab. I use MQTT Homie and on ESP GitHub - homieiot/homie-esp8266: 💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT

This not answer all your questions but a part of it.

What Linear actuator are you using?

Do you need to change the speed of the actuator?

Have you already got your components or are you researching?

More than one way to do it.

No requirement on speed, just open to full length and retract to full length should be good, if possible expand to half length could be useful also for a window

Yes I have the L298N and ESP8266 board (from some more research yesterday it seems I need the D1mini itself instead because the L298N can supply 5v only while my current ESP8266 is on 3.3v. I will order a D1mini but I think the concept should be same (pin connections)

1 Like

Ok cool

So your esp8266 or d1 mini will output 3.3v and the L298N only needs 2.3v min to be high so it should work.

Your linear actuator has built in limit switches so no need to worry about overdriving.

Now for the programming I would set it up like a blind.

https://tasmota.github.io/docs/Blinds-and-Shutters/

Okay thank you, so that would be 1 shutter config similar to this one from the guide:

That is control for a specific type of blind. It will not work for you I don’t think.

What signals are you going to be using to connect your board to your driver?

So assume you will be powering from 12v source between VCC and GND.
Connect your 5v and GND to D1mini 5v and GND
Connect your Linear actuator up to OUT1 and OUT2. Polarity dose not matter either way will do

Now you need to connect IN1 and IN2 to outputs from D1Mini.

Connect IN1 to D1
Connect IN2 to D2

Then set it up like

You can ignore using it as a shutter for now and just get it working.
Once you can get it working from the tasmota web interface then look at MQTT