Working as expected.. mostly!

A project log for Vehicle Detection With D1 Mini and Magnetometer

Detect vehicles using QMC5883L and actuate swinging gate using relay to allow exit

andrewAndrew 09/08/2019 at 20:210 Comments

This build works just as I'd expect, I'm very pleased with how it turned out. I do have a couple of concerns:

1. The cat5 I've used is only plenum rated (if that). I didn't bury it in any conduit so there's a decent chance that it will degrade, ingest water, etc. We'll see if this has near-term affects on the function, in the long term it should almost certainly be laid in a conduit, time will tell.

2. The D1 Mini has a voltage divider on A0 already. It feels weird to stack the voltage dividers and my reading*15.43 was the result of some basic circuit simulation and real-world testing. In addition, the voltage sensor is not currently functioning as I'd expect. I suspect the cable on the battery terminal is loose. In hindsight I should have soldered the sensor wire onto a washer to be tight alongside the other wiring on the battery + terminal. I also didn't attach the GND to the voltage divider. I don't *think* it's necessary since the whole system is battery powered and *should* share the same ground but I'm not an electrical engineer. The D1 pulls power from the gate circuit board's +12v and GND terminals. 

3. I'm not sure how well the IP66 Sonoff box will do underground in the rock driveway long term. The PVC pipe was a last minute addition and probably the saving grace. Even still I don't know if the plexiglass cover on the junction box will eventually get cracked from pressure or have water seep in by another means.