Skip to content
Free delivery, every order. Want a bulk deal or can't find what you need? Email support@pmdway.com now!
Free delivery, every order. Want a bulk deal or can't find what you need? Email support@pmdway.com now!
ESP8266 Automobile Detection and Gate Operation

ESP8266 Automobile Detection and Gate Operation

from hackster.io

Andrew’s parents have a swinging gate at the entrance to their driveway, with a keypad outside to let guests in. The gate eventually closes automatically, but as there’s no keypad on the other side, this has to be actuated manually by a push button on the control box, or using a garage-style remote.

As an inductive sensor designed for vehicle detection costs over $150, he thought he could do things more cheaply — and smarter.

After ruling out an ultrasonic sensor because of the possibility for inaccurate readings, Andrew eventually settled on a QMC5883L magnetometer. This would theoretically change its readings if a large hunk of metal — e.g. a car — came to rest on top of it that could be used to trigger a gate response.

He then integrated this sensor with a Wemos D1 mini ESP8266 board for control, along with a relay to switch the gate. While he was at it, he added a voltage divider to sense power levels on the battery that drives the gate, though this functionality has had a few issues that appear unresolved.

Battery readings aside, the primary function of opening the gate works quite well, with the QMC5883L sensor burried under the driveway, and a reed switch used to detect if the gate is closed. With this sensor data and several programming rules to prevent false triggers — or worse slamming the gate on exiting cars — operation is now simplified.

As an extra bonus, he’s able to monitor to monitor its usage over MQTT, and he’s implemented a Raspberry Pi setup for remote updates.

Finally - to keep up to date with interesting news, offers and new products - interact with us on facebook, instagram, and twitter.

Previous article TV for Cats with Raspberry Pi

Leave a comment

Comments must be approved before appearing

* Required fields