Sensor to open door

I am lost:(

I am trying figur out how i can mange this bulid.
Going ti build a garage for my lawn mower.
i got the motor to run door, i can set the hight on so no worris.
Now to the hard one.

I need som kind of laser/IR so when the mower is breking the “line” the door will open. I will need one inside and outside.
Some saying ESPhome is the best, but havet mange to find any good IR senor or laser. i did find a good “card” soneoff SV i think will work good.

So i need a “mothercard” that can handel 2 laser/IR support 220V rely and have Reed Switch so i can have a nice look in HA:P

A little while ago I got myself a Wemos D1 Mini and HC SR04 Ultrasonic Sensor and built a distance sensor according to this page:
https://github.com/RTurala/Sonoff-Tasmota/wiki/Wemos-D1-Mini-and-HC-SR04-Ultrasonic-Sensor.

Not sure if you could hook up two sensors to one Wemos, though.

here

I don’t have a automatic lawnmower myself but my mom does, and I have noticed that it does not always go back to base in a straight line.
Keep that in mind and make the doors wider than they have to be.

You could use this with esphome : https://esphome.io/components/sensor/vl53l0x.html
It’s a “time of flight” sensor. Only one transmitter is needed, and it measures the lenght of space in front of it.

I use 2 VL53L0X in my stairs. When i walk in front of it, the ESP gets a smaller lenght than usual and you can trigger anything you want.
There are different kind of VL53L0X sensors, depending on the lenght you want to measure

is going to look lik this when its done,

a ultrasonic, may work if i have 2 of them. on inside and one outside. Dont know how to construct all the wood around it so it wont stick out from the poortch

this will work if its just “oneway”

the door is close and the lawnmover is inside, its going to work. it starting to move, the door open (delay door close 5min) now the lawnmover is out and cuting and the door is closed.

Now the battery i low so its going back to the charingdock the door opens and it can charge (5 min delay befor closing after hiting the line)

That door looks too slow for it to open if it starts moving in there.

i can adjuste the depth of the hole and the speed of the motor. so think it will work.

Its a great idee but i dont think i can use it?
or can have 2 of them utrasonic in a soneoff SV card? Inside and outside
the dream if can only use one card that can have it all. and even get Reed Switch on it

I Would go down the line the NodeMCU ESP8266

there pins handle the 5v beater which is what the utrasonic likes

then you be able have your 2 utrasonic plus a relay is it (open/close it) door plus a door sensor (open/close) Plus relay (turn light on/off)

I agree with :kiwi_fruit: here.
A Sonoff SV is just a 8266 chip with a relay.

So get a real 8266 and buy a relay separately. The price will probably be about the same but the options will be much more.

LOL never seen that one one before thanks have and idea

what do u mean by “real” 8266? and got any tip for a good relay?

I am a pretty new this ESP, so i am a bit lost, but hope i will learn alot when this is all done.

Did have a esp8266 at home, but dont rely know what to or what all parts i will ned for this

Think of the 8266 chip as an engine.
The Sonoff SV is in that reference a golf cart.
It has an engine and can do some limited things.

What I meant by real 8266 is the engine alone (soldered on a PCB).
That gives you more options in what to build.
You could make a golf cart, or you build a golf cart with lots of extra sensors and/or lights.
It’s all up to you.

The Sonoff SV is built for one purpose although you have little wiggle room it’s not as much as if you get a node mcu, wemos d1 mini or any other ESP8266 chip.

You will need a relay that can trigger on 3.3 volt and the distance sensor(s) if that is the route you want to go for triggering the 8266.

In real terms you have a distance sensor that outputs a number.
The code in the 8266 has a threshold, one past the threshold it will put 3.3 volt on one pin.
This pin is connected to the relay coil.
The other two pins on the relay will close the contact to your door thing.

Yeah sonoff you have to worry about mains voltage when using the gpio pins for stuff. With a plain 8266 (wemos etc) it is easier to wire a relay and 3v3 supply so the gpio are safe to use for other stuff. Bottom line, you want sensors and a relay, those sensors might become dangerous wired to a sonoff.

Sonoff are perfect if all you need is a relay. For anything else, I use bare esp8266 or wemos d1. Now that we aren’t in the past, esp32 is probably the better alternative in general. I just haven’t messed with those yet as I’m still burning through my hoards of esp8266 boards to avoid waste.

Looking at the application, I agree sonic sensing should be adequate. It will open if a cat walks by, but that could happen with lasers etc. Only a camera and video AI could do better.

I’m curious though, is this to prevent theft, or just for fun? My thought is a criminal would just wait for it to start mowing to make his move.

no it just for fun, and trying to get more knowledge about ESP and how it work. and bulding somthing fun.

The abolut best wholde be to make a custom PCB bord, pretty simpel just a rely, 8266 some pins for sensor. i did look at it, but it sems way to advance do make one. it wholde i rely nice cou can just take alrady existens card and put them on a pcb and dont need to make all the copar way.

1 Like

i found :this guy

He is making almost what i am looking for one card that will solve my problem, i just want to add pin for one reed switch and pin for 2 utrasonic or if i going to use the VL53L0X and its done

Haven’t seen it all yet but I just heard ESP01.
That is not what you want.
Sure it’s cheaper but it’s not worth it.

As mentioned before, get a ESP8266, solder on pins.
Then it’s just to hook everything up with dupont cables. You might have to splice the 3.3 and GND, but apart from that it’s really simple.
Then just put it in a box so that you don’t accidentally pull out wires or something.

I agree etching a pcb is a bit much for this. If you use a wemos d1 mini, and all of your sensors are on breakout boards, then all you have to do is be able to solder wires together to for some complex circuitry. Heck, most d1 minis come with pins already soldered. All of the stuff you need for this is available on premade pcb’s with compatible vcc and signals levels. Think of a wemos d1 as just an arduino with wifi for cheap… there are some fancy hard to solder projects shown online, but as long as you are not using battery power, you don’t have to go down that rabbit hole of diy pcb and micro soldering.

I made a device for my garage door opener or that does a few things. It has radar motion to turn on lights, it has a relay to open/close the door, temperature/humid/barometer, lum sensor, df player for mp3 voice prompts, beeper for non voice prompts… and there are still pins left free. The device cost probably $25 total, and nothing commercially available comes even close. Only downside is enclosures… fortunately I have a 3d printer and know how to 3d model my own, but I used to just use a drill and hot glue to great effect. Esp is a very valuable skill to learn in general, and HA is a great place to start.