Measuring motor shield current and protecting an arduino outdoors

Hi all,

I've got a couple of questions about a project that I'm doing.

Question 1: I am driving a 12V DC geared motor with an Arduino and an Adafruit motor shield V2.3. I'm using it to raise and lower a chicken coop door. The motor stops in either of two positions on limit switches. However, in the event of it not touching either of the limit switches, (e.g. because something is preventing the door from closing fully, like a bit of straw or because in Winter, the door is frozen open or shut), the motor will keep running until it stalls. I was wondering if there was a way of providing some sort of fail-safe as well as the backup switches? Is there a way, for example, that I can monitor the motor current draw and if it exceeds a certain threshold, cut the power?

Question 2: I have an Arduino and a small circuit on a piece of veroboard, which I'm using outdoors. They are in enclosures, but I was wondering if there was some sort of lacquer I could spray on them to give them a bit of extra protection from damp?

Any advice would be appreciated

Use a high side DC current sensor (INA219...) for current monitoring.

if there was some sort of lacquer I could spray on them to give them a bit of extra protection from damp?

Conformal coatings.

Any type of polyurethane will work for you. But nothing makes it “waterproof”, only more water resistant.

Paul

If You want to awoid condensation, use a temperature controlled heater to stay above icing temperature.

Thanks for all the ideas everyone, I will look into them.